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
This commit is contained in:
parent
5b37633364
commit
476dea24ff
1 changed files with 2 additions and 1 deletions
|
@ -920,7 +920,8 @@ int wpas_wps_cancel(struct wpa_supplicant *wpa_s)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_AP */
|
#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_printf(MSG_DEBUG, "WPS: Cancel operation - cancel scan");
|
||||||
wpa_supplicant_cancel_scan(wpa_s);
|
wpa_supplicant_cancel_scan(wpa_s);
|
||||||
wpas_clear_wps(wpa_s);
|
wpas_clear_wps(wpa_s);
|
||||||
|
|
Loading…
Reference in a new issue