From 885c4c9632550e57c64204864fcabdfa405dc329 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 22 Sep 2021 12:34:17 -0700 Subject: [PATCH] scan: use oper_class/channel for OWE hidden scans If these are included in the OWE transition IE use them to scan for the OWE hidden network. --- src/scan.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/scan.c b/src/scan.c index be22f21a..be5953ad 100644 --- a/src/scan.c +++ b/src/scan.c @@ -671,6 +671,22 @@ uint32_t scan_active_full(uint64_t wdev_id, trigger, notify, userdata, destroy); } +static void scan_add_owe_freq(struct scan_freq_set *freqs, + const struct scan_bss *bss) +{ + int freq; + + if (bss->owe_trans->oper_class) + freq = oci_to_frequency(bss->owe_trans->oper_class, + bss->owe_trans->channel); + else + freq = bss->frequency; + + L_WARN_ON(freq < 0); + + scan_freq_set_add(freqs, freq); +} + static void add_owe_scan_cmd(struct scan_context *sc, struct scan_request *sr, bool ignore_flush, struct scan_freq_set *freqs, @@ -682,7 +698,9 @@ static void add_owe_scan_cmd(struct scan_context *sc, struct scan_request *sr, if (!freqs) { tmp = scan_freq_set_new(); - scan_freq_set_add(tmp, bss->frequency); + + scan_add_owe_freq(tmp, bss); + params.freqs = tmp; } else params.freqs = freqs; @@ -733,7 +751,7 @@ uint32_t scan_owe_hidden(uint64_t wdev_id, struct l_queue *list, for (entry = l_queue_get_entries(list); entry; entry = entry->next) { bss = entry->data; - scan_freq_set_add(freqs, bss->frequency); + scan_add_owe_freq(freqs, bss); /* First */ if (!ssid) {