wpa_supplicant: Problem with freq_list scan filter

Bojan Prtvar bojan.prtvar at rt-rk.com
Fri Aug 8 10:49:12 EDT 2014


Hi Janusz,

On 08/08/2014 12:05, Janusz Dziedzic wrote:
> You have to check the code, fix if needed.
> Could be also driver don't care about scan_list and scan all freq in
> some cases (in such case you can workaround this and remove scan
> results in supplicant base on freq_list?).
Thank you for your hints. By examining the code I found out that
freq_list is only taken into account by
wpa_supplicant_req_scan() (via wpa_supplicant_scan(), to be more
precise) and my error case happens on
wpa_supplicant_req_sched_scan().
So this is what I did, and this seams to fix the problem on my side.
However, I'm concerned about potential side effects, because I don't
understand the philosophy and difference
between req_scan and req_sched_scan. Can you please comment?  


diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 40eb8d8..f07da46 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1244,6 +1244,12 @@ 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 in sched
scan");
+               int_array_concat(&params.freqs, wpa_s->conf->freq_list);
+       }
        scan_params = &params;

 scan:



More information about the HostAP mailing list