Skip to content

Commit db1d0b6

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: mac80211: correctly check if CSA is active
We are not adding an interface if an existing one is doing CSA. But the check won't work for MLO station interfaces, since for those, vif->bss_conf is zeroed out. Fix this by checking if any link of the vif has an active CSA. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260111191912.7ceff62fc561.Ia38d27f42684d1cfd82d930d232bd5dea6ab9282@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a3034bf commit db1d0b6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

net/mac80211/iface.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
350350
/* we hold the RTNL here so can safely walk the list */
351351
list_for_each_entry(nsdata, &local->interfaces, list) {
352352
if (nsdata != sdata && ieee80211_sdata_running(nsdata)) {
353+
struct ieee80211_link_data *link;
354+
353355
/*
354356
* Only OCB and monitor mode may coexist
355357
*/
@@ -376,8 +378,10 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
376378
* will not add another interface while any channel
377379
* switch is active.
378380
*/
379-
if (nsdata->vif.bss_conf.csa_active)
380-
return -EBUSY;
381+
for_each_link_data(nsdata, link) {
382+
if (link->conf->csa_active)
383+
return -EBUSY;
384+
}
381385

382386
/*
383387
* The remaining checks are only performed for interfaces

0 commit comments

Comments
 (0)