WPS: Clear known_wps_freq in addition to after_wps

Both of these variables can result in optimized WPS scans, so better
clear these more consistently to avoid unexpected single-channel scans.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-10-27 12:56:56 +02:00
parent d20c340f7e
commit 4d9fb08d23
3 changed files with 4 additions and 0 deletions

View File

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

View File

@ -671,6 +671,7 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
wpa_drv_set_supp_port(wpa_s, 1);
#endif /* IEEE8021X_EAPOL */
wpa_s->after_wps = 0;
wpa_s->known_wps_freq = 0;
#ifdef CONFIG_P2P
wpas_p2p_completed(wpa_s);
#endif /* CONFIG_P2P */

View File

@ -883,6 +883,7 @@ static void wpas_clear_wps(struct wpa_supplicant *wpa_s)
struct wpa_ssid *ssid, *remove_ssid = NULL, *prev_current;
wpa_s->after_wps = 0;
wpa_s->known_wps_freq = 0;
prev_current = wpa_s->current_ssid;