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.
This commit is contained in:
parent
f1b0de09d9
commit
3180d7a208
2 changed files with 9 additions and 3 deletions
|
@ -650,10 +650,14 @@ static void wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s)
|
||||||
|
|
||||||
wpas_notify_scan_done(wpa_s, 1);
|
wpas_notify_scan_done(wpa_s, 1);
|
||||||
|
|
||||||
if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)) ||
|
if ((wpa_s->conf->ap_scan == 2 && !wpas_wps_searching(wpa_s)))
|
||||||
wpa_s->disconnected)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (wpa_s->disconnected) {
|
||||||
|
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (selected == NULL) {
|
while (selected == NULL) {
|
||||||
for (prio = 0; prio < wpa_s->conf->num_prio; prio++) {
|
for (prio = 0; prio < wpa_s->conf->num_prio; prio++) {
|
||||||
selected = wpa_supplicant_select_bss(
|
selected = wpa_supplicant_select_bss(
|
||||||
|
|
|
@ -191,8 +191,10 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
struct wpa_driver_scan_params params;
|
struct wpa_driver_scan_params params;
|
||||||
size_t max_ssids;
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!wpa_supplicant_enabled_networks(wpa_s->conf) &&
|
if (!wpa_supplicant_enabled_networks(wpa_s->conf) &&
|
||||||
!wpa_s->scan_req) {
|
!wpa_s->scan_req) {
|
||||||
|
|
Loading…
Reference in a new issue