aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorPaul Stewart <pstew@chromium.org>2013-02-03 19:08:31 (GMT)
committerJouni Malinen <j@w1.fi>2013-02-03 19:08:31 (GMT)
commitcecdddc18419048dfe30866eb02c305c752a39c2 (patch)
treed00db1a085ab09c67992ffdaab9e3955024d018f /wpa_supplicant/interworking.c
parent9e737f08d41ab089b0737d3c002a62c4175be241 (diff)
downloadhostap-cecdddc18419048dfe30866eb02c305c752a39c2.zip
hostap-cecdddc18419048dfe30866eb02c305c752a39c2.tar.gz
hostap-cecdddc18419048dfe30866eb02c305c752a39c2.tar.bz2
wpa_supplicant: Implement fast-associate on SelectNetwork
If scan results are available when we perform a SelectNetwork, use them to make an associate decision. This can save an entire scan interval-worth of time in situations where something external to wpa_supplicant (like a connection manager) has just previously requested a scan before calling SelectNetwork. Signed-hostap: Paul Stewart <pstew@chromium.org>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index b8a8bb2..e1f58a6 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -54,16 +54,8 @@ 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;
- }
- }
+ if (wpa_supplicant_fast_associate(wpa_s) >= 0)
+ return;
wpa_supplicant_req_scan(wpa_s, 0, 0);
}