3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-01 17:16:41 +02:00

scan: check flush feature before using flag

This commit is contained in:
James Prestwood 2022-02-24 09:04:56 -08:00 committed by Denis Kenzior
parent 9224575a83
commit 1974a67b30

View File

@ -362,7 +362,8 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc,
if (params->freqs)
scan_build_attr_scan_frequencies(msg, params->freqs);
if (params->flush && !ignore_flush_flag)
if (params->flush && !ignore_flush_flag && wiphy_has_feature(sc->wiphy,
NL80211_FEATURE_SCAN_FLUSH))
flags |= NL80211_SCAN_FLAG_FLUSH;
if (!is_passive && params->randomize_mac_addr_hint &&