From 887073b5d992ebca415075ea91bd5705bddf1794 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 10 Oct 2022 12:40:10 -0700 Subject: [PATCH] station: skip disabled frequencies in neighbor report Use the disabled frequency list to check if the neighbor report is including a frequency which IWD cannot use. --- src/station.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/station.c b/src/station.c index fc0a40bf..b86a02a0 100644 --- a/src/station.c +++ b/src/station.c @@ -1810,6 +1810,8 @@ static void parse_neighbor_report(struct station *station, struct handshake_state *hs = netdev_get_handshake(station->netdev); const struct scan_freq_set *supported = wiphy_get_supported_freqs(station->wiphy); + const struct scan_freq_set *disabled = + wiphy_get_disabled_freqs(station->wiphy); freq_set_md = scan_freq_set_new(); freq_set_no_md = scan_freq_set_new(); @@ -1846,8 +1848,9 @@ static void parse_neighbor_report(struct station *station, if (!(band & wiphy_get_supported_bands(station->wiphy))) continue; - /* Skip if frequency is not supported */ - if (!scan_freq_set_contains(supported, freq)) + /* Skip if frequency is not supported or disabled */ + if (!scan_freq_set_contains(supported, freq) || + scan_freq_set_contains(disabled, freq)) continue; if (!memcmp(info.addr,