aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-09-14 14:25:03 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-09 18:05:42 (GMT)
commit40578b5048cd2a34f293c19f4fbdaff9edccd109 (patch)
tree873e6752b38eeded0beaedb84fde17e4b573971e
parent244f14e19d7c9c7f308c7a42f6d4131b11010288 (diff)
downloadhostap-06-40578b5048cd2a34f293c19f4fbdaff9edccd109.zip
hostap-06-40578b5048cd2a34f293c19f4fbdaff9edccd109.tar.gz
hostap-06-40578b5048cd2a34f293c19f4fbdaff9edccd109.tar.bz2
Getting back to DISCONNECTED afer SCANNING
After transitioning from DISCONNECTED to SCANNING, we never go back to DISCONNECTED even though scanning is done or failed. We're thus stuck in SCANNING while scanning is actually done. (cherry picked from commit 3180d7a2088fdd429c2eb9ae74abfa96e6a9b9b0) Conflicts: wpa_supplicant/events.c
-rw-r--r--wpa_supplicant/events.c8
-rw-r--r--wpa_supplicant/scan.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 9d7f9d7..39efedd 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -649,10 +649,14 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
wpas_wps_notify_scan_results(wpa_s);
}
- if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)) ||
- wpa_s->disconnected)
+ if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)))
return;
+ if (wpa_s->disconnected) {
+ wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
+ return;
+ }
+
while (selected == NULL) {
for (prio = 0; prio < wpa_s->conf->num_prio; prio++) {
selected = wpa_supplicant_select_bss(
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index bbe619e..8cb7a42 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -92,8 +92,10 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
#endif /* CONFIG_WPS */
- if (wpa_s->disconnected && !wpa_s->scan_req)
+ if (wpa_s->disconnected && !wpa_s->scan_req) {
+ wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
return;
+ }
if (!wpa_supplicant_enabled_networks(wpa_s->conf) &&
!wpa_s->scan_req) {