3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 22:59:41 +01:00

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.
This commit is contained in:
James Prestwood 2022-10-10 12:40:10 -07:00 committed by Denis Kenzior
parent 6b81b6e46a
commit 887073b5d9

View File

@ -1810,6 +1810,8 @@ static void parse_neighbor_report(struct station *station,
struct handshake_state *hs = netdev_get_handshake(station->netdev); struct handshake_state *hs = netdev_get_handshake(station->netdev);
const struct scan_freq_set *supported = const struct scan_freq_set *supported =
wiphy_get_supported_freqs(station->wiphy); 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_md = scan_freq_set_new();
freq_set_no_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))) if (!(band & wiphy_get_supported_bands(station->wiphy)))
continue; continue;
/* Skip if frequency is not supported */ /* Skip if frequency is not supported or disabled */
if (!scan_freq_set_contains(supported, freq)) if (!scan_freq_set_contains(supported, freq) ||
scan_freq_set_contains(disabled, freq))
continue; continue;
if (!memcmp(info.addr, if (!memcmp(info.addr,