aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-11-28 10:56:21 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-26 18:50:28 (GMT)
commit662b40b16b2d41bb5997a1875d41cf8a0dabc663 (patch)
tree4001991f9c14642c954e47dd161c0cb0c1f57949 /wpa_supplicant/events.c
parent015af91fea2ec780cb44914bfc0cbc39932cf60d (diff)
downloadhostap-662b40b16b2d41bb5997a1875d41cf8a0dabc663.zip
hostap-662b40b16b2d41bb5997a1875d41cf8a0dabc663.tar.gz
hostap-662b40b16b2d41bb5997a1875d41cf8a0dabc663.tar.bz2
WPS: Reduce scan wait time during WPS processing
Since the AP is expected to be available, there is no need to wait for the full five second wait between scans during WPS connection. This speeds up cases where the first scan misses the AP for some reason. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 062c696..ae05a37 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1395,6 +1395,16 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
return 1;
}
#endif /* CONFIG_INTERWORKING */
+#ifdef CONFIG_WPS
+ if (wpa_s->after_wps > 0) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "Use shorter wait during WPS processing");
+ timeout_sec = 0;
+ timeout_usec = 500000;
+ wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
+ timeout_usec);
+ return 0;
+ }
+#endif /* CONFIG_WPS */
if (wpa_supplicant_req_sched_scan(wpa_s))
wpa_supplicant_req_new_scan(wpa_s, timeout_sec,
timeout_usec);