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 9DC7DC64EC4 for ; Tue, 7 Mar 2023 01:12:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbjCGBMC convert rfc822-to-8bit (ORCPT ); Mon, 6 Mar 2023 20:12:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjCGBMA (ORCPT ); Mon, 6 Mar 2023 20:12:00 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9663D34F46 for ; Mon, 6 Mar 2023 17:11:57 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3271B0sL4030882, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 3271B0sL4030882 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Tue, 7 Mar 2023 09:11:00 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Tue, 7 Mar 2023 09:11:09 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 7 Mar 2023 09:11:08 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02]) by RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02%5]) with mapi id 15.01.2375.007; Tue, 7 Mar 2023 09:11:08 +0800 From: Ping-Ke Shih To: Deren Wu , Felix Fietkau , "Lorenzo Bianconi" CC: Sean Wang , Soul Huang , YN Chen , Leon Yen , "Eric-SY Chang" , KM Lin , Robin Chiu , CH Yeh , Posh Sun , Stella Chang , "Evelyn Tsai" , Ryder Lee , "Shayne Chen" , linux-wireless , linux-mediatek , Neil Chen Subject: RE: [PATCH] wifi: mt76: mt7921: use driver flags rather than mac80211 flags to mcu Thread-Topic: [PATCH] wifi: mt76: mt7921: use driver flags rather than mac80211 flags to mcu Thread-Index: AQHZTnDDuORaGrc0ok+pzt4yBeuUlK7uhgxg Date: Tue, 7 Mar 2023 01:11:08 +0000 Message-ID: <4df66aae6e6046d1ba207de47247a21b@realtek.com> References: In-Reply-To: Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Deren Wu > Sent: Saturday, March 4, 2023 4:10 PM > To: Felix Fietkau ; Lorenzo Bianconi > Cc: Sean Wang ; Soul Huang ; YN Chen > ; Leon Yen ; Eric-SY Chang ; > Deren Wu ; KM Lin ; Robin Chiu ; CH > Yeh ; Posh Sun ; Stella Chang ; > Evelyn Tsai ; Ryder Lee ; Shayne Chen > ; linux-wireless ; linux-mediatek > ; Neil Chen > Subject: [PATCH] wifi: mt76: mt7921: use driver flags rather than mac80211 flags to mcu > > From: Neil Chen > > FIF_* flags from mac80211 is not ABI. mt7921 should not pass it into mcu > directly. Remap FIF_* to driver defined flags as mcu command input. > > Fixes: c222f77fd421 ("wifi: mt76: mt7921: fix rx filter incorrect by drv/fw inconsistent") > Signed-off-by: Neil Chen Miss your s-o-b, Deren? > --- > .../net/wireless/mediatek/mt76/mt7921/main.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c > b/drivers/net/wireless/mediatek/mt76/mt7921/main.c > index 75eaf86c6a78..f67b37d38dbc 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c > @@ -703,10 +703,25 @@ static void mt7921_configure_filter(struct ieee80211_hw *hw, > unsigned int *total_flags, > u64 multicast) > { > +#define MT7921_FILTER_FCSFAIL BIT(2) > +#define MT7921_FILTER_CONTROL BIT(5) > +#define MT7921_FILTER_OTHER_BSS BIT(6) > +#define MT7921_FILTER_ENABLE BIT(31) > + > struct mt7921_dev *dev = mt7921_hw_dev(hw); > + u32 flags = MT7921_FILTER_ENABLE; > + > +#define MT7921_FILTER(_fif, _type) do { \ > + if (*total_flags & (_fif)) \ > + flags |= MT7921_FILTER_##_type; \ > + } while (0) > + > + MT7921_FILTER(FIF_FCSFAIL, FCSFAIL); > + MT7921_FILTER(FIF_CONTROL, CONTROL); > + MT7921_FILTER(FIF_OTHER_BSS, OTHER_BSS); > > mt7921_mutex_acquire(dev); > - mt7921_mcu_set_rxfilter(dev, *total_flags, 0, 0); > + mt7921_mcu_set_rxfilter(dev, flags, 0, 0); > mt7921_mutex_release(dev); > > *total_flags &= (FIF_OTHER_BSS | FIF_FCSFAIL | FIF_CONTROL); > -- > 2.18.0 > > > ------Please consider the environment before printing this e-mail.