HE: Send the AP's OBSS PD settings to the kernel
This allows us to send the OBSS PD settings to the kernel, such that the driver can propagate them to the hardware/firmware. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
262b71eead
commit
a84bf44388
3 changed files with 39 additions and 0 deletions
|
@ -1423,6 +1423,13 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
|
||||||
params.proberesp_ies = proberesp;
|
params.proberesp_ies = proberesp;
|
||||||
params.assocresp_ies = assocresp;
|
params.assocresp_ies = assocresp;
|
||||||
params.reenable = hapd->reenable_beacon;
|
params.reenable = hapd->reenable_beacon;
|
||||||
|
#ifdef CONFIG_IEEE80211AX
|
||||||
|
params.he_spr = !!hapd->iface->conf->spr.sr_control;
|
||||||
|
params.he_spr_srg_obss_pd_min_offset =
|
||||||
|
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;
|
||||||
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
hapd->reenable_beacon = 0;
|
hapd->reenable_beacon = 0;
|
||||||
|
|
||||||
if (cmode &&
|
if (cmode &&
|
||||||
|
|
|
@ -1442,6 +1442,21 @@ struct wpa_driver_ap_params {
|
||||||
* type 11 as defined in IEEE Std 802.11-2016, 9.4.2.22.13
|
* type 11 as defined in IEEE Std 802.11-2016, 9.4.2.22.13
|
||||||
*/
|
*/
|
||||||
const struct wpabuf *civic;
|
const struct wpabuf *civic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* he_spr - Whether Spatial Reuse is enabled
|
||||||
|
*/
|
||||||
|
int he_spr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* he_spr_srg_obss_pd_min_offset - Minimum TX power offset
|
||||||
|
*/
|
||||||
|
int he_spr_srg_obss_pd_min_offset;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* he_spr_srg_obss_pd_max_offset - Maximum TX power offset
|
||||||
|
*/
|
||||||
|
int he_spr_srg_obss_pd_max_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wpa_driver_mesh_bss_params {
|
struct wpa_driver_mesh_bss_params {
|
||||||
|
|
|
@ -4282,6 +4282,23 @@ static int wpa_driver_nl80211_set_ap(void *priv,
|
||||||
nla_nest_end(msg, ftm);
|
nla_nest_end(msg, ftm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_IEEE80211AX
|
||||||
|
if (params->he_spr) {
|
||||||
|
struct nlattr *spr;
|
||||||
|
|
||||||
|
spr = nla_nest_start(msg, NL80211_ATTR_HE_OBSS_PD);
|
||||||
|
wpa_printf(MSG_DEBUG, "nl80211: he_spr=%d", params->he_spr);
|
||||||
|
|
||||||
|
if (nla_put_u8(msg, NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET,
|
||||||
|
params->he_spr_srg_obss_pd_min_offset) ||
|
||||||
|
nla_put_u8(msg, NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET,
|
||||||
|
params->he_spr_srg_obss_pd_max_offset))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
nla_nest_end(msg, spr);
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
|
|
||||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
|
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
|
||||||
|
|
Loading…
Reference in a new issue