From: Benjamin Berg Date: Tue, 20 Feb 2024 13:18:17 +0000 (+0100) Subject: WNM: Don't scan frequencies of neighbors that should be ignored X-Git-Tag: hostap_2_11~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40ef706e55a8261db68b82cb0356cf7b8877495c;p=thirdparty%2Fhostap.git WNM: Don't scan frequencies of neighbors that should be ignored It does not make sense to scan for neighbors that we are not supposed to use anyway. As such, skip them. Signed-off-by: Benjamin Berg --- diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index 9cec9e451..652c6d0e7 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -1358,6 +1358,10 @@ static void wnm_set_scan_freqs(struct wpa_supplicant *wpa_s) struct neighbor_report *nei; nei = &wpa_s->wnm_neighbor_report_elements[i]; + + if (nei->preference_present && nei->preference == 0) + continue; + if (nei->freq <= 0) { wpa_printf(MSG_DEBUG, "WNM: Unknown neighbor operating frequency for "