[PATCH 06/15] vendor_quirks: add two new vendor quirks

James Prestwood <[email protected]> Fri, 22 Aug 2025 12:51:09 -0700
Newsgroups dev.linux.lists.iwd
Message-ID <[email protected]>
VENDOR_QUIRK_BAD_BSS_TM_CANDIDATE_LIST:
  When a BSS requests a station roam it can optionally include a
  list of BSS's that can be roamed to. IWD uses this list and only
  scans on those frequencies. In some cases though the AP's list
  contains very poor options and it would be better for IWD to
  request a full neighbor report.

VENDOR_QUIRK_REPLAY_COUNTER_MISMATCH:
  On some Aruba APs there is a mismatch in the replay counters
  between what is seen in scans versus authentications/associations.
  This difference is not allowed in the spec, therefore IWD will
  not connect. This quirk is intended to relax that check.
---
 src/vendor_quirks.c |  5 ++++-
 src/vendor_quirks.h | 15 +++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/vendor_quirks.c b/src/vendor_quirks.c
index ccfcb444..e005ba3b 100644
--- a/src/vendor_quirks.c
+++ b/src/vendor_quirks.c
@@ -34,7 +34,10 @@ static const struct {
 	uint8_t oui[3];
 	uint32_t quirks;
 } quirk_db[] = {
-	{ }
+	/* Cisco Meraki */
+	{ { 0x00, 0x18, 0x0a }, VENDOR_QUIRK_BAD_BSS_TM_CANDIDATE_LIST },
+	/* Hewlitt Packard, owns Aruba */
+	{ { 0x00, 0x0b, 0x86 }, VENDOR_QUIRK_REPLAY_COUNTER_MISMATCH },
 };
 
 uint32_t vendor_quirks(const uint8_t *oui)
diff --git a/src/vendor_quirks.h b/src/vendor_quirks.h
index 758073b3..6c587d45 100644
--- a/src/vendor_quirks.h
+++ b/src/vendor_quirks.h
@@ -22,4 +22,19 @@
 
 #include <stdint.h>
 
+enum vendor_quirk {
+	/*
+	 * The neighbor list in a BSS Transition Management request from an AP
+	 * contains a very sparse BSS list which generally leads to poor roaming
+	 * decisions.
+	 */
+	VENDOR_QUIRK_BAD_BSS_TM_CANDIDATE_LIST = 1 << 0,
+	/*
+	 * The PTK/GTK replay counter differs between a scan and FT
+	 * authentication. This is not allowable in the spec, but seen with
+	 * certain vendors.
+	 */
+	VENDOR_QUIRK_REPLAY_COUNTER_MISMATCH = 1 << 1,
+};
+
 uint32_t vendor_quirks(const uint8_t *oui);
-- 
2.34.1