nl80211: Add support for minimal probe request content

Extend 'struct wpa_driver_scan_params' to allow higher layer to indicate
if minimal probe request content should be included by the driver as part
of the scan logic.

Implement this with driver_nl80211, by setting
NL80211_SCAN_FLAG_MIN_PREQ_CONTENT.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2023-06-12 22:59:48 +03:00 committed by Jouni Malinen
parent c84709c59d
commit a12f39ad4c
4 changed files with 22 additions and 0 deletions

View file

@ -685,6 +685,13 @@ struct wpa_driver_scan_params {
*/
unsigned int non_coloc_6ghz:1;
/**
* min_probe_req_content - Minimize probe request content to only have
* minimal requirement elements, e.g., supported rates etc., and no
* additional elements other then those provided by user space.
*/
unsigned int min_probe_req_content:1;
/*
* NOTE: Whenever adding new parameters here, please make sure
* wpa_scan_clone_params() and wpa_scan_free_params() get updated with
@ -2253,6 +2260,8 @@ struct wpa_driver_capa {
#define WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA 0x0000000000002000ULL
/** Driver supports MLO in station/AP mode */
#define WPA_DRIVER_FLAGS2_MLO 0x0000000000004000ULL
/** Driver supports minimal scan request probe content */
#define WPA_DRIVER_FLAGS2_SCAN_MIN_PREQ 0x0000000000008000ULL
u64 flags2;
#define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \

View file

@ -697,6 +697,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
capa->flags2 |= WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_STA;
capa->flags2 |= WPA_DRIVER_FLAGS2_PROT_RANGE_NEG_AP;
}
if (ext_feature_isset(ext_features, len,
NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT))
capa->flags2 |= WPA_DRIVER_FLAGS2_SCAN_MIN_PREQ;
}

View file

@ -315,6 +315,14 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION;
}
if (params->min_probe_req_content) {
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_SCAN_MIN_PREQ)
scan_flags |= NL80211_SCAN_FLAG_MIN_PREQ_CONTENT;
else
wpa_printf(MSG_DEBUG,
"nl80211: NL80211_SCAN_FLAG_MIN_PREQ_CONTENT not supported");
}
if (scan_flags &&
nla_put_u32(msg, NL80211_ATTR_SCAN_FLAGS, scan_flags))
goto fail;

View file

@ -3045,6 +3045,7 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src)
params->relative_adjust_rssi = src->relative_adjust_rssi;
params->p2p_include_6ghz = src->p2p_include_6ghz;
params->non_coloc_6ghz = src->non_coloc_6ghz;
params->min_probe_req_content = src->min_probe_req_content;
return params;
failed: