[package] wpa_supplicant: refresh patches
[openwrt/svn-archive/archive.git] / package / wpa_supplicant / patches / 120-ssid_scan.patch
1 Don't do broadcast SSID scans, if all configured SSIDs use scan_ssid=1. Improves background scanning in supplicant-managed roaming.
2
3 --- a/wpa_supplicant/scan.c
4 +++ b/wpa_supplicant/scan.c
5 @@ -48,11 +48,23 @@ static void wpa_supplicant_scan(void *el
6 int enabled, scan_req = 0, ret;
7 const u8 *extra_ie = NULL;
8 size_t extra_ie_len = 0;
9 + int scan_ssid_all = 1;
10
11 if (wpa_s->disconnected && !wpa_s->scan_req)
12 return;
13
14 enabled = 0;
15 +
16 + /* check if all configured ssids should be scanned directly */
17 + ssid = wpa_s->conf->ssid;
18 + while (ssid) {
19 + if (!ssid->scan_ssid) {
20 + scan_ssid_all = 0;
21 + break;
22 + }
23 + ssid = ssid->next;
24 + }
25 +
26 ssid = wpa_s->conf->ssid;
27 while (ssid) {
28 if (!ssid->disabled) {
29 @@ -125,6 +137,10 @@ static void wpa_supplicant_scan(void *el
30 return;
31 }
32
33 + if (scan_ssid_all && !ssid) {
34 + ssid = wpa_s->conf->ssid;
35 + }
36 +
37 wpa_printf(MSG_DEBUG, "Starting AP scan (%s SSID)",
38 ssid ? "specific": "broadcast");
39 if (ssid) {