Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1585027lkv; Wed, 19 May 2021 13:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWbwgrPFSHYPdT0QiOzoJeXijcceG+3pVTkr3p1i0B+rgfS2SDLToaGHMvkdPG+erKvbfq X-Received: by 2002:a05:6602:121a:: with SMTP id y26mr1330224iot.168.1621455812152; Wed, 19 May 2021 13:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455812; cv=none; d=google.com; s=arc-20160816; b=PD6zf+hjRT1pFl8JnilxUKCXg2V+7LqKGVn1q0sOBm/1FvmNuX8y0EZQ8rqvYWxjIC f38XmO5pXAyi+ZN+h3anun5gCJpq7kcx5zXMaA3CuSQYkJwdlMk0RkIXHDsUi7lGnhRc W3QeS60CFebbu/sG++ITCl71pZomruKBINm09FIQAVQgvUEPEY5BDKdQ1DJqqVSRo2dW 8uckoIjnSBw0VgPI3168sVor/m/cxQi6f0167NgX8W7ace1FOr4GvUZdfqcryJ56goHk ugcFvMSgLukNIf4FDFJAvOT3KRlTixpeOPL9fese+t8wUn+5vHa5O2MCi8ycc7nwetGs Ye7A== 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=CofyV8akMJgFk02fZnSn3QW0gI9BMfF8bMoHulgxUQA=; b=r/E4P0uHikMIU1Zuq04s05ZoJRGdtR/+eTCgKSrXmQvb0ZoHYtgT1v7D9iOWYaXkQE gMiLDv4uVxo9oFmXZRbyzmih4d9CnolGi6bkmBT7RpWJZS2C+zgqEq1j1p8qzJ+jT0Ff Xf/z2smFPsHbzSKQl2dGe8Mlw0JfwwmcSv6h9cawxEV8ypwoaX92eNwayEEPir5jA1AV Gf1RCaDgt8zLROfYHK2Cr1tlCIy06czLpZkLOdo0S7V/GWtu7nGFSW20qrWs4sWWAXnW rwOWiLpNpvW2gWon1/nW/o0hQJxnJ+yvu7IpXGXiv7E3+ZG9qO6KVvnVheZo+EZdzJbz iOow== 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 v6si325892jas.16.2021.05.19.13.23.19; Wed, 19 May 2021 13:23:32 -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 S232392AbhEST55 (ORCPT + 99 others); Wed, 19 May 2021 15:57:57 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:38710 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232233AbhEST55 (ORCPT ); Wed, 19 May 2021 15:57:57 -0400 X-UUID: fb981334ad6d41c1b13fd02542db989f-20210520 X-UUID: fb981334ad6d41c1b13fd02542db989f-20210520 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 1035569857; Thu, 20 May 2021 03:56:33 +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; Thu, 20 May 2021 03:56:26 +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; Thu, 20 May 2021 03:56:26 +0800 From: Ryder Lee To: Felix Fietkau , Johannes Berg CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Bo Jiao , Sujuan Chen , , , Ryder Lee Subject: [RFC PATCH 2/4] mac80211: minstrel_ht: fix minstrel_aggr_check for encap offload Date: Thu, 20 May 2021 03:56:22 +0800 Message-ID: <4e50d38c98c407825c6897a034fee3ba6366b0ad.1621453091.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: 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 | 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