This patch adds hostapd configuration options for unsolicited broadcast probe response transmission for in-band discovery in 6GHz. Maximum allowed packet interval is 20 TUs (IEEE P802.11ax/D6.0 26.17.2.3.2, AP behavior for fast passive scanning). Setting value to 0 disables the transmission. Signed-off-by: Aloka Dixit <alokad@xxxxxxxxxxxxxx> --- hostapd/config_file.c | 4 ++++ hostapd/hostapd.conf | 6 ++++++ src/ap/ap_config.h | 2 ++ src/ap/beacon.c | 21 +++++++++++++++++++++ src/drivers/driver.h | 15 +++++++++++++++ 5 files changed, 48 insertions(+) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 8f7fcd8b762c..d7bbb7141efc 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3549,6 +3549,10 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->he_oper_centr_freq_seg0_idx = atoi(pos); } else if (os_strcmp(buf, "he_oper_centr_freq_seg1_idx") == 0) { conf->he_oper_centr_freq_seg1_idx = atoi(pos); + } else if (os_strcmp(buf, + "unsol_bcast_probe_resp_interval") == 0) { + bss->unsol_bcast_probe_resp_interval = + (atoi(pos) > 20) ? 20 : atoi(pos); #endif /* CONFIG_IEEE80211AX */ } else if (os_strcmp(buf, "max_listen_interval") == 0) { bss->max_listen_interval = atoi(pos); diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 2b0f762e544e..480c7dc7a469 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -867,6 +867,12 @@ wmm_ac_vo_acm=0 #he_spr_srg_obss_pd_min_offset #he_spr_srg_obss_pd_max_offset +# Unsolicited broadcast probe response transmission settings, 6GHz only. +# If interval is set to non-zero, the AP schedules unsolicited +# broadcast probe response frames for in-band discovery. Refer to +# IEEE P802.11ax/D6.0 26.17.2.3.2, AP behavior for fast passive scanning. +#unsol_bcast_probe_resp_interval=0(default) to 20 TUs. + ##### IEEE 802.1X-2004 related configuration ################################## # Require IEEE 802.1X authorization diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index b705c378fe28..74584159a6a6 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -860,6 +860,8 @@ struct hostapd_bss_config { */ u8 mka_psk_set; #endif /* CONFIG_MACSEC */ + + u32 unsol_bcast_probe_resp_interval; }; /** diff --git a/src/ap/beacon.c b/src/ap/beacon.c index b3b33b7faf1d..071b753367e9 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -1123,6 +1123,21 @@ void sta_track_del(struct hostapd_sta_info *info) os_free(info); } +#ifdef CONFIG_IEEE80211AX +/* Unsolicited broadcast probe response transmission, 6GHz only */ +static u8 *hostapd_unsol_bcast_probe_resp(struct hostapd_data *hapd, + struct wpa_driver_ap_params *params) +{ + if (!is_6ghz_op_class(hapd->iconf->op_class)) + return NULL; + + params->unsol_bcast_probe_resp_interval = + hapd->conf->unsol_bcast_probe_resp_interval; + + return hostapd_gen_probe_resp(hapd, NULL, 0, + ¶ms->unsol_bcast_probe_resp_tmpl_len); +} +#endif /* CONFIG_IEEE80211AX */ int ieee802_11_build_ap_params(struct hostapd_data *hapd, struct wpa_driver_ap_params *params) @@ -1461,6 +1476,10 @@ void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params) params->head = NULL; os_free(params->proberesp); params->proberesp = NULL; +#ifdef CONFIG_IEEE80211AX + os_free(params->unsol_bcast_probe_resp_tmpl); + params->unsol_bcast_probe_resp_tmpl = NULL; +#endif /* CONFIG_IEEE80211AX */ } @@ -1505,6 +1524,8 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd) params.he_bss_color = hapd->iface->conf->he_op.he_bss_color; params.twt_responder = hostapd_get_he_twt_responder(hapd, IEEE80211_MODE_AP); + params.unsol_bcast_probe_resp_tmpl = + hostapd_unsol_bcast_probe_resp(hapd, ¶ms); #endif /* CONFIG_IEEE80211AX */ hapd->reenable_beacon = 0; diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 0ecda49dd1df..d36984488127 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1508,6 +1508,21 @@ struct wpa_driver_ap_params { * twt_responder - Whether Target Wait Time responder is enabled */ int twt_responder; + + /** + * Unsolicited broadcast probe response interval + */ + u32 unsol_bcast_probe_resp_interval; + + /** + * Unsolicited broadcast probe response template data + */ + u8 *unsol_bcast_probe_resp_tmpl; + + /** + * Unsolicited broadcast probe response template length + */ + size_t unsol_bcast_probe_resp_tmpl_len; }; struct wpa_driver_mesh_bss_params { -- 2.25.0 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap