aboutsummaryrefslogtreecommitdiffstats
path: root/package/wpa_supplicant/patches/110-roaming.patch
blob: 2836b204e1bc66e7a6c8e7ddd8992f3f0fb49be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
This patch decreases the timeouts for assoc/auth to more realistic values. Improves roaming speed
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -807,7 +807,7 @@ static void wpa_supplicant_event_assoc(s
 		wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
 	} else if (!ft_completed) {
 		/* Timeout for receiving the first EAPOL packet */
-		wpa_supplicant_req_auth_timeout(wpa_s, 10, 0);
+		wpa_supplicant_req_auth_timeout(wpa_s, 3, 0);
 	}
 	wpa_supplicant_cancel_scan(wpa_s);
 
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -145,6 +145,7 @@ static void wpa_supplicant_scan(void *el
 		return;
 	}
 
+	wpa_drv_flush_pmkid(wpa_s);
 	if (wpa_s->use_client_mlme) {
 		ieee80211_sta_set_probe_req_ie(wpa_s, extra_ie, extra_ie_len);
 		ret = ieee80211_sta_req_scan(wpa_s, ssid ? ssid->ssid : NULL,
@@ -157,7 +158,7 @@ static void wpa_supplicant_scan(void *el
 
 	if (ret) {
 		wpa_printf(MSG_WARNING, "Failed to initiate AP scan.");
-		wpa_supplicant_req_scan(wpa_s, 10, 0);
+		wpa_supplicant_req_scan(wpa_s, 3, 0);
 	}
 }
 
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1118,10 +1118,10 @@ void wpa_supplicant_associate(struct wpa
 
 		if (assoc_failed) {
 			/* give IBSS a bit more time */
- 			timeout = ssid->mode ? 10 : 5;
+ 			timeout = ssid->mode ? 5 : 2;
 		} else if (wpa_s->conf->ap_scan == 1) {
 			/* give IBSS a bit more time */
- 			timeout = ssid->mode ? 20 : 10;
+ 			timeout = ssid->mode ? 7 : 3;
 		}
 		wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
 	}