Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EEE7C433EF for ; Thu, 2 Dec 2021 08:37:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240924AbhLBIk5 (ORCPT ); Thu, 2 Dec 2021 03:40:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbhLBIk4 (ORCPT ); Thu, 2 Dec 2021 03:40:56 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43209C061574 for ; Thu, 2 Dec 2021 00:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dfEngekXwUdQAcrvymPijoi6y9Y5D/celdT9ynCyXWQ=; b=euEyv+SchF4ZYsSi7zNTQ8wgzW Cy34fmrolkk1viXGH4KVpnBdUibpEmFa/q2tYzCY/RzGX3QRqi5m6C7kT/nWXPTI14sYkCsotIbhv jy9CPyr9G2/TQn6rq/LVeRhfP9ueydMuubC+qZ6PLO0oanqxCUT1rjFJxbUFASXlx4c0=; Received: from p54ae943f.dip0.t-ipconnect.de ([84.174.148.63] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1mshao-0008K4-5Q; Thu, 02 Dec 2021 09:37:26 +0100 Message-ID: <4994484d-a053-a870-65e6-6461979ef74f@nbd.name> Date: Thu, 2 Dec 2021 09:37:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH] mt76: fix 802.3 RX fail by hdr_trans Content-Language: en-US To: Deren Wu , Lorenzo Bianconi Cc: Sean Wang , Soul Huang , YN Chen , Leon Yen , Eric-SY Chang , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Eric Liang , Stella Chang , Evelyn Tsai , Ryder Lee , Shayne Chen , linux-wireless , linux-mediatek References: <0b88b34cc5103e247c134901f9c39614128eb599.1638424783.git.deren.wu@mediatek.com> From: Felix Fietkau In-Reply-To: <0b88b34cc5103e247c134901f9c39614128eb599.1638424783.git.deren.wu@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-12-02 08:40, Deren Wu wrote: > From: Deren Wu > > Should not run hdr_trans process for 802.3 packets, > this would cause all data frame RX fail. > > Fixes: d9930ec65b9f ("mt76: only set rx radiotap flag from within decoder functions") > Reviewed-by: Ryder Lee > Signed-off-by: Deren Wu > --- > drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +- > drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c > index 6c14cb1cfd5a..5757284b24a5 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c > @@ -794,7 +794,7 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb) > status->flag |= RX_FLAG_8023; > } > > - if (rxv && mode >= MT_PHY_TYPE_HE_SU) > + if (rxv && mode >= MT_PHY_TYPE_HE_SU && !(status->flag & RX_FLAG_8023)) > mt7915_mac_decode_he_radiotap(skb, rxv, mode); > > if (!status->wcid || !ieee80211_is_data_qos(fc)) > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c > index e17c8f4c9747..eaffe665cb28 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c > @@ -780,7 +780,6 @@ mt7921_mac_fill_rx(struct mt7921_dev *dev, struct sk_buff *skb) > mt76_insert_ccmp_hdr(skb, key_id); > } > > - hdr = mt76_skb_get_hdr(skb); This line is not safe to remove, since mt76_insert_ccmp_hdr moves the header. However, there is a redundant call to mt76_skb_get_hdr above this part, which you can remove. Please do that in a separate patch though, since it has nothing to do with the rest of the changes. Thanks, - Felix