1 Don't do broadcast SSID scans, if all configured SSIDs use scan_ssid=1. Improves background scanning in supplicant-managed roaming.
3 --- a/wpa_supplicant/scan.c
4 +++ b/wpa_supplicant/scan.c
5 @@ -73,6 +73,7 @@ static void wpa_supplicant_scan(void *el
6 struct wpabuf *wps_ie = NULL;
7 const u8 *extra_ie = NULL;
8 size_t extra_ie_len = 0;
9 + int scan_ssid_all = 1;
12 enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
13 @@ -82,6 +83,17 @@ static void wpa_supplicant_scan(void *el
18 + /* check if all configured ssids should be scanned directly */
19 + ssid = wpa_s->conf->ssid;
21 + if (!ssid->scan_ssid) {
28 ssid = wpa_s->conf->ssid;
30 if (!ssid->disabled) {
31 @@ -154,6 +166,10 @@ static void wpa_supplicant_scan(void *el
35 + if (scan_ssid_all && !ssid) {
36 + ssid = wpa_s->conf->ssid;
39 wpa_printf(MSG_DEBUG, "Starting AP scan (%s SSID)",
40 ssid ? "specific": "broadcast");