History

nl80211/cfg80211: Specify band specific min RSSI thresholds with sched scan

This commit adds the support to specify the RSSI thresholds per band for each match set. This enhances the current behavior which specifies a single rssi_threshold across all the bands by introducing the rssi_threshold_per_band. These per band rssi thresholds are referred through NL80211_BAND_* (enum nl80211_band) variables as attribute types. Such attributes/values per each band are nested through NL80211_ATTR_SCHED_SCAN_MIN_RSSI. These band specific rssi thresholds shall take precedence over the current rssi_thold per match set. Drivers indicate this support through %NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD. These per band rssi attributes/values does not specify "default RSSI filter" as done by NL80211_SCHED_SCAN_MATCH_ATTR_RSSI to stay backward compatible. That said, these per band rssi values have to be specified for the corresponding matchset.

vamsi krishna committed 7 years ago

Commit 1e1b11b1 parent d39f3b43 files · +74 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+13−0
@@ -3638,6 +3638,14 @@ enum nl80211_reg_rule_attr { · 3637 unmodified lines
36383638 * value as specified by &struct nl80211_bss_select_rssi_adjust.
36393639 * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching
36403640 * (this cannot be used together with SSID).
3641+ * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Nested attribute that carries the
3642+ * band specific minimum rssi thresholds for the bands defined in
3643+ * enum nl80211_band. The minimum rssi threshold value(s32) specific to a
3644+ * band shall be encapsulated in attribute with type value equals to one
3645+ * of the NL80211_BAND_* defined in enum nl80211_band. For example, the
3646+ * minimum rssi threshold value for 2.4GHZ band shall be encapsulated
3647+ * within an attribute of type NL80211_BAND_2GHZ. And one or more of such
3648+ * attributes will be nested within this attribute.
36413649 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
36423650 * attribute number currently defined
36433651 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -3650,6 +3658,7 @@ enum nl80211_sched_scan_match_attr { · 6 unmodified lines
36503658 NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
36513659 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
36523660 NL80211_SCHED_SCAN_MATCH_ATTR_BSSID,
3661+ NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI,
36533662
36543663 /* keep last */
36553664 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@@ -5343,6 +5352,9 @@ enum nl80211_feature_flags { · 1687 unmodified lines
53435352 * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching
53445353 * (set/del PMKSA operations) in AP mode.
53455354 *
5355+ * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Driver supports
5356+ * filtering of sched scan results using band specific RSSI thresholds.
5357+ *
53465358 * @NUM_NL80211_EXT_FEATURES: number of extended features.
53475359 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
53485360 */
@@ -5384,6 +5396,7 @@ enum nl80211_ext_feature_index { · 35 unmodified lines
53845396 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER,
53855397 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
53865398 NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
5399+ NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
53875400
53885401 /* add new features before the definition below */
53895402 NUM_NL80211_EXT_FEATURES,