diff options
author | Ilan Peer <ilan.peer@intel.com> | 2015-02-18 02:35:14 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2015-02-21 14:07:53 (GMT) |
commit | f1609f119aebfef376c9f2b961bb121d566b40a4 (patch) | |
tree | 4f780f7a6d11bc4184fe98272ef100cfdf57875b /wpa_supplicant/events.c | |
parent | abb8d08b8ab1d85335b5b6af691d2a5cb7e357d3 (diff) | |
download | hostap-f1609f119aebfef376c9f2b961bb121d566b40a4.zip hostap-f1609f119aebfef376c9f2b961bb121d566b40a4.tar.gz hostap-f1609f119aebfef376c9f2b961bb121d566b40a4.tar.bz2 |
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>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r-- | wpa_supplicant/events.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index c4bc02d..72a7368 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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); } } |