aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-09-02 17:18:48 (GMT)
committerJouni Malinen <j@w1.fi>2012-09-02 17:18:48 (GMT)
commita594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc (patch)
tree5e94cc7b43c5c9fe4efe0e35a7b7c5825d1711b1 /wpa_supplicant/interworking.c
parent620c783753bddd37988269314862dc7e4a62f700 (diff)
downloadhostap-a594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc.zip
hostap-a594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc.tar.gz
hostap-a594e2a9ab469e2d89f9dbd54b8aaf0f47dc66dc.tar.bz2
Interworking: Skip extra scan after network auto-select
If the scan results from before ANQP fetch are fresh (less than five seconds old), do not run a new scan when selecting the BSS after having used Interworking network selection. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 7741fdc..987c79b 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -52,6 +52,18 @@ static void interworking_reconnect(struct wpa_supplicant *wpa_s)
}
wpa_s->disconnected = 0;
wpa_s->reassociate = 1;
+
+ if (wpa_s->last_scan_res_used > 0) {
+ struct os_time now;
+ os_get_time(&now);
+ if (now.sec - wpa_s->last_scan.sec <= 5) {
+ wpa_printf(MSG_DEBUG, "Interworking: Old scan results "
+ "are fresh - connect without new scan");
+ if (wpas_select_network_from_last_scan(wpa_s) == 0)
+ return;
+ }
+ }
+
wpa_supplicant_req_scan(wpa_s, 0, 0);
}