mac80211: notify non-transmitting BSS of color changes
Subsystems (2)
PATCH 1/1 mac80211: notify non-transmitting BSS of color changes
When a transmitting multiple bssid BSS changes its bss color, we need to also notify the non transmitting BSSs of the new bss color.
This patch depends on the multiple bssid and bss coloring series.
Signed-off-by John Crispin <[email protected]>
--- net/mac80211/cfg.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-)
net/mac80211/cfg.c +30 -12
@@ -4182,6 +4182,32 @@ static int ieee80211_set_color_change_beacon(struct ieee80211_sub_if_data *sdatareturn 0 ; } +static void ieee80211_color_change_bss_config_notify (struct ieee80211_sub_if_data *sdata, +u8 color,int enable,u32 changed) +{ + sdata->vif.bss_conf.he_bss_color.color = color; + sdata->vif.bss_conf.he_bss_color.enabled = enable; + changed |=BSS_CHANGED_HE_BSS_COLOR ; + +ieee80211_bss_info_change_notify (sdata, changed); + +if (ieee80211_hw_check (&sdata->local->hw,SUPPORTS_MULTI_BSSID_AP ) && + !sdata->vif.multiple_bssid.non_transmitted) { +struct ieee80211_vif *child; + +list_for_each_entry (child, &sdata->vif.multiple_bssid.list, + multiple_bssid.list) { +struct ieee80211_sub_if_data *child_sdata =vif_to_sdata (child); + +sdata_lock (child_sdata); + child->bss_conf.he_bss_color.color = color; + child->bss_conf.he_bss_color.enabled = enable; +ieee80211_bss_info_change_notify (child_sdata,BSS_CHANGED_HE_BSS_COLOR ); +sdata_unlock (child_sdata); + } + } +} +static int ieee80211_color_change_finalize (struct ieee80211_sub_if_data *sdata) {struct ieee80211_local *local = sdata->local;
@@ -4199,12 +4225,7 @@ static int ieee80211_color_change_finalize(struct ieee80211_sub_if_data *sdata)return err; } - sdata->vif.bss_conf.he_bss_color.color = sdata->vif.color_change_color; - sdata->vif.bss_conf.he_bss_color.enabled =1 ; - changed |=BSS_CHANGED_HE_BSS_COLOR ; - -ieee80211_bss_info_change_notify (sdata, changed); - +ieee80211_color_change_bss_config_notify (sdata, sdata->vif.color_change_color,1 ,0 );cfg80211_color_change_notify (sdata->dev);return 0 ;
@@ -4283,14 +4304,11 @@ __ieee80211_color_change(struct wiphy *wiphy, struct net_device *dev,cfg80211_color_change_started_notify (sdata->dev, params->count); -if (changed) { - sdata->vif.bss_conf.he_bss_color.enabled =0 ; - changed |=BSS_CHANGED_HE_BSS_COLOR ; -ieee80211_bss_info_change_notify (sdata, changed); - }else { +if (changed) +ieee80211_color_change_bss_config_notify (sdata,0 ,0 , changed); +else /* if the beacon didn't change, we can finalize immediately */ ieee80211_color_change_finalize (sdata); - }return 0 ; }
Signature · 7 lines
2.25.1 -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Johannes Berg
maintainerQuoted 4 lines · John Crispin
When a transmitting multiple bssid BSS changes its bss color, we need to also notify the non transmitting BSSs of the new bss color.
This patch depends on the multiple bssid and bss coloring series.
It's probably the second or third time I've tried applying this ... please resend it with the prerequisites.
johannes