From: Ilan Peer Date: Wed, 3 Apr 2019 15:17:13 +0000 (+0300) Subject: scan: Use normal scans after connection failure X-Git-Tag: hostap_2_8~134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a42f1eded2cdc07a36e6739bac53c68ea2b7e7c;p=thirdparty%2Fhostap.git scan: Use normal scans after connection failure 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 --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 57d3f126d..4aebfc052 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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)); }