mac80211: support scan features for improved scan privacy

Support the new random SN and minimal probe request contents
scan flags for the case of software scan - for hardware scan
the drivers need to opt in, but may need to do only that,
depending on their implementation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
This commit is contained in:
Johannes Berg 2018-05-28 15:47:41 +02:00 committed by Johannes Berg
parent 2e076f1990
commit b9771d41ae
9 changed files with 71 additions and 24 deletions

View file

@ -557,10 +557,19 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
wiphy_ext_feature_set(wiphy,
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211);
if (!ops->hw_scan)
if (!ops->hw_scan) {
wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN |
NL80211_FEATURE_AP_SCAN;
/*
* if the driver behaves correctly using the probe request
* (template) from mac80211, then both of these should be
* supported even with hw scan - but let drivers opt in.
*/
wiphy_ext_feature_set(wiphy,
NL80211_EXT_FEATURE_SCAN_RANDOM_SN);
wiphy_ext_feature_set(wiphy,
NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT);
}
if (!ops->set_key)
wiphy->flags |= WIPHY_FLAG_IBSS_RSN;