aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-02-26 15:16:35 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-26 15:19:20 (GMT)
commit0645492e7c98441d230b787c5711b4e4b337655b (patch)
tree57c1756b5416aca3ecf22cc7544c4ada96d6464f /wpa_supplicant/wnm_sta.c
parenteb20cea590f1020835f09103d0290a0a7e7d5ada (diff)
downloadhostap-0645492e7c98441d230b787c5711b4e4b337655b.zip
hostap-0645492e7c98441d230b787c5711b4e4b337655b.tar.gz
hostap-0645492e7c98441d230b787c5711b4e4b337655b.tar.bz2
WNM: Optimize a single BSS transition management candidate scan
If the BSS Transition Management Request frame includes only a single candidate and we need to scan for the BSS to get up-to-date information, use a scan for the known BSSID instead of wildcard BSSID. In addition, set the SSID in the scan if it is known based on old scan results in the BSS table. This removes unnecessary Probe Response frames when we are interested in results from only a single BSS. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wnm_sta.c')
-rw-r--r--wpa_supplicant/wnm_sta.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 0dc41dc..4da9124 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -1148,6 +1148,14 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
}
wnm_set_scan_freqs(wpa_s);
+ if (wpa_s->wnm_num_neighbor_report == 1) {
+ os_memcpy(wpa_s->next_scan_bssid,
+ wpa_s->wnm_neighbor_report_elements[0].bssid,
+ ETH_ALEN);
+ wpa_printf(MSG_DEBUG,
+ "WNM: Scan only for a specific BSSID since there is only a single candidate "
+ MACSTR, MAC2STR(wpa_s->next_scan_bssid));
+ }
wpa_supplicant_req_scan(wpa_s, 0, 0);
} else if (reply) {
enum bss_trans_mgmt_status_code status;