diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-06-06 22:07:11 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-06-06 22:07:11 +0300 |
commit | 476dea24fffca37ebc1011840449e89ed4b8f49a (patch) | |
tree | 79c1675e2ff2d05db4894f03fb1a44382467278a | |
parent | 5b3763336466f2c55611437cb924aeee45f7203e (diff) | |
download | external_wpa_supplicant_8_ti-476dea24fffca37ebc1011840449e89ed4b8f49a.zip external_wpa_supplicant_8_ti-476dea24fffca37ebc1011840449e89ed4b8f49a.tar.gz external_wpa_supplicant_8_ti-476dea24fffca37ebc1011840449e89ed4b8f49a.tar.bz2 |
WPS: Cancel WPS operation also in DISCONNECTED state
It is possible for wpa_state to be WPA_DISCONNECTED when a new scan is
scheduled to be started in the future. If wpas_wps_cancel() gets called
(e.g., through control interface wps_cancel or a P2P group removal)
while in that state, the WPS operation (scan request and special network
block) were not removed. Fix this by clearing the WPS operations both in
WPA_SCANNING and WPA_DISCONNECTED states.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
-rw-r--r-- | wpa_supplicant/wps_supplicant.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c index 8e671f9..78e1166 100644 --- a/wpa_supplicant/wps_supplicant.c +++ b/wpa_supplicant/wps_supplicant.c @@ -920,7 +920,8 @@ int wpas_wps_cancel(struct wpa_supplicant *wpa_s) } #endif /* CONFIG_AP */ - if (wpa_s->wpa_state == WPA_SCANNING) { + if (wpa_s->wpa_state == WPA_SCANNING || + wpa_s->wpa_state == WPA_DISCONNECTED) { wpa_printf(MSG_DEBUG, "WPS: Cancel operation - cancel scan"); wpa_supplicant_cancel_scan(wpa_s); wpas_clear_wps(wpa_s); |