nl80211: Unsolicited broadcast Probe Response configuration

Unsolicited broadcast Probe Response transmission is used for in-band
discovery in the 6 GHz band (IEEE P802.11ax/D8.0 26.17.2.3.2, AP
behavior for fast passive scanning). Add support for configuring the
parameters for such frames.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
This commit is contained in:
Aloka Dixit 2020-09-11 02:45:47 +00:00 committed by Jouni Malinen
parent 024b4b2a29
commit cfc45a98d2
3 changed files with 42 additions and 0 deletions

View file

@ -4433,6 +4433,39 @@ static int nl80211_fils_discovery(struct i802_bss *bss, struct nl_msg *msg,
#endif /* CONFIG_FILS */ #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, static int wpa_driver_nl80211_set_ap(void *priv,
struct wpa_driver_ap_params *params) 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)) if (nla_put_flag(msg, NL80211_ATTR_TWT_RESPONDER))
goto fail; goto fail;
} }
if (params->unsol_bcast_probe_resp_interval &&
nl80211_unsol_bcast_probe_resp(bss, msg, params) < 0)
goto fail;
#endif /* CONFIG_IEEE80211AX */ #endif /* CONFIG_IEEE80211AX */
#ifdef CONFIG_SAE #ifdef CONFIG_SAE

View file

@ -176,6 +176,7 @@ struct wpa_driver_nl80211_data {
unsigned int no_rrm:1; unsigned int no_rrm:1;
unsigned int get_sta_info_vendor_cmd_avail:1; unsigned int get_sta_info_vendor_cmd_avail:1;
unsigned int fils_discovery:1; unsigned int fils_discovery:1;
unsigned int unsol_bcast_probe_resp:1;
u64 vendor_scan_cookie; u64 vendor_scan_cookie;
u64 remain_on_chan_cookie; u64 remain_on_chan_cookie;

View file

@ -652,6 +652,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
if (ext_feature_isset(ext_features, len, if (ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_FILS_DISCOVERY)) NL80211_EXT_FEATURE_FILS_DISCOVERY))
info->drv->fils_discovery = 1; 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;
} }