1 From: John Crispin <john@phrozen.org>
2 Date: Thu, 24 Feb 2022 12:54:59 +0100
3 Subject: [PATCH] mac80211: MBSSID channel switch
5 Trigger ieee80211_csa_finish() on the non-transmitting interfaces
6 when channel switch concludes on the transmitting interface.
8 Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
9 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
10 Co-developed-by: Aloka Dixit <alokad@codeaurora.org>
11 Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
12 Signed-off-by: John Crispin <john@phrozen.org>
13 Link: https://lore.kernel.org/r/6fde4d7f9fa387494f46a7aa4a584478dcda06f1.1645702516.git.lorenzo@kernel.org
14 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
17 --- a/net/mac80211/cfg.c
18 +++ b/net/mac80211/cfg.c
19 @@ -3247,9 +3247,31 @@ cfg80211_beacon_dup(struct cfg80211_beac
20 void ieee80211_csa_finish(struct ieee80211_vif *vif)
22 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
23 + struct ieee80211_local *local = sdata->local;
25 - ieee80211_queue_work(&sdata->local->hw,
26 - &sdata->csa_finalize_work);
29 + if (vif->mbssid_tx_vif == vif) {
30 + /* Trigger ieee80211_csa_finish() on the non-transmitting
31 + * interfaces when channel switch is received on
32 + * transmitting interface
34 + struct ieee80211_sub_if_data *iter;
36 + list_for_each_entry_rcu(iter, &local->interfaces, list) {
37 + if (!ieee80211_sdata_running(iter))
40 + if (iter == sdata || iter->vif.mbssid_tx_vif != vif)
43 + ieee80211_queue_work(&iter->local->hw,
44 + &iter->csa_finalize_work);
47 + ieee80211_queue_work(&local->hw, &sdata->csa_finalize_work);
51 EXPORT_SYMBOL(ieee80211_csa_finish);