aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2014-01-15 09:11:32 (GMT)
committerJouni Malinen <j@w1.fi>2014-01-17 09:48:17 (GMT)
commit5ddd07cb37811718e21f9ab2611d3dcdc554f4b9 (patch)
tree6516471e346302ea53ce98178a567cf8a76a75d4 /wpa_supplicant
parent94a2dd0b252719999f3831aded2f6085c020ae96 (diff)
downloadhostap-5ddd07cb37811718e21f9ab2611d3dcdc554f4b9.zip
hostap-5ddd07cb37811718e21f9ab2611d3dcdc554f4b9.tar.gz
hostap-5ddd07cb37811718e21f9ab2611d3dcdc554f4b9.tar.bz2
Reset normal_scans counter upon entering INTERFACE_DISABLED state
Depending on the implementation, the scheduled scan may not give results quickly when in DISCONNECTED state. This patch resets wpa_s::normal_scans upon entering to the INTERFACE_DISABLED state so a normal scan is assured upon going to DISCONNECTED state after the interface has been re-enabled. This mainly solves a long reconnect time observed upon repeated kernel driver reloads, i.e., third reload resulted in a scheduled scan. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-hostap: Arend van Spriel <arend@broadcom.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 78e2749..b7c16ca 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -652,6 +652,11 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
wpa_supplicant_state_txt(wpa_s->wpa_state),
wpa_supplicant_state_txt(state));
+ if (state == WPA_INTERFACE_DISABLED) {
+ /* Assure normal scan when interface is restored */
+ wpa_s->normal_scans = 0;
+ }
+
if (state == WPA_COMPLETED)
wpas_connect_work_done(wpa_s);