aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/scan.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-02-26 14:31:33 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-26 15:19:20 (GMT)
commiteb20cea590f1020835f09103d0290a0a7e7d5ada (patch)
treea3b30790a93e5d4a5f81e37dfe6c3238a221988e /wpa_supplicant/scan.c
parent452874a9df139d854fc4db736296907487cb16f3 (diff)
downloadhostap-eb20cea590f1020835f09103d0290a0a7e7d5ada.zip
hostap-eb20cea590f1020835f09103d0290a0a7e7d5ada.tar.gz
hostap-eb20cea590f1020835f09103d0290a0a7e7d5ada.tar.bz2
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>
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r--wpa_supplicant/scan.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index c333e57..c925cad 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -2259,6 +2259,17 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src)
params->mac_addr_mask = mac_addr + ETH_ALEN;
}
}
+
+ if (src->bssid) {
+ u8 *bssid;
+
+ bssid = os_malloc(ETH_ALEN);
+ if (!bssid)
+ goto failed;
+ os_memcpy(bssid, src->bssid, ETH_ALEN);
+ params->bssid = bssid;
+ }
+
return params;
failed:
@@ -2287,6 +2298,8 @@ void wpa_scan_free_params(struct wpa_driver_scan_params *params)
*/
os_free((u8 *) params->mac_addr);
+ os_free((u8 *) params->bssid);
+
os_free(params);
}