From 1974a67b3037cf6c18179f5f47f4831ed87feaf9 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 24 Feb 2022 09:04:56 -0800 Subject: [PATCH] scan: check flush feature before using flag --- src/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scan.c b/src/scan.c index 7c510df8..12b7a3fd 100644 --- a/src/scan.c +++ b/src/scan.c @@ -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 &&