diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 86b70d546..80d2b4a40 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -4433,6 +4433,39 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg, #endif /* CONFIG_FILS */ +#ifdef CONFIG_IEEE80211AX +static int nl80211_unsol_bcast_probe_resp(struct i802_bss *bss, + struct nl_msg *msg, + struct wpa_driver_ap_params *params) +{ + struct nlattr *attr; + + if (!bss->drv->unsol_bcast_probe_resp) { + wpa_printf(MSG_ERROR, + "nl80211: Driver does not support unsolicited broadcast Probe Response frame transmission for %s", + bss->ifname); + return -1; + } + + wpa_printf(MSG_DEBUG, + "nl80211: Unsolicited broadcast Probe Response frame interval: %u", + params->unsol_bcast_probe_resp_interval); + attr = nla_nest_start(msg, NL80211_ATTR_UNSOL_BCAST_PROBE_RESP); + if (!attr || + nla_put_u32(msg, NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT, + params->unsol_bcast_probe_resp_interval) || + (params->unsol_bcast_probe_resp_tmpl && + nla_put(msg, NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL, + params->unsol_bcast_probe_resp_tmpl_len, + params->unsol_bcast_probe_resp_tmpl))) + return -1; + + nla_nest_end(msg, attr); + return 0; +} +#endif /* CONFIG_IEEE80211AX */ + + static int wpa_driver_nl80211_set_ap(void *priv, struct wpa_driver_ap_params *params) { @@ -4709,6 +4742,10 @@ static int wpa_driver_nl80211_set_ap(void *priv, if (nla_put_flag(msg, NL80211_ATTR_TWT_RESPONDER)) goto fail; } + + if (params->unsol_bcast_probe_resp_interval && + nl80211_unsol_bcast_probe_resp(bss, msg, params) < 0) + goto fail; #endif /* CONFIG_IEEE80211AX */ #ifdef CONFIG_SAE diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h index 343403017..940d82c87 100644 --- a/src/drivers/driver_nl80211.h +++ b/src/drivers/driver_nl80211.h @@ -176,6 +176,7 @@ struct wpa_driver_nl80211_data { unsigned int no_rrm:1; unsigned int get_sta_info_vendor_cmd_avail:1; unsigned int fils_discovery:1; + unsigned int unsol_bcast_probe_resp:1; u64 vendor_scan_cookie; u64 remain_on_chan_cookie; diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 3296ce9d6..7eae0e325 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -652,6 +652,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info, if (ext_feature_isset(ext_features, len, NL80211_EXT_FEATURE_FILS_DISCOVERY)) info->drv->fils_discovery = 1; + + if (ext_feature_isset(ext_features, len, + NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP)) + info->drv->unsol_bcast_probe_resp = 1; }