3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 06:02:37 +01:00

device: introduce seen_hidden_networks flag

This flag indicates whether the hidden networks were
observed in the scan results. We drop the hidden network BSSs
after the flag is set.
This commit is contained in:
Tim Kourt 2018-06-27 16:33:03 -07:00 committed by Denis Kenzior
parent 3781c157db
commit 8ea4f82166

View File

@ -91,6 +91,7 @@ struct device {
bool signal_low : 1;
bool roam_no_orig_ap : 1;
bool ap_directed_roaming : 1;
bool seen_hidden_networks : 1;
uint32_t ap_roam_watch;
};
@ -264,6 +265,12 @@ static void process_bss(struct device *device, struct scan_bss *bss,
util_ssid_to_utf8(bss->ssid_len, bss->ssid),
bss->frequency, bss->rank, bss->signal_strength);
if (util_ssid_is_hidden(bss->ssid_len, bss->ssid)) {
l_warn("Ignoring BSS with hidden SSID");
device->seen_hidden_networks = true;
return;
}
if (!util_ssid_is_utf8(bss->ssid_len, bss->ssid)) {
l_warn("Ignoring BSS with non-UTF8 SSID");
return;
@ -342,6 +349,8 @@ void device_set_scan_results(struct device *device, struct l_queue *bss_list)
device->old_bss_list = device->bss_list;
device->bss_list = bss_list;
device->seen_hidden_networks = false;
while ((network = l_queue_pop_head(device->networks_sorted)))
network_bss_list_clear(network);