aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-09-14 14:25:03 (GMT)
committerJouni Malinen <j@w1.fi>2009-09-14 14:25:03 (GMT)
commit3180d7a2088fdd429c2eb9ae74abfa96e6a9b9b0 (patch)
treef3f99223ff0326b341db4f580b673e24ae3dfabf /wpa_supplicant
parentf1b0de09d96dafd229c615e8114ca83d1af3b380 (diff)
downloadhostap-3180d7a2088fdd429c2eb9ae74abfa96e6a9b9b0.zip
hostap-3180d7a2088fdd429c2eb9ae74abfa96e6a9b9b0.tar.gz
hostap-3180d7a2088fdd429c2eb9ae74abfa96e6a9b9b0.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.
Diffstat (limited to 'wpa_supplicant')
-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 7c98f53..03d0e1f 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -650,10 +650,14 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
wpas_notify_scan_done(wpa_s, 1);
- 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 10eb525..e122e67 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -191,8 +191,10 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
struct wpa_driver_scan_params params;
size_t max_ssids;
- 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) {