From: Bojan Prtvar Date: Mon, 11 Aug 2014 10:25:03 +0000 (+0200) Subject: wpa_supplicant: Use freq_list scan filtar in sched_scan X-Git-Tag: hostap_2_3~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cc0d6a0eb0e640a4853bfd05b5033c22fc60c73;p=thirdparty%2Fhostap.git wpa_supplicant: Use freq_list scan filtar in sched_scan Global freq_list scan filtar was taken into account only by req_scan and not by req_sched_scan. We want to allow the user to limit the channels that wpa_supplicant will scan in req_sched_scan requests as well. Signed-off-by: Bojan Prtvar --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 40eb8d847..ec808772c 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1244,6 +1244,13 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s) if (wpa_s->conf->filter_rssi) params.filter_rssi = wpa_s->conf->filter_rssi; + /* See if user specified frequencies. If so, scan only those. */ + if (wpa_s->conf->freq_list && !params.freqs) { + wpa_dbg(wpa_s, MSG_DEBUG, + "Optimize scan based on conf->freq_list"); + int_array_concat(¶ms.freqs, wpa_s->conf->freq_list); + } + scan_params = ¶ms; scan: