DO NOT MERGE ANYWHERE Fix max number of sched scan SSIDs based on driver capability
am: 0fbcc4cde5 -s ours
* commit '0fbcc4cde5f93d092d62366ef9615b3edb8fa5f6':
DO NOT MERGE ANYWHERE Fix max number of sched scan SSIDs based on driver capability
Change-Id: Iae4610d3bc1a237c7234e0515fa6b188fe1ccee9
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 1fc4b27..e81465c 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -2259,18 +2259,10 @@
size_t i, num_ssid, num_match_ssid;
struct wpa_ssid *ssid;
struct wpa_driver_scan_params params;
- unsigned int max_sched_scan_ssids;
if (!wpa_s->sched_scan_supported)
return -1;
- if (wpa_s->max_sched_scan_ssids > WPAS_MAX_SCAN_SSIDS)
- max_sched_scan_ssids = WPAS_MAX_SCAN_SSIDS;
- else
- max_sched_scan_ssids = wpa_s->max_sched_scan_ssids;
- if (max_sched_scan_ssids < 1)
- return -1;
-
if (wpa_s->pno || wpa_s->pno_sched_pending)
return 0;
@@ -2314,10 +2306,10 @@
num_ssid++;
}
- if (num_ssid > max_sched_scan_ssids) {
+ if (num_ssid > WPAS_MAX_SCAN_SSIDS) {
wpa_printf(MSG_DEBUG, "PNO: Use only the first %u SSIDs from "
- "%u", max_sched_scan_ssids, (unsigned int) num_ssid);
- num_ssid = max_sched_scan_ssids;
+ "%u", WPAS_MAX_SCAN_SSIDS, (unsigned int) num_ssid);
+ num_ssid = WPAS_MAX_SCAN_SSIDS;
}
if (num_match_ssid > wpa_s->max_match_sets) {