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
1982 * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also1982 * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also
1983 * used in various commands/events for specifying the BSSID.1983 * used in various commands/events for specifying the BSSID.
1984 *1984 *
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 *
1985 * @NUM_NL80211_ATTR: total number of nl80211_attrs available1999 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1986 * @NL80211_ATTR_MAX: highest attribute number currently defined2000 * @NL80211_ATTR_MAX: highest attribute number currently defined
1987 * @__NL80211_ATTR_AFTER_LAST: internal use2001 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2388,6 +2402,9 @@ enum nl80211_attrs { · 400 unmodified lines
2388 2402
2389 NL80211_ATTR_BSSID,2403 NL80211_ATTR_BSSID,
2390 2404
2405 NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI,
2406 NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST,
2407
2391 /* add attributes here, update the policy in nl80211.c */2408 /* add attributes here, update the policy in nl80211.c */
2392 2409
2393 __NL80211_ATTR_AFTER_LAST,2410 __NL80211_ATTR_AFTER_LAST,
@@ -3080,6 +3097,13 @@ enum nl80211_reg_rule_attr { · 686 unmodified lines
3080 * how this API was implemented in the past. Also, due to the same problem,3097 * how this API was implemented in the past. Also, due to the same problem,
3081 * the only way to create a matchset with only an RSSI filter (with this3098 * the only way to create a matchset with only an RSSI filter (with this
3082 * attribute) is if there's only a single matchset with the RSSI attribute.3099 * 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.
3083 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter3107 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
3084 * attribute number currently defined3108 * attribute number currently defined
3085 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use3109 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -3089,6 +3113,8 @@ enum nl80211_sched_scan_match_attr { · 3 unmodified lines
3089 3113
3090 NL80211_SCHED_SCAN_MATCH_ATTR_SSID,3114 NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
3091 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,3115 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
3116 NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
3117 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
3092 3118
3093 /* keep last */3119 /* keep last */
3094 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,3120 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
@@ -4703,6 +4729,9 @@ enum nl80211_feature_flags { · 1608 unmodified lines
4703 * in @NL80211_CMD_FRAME while not associated.4729 * in @NL80211_CMD_FRAME while not associated.
4704 * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED: This driver supports4730 * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED: This driver supports
4705 * randomized TA in @NL80211_CMD_FRAME while associated.4731 * 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).
4706 *4735 *
4707 * @NUM_NL80211_EXT_FEATURES: number of extended features.4736 * @NUM_NL80211_EXT_FEATURES: number of extended features.
4708 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.4737 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4720,6 +4749,7 @@ enum nl80211_ext_feature_index { · 11 unmodified lines
4720 NL80211_EXT_FEATURE_FILS_STA,4749 NL80211_EXT_FEATURE_FILS_STA,
4721 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,4750 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,
4722 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,4751 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,
4752 NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI,
4723 4753
4724 /* add new features before the definition below */4754 /* add new features before the definition below */
4725 NUM_NL80211_EXT_FEATURES,4755 NUM_NL80211_EXT_FEATURES,