Commit 195b9a0f authored by Lavanya Suresh's avatar Lavanya Suresh Committed by Johannes Berg

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: default avatarLavanya Suresh <lavaks@codeaurora.org>
Signed-off-by: default avatarRameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://lore.kernel.org/r/1649867295-7204-3-git-send-email-quic_ramess@quicinc.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3d48cb74
...@@ -1316,6 +1316,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, ...@@ -1316,6 +1316,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_beacon_data *params) struct cfg80211_beacon_data *params)
{ {
struct ieee80211_sub_if_data *sdata; struct ieee80211_sub_if_data *sdata;
struct ieee80211_bss_conf *bss_conf;
struct beacon_data *old; struct beacon_data *old;
int err; int err;
...@@ -1335,6 +1336,14 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, ...@@ -1335,6 +1336,14 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
err = ieee80211_assign_beacon(sdata, params, NULL, NULL); err = ieee80211_assign_beacon(sdata, params, NULL, NULL);
if (err < 0) if (err < 0)
return err; 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); ieee80211_bss_info_change_notify(sdata, err);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment