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;
9 enum wpa_states prev_state;
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);
15 + /* check if all configured ssids should be scanned directly */
16 + ssid = wpa_s->conf->ssid;
18 + if (!ssid->scan_ssid) {
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);
32 + if (scan_ssid_all && !ssid)
33 + ssid = wpa_s->conf->ssid;
36 wpa_s->prev_scan_ssid = ssid;