Message ID | 20210426190534.12667-5-alokad@codeaurora.org |
---|---|
State | New |
Headers | show |
Series | [v10,1/4] nl80211: multiple bssid and EMA support in AP mode | expand |
On Mon, 2021-04-26 at 12:05 -0700, Aloka Dixit wrote: > > + if (sdata->vif.mbssid.flags & IEEE80211_VIF_MBSSID_TX) { > + struct ieee80211_sub_if_data *child; > + > + wiphy_unlock(sdata->local->hw.wiphy); > + mutex_lock(&sdata->local->iflist_mtx); > + list_for_each_entry(child, &sdata->local->interfaces, list) > + if (child->vif.mbssid.parent == vif && > + ieee80211_sdata_running(child)) > + ieee80211_queue_work(&child->local->hw, > + &child->csa_finalize_work); > + mutex_unlock(&sdata->local->iflist_mtx); > + wiphy_lock(sdata->local->hw.wiphy); Same here wrt. locking, but for queueing work it shouldn't matter? johannes
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index db21e1a621b1..5ca75a23d54c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3254,8 +3254,21 @@ void ieee80211_csa_finish(struct ieee80211_vif *vif) { struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); - ieee80211_queue_work(&sdata->local->hw, - &sdata->csa_finalize_work); + if (sdata->vif.mbssid.flags & IEEE80211_VIF_MBSSID_TX) { + struct ieee80211_sub_if_data *child; + + wiphy_unlock(sdata->local->hw.wiphy); + mutex_lock(&sdata->local->iflist_mtx); + list_for_each_entry(child, &sdata->local->interfaces, list) + if (child->vif.mbssid.parent == vif && + ieee80211_sdata_running(child)) + ieee80211_queue_work(&child->local->hw, + &child->csa_finalize_work); + mutex_unlock(&sdata->local->iflist_mtx); + wiphy_lock(sdata->local->hw.wiphy); + } + + ieee80211_queue_work(&sdata->local->hw, &sdata->csa_finalize_work); } EXPORT_SYMBOL(ieee80211_csa_finish);