WPS: Clear after_wps from number of new locations

This makes it less likely to forget WPS single-channel scan optimization
in effect after having completed the WPS operation or in case WPS
operating gets cancelled.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-10-20 21:34:39 +03:00
parent 72c052d525
commit 7255983b59
2 changed files with 9 additions and 0 deletions

View File

@ -5162,6 +5162,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
#ifdef CONFIG_WPS
wpas_wps_cancel(wpa_s);
#endif /* CONFIG_WPS */
wpa_s->after_wps = 0;
#ifdef CONFIG_TDLS_TESTING
extern unsigned int tdls_testing;
@ -5595,6 +5596,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
(wpa_s->wpa_state == WPA_COMPLETED))) {
wpa_s->normal_scans = 0;
wpa_s->scan_req = MANUAL_SCAN_REQ;
wpa_s->after_wps = 0;
wpa_supplicant_req_scan(wpa_s, 0, 0);
} else if (wpa_s->sched_scanning) {
wpa_printf(MSG_DEBUG, "Stop ongoing "

View File

@ -882,6 +882,8 @@ static void wpas_clear_wps(struct wpa_supplicant *wpa_s)
int id;
struct wpa_ssid *ssid, *remove_ssid = NULL, *prev_current;
wpa_s->after_wps = 0;
prev_current = wpa_s->current_ssid;
/* Enable the networks disabled during wpas_wps_reassoc */
@ -1157,6 +1159,8 @@ int wpas_wps_cancel(struct wpa_supplicant *wpa_s)
wpas_wps_clear_ap_info(wpa_s);
}
wpa_s->after_wps = 0;
return 0;
}
@ -2465,6 +2469,9 @@ void wpas_wps_update_ap_info(struct wpa_supplicant *wpa_s,
void wpas_wps_notify_assoc(struct wpa_supplicant *wpa_s, const u8 *bssid)
{
struct wps_ap_info *ap;
wpa_s->after_wps = 0;
if (!wpa_s->wps_ap_iter)
return;
ap = wpas_wps_get_ap_info(wpa_s, bssid);