From 8cb134f9359f020036b4bf6ebe4143769e1ea037 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 22 Aug 2025 12:51:06 -0700 Subject: [PATCH] scan: check support before using colocated flag --- src/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scan.c b/src/scan.c index dfd667bb..d9f27c83 100644 --- a/src/scan.c +++ b/src/scan.c @@ -414,7 +414,8 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc, if (params->ap_scan) flags |= NL80211_SCAN_FLAG_AP; - flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ; + if (wiphy_supports_colocated_flag(sc->wiphy)) + flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ; if (flags) l_genl_msg_append_attr(msg, NL80211_ATTR_SCAN_FLAGS, 4, &flags);