Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4127344pxy; Mon, 26 Apr 2021 19:23:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyviBEJb4OhShV4YiGANq7cHNYKat26zZqZgZYaHypvdWGUp8W3dLPPpBc37uHZSTu0ELcd X-Received: by 2002:a17:90b:98:: with SMTP id bb24mr11923226pjb.206.1619490180122; Mon, 26 Apr 2021 19:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619490180; cv=none; d=google.com; s=arc-20160816; b=nr42yOYGWuA/ENBu2HSOV9CYA1mEGwuGpQIJyyYuRdkqdRGiUVwoFeK1X6/0JVMk1s NWpLwb15c2X6K2Mr/C8lloCKYv4Azf4X7kxdP36cyWHiu1GSS9u8Ulu18pUeBCbPEu26 CcmjLKCzTIgOaPbg8uf/fdm1OLTzOPzN3bjWGePRpq06yFsMuev8O2/xMpiFfl33A5Na 6Dg8KChGoW0d+ibfrCFzJdReAdhfc4+ySakPSjBAi4jlR8nVCD7k1PjQ8oXomZmUFEYp cTJJG6eTnNX25K5awMaxUXgaQoENj0+gsUP1JrH82XXz3RQQdahy6kVAXk2pWiaVH+Vq gYVA== 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=4qbeSNUwJ35pungCxpDfdgZ5HMN2BvNctduO5MP2TQw=; b=L1aQ0pdD4iXaiKrVOe8EyJ2IR2Q9GvQRzs2Tf+3+a5ZKlvHWYTJ/sLirx4Aeiw0D6E Hhg8SdClZ+k8AYEjUHGjV7oNKpaRpkf7AOuVga3OxppWy0yV057hQAn4SU7CCOJ4hkc3 364azmgJ4G4yPUgn1QmH0Z4Oez2Sh92oe47SEtOvi6feVv5XtuaVEi5rgPUpyl3h53fK joPKwtqwhSBC2MZFY7hIv7XELkkD6VKirR23TllY/LlNxCEfzRSoiZnASaXdktrlbYW0 QQODq5j45I1Ah1tY4uPuYdxjedWiDjqfHvNxKxKtseYWJDBhwX4+d7piVTAXDhrom9QC 1JEw== 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 q4si1741099pjg.144.2021.04.26.19.22.40; Mon, 26 Apr 2021 19:23:00 -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 S232159AbhD0CVN (ORCPT + 99 others); Mon, 26 Apr 2021 22:21:13 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:60216 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235991AbhD0CVM (ORCPT ); Mon, 26 Apr 2021 22:21:12 -0400 X-UUID: f0b2f4a374d745d08eb33fa9b8ff949a-20210427 X-UUID: f0b2f4a374d745d08eb33fa9b8ff949a-20210427 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1086792884; Tue, 27 Apr 2021 10:20:27 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 27 Apr 2021 10:20:19 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 27 Apr 2021 10:20:19 +0800 From: Ryder Lee To: Felix Fietkau CC: Johannes Berg , Lorenzo Bianconi , Shayne Chen , , , "Ryder Lee" Subject: [PATCH] mac80211: minstrel_ht: fix minstrel_aggr_check for encap offload Date: Tue, 27 Apr 2021 10:20:17 +0800 Message-ID: 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 Avoid checking ieee80211_hdr to support encap offload. Signed-off-by: Ryder Lee --- net/mac80211/rc80211_minstrel_ht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index ecad9b10984f..02a6648aba54 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1180,20 +1180,19 @@ minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary) static void minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb) { - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 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 (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