Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Miri Korenblit and committed by
Johannes Berg
db1d0b6a a3034bf0

+6 -2
+6 -2
net/mac80211/iface.c
··· 350 350 /* we hold the RTNL here so can safely walk the list */ 351 351 list_for_each_entry(nsdata, &local->interfaces, list) { 352 352 if (nsdata != sdata && ieee80211_sdata_running(nsdata)) { 353 + struct ieee80211_link_data *link; 354 + 353 355 /* 354 356 * Only OCB and monitor mode may coexist 355 357 */ ··· 378 376 * will not add another interface while any channel 379 377 * switch is active. 380 378 */ 381 - if (nsdata->vif.bss_conf.csa_active) 382 - return -EBUSY; 379 + for_each_link_data(nsdata, link) { 380 + if (link->conf->csa_active) 381 + return -EBUSY; 382 + } 383 383 384 384 /* 385 385 * The remaining checks are only performed for interfaces