Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp776138pxj; Thu, 17 Jun 2021 13:40:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUKbnHwevMguEj8PJuxj1/WQ5fqHAAFOCe7wSn9gQR/W2p4J1Wor2bnvLzgdjtyvM8/DZ7 X-Received: by 2002:a17:906:dbcd:: with SMTP id yc13mr7421354ejb.267.1623962405170; Thu, 17 Jun 2021 13:40:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623962405; cv=none; d=google.com; s=arc-20160816; b=QqvlkGNFGS3KAq86M3eWF6zHqR3UFPoOMp200FKsvlT1dhEExIizx2Fn88gUSuw8WZ /743HmNv8vjbjd8rNtTZGxuYQ+gFPqp3lsSvfceEmX+LrmtdIqOzL3yEQPol++esv7Od k43Fij7MIP6Yf1yLuhTW7E2O6i1/u7GRJ/ovjA6qAjxToXfSwoDaTHIlcSbOxyGXG71u OpZSw8eLvvlDZy6TVosaqUyJP4mIRM1BLUFTg8Z5Ki1i6E3dRZA/rDpgYi4Neiz4cO3w YM173qv1PUgsSXIT3uDGTvB673qB85CkqRWX9Jso6q5f9R9cLCA7YKP/tDtLRgi52jy3 pt4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=3whl8XMmBlAuofLNtXUc8hGP9w9uqXPV0Lrfv1VUn38=; b=QkyLVNyJiZzM1k0mLBL8dtLrIvrssBOvGuf2NKHu5rrL/CChpVUMCZenb7G/wTgXXc dTKQqkLdV3aQGNpbbE0nfCkoGYcIhw5JSWybpP4jpJfLAOU1fUaAsGTWdmKxOqG7ijPe Ww5guK8a6XpsIitxn3J9bAIEmY21y1oPzC5Y3vd5S7yMUvk7c/S2pABwlKLJ13NFce4H HXJoSzfTuPToK8/TmylGxComM/bwnfcvh/KgdeWVCHZG89SwzsbDC0EOVToO9AsEOLhL wexNjKtaUwWnkcASl8Uapeg9ab/V5YLobuf1e/nCdveLEHHVmkUteLmaIMBEHhddYHTc abVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 29si75515eje.431.2021.06.17.13.39.16; Thu, 17 Jun 2021 13:40:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbhFQSzX (ORCPT + 99 others); Thu, 17 Jun 2021 14:55:23 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:43616 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231992AbhFQSzV (ORCPT ); Thu, 17 Jun 2021 14:55:21 -0400 X-UUID: e52f94d6565e44acae78ef579c2ea172-20210618 X-UUID: e52f94d6565e44acae78ef579c2ea172-20210618 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1232563317; Fri, 18 Jun 2021 02:53:09 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 18 Jun 2021 02:53:08 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 18 Jun 2021 02:53:08 +0800 From: Ryder Lee To: Felix Fietkau CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , , Ryder Lee Subject: [PATCH 3/4] mt76: connac: explicitly check vif->offload_flags Date: Fri, 18 Jun 2021 02:53:04 +0800 Message-ID: <61c1bc26142c8ed62d5d8a59d3f1d50dad89ffc0.1623955182.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com> References: <4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Check vif->offload_flags for encap offload in case of unsupported interfaces. Signed-off-by: Ryder Lee --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index b155e7b8d89d..e56713425860 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -406,10 +406,12 @@ void mt76_connac_mcu_wtbl_hdr_trans_tlv(struct sk_buff *skb, htr = (struct wtbl_hdr_trans *)tlv; htr->no_rx_trans = !test_bit(MT_WCID_FLAG_HDR_TRANS, &wcid->flags); - if (vif->type == NL80211_IFTYPE_STATION) - htr->to_ds = true; - else - htr->from_ds = true; + if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) { + if (vif->type == NL80211_IFTYPE_STATION) + htr->to_ds = true; + else + htr->from_ds = true; + } if (test_bit(MT_WCID_FLAG_4ADDR, &wcid->flags)) { htr->to_ds = true; -- 2.18.0