wpa_supplicant: Cancel sched_scan when stopping countermeasures
When stopping the TKIP countermeasures, it would be preferable to connect immediately. However if scheduled scan is in progress, a connection attempt will be done only when scan results are received, so cancel the scheduled scan to allow immediate scan and connection attempt. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
abb8d08b8a
commit
f1609f119a
1 changed files with 9 additions and 0 deletions
|
@ -175,6 +175,15 @@ void wpa_supplicant_stop_countermeasures(void *eloop_ctx, void *sock_ctx)
|
|||
wpa_s->countermeasures = 0;
|
||||
wpa_drv_set_countermeasures(wpa_s, 0);
|
||||
wpa_msg(wpa_s, MSG_INFO, "WPA: TKIP countermeasures stopped");
|
||||
|
||||
/*
|
||||
* It is possible that the device is sched scanning, which means
|
||||
* that a connection attempt will be done only when we receive
|
||||
* scan results. However, in this case, it would be preferable
|
||||
* to scan and connect immediately, so cancel the sched_scan and
|
||||
* issue a regular scan flow.
|
||||
*/
|
||||
wpa_supplicant_cancel_sched_scan(wpa_s);
|
||||
wpa_supplicant_req_scan(wpa_s, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue