From patchwork Tue Apr 27 02:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 428345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9C88C43460 for ; Tue, 27 Apr 2021 02:20:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7A41613AB for ; Tue, 27 Apr 2021 02:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232159AbhD0CVN (ORCPT ); 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 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;