Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp811291pxj; Thu, 17 Jun 2021 14:35:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMt+PWUKT8kLw04vrDxkO3fgBRPfNc1Sk2TPHqAhxBgTg4YWIOb0KPd+3xRRFKNWIevpvT X-Received: by 2002:a17:906:d1ce:: with SMTP id bs14mr7630327ejb.183.1623965717551; Thu, 17 Jun 2021 14:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623965717; cv=none; d=google.com; s=arc-20160816; b=f0e8bmdO5nh+g03Dojiv7pCTdzpgYT3H6t7t57pJhwhhKbFElyXYvpvU8ttLFuiWNL dBkFyr5qF2wSQhzMLaB14uRIB0Hu91JbkedmAb9A89Oz0JpTHQQh1tbpIQCBgwvC7MEN 9jak7WUIADgb0cUR8ZeZqlCtidxw5mP9k2gBxFUSH+AAlp96PZEC5d35xXh2GSr1N2N+ Ifgis/EAap/VSkMZ6MsBjW8MEf3CppgtXvfhQSgfcoRccFowes7eNa6GFt1Qi1aKg/5M zl/NB+WqjfToUXkni5kLTnxZqODPWsZ9txVs/q+fbI59BVKLs6laW+1YM4MKrOMDOBRw WLsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=8Ln70HbTvXJ24orfwgWYwggdUJ6kaFuncXoVJrjvDKI=; b=TKBn/gkTBP/E6PTpN40s0HHp068IpZdwpjG8WwY92PTIifDAfRaopIaO/fSMBGVDqT kiWArpT+PSW8Vzr5SIlHLU31JPEegwi2i6oitpE2ZkSnuCSR/Cp0w7V4l+KRW0KljDN5 cf2KNy2fUKukbWwa/gu7LBgyYXA5SPpycJIfjQ0dRueN53dFeX4ZAI8lgd8aa8s/XLsc nDBf44JfE6ZHX4Gb5wn/IWtpLYMFPdQtBNWYeg4Y/rLQ3+fSWDhfFPs+1x1d5KmPlgkz IUOHe8QSW2+WFDEG51hl+/S8BNDdW/sIZuyYZo6i3AIha/YENRDfIobWOrmjOqGtcN6N lBQw== 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 z14si6061002edb.332.2021.06.17.14.34.52; Thu, 17 Jun 2021 14:35:17 -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 S232734AbhFQUlX (ORCPT + 99 others); Thu, 17 Jun 2021 16:41:23 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:59612 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232573AbhFQUlW (ORCPT ); Thu, 17 Jun 2021 16:41:22 -0400 X-UUID: 3193de31d3c642adadadacdb2e7e7bb5-20210618 X-UUID: 3193de31d3c642adadadacdb2e7e7bb5-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 663607349; Fri, 18 Jun 2021 04:39:09 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 18 Jun 2021 04:39:02 +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 04:39:02 +0800 From: Ryder Lee To: Felix Fietkau CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , , Ryder Lee Subject: [PATCH v2 1/3] mac80211: check per vif offload_flags in Tx path Date: Fri, 18 Jun 2021 04:38:59 +0800 Message-ID: <177785418cf407808bf3a44760302d0647076990.1623961575.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org offload_flags has been introduced to indicate encap status of each interface. An interface can encap offload at runtime, or if it has some extra limitations it can simply override the flags, so it's more flexible to check offload_flags in Tx path. Signed-off-by: Ryder Lee --- v2: drop a TX_FRAG_LIST condition --- net/mac80211/tx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 0a4bc9e08637..db0d26d19f91 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3267,6 +3267,9 @@ static bool ieee80211_amsdu_aggregate(struct ieee80211_sub_if_data *sdata, if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) return false; + if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) + return false; + if (skb_is_gso(skb)) return false; -- 2.18.0