mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
mac80211: disable BSS color collision detection in case of no free colors
AP may run out of BSS color after color collision detection event from driver. Disable BSS color collision detection if no free colors are available based on bss color disabled bit sent as a part of NL80211_ATTR_HE_BSS_COLOR attribute sent in NL80211_CMD_SET_BEACON. It can be reenabled once new color is available. Signed-off-by: Lavanya Suresh <lavaks@codeaurora.org> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> Link: https://lore.kernel.org/r/1649867295-7204-3-git-send-email-quic_ramess@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
3d48cb7481
commit
195b9a0fd5
@ -1316,6 +1316,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_beacon_data *params)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
struct ieee80211_bss_conf *bss_conf;
|
||||
struct beacon_data *old;
|
||||
int err;
|
||||
|
||||
@ -1335,6 +1336,14 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
err = ieee80211_assign_beacon(sdata, params, NULL, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
bss_conf = &sdata->vif.bss_conf;
|
||||
if (params->he_bss_color_valid &&
|
||||
params->he_bss_color.enabled != bss_conf->he_bss_color.enabled) {
|
||||
bss_conf->he_bss_color.enabled = params->he_bss_color.enabled;
|
||||
err |= BSS_CHANGED_HE_BSS_COLOR;
|
||||
}
|
||||
|
||||
ieee80211_bss_info_change_notify(sdata, err);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user