Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp129615pxj; Thu, 27 May 2021 23:31:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1/LirnVg1rCQGy9D4iVysd3mHylBs/SFxE+3zIMM7Lmlts5giapMi/lkb8FU6dr0CbRLE X-Received: by 2002:a17:907:76e8:: with SMTP id kg8mr7143711ejc.130.1622183487129; Thu, 27 May 2021 23:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622183487; cv=none; d=google.com; s=arc-20160816; b=vSoWJF7mloRRNn9vpH3cVOdkzPkvLStncadWdr5jubhC6ZzVOk9+tvypTlO06yRk4n j/YaQ0yUQixE7r+CyYuKgIL88/PYhyxxtqKrdO3KbxTSC6l+hO6j+l8EdYC9SBoWb7Ic +SjMa7qw2UHEv5yRTgTsfhGSKwQ0G62wL/aZV6XapDsndRz02y6SCBTdngfVSN5K68D3 67VA2D8K9iffkTcugL27a3sxsM1I5kQQyEiJKzE8qa7Wr0QCgTcROsVWLPIrrJCmPY+w V2yhsc1CUsGMRKKIPv+dQfbyUzhrDkFwh6Qhee4TrYrZ0OitBK9hEhtcBZl1yH33PsBN xMJA== 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=xQhnNs16CYUAMbtJy8piyiUEPjV93u+DIJIZ1sDE4+Q=; b=HnSzdBw73aW5gbiO3xRTF40DYj0IVn3yZhW0xMQAF/BmOM1FJmklE2RdRdYlC8HoFG wlZipjV+F81G+aJ9MWPkfzvoQQJQbQKc+Ft1TJI3U2WLiXlrd6gsKyM6PD5ghfV2BNE6 pXaThGnbFC3Gkt11MUyfC87s9gnKPhMpsCmPdNGAR0r22hSS4sf2SAj10D+O9tJwgv9+ 3QxsSRbt8mDP8+CnZcBPZNqkYmqHmq+x4iix+UhR+mwHZwfUj8O56mYCA11AwQR7f5DK W6nueyLreid0B+1VgNMxNGxt5usOgQ8PEzDMlksajSE41Ivqtju1RCYpmnkZddSnh2+r gxeA== 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 j23si576323eje.719.2021.05.27.23.31.03; Thu, 27 May 2021 23:31:27 -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 S235526AbhE1GLr (ORCPT + 99 others); Fri, 28 May 2021 02:11:47 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:42948 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235513AbhE1GLl (ORCPT ); Fri, 28 May 2021 02:11:41 -0400 X-UUID: 342094424fcf4655accfbcec0262e0ff-20210528 X-UUID: 342094424fcf4655accfbcec0262e0ff-20210528 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 1013117767; Fri, 28 May 2021 14:09:37 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 28 May 2021 14:09:35 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 28 May 2021 14:09:35 +0800 From: Ryder Lee To: Felix Fietkau , Johannes Berg CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Bo Jiao , Sujuan Chen , , , Ryder Lee Subject: [PATCH v2 2/4] mac80211: minstrel_ht: fix minstrel_aggr_check for encap offload Date: Fri, 28 May 2021 14:05:42 +0800 Message-ID: <2b98f1d3f6fb9f2beb6d3458af3f0c25e863c191.1622164961.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <2176023d8f13d82d093452e1c105609396c30622.1622164961.git.ryder.lee@mediatek.com> References: <2176023d8f13d82d093452e1c105609396c30622.1622164961.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 Avoid checking ieee80211_hdr to support encap offload. Signed-off-by: Ryder Lee --- change since v2 - none --- net/mac80211/rc80211_minstrel_ht.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 6487b05da6fa..55ff93c803ac 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1179,19 +1179,24 @@ static void minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct sta_info *sta = container_of(pubsta, struct sta_info, sta); u16 tid; if (skb_get_queue_mapping(skb) == IEEE80211_AC_VO) return; - if (unlikely(!ieee80211_is_data_qos(hdr->frame_control))) + if (unlikely(!pubsta->wme)) + return; + + if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && + unlikely(!ieee80211_is_data_qos(hdr->frame_control))) return; if (unlikely(skb->protocol == cpu_to_be16(ETH_P_PAE))) return; - tid = ieee80211_get_tid(hdr); + tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK; if (likely(sta->ampdu_mlme.tid_tx[tid])) return; -- 2.18.0