aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorVamsi Krishna <vamsin@qti.qualcomm.com>2016-12-02 16:59:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-12 05:39:23 -0500
commit45816391e1a5f32e25b8eb2f0c18033ea4b4b6a4 (patch)
tree6e05366dddbcf86b9a73c2174b1b832011157328 /include/uapi
parentcd84516473a78a6932b1e034e71742e14842e8dc (diff)
nl80211: Use different attrs for BSSID and random MAC addr in scan req
commit 2fa436b3a2a7009c11a3bc03fe0ff4c26e80fd87 upstream. NL80211_ATTR_MAC was used to set both the specific BSSID to be scanned and the random MAC address to be used when privacy is enabled. When both the features are enabled, both the BSSID and the local MAC address were getting same value causing Probe Request frames to go with unintended DA. Hence, this has been fixed by using a different NL80211_ATTR_BSSID attribute to set the specific BSSID (which was the more recent addition in cfg80211) for a scan. Backwards compatibility with old userspace software is maintained to some extent by allowing NL80211_ATTR_MAC to be used to set the specific BSSID when scanning without enabling random MAC address use. Scanning with random source MAC address was introduced by commit ad2b26abc157 ("cfg80211: allow drivers to support random MAC addresses for scan") and the issue was introduced with the addition of the second user for the same attribute in commit 818965d39177 ("cfg80211: Allow a scan request for a specific BSSID"). Fixes: 818965d39177 ("cfg80211: Allow a scan request for a specific BSSID") Signed-off-by: Vamsi Krishna <vamsin@qti.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/nl80211.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 56368e9b4622..d3cbe48b286d 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -323,7 +323,7 @@
323 * @NL80211_CMD_GET_SCAN: get scan results 323 * @NL80211_CMD_GET_SCAN: get scan results
324 * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters 324 * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
325 * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the 325 * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
326 * probe requests at CCK rate or not. %NL80211_ATTR_MAC can be used to 326 * probe requests at CCK rate or not. %NL80211_ATTR_BSSID can be used to
327 * specify a BSSID to scan for; if not included, the wildcard BSSID will 327 * specify a BSSID to scan for; if not included, the wildcard BSSID will
328 * be used. 328 * be used.
329 * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to 329 * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
@@ -1937,6 +1937,9 @@ enum nl80211_commands {
1937 * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute. 1937 * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
1938 * See &enum nl80211_nan_match_attributes. 1938 * See &enum nl80211_nan_match_attributes.
1939 * 1939 *
1940 * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also
1941 * used in various commands/events for specifying the BSSID.
1942 *
1940 * @NUM_NL80211_ATTR: total number of nl80211_attrs available 1943 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
1941 * @NL80211_ATTR_MAX: highest attribute number currently defined 1944 * @NL80211_ATTR_MAX: highest attribute number currently defined
1942 * @__NL80211_ATTR_AFTER_LAST: internal use 1945 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2336,6 +2339,8 @@ enum nl80211_attrs {
2336 NL80211_ATTR_NAN_FUNC, 2339 NL80211_ATTR_NAN_FUNC,
2337 NL80211_ATTR_NAN_MATCH, 2340 NL80211_ATTR_NAN_MATCH,
2338 2341
2342 NL80211_ATTR_BSSID,
2343
2339 /* add attributes here, update the policy in nl80211.c */ 2344 /* add attributes here, update the policy in nl80211.c */
2340 2345
2341 __NL80211_ATTR_AFTER_LAST, 2346 __NL80211_ATTR_AFTER_LAST,