History

cfg80211: Add support to sched scan to report better BSSs

Enhance sched scan to support option of finding a better BSS while in connected state. Firmware scans the medium and reports when it finds a known BSS which has better RSSI than the current connected BSS. New attributes to specify the relative RSSI (compared to the current BSS) are added to the sched scan to implement this.

vamsi krishna committed 9 years ago

Commit bf95ecd1 parent ab5bb2d3 files · +99 −11Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+30−0
@@ -1982,6 +1982,20 @@ enum nl80211_commands { · 1981 unmodified lines
19821982 * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also
19831983 * used in various commands/events for specifying the BSSID.
19841984 *
1985+ * @NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI: Relative RSSI threshold by which
1986+ * other BSSs has to be better or slightly worse than the current
1987+ * connected BSS so that they get reported to user space.
1988+ * This will give an opportunity to userspace to consider connecting to
1989+ * other matching BSSs which have better or slightly worse RSSI than
1990+ * the current connected BSS by using an offloaded operation to avoid
1991+ * unnecessary wakeups.
1992+ *
1993+ * @NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST: When present the RSSI level for BSSs in
1994+ * the specified band is to be adjusted before doing
1995+ * %NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI based comparision to figure out
1996+ * better BSSs. The attribute value is a packed structure
1997+ * value as specified by &struct nl80211_bss_select_rssi_adjust.
1998+ *
19851999 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
19862000 * @NL80211_ATTR_MAX: highest attribute number currently defined
19872001 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2388,6 +2402,9 @@ enum nl80211_attrs { · 400 unmodified lines
23882402
23892403 NL80211_ATTR_BSSID,
23902404
2405+ NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI,
2406+ NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST,
2407+
23912408 /* add attributes here, update the policy in nl80211.c */
23922409
23932410 __NL80211_ATTR_AFTER_LAST,
@@ -3080,6 +3097,13 @@ enum nl80211_reg_rule_attr { · 686 unmodified lines
30803097 * how this API was implemented in the past. Also, due to the same problem,
30813098 * the only way to create a matchset with only an RSSI filter (with this
30823099 * attribute) is if there's only a single matchset with the RSSI attribute.
3100+ * @NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI: Flag indicating whether
3101+ * %NL80211_SCHED_SCAN_MATCH_ATTR_RSSI to be used as absolute RSSI or
3102+ * relative to current bss's RSSI.
3103+ * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST: When present the RSSI level for
3104+ * BSS-es in the specified band is to be adjusted before doing
3105+ * RSSI-based BSS selection. The attribute value is a packed structure
3106+ * value as specified by &struct nl80211_bss_select_rssi_adjust.
30833107 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
30843108 * attribute number currently defined
30853109 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -3089,6 +3113,8 @@ enum nl80211_sched_scan_match_attr { · 3 unmodified lines
30893113
30903114 NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
30913115 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
3116+ NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
3117+ NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
30923118
30933119 /* keep last */
30943120 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@@ -4703,6 +4729,9 @@ enum nl80211_feature_flags { · 1608 unmodified lines
47034729 * in @NL80211_CMD_FRAME while not associated.
47044730 * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED: This driver supports
47054731 * randomized TA in @NL80211_CMD_FRAME while associated.
4732+ * @NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI: The driver supports sched_scan
4733+ * for reporting BSSs with better RSSI than the current connected BSS
4734+ * (%NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI).
47064735 *
47074736 * @NUM_NL80211_EXT_FEATURES: number of extended features.
47084737 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4720,6 +4749,7 @@ enum nl80211_ext_feature_index { · 11 unmodified lines
47204749 NL80211_EXT_FEATURE_FILS_STA,
47214750 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,
47224751 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,
4752+ NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI,
47234753
47244754 /* add new features before the definition below */
47254755 NUM_NL80211_EXT_FEATURES,