BACKPORT: nl80211: add handling for BSS color

This patch adds the attributes, policy and parsing code to allow userland
to send the info about the BSS coloring settings to the kernel.

Bug: 154782456
Signed-off-by: John Crispin <john@phrozen.org>
Link: https://lore.kernel.org/r/20191217141921.8114-1-john@phrozen.org
[johannes: remove the strict policy parsing, that was a misunderstanding]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: Ib24133d6825ef455819f697de6d9d67c856c315e
(cherry picked from commit 5c5e52d1bb962510fecdc1ebecdde89694d1b223)
Signed-off-by: Vamsi Krishna <vamsin@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
John Crispin 2019-12-17 15:19:18 +01:00 • committed by Greg Kroah-Hartman
commit 92a63a3d99
3 changed files with 81 additions and 0 deletions

View file

@ -2392,6 +2392,8 @@ enum nl80211_commands {
* @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key
* (u16).
*
* @NL80211_ATTR_HE_BSS_COLOR: nested attribute for BSS Color Settings.
*
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@ -2856,6 +2858,8 @@ enum nl80211_attrs {
NL80211_ATTR_VLAN_ID,
NL80211_ATTR_HE_BSS_COLOR,
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@ -6574,5 +6578,27 @@ enum nl80211_obss_pd_attributes {
NL80211_HE_OBSS_PD_ATTR_MAX = __NL80211_HE_OBSS_PD_ATTR_LAST - 1,
};
/**
* enum nl80211_bss_color_attributes - BSS Color attributes
* @__NL80211_HE_BSS_COLOR_ATTR_INVALID: Invalid
*
* @NL80211_HE_BSS_COLOR_ATTR_COLOR: the current BSS Color.
* @NL80211_HE_BSS_COLOR_ATTR_DISABLED: is BSS coloring disabled.
* @NL80211_HE_BSS_COLOR_ATTR_PARTIAL: the AID equation to be used..
*
* @__NL80211_HE_BSS_COLOR_ATTR_LAST: Internal
* @NL80211_HE_BSS_COLOR_ATTR_MAX: highest BSS Color attribute.
*/
enum nl80211_bss_color_attributes {
__NL80211_HE_BSS_COLOR_ATTR_INVALID,
NL80211_HE_BSS_COLOR_ATTR_COLOR,
NL80211_HE_BSS_COLOR_ATTR_DISABLED,
NL80211_HE_BSS_COLOR_ATTR_PARTIAL,
/* keep last */
__NL80211_HE_BSS_COLOR_ATTR_LAST,
NL80211_HE_BSS_COLOR_ATTR_MAX = __NL80211_HE_BSS_COLOR_ATTR_LAST - 1,
};
#endif /* __LINUX_NL80211_H */