diff options
author | Lavanya Suresh <lavaks@codeaurora.org> | 2022-04-13 21:58:15 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-05-16 09:46:30 +0200 |
commit | 195b9a0fd5817d6b907663bc0de3658719aea841 (patch) | |
tree | 2de9f643a417f5f1026772c15d9da63ef0545591 /net/mac80211 | |
parent | 3d48cb74816d8468f0235ce9a867a2d7b9832693 (diff) | |
download | linux-195b9a0fd5817d6b907663bc0de3658719aea841.tar.gz linux-195b9a0fd5817d6b907663bc0de3658719aea841.tar.bz2 linux-195b9a0fd5817d6b907663bc0de3658719aea841.zip |
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 555db74d6274..bbec7d778084 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -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; } |