]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
scan: Use normal scans after connection failure
authorIlan Peer <ilan.peer@intel.com>
Wed, 3 Apr 2019 15:17:13 +0000 (18:17 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 6 Apr 2019 14:13:10 +0000 (17:13 +0300)
In case of connection attempt failure, set 'normal_scans'
to zero, as otherwise it is possible that scheduled scan
would be used and not normal scan, which might delay the
next connection attempt.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
wpa_supplicant/wpa_supplicant.c

index 57d3f126dcc1e40093bfebcfaa4db5b6c8056644..4aebfc052d1c47473563651fe9d2872d163455fa 100644 (file)
@@ -6765,6 +6765,9 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid)
         * TODO: if more than one possible AP is available in scan results,
         * could try the other ones before requesting a new scan.
         */
+
+       /* speed up the connection attempt with normal scan */
+       wpa_s->normal_scans = 0;
        wpa_supplicant_req_scan(wpa_s, timeout / 1000,
                                1000 * (timeout % 1000));
 }