HE: Propagate BSS color settings to nl80211

Add the code required to send the BSS color settings to the kernel.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin 2020-02-04 09:04:55 +01:00 committed by Jouni Malinen
parent 8155b36fae
commit 0b0ee0f15e
3 changed files with 35 additions and 0 deletions

View file

@ -1421,6 +1421,11 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
hapd->iface->conf->spr.srg_obss_pd_min_offset;
params.he_spr_srg_obss_pd_max_offset =
hapd->iface->conf->spr.srg_obss_pd_max_offset;
params.he_bss_color_disabled =
hapd->iface->conf->he_op.he_bss_color_disabled;
params.he_bss_color_partial =
hapd->iface->conf->he_op.he_bss_color_partial;
params.he_bss_color = hapd->iface->conf->he_op.he_bss_color;
params.twt_responder = hostapd_get_he_twt_responder(hapd,
IEEE80211_MODE_AP);
#endif /* CONFIG_IEEE80211AX */

View file

@ -1481,6 +1481,21 @@ struct wpa_driver_ap_params {
*/
int he_spr_srg_obss_pd_max_offset;
/**
* he_bss_color - Whether the BSS Color is disabled
*/
int he_bss_color_disabled;
/**
* he_bss_color_partial - The BSS Color AID equation
*/
int he_bss_color_partial;
/**
* he_bss_color - The BSS Color of the AP
*/
int he_bss_color;
/**
* twt_responder - Whether Target Wait Time responder is enabled
*/

View file

@ -4362,6 +4362,21 @@ static int wpa_driver_nl80211_set_ap(void *priv,
nla_nest_end(msg, spr);
}
if (params->freq && params->freq->he_enabled) {
struct nlattr *bss_color;
bss_color = nla_nest_start(msg, NL80211_ATTR_HE_BSS_COLOR);
if (!bss_color ||
(params->he_bss_color_disabled &&
nla_put_flag(msg, NL80211_HE_BSS_COLOR_ATTR_DISABLED)) ||
(params->he_bss_color_partial &&
nla_put_flag(msg, NL80211_HE_BSS_COLOR_ATTR_PARTIAL)) ||
nla_put_u8(msg, NL80211_HE_BSS_COLOR_ATTR_COLOR,
params->he_bss_color))
goto fail;
nla_nest_end(msg, bss_color);
}
if (params->twt_responder) {
wpa_printf(MSG_DEBUG, "nl80211: twt_responder=%d",
params->twt_responder);