Signed-off-by: John Crispin <john@xxxxxxxxxxx> --- src/ap/beacon.c | 3 +++ src/drivers/driver.h | 16 ++++++++++++++++ src/drivers/driver_nl80211.c | 13 +++++++++++++ 3 files changed, 32 insertions(+) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 7c5e4cd19..59e80b4ce 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -1421,6 +1421,9 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd) params.reenable = hapd->reenable_beacon; #ifdef CONFIG_IEEE80211AX params.twt_responder = hostapd_get_he_twt_responder(hapd); + 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 hapd->reenable_beacon = 0; diff --git a/src/drivers/driver.h b/src/drivers/driver.h index c6c87d8fb..10ad99a45 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1432,6 +1432,22 @@ struct wpa_driver_ap_params { * twt_responder - Whether Target Wait Time responder is enabled */ int twt_responder; + + /** + * 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 { diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index c9f39bee0..cf5ed69a9 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -4293,6 +4293,19 @@ static int wpa_driver_nl80211_set_ap(void *priv, if (nla_put_flag(msg, NL80211_ATTR_TWT_RESPONDER)) goto fail; } + + if (params->he_spr) { + struct nlattr *spr = nla_nest_start(msg, NL80211_ATTR_HE_OBSS_PD); + wpa_printf(MSG_DEBUG, "nl80211: he_spr=%d", + params->he_spr); + + if (nla_put_u32(msg, NL80211_ATTR_HE_OBSS_PD_MIN_OFFSET, params->he_spr_srg_obss_pd_min_offset)) + goto fail; + if (nla_put_u32(msg, NL80211_ATTR_HE_OBSS_PD_MAX_OFFSET, params->he_spr_srg_obss_pd_max_offset)) + goto fail; + + nla_nest_end(msg, spr); + } #endif ret = send_and_recv_msgs(drv, msg, NULL, NULL); if (ret) { -- 2.20.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap