diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2016-02-26 16:31:33 +0200 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-05-02 01:03:36 -0700 |
| commit | 1d7cbb7988fc4778a4ee245e9ea3d72f220ae4b7 (patch) | |
| tree | 512649d25b4110c067e61f050adf45940d6a8354 /src | |
| parent | 53fd092f22448dc3875eb2de2189d0f4f2e77aec (diff) | |
| download | android_external_wpa_supplicant_8-1d7cbb7988fc4778a4ee245e9ea3d72f220ae4b7.tar.gz android_external_wpa_supplicant_8-1d7cbb7988fc4778a4ee245e9ea3d72f220ae4b7.tar.bz2 android_external_wpa_supplicant_8-1d7cbb7988fc4778a4ee245e9ea3d72f220ae4b7.zip | |
nl80211: Add an option to specify the BSSID to scan for
This allows scans to be optimized when a response is needed only from a
single, known BSS.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: eb20cea590f1020835f09103d0290a0a7e7d5ada
Git-repo: git://w1.fi/srv/git/hostap.git
Change-Id: Ia449479732f6a15a78c9aabf821accf201970acf
CRs-Fixed: 996616
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/driver.h | 9 | ||||
| -rw-r--r-- | src/drivers/driver_nl80211_scan.c | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 9cea60ca..1abfc1f7 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -416,6 +416,15 @@ struct wpa_driver_scan_params { */ const u8 *mac_addr_mask; + /** + * bssid - Specific BSSID to scan for + * + * This optional parameter can be used to replace the default wildcard + * BSSID with a specific BSSID to scan for if results are needed from + * only a single BSS. + */ + const u8 *bssid; + /* * NOTE: Whenever adding new parameters here, please make sure * wpa_scan_clone_params() and wpa_scan_free_params() get updated with diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index a8ce7ea8..b84b6449 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -250,6 +250,13 @@ int wpa_driver_nl80211_scan(struct i802_bss *bss, goto fail; } + if (params->bssid) { + wpa_printf(MSG_DEBUG, "nl80211: Scan for a specific BSSID: " + MACSTR, MAC2STR(params->bssid)); + if (nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, params->bssid)) + goto fail; + } + ret = send_and_recv_msgs(drv, msg, NULL, NULL); msg = NULL; if (ret) { |
