1 --- a/wpa_supplicant/scan.c
2 +++ b/wpa_supplicant/scan.c
3 @@ -423,6 +423,7 @@ static void wpa_supplicant_scan(void *el
5 struct wpabuf *extra_ie;
6 struct wpa_driver_scan_params params;
7 + int scan_ssid_all = 1;
9 enum wpa_states prev_state;
11 @@ -502,6 +503,16 @@ static void wpa_supplicant_scan(void *el
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 @@ -564,6 +575,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;