public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 01/15] wiphy: add driver quirk for the colocated scan flag
Date: Fri, 22 Aug 2025 12:51:04 -0700	[thread overview]
Message-ID: <20250822195118.271122-1-prestwoj@gmail.com> (raw)

Some drivers do not handle the colocated scan flag very well and this
results in BSS's not being seen in scans. This of course results in
very poor behavior.

This has been seen on ath11k specifically but after some
conversations [1] on the linux-wireless mailing list others have
reported issues with iwlwifi acting similarly. Since there are many
hardware variants that use both ath11k and iwlwifi this new quirk
isn't being forced to those drivers, but let users configure IWD to
disable the flag if needed.

[1] https://lore.kernel.org/linux-wireless/d1e75a08-047d-7947-d51a-2e486efead77@candelatech.com/
---
 src/wiphy.c | 23 +++++++++++++++++------
 src/wiphy.h |  1 +
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/wiphy.c b/src/wiphy.c
index fb544fe6..c7f2805e 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -75,6 +75,8 @@ enum driver_flag {
 	OWE_DISABLE = 0x8,
 	MULTICAST_RX_DISABLE = 0x10,
 	SAE_DISABLE = 0x20,
+	/* Disables use of the NL80211_SCAN_FLAG_COLOCATED_6GHZ flag in scans */
+	COLOCATED_SCAN_DISABLE = 0x40,
 };
 
 struct driver_flag_name {
@@ -103,12 +105,13 @@ static const struct driver_info driver_infos[] = {
 };
 
 static const struct driver_flag_name driver_flag_names[] = {
-	{ "DefaultInterface",   DEFAULT_IF },
-	{ "ForcePae",           FORCE_PAE },
-	{ "PowerSaveDisable",   POWER_SAVE_DISABLE },
-	{ "OweDisable",         OWE_DISABLE },
-	{ "MulticastRxDisable", MULTICAST_RX_DISABLE },
-	{ "SaeDisable",         SAE_DISABLE },
+	{ "DefaultInterface",     DEFAULT_IF },
+	{ "ForcePae",             FORCE_PAE },
+	{ "PowerSaveDisable",     POWER_SAVE_DISABLE },
+	{ "OweDisable",           OWE_DISABLE },
+	{ "MulticastRxDisable",   MULTICAST_RX_DISABLE },
+	{ "SaeDisable",           SAE_DISABLE },
+	{ "ColocatedScanDisable", COLOCATED_SCAN_DISABLE },
 };
 
 struct wiphy {
@@ -963,6 +966,11 @@ bool wiphy_supports_multicast_rx(const struct wiphy *wiphy)
 				!(wiphy->driver_flags & MULTICAST_RX_DISABLE);
 }
 
+bool wiphy_supports_colocated_flag(const struct wiphy *wiphy)
+{
+	return !(wiphy->driver_flags & COLOCATED_SCAN_DISABLE);
+}
+
 const uint8_t *wiphy_get_ht_capabilities(const struct wiphy *wiphy,
 						enum band_freq band,
 						size_t *size)
@@ -1382,6 +1390,9 @@ static void wiphy_print_basic_info(struct wiphy *wiphy)
 		if (wiphy->driver_flags & SAE_DISABLE)
 			flags = l_strv_append(flags, "SaeDisable");
 
+		if (wiphy->driver_flags & COLOCATED_SCAN_DISABLE)
+			flags = l_strv_append(flags, "ColocatedScanDisable");
+
 		joined = l_strjoinv(flags, ' ');
 
 		l_info("\tDriver Flags: %s", joined);
diff --git a/src/wiphy.h b/src/wiphy.h
index 9fcbdcd2..19d79405 100644
--- a/src/wiphy.h
+++ b/src/wiphy.h
@@ -144,6 +144,7 @@ bool wiphy_country_is_unknown(struct wiphy *wiphy);
 bool wiphy_supports_uapsd(const struct wiphy *wiphy);
 bool wiphy_supports_cmd_offchannel(const struct wiphy *wiphy);
 bool wiphy_supports_multicast_rx(const struct wiphy *wiphy);
+bool wiphy_supports_colocated_flag(const struct wiphy *wiphy);
 
 const uint8_t *wiphy_get_ht_capabilities(const struct wiphy *wiphy,
 						enum band_freq band,
-- 
2.34.1


             reply	other threads:[~2025-08-22 19:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 19:51 James Prestwood [this message]
2025-08-22 19:51 ` [PATCH 02/15] wiphy: add comments around the driver quirks James Prestwood
2025-08-22 19:51 ` [PATCH 03/15] scan: check support before using colocated flag James Prestwood
2025-08-22 19:51 ` [PATCH 04/15] monitor: add Cisco Meraki as a printable vendor James Prestwood
2025-08-22 19:51 ` [PATCH 05/15] vendor_quirks: initial skeleton James Prestwood
2025-08-23 14:43   ` Marcel Holtmann
2025-08-25 14:31     ` James Prestwood
2025-08-26 14:56   ` Denis Kenzior
2025-08-22 19:51 ` [PATCH 06/15] vendor_quirks: add two new vendor quirks James Prestwood
2025-08-23 14:46   ` Marcel Holtmann
2025-08-25 14:32     ` James Prestwood
2025-08-22 19:51 ` [PATCH 07/15] handshake: pass object to handshake_util_ap_ie_matches James Prestwood
2025-08-22 19:51 ` [PATCH 08/15] handshake: add vendor quirks into handshake object James Prestwood
2025-08-22 19:51 ` [PATCH 09/15] scan: store vendor quirks in scan_bss James Prestwood
2025-08-22 19:51 ` [PATCH 10/15] station: set vendor quirks into handshake object James Prestwood
2025-08-22 19:51 ` [PATCH 11/15] handshake: use vendor quirk to disable check of replay counters James Prestwood
2025-08-22 19:51 ` [PATCH 12/15] station: get neighbor report on BSS TM request James Prestwood
2025-08-22 19:51 ` [PATCH 13/15] station: check vendor quirk for BSS TM request candidate list James Prestwood
2025-08-23 14:48   ` Marcel Holtmann
2025-08-25 14:37     ` James Prestwood
2025-08-22 19:51 ` [PATCH 14/15] station: clear roam_freqs on delayed roam James Prestwood
2025-08-26 15:00   ` Denis Kenzior
2025-08-22 19:51 ` [PATCH 15/15] auto-t: add AP roam test for bad neighbor reports/candidate lists James Prestwood
2025-08-26 14:47 ` [PATCH 01/15] wiphy: add driver quirk for the colocated scan flag Denis Kenzior
2025-08-26 15:24   ` James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250822195118.271122-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox