aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-12-11 16:39:12 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-11 16:39:12 (GMT)
commita5c723adcf48e8f4cd74f1162a8f2602f3f54040 (patch)
tree33090b0bd316d2b34f4670b19131be2d62bc00a4 /wpa_supplicant
parenta1836de64b379ea6eb1a50498a803571a74181f6 (diff)
downloadhostap-a5c723adcf48e8f4cd74f1162a8f2602f3f54040.zip
hostap-a5c723adcf48e8f4cd74f1162a8f2602f3f54040.tar.gz
hostap-a5c723adcf48e8f4cd74f1162a8f2602f3f54040.tar.bz2
Interworking: Clear SCANNING state if no network selected
Commit 192ad3d7307473f14c049c1ea724e292a3f8ae24 ('Interworking: Clear SCANNING state if no match found') did this for the case where no network matched credentials, but left the SCANNING state in place if there were a match, but automatic connection was not enabled. Extend this to cover the case where INTERWORKING_SELECT is not followed by a connection attempt so that wpa_state is not left indefinitely to SCANNING. This fixes a hwsim test case failure in the following sequence: ap_anqp_sharing scan_trigger_failure Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/interworking.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 1fb40c7..5c0e109 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -2530,7 +2530,8 @@ static void interworking_select_network(struct wpa_supplicant *wpa_s)
wpa_msg(wpa_s, MSG_INFO, INTERWORKING_SELECTED MACSTR,
MAC2STR(selected->bssid));
interworking_connect(wpa_s, selected, 0);
- }
+ } else if (wpa_s->wpa_state == WPA_SCANNING)
+ wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
}