diff mbox series

[12/17] wifi: mt76: mt7925: Update mt7925_unassign_vif_chanctx for per-link BSS

Message ID 20241211011926.5002-12-sean.wang@kernel.org (mailing list archive)
State New
Headers show
Series [01/17] wifi: mt76: connac: Extend mt76_connac_mcu_uni_add_dev for MLO | expand

Commit Message

Sean Wang Dec. 11, 2024, 1:19 a.m. UTC
From: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>

Update mt7925_unassign_vif_chanctx to support per-link BSS.

Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kernel test robot Dec. 12, 2024, 4:30 a.m. UTC | #1
Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.13-rc2 next-20241211]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/sean-wang-kernel-org/wifi-mt76-mt7925-Fix-incorrect-MLD-address-in-bss_mld_tlv-for-MLO-support/20241211-092359
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link:    https://lore.kernel.org/r/20241211011926.5002-12-sean.wang%40kernel.org
patch subject: [PATCH 12/17] wifi: mt76: mt7925: Update mt7925_unassign_vif_chanctx for per-link BSS
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20241212/202412121200.voBerw6W-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241212/202412121200.voBerw6W-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412121200.voBerw6W-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/wireless/mediatek/mt76/mt7925/main.c: In function 'mt7925_unassign_vif_chanctx':
>> drivers/net/wireless/mediatek/mt76/mt7925/main.c:2082:36: warning: variable 'pri_link_conf' set but not used [-Wunused-but-set-variable]
    2082 |         struct ieee80211_bss_conf *pri_link_conf;
         |                                    ^~~~~~~~~~~~~


vim +/pri_link_conf +2082 drivers/net/wireless/mediatek/mt76/mt7925/main.c

621e9e22b8d031 Sean Wang      2024-07-06  2073  
621e9e22b8d031 Sean Wang      2024-07-06  2074  static void mt7925_unassign_vif_chanctx(struct ieee80211_hw *hw,
621e9e22b8d031 Sean Wang      2024-07-06  2075  					struct ieee80211_vif *vif,
621e9e22b8d031 Sean Wang      2024-07-06  2076  					struct ieee80211_bss_conf *link_conf,
621e9e22b8d031 Sean Wang      2024-07-06  2077  					struct ieee80211_chanctx_conf *ctx)
621e9e22b8d031 Sean Wang      2024-07-06  2078  {
621e9e22b8d031 Sean Wang      2024-07-06  2079  	struct mt792x_chanctx *mctx = (struct mt792x_chanctx *)ctx->drv_priv;
621e9e22b8d031 Sean Wang      2024-07-06  2080  	struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
621e9e22b8d031 Sean Wang      2024-07-06  2081  	struct mt792x_dev *dev = mt792x_hw_dev(hw);
621e9e22b8d031 Sean Wang      2024-07-06 @2082  	struct ieee80211_bss_conf *pri_link_conf;
621e9e22b8d031 Sean Wang      2024-07-06  2083  	struct mt792x_bss_conf *mconf;
621e9e22b8d031 Sean Wang      2024-07-06  2084  
621e9e22b8d031 Sean Wang      2024-07-06  2085  	mutex_lock(&dev->mt76.mutex);
621e9e22b8d031 Sean Wang      2024-07-06  2086  
621e9e22b8d031 Sean Wang      2024-07-06  2087  	if (ieee80211_vif_is_mld(vif)) {
621e9e22b8d031 Sean Wang      2024-07-06  2088  		mconf = mt792x_vif_to_link(mvif, link_conf->link_id);
621e9e22b8d031 Sean Wang      2024-07-06  2089  		pri_link_conf = mt792x_vif_to_bss_conf(vif, mvif->deflink_id);
621e9e22b8d031 Sean Wang      2024-07-06  2090  
621e9e22b8d031 Sean Wang      2024-07-06  2091  		if (vif->type == NL80211_IFTYPE_STATION &&
621e9e22b8d031 Sean Wang      2024-07-06  2092  		    mconf == &mvif->bss_conf)
ef9f0dc93583f5 Ming Yen Hsieh 2024-12-10  2093  			mt7925_mcu_add_bss_info(&dev->phy, NULL, link_conf,
621e9e22b8d031 Sean Wang      2024-07-06  2094  						NULL, false);
621e9e22b8d031 Sean Wang      2024-07-06  2095  	} else {
621e9e22b8d031 Sean Wang      2024-07-06  2096  		mconf = &mvif->bss_conf;
621e9e22b8d031 Sean Wang      2024-07-06  2097  	}
621e9e22b8d031 Sean Wang      2024-07-06  2098  
621e9e22b8d031 Sean Wang      2024-07-06  2099  	mctx->bss_conf = NULL;
621e9e22b8d031 Sean Wang      2024-07-06  2100  	mconf->mt76.ctx = NULL;
621e9e22b8d031 Sean Wang      2024-07-06  2101  	mutex_unlock(&dev->mt76.mutex);
621e9e22b8d031 Sean Wang      2024-07-06  2102  }
621e9e22b8d031 Sean Wang      2024-07-06  2103
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 9e9f33b6a1bb..615d7a370923 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -2090,7 +2090,7 @@  static void mt7925_unassign_vif_chanctx(struct ieee80211_hw *hw,
 
 		if (vif->type == NL80211_IFTYPE_STATION &&
 		    mconf == &mvif->bss_conf)
-			mt7925_mcu_add_bss_info(&dev->phy, NULL, pri_link_conf,
+			mt7925_mcu_add_bss_info(&dev->phy, NULL, link_conf,
 						NULL, false);
 	} else {
 		mconf = &mvif->bss_conf;