summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c26d102)
raw | patch | inline | side by side (parent: c26d102)
author | Eliad Peller <eliad@wizery.com> | |
Mon, 22 Jul 2013 22:16:28 +0000 (01:16 +0300) | ||
committer | Arik Nemtsov <arik@wizery.com> | |
Wed, 18 Dec 2013 16:20:18 +0000 (18:20 +0200) |
bgscan_learn_get_probe_freq() starts from returning
the second entry in the supp_freqs arrays.
Change its logic a bit to make it start from the first
entry.
Signed-hostap: Eliad Peller <eliad@wizery.com>
the second entry in the supp_freqs arrays.
Change its logic a bit to make it start from the first
entry.
Signed-hostap: Eliad Peller <eliad@wizery.com>
wpa_supplicant/bgscan_learn.c | patch | blob | history |
index d914d27ff4dbdc21df676dcfcdf58a270a8fc465..64ec14b30682858e86f0a8c221d120debc15ebff 100644 (file)
if (data->supp_freqs == NULL)
return freqs;
- idx = data->probe_idx + 1;
- while (idx != data->probe_idx) {
- if (data->supp_freqs[idx] == 0) {
- if (data->probe_idx == 0)
- break;
- idx = 0;
- }
+ idx = data->probe_idx;
+ do {
if (!in_array(freqs, data->supp_freqs[idx])) {
wpa_printf(MSG_DEBUG, "bgscan learn: Probe new freq "
"%u", data->supp_freqs[idx]);
- data->probe_idx = idx;
+ data->probe_idx = idx + 1;
+ if (data->supp_freqs[data->probe_idx] == 0)
+ data->probe_idx = 0;
n = os_realloc_array(freqs, count + 2, sizeof(int));
if (n == NULL)
return freqs;
}
idx++;
- }
+ if (data->supp_freqs[idx] == 0)
+ idx = 0;
+ } while (idx != data->probe_idx);
return freqs;
}