nl80211: Introduce scan flags to emphasize requested scan behavior
This commit defines new scan flags (LOW_SPAN, LOW_POWER, HIGH_LATENCY) to emphasize the requested scan behavior for the driver. These flags are optional and are mutually exclusive. The implementation of the respective functionality can be driver/hardware specific. These flags can be used to control the compromise between how long a scan takes, how much power it uses, and high accurate/complete the scan is in finding the BSSs. Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
6335698e24
commit
5037a00992
@@ -6715,8 +6715,17 @@ nl80211_check_scan_flags(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
|
||||
*flags = nla_get_u32(attrs[NL80211_ATTR_SCAN_FLAGS]);
|
||||
|
||||
if ((*flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
|
||||
!(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN))
|
||||
if (((*flags & NL80211_SCAN_FLAG_LOW_PRIORITY) &&
|
||||
!(wiphy->features & NL80211_FEATURE_LOW_PRIORITY_SCAN)) ||
|
||||
((*flags & NL80211_SCAN_FLAG_LOW_SPAN) &&
|
||||
!wiphy_ext_feature_isset(wiphy,
|
||||
NL80211_EXT_FEATURE_LOW_SPAN_SCAN)) ||
|
||||
((*flags & NL80211_SCAN_FLAG_LOW_POWER) &&
|
||||
!wiphy_ext_feature_isset(wiphy,
|
||||
NL80211_EXT_FEATURE_LOW_POWER_SCAN)) ||
|
||||
((*flags & NL80211_SCAN_FLAG_HIGH_ACCURACY) &&
|
||||
!wiphy_ext_feature_isset(wiphy,
|
||||
NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN)))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (*flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
|
||||
|
Reference in New Issue
Block a user