Root/package/hostapd/patches/310-scan_ssid.patch

1--- a/wpa_supplicant/scan.c
2+++ b/wpa_supplicant/scan.c
3@@ -248,6 +248,7 @@ static void wpa_supplicant_scan(void *el
4     enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
5 #endif /* CONFIG_WPS */
6     struct wpa_driver_scan_params params;
7+ int scan_ssid_all = 1;
8     size_t max_ssids;
9     enum wpa_states prev_state;
10 
11@@ -316,6 +317,16 @@ static void wpa_supplicant_scan(void *el
12         wpa_s->wpa_state == WPA_INACTIVE)
13         wpa_supplicant_set_state(wpa_s, WPA_SCANNING);
14 
15+ /* check if all configured ssids should be scanned directly */
16+ ssid = wpa_s->conf->ssid;
17+ while (ssid) {
18+ if (!ssid->scan_ssid) {
19+ scan_ssid_all = 0;
20+ break;
21+ }
22+ ssid = ssid->next;
23+ }
24+
25     /* Find the starting point from which to continue scanning */
26     ssid = wpa_s->conf->ssid;
27     if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
28@@ -379,6 +390,9 @@ static void wpa_supplicant_scan(void *el
29         int_array_sort_unique(params.freqs);
30     }
31 
32+ if (scan_ssid_all && !ssid)
33+ ssid = wpa_s->conf->ssid;
34+
35     if (ssid) {
36         wpa_s->prev_scan_ssid = ssid;
37         if (max_ssids > 1) {
38

Archive Download this file



interactive