| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/11/25 04:31 | flow | patch-triage |
6mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch converts the DP peer list into a hash table in the ath12k wireless driver to optimize MAC address lookups. The ath12k driver is a vendor driver specifically for Qualcomm Wi-Fi 7 chips (e.g., QCN9274, WCN7850 via PCI, and IPQ5332 via AHB). Standard virtualized environments (QEMU and GCE) do not emulate these Qualcomm wireless ASICs, and ath12k provides no virtual or USB-emulated devices. As such, the modified driver code is structurally unreachable during fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/11/25 04:31 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 9076e1bc4c49e8d975f254607b16c32018bcbddc\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Nov 25 04:31:00 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath12k/cmn_defs.h b/drivers/net/wireless/ath/ath12k/cmn_defs.h\nindex 20208ffea1c9aa..15c5e8d11afc73 100644\n--- a/drivers/net/wireless/ath/ath12k/cmn_defs.h\n+++ b/drivers/net/wireless/ath/ath12k/cmn_defs.h\n@@ -10,6 +10,8 @@\n \n #define MAX_RADIOS 2\n #define ATH12K_MAX_DEVICES 3\n+#define ATH12K_MAX_CLIENTS 512\n+\n #define ATH12K_GROUP_MAX_RADIO (ATH12K_MAX_DEVICES * MAX_RADIOS)\n \n #define ATH12K_SCAN_MAX_LINKS\tATH12K_GROUP_MAX_RADIO\ndiff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c\nindex 719200759ca095..6e0bb1fecc09e1 100644\n--- a/drivers/net/wireless/ath/ath12k/core.c\n+++ b/drivers/net/wireless/ath/ath12k/core.c\n@@ -44,7 +44,7 @@ static const struct\n ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = {\n [ATH12K_QMI_MEMORY_MODE_DEFAULT] = {\n \t\t.num_vdevs = 17,\n-\t\t.max_client_single = 512,\n+\t\t.max_client_single = ATH12K_MAX_CLIENTS,\n \t\t.max_client_dbs = 128,\n \t\t.max_client_dbs_sbs = 128,\n \t\t.dp_params = {\ndiff --git a/drivers/net/wireless/ath/ath12k/dp_cmn.h b/drivers/net/wireless/ath/ath12k/dp_cmn.h\nindex 88abe90767eb99..ff011fafc175c4 100644\n--- a/drivers/net/wireless/ath/ath12k/dp_cmn.h\n+++ b/drivers/net/wireless/ath/ath12k/dp_cmn.h\n@@ -6,6 +6,7 @@\n #ifndef ATH12K_DP_CMN_H\n #define ATH12K_DP_CMN_H\n \n+#include \u003clinux/hashtable.h\u003e\n #include \"cmn_defs.h\"\n \n struct ath12k_hw_group;\n@@ -18,12 +19,21 @@ struct ath12k_dp_link_peer;\n */\n #define MAX_DP_PEER_LIST_SIZE 16384\n \n+/*\n+ * The hash table supports ATH12K_MAX_DEVICES * ATH12K_MAX_CLIENTS clients;\n+ * order_base_2() gives 2048 hash buckets.\n+ */\n+#define ATH12K_DP_PEER_HASH_BITS \\\n+\torder_base_2(ATH12K_MAX_DEVICES * ATH12K_MAX_CLIENTS)\n+\n struct ath12k_dp_hw {\n \tstruct ath12k_dp_peer __rcu *dp_peers[MAX_DP_PEER_LIST_SIZE];\n \n-\t/* Lock for protection of dp_peer_list and peers */\n+\t/* Lock for protection of dp_peers[] and peer_hash */\n \tspinlock_t peer_lock;\n-\tstruct list_head dp_peers_list;\n+\n+\t/* Generic hash table for fast MAC address lookup */\n+\tDECLARE_HASHTABLE(peer_hash, ATH12K_DP_PEER_HASH_BITS);\n };\n \n struct ath12k_dp_hw_group {\ndiff --git a/drivers/net/wireless/ath/ath12k/dp_peer.c b/drivers/net/wireless/ath/ath12k/dp_peer.c\nindex 4e753e6abe3ab5..5dc7f08e6292b7 100644\n--- a/drivers/net/wireless/ath/ath12k/dp_peer.c\n+++ b/drivers/net/wireless/ath/ath12k/dp_peer.c\n@@ -4,6 +4,7 @@\n * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n */\n \n+#include \u003clinux/jhash.h\u003e\n #include \"core.h\"\n #include \"dp_peer.h\"\n #include \"debug.h\"\n@@ -371,30 +372,58 @@ void ath12k_dp_link_peer_rhash_delete(struct ath12k_dp *dp,\n \t\t\t peer-\u003eaddr, peer-\u003epeer_id, ret);\n }\n \n+static u32 ath12k_dp_peer_addr_hash(const u8 *addr)\n+{\n+\treturn jhash(addr, ETH_ALEN, 0);\n+}\n+\n struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr(struct ath12k_dp_hw *dp_hw, u8 *addr)\n {\n-\tstruct ath12k_dp_peer *peer;\n+\tstruct ath12k_dp_peer *dp_peer;\n+\tu32 hash;\n \n \tlockdep_assert_held(\u0026dp_hw-\u003epeer_lock);\n \n-\tlist_for_each_entry(peer, \u0026dp_hw-\u003edp_peers_list, list) {\n-\t\tif (ether_addr_equal(peer-\u003eaddr, addr))\n-\t\t\treturn peer;\n+\thash = ath12k_dp_peer_addr_hash(addr);\n+\thash_for_each_possible(dp_hw-\u003epeer_hash, dp_peer, hash_node, hash) {\n+\t\tif (ether_addr_equal(dp_peer-\u003eaddr, addr))\n+\t\t\treturn dp_peer;\n \t}\n \n \treturn NULL;\n }\n EXPORT_SYMBOL(ath12k_dp_peer_find_by_addr);\n \n+static void ath12k_dp_peer_hash_table_add(struct ath12k_dp_hw *dp_hw,\n+\t\t\t\t\t struct ath12k_dp_peer *dp_peer)\n+{\n+\tu32 hash;\n+\n+\tlockdep_assert_held(\u0026dp_hw-\u003epeer_lock);\n+\n+\thash = ath12k_dp_peer_addr_hash(dp_peer-\u003eaddr);\n+\thash_add(dp_hw-\u003epeer_hash, \u0026dp_peer-\u003ehash_node, hash);\n+}\n+\n+void ath12k_dp_peer_hash_table_delete(struct ath12k_dp_hw *dp_hw,\n+\t\t\t\t struct ath12k_dp_peer *dp_peer)\n+{\n+\tlockdep_assert_held(\u0026dp_hw-\u003epeer_lock);\n+\n+\thash_del(\u0026dp_peer-\u003ehash_node);\n+}\n+\n struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr_and_sta(struct ath12k_dp_hw *dp_hw,\n \t\t\t\t\t\t\t u8 *addr,\n \t\t\t\t\t\t\t struct ieee80211_sta *sta)\n {\n \tstruct ath12k_dp_peer *dp_peer;\n+\tu32 hash;\n \n \tlockdep_assert_held(\u0026dp_hw-\u003epeer_lock);\n \n-\tlist_for_each_entry(dp_peer, \u0026dp_hw-\u003edp_peers_list, list) {\n+\thash = ath12k_dp_peer_addr_hash(addr);\n+\thash_for_each_possible(dp_hw-\u003epeer_hash, dp_peer, hash_node, hash) {\n \t\tif (ether_addr_equal(dp_peer-\u003eaddr, addr) \u0026\u0026 (dp_peer-\u003esta == sta))\n \t\t\treturn dp_peer;\n \t}\n@@ -408,10 +437,12 @@ static struct ath12k_dp_peer *ath12k_dp_peer_create_find(struct ath12k_dp_hw *dp\n \t\t\t\t\t\t\t bool mlo_peer)\n {\n \tstruct ath12k_dp_peer *dp_peer;\n+\tu32 hash;\n \n \tlockdep_assert_held(\u0026dp_hw-\u003epeer_lock);\n \n-\tlist_for_each_entry(dp_peer, \u0026dp_hw-\u003edp_peers_list, list) {\n+\thash = ath12k_dp_peer_addr_hash(addr);\n+\thash_for_each_possible(dp_hw-\u003epeer_hash, dp_peer, hash_node, hash) {\n \t\tif (ether_addr_equal(dp_peer-\u003eaddr, addr)) {\n \t\t\tif (!sta || mlo_peer || dp_peer-\u003eis_mlo ||\n \t\t\t dp_peer-\u003esta == sta)\n@@ -517,7 +548,7 @@ int ath12k_dp_peer_create(struct ath12k_dp_hw *dp_hw, u8 *addr,\n \n \tspin_lock_bh(\u0026dp_hw-\u003epeer_lock);\n \n-\tlist_add(\u0026dp_peer-\u003elist, \u0026dp_hw-\u003edp_peers_list);\n+\tath12k_dp_peer_hash_table_add(dp_hw, dp_peer);\n \n \t/*\n \t * For an MLO client whose ML peer ID is allocated by the host, the\n@@ -555,7 +586,7 @@ void ath12k_dp_peer_delete(struct ath12k_dp_hw *dp_hw, u8 *addr,\n \t dp_peer-\u003epeer_id != ATH12K_MLO_PEER_ID_PENDING)\n \t\trcu_assign_pointer(dp_hw-\u003edp_peers[dp_peer-\u003epeer_id], NULL);\n \n-\tlist_del(\u0026dp_peer-\u003elist);\n+\tath12k_dp_peer_hash_table_delete(dp_hw, dp_peer);\n \n \tspin_unlock_bh(\u0026dp_hw-\u003epeer_lock);\n \ndiff --git a/drivers/net/wireless/ath/ath12k/dp_peer.h b/drivers/net/wireless/ath/ath12k/dp_peer.h\nindex 2ac4c6c6d53545..0a2b9d1814a550 100644\n--- a/drivers/net/wireless/ath/ath12k/dp_peer.h\n+++ b/drivers/net/wireless/ath/ath12k/dp_peer.h\n@@ -127,7 +127,6 @@ void ath12k_dp_link_peer_extended_event(struct ath12k_base *ab, u8 vdev_id,\n \t\t\t\t\tu8 logical_link_id, u8 valid);\n \n struct ath12k_dp_peer {\n-\tstruct list_head list;\n \tbool is_mlo;\n \tbool dp_setup_done;\n \n@@ -164,6 +163,9 @@ struct ath12k_dp_peer {\n \tstruct ath12k_dp_rx_tid rx_tid[IEEE80211_NUM_TIDS + 1];\n \n \tbool use_4addr;\n+\n+\t/* Hash table node for MAC address lookup */\n+\tstruct hlist_node hash_node;\n };\n \n struct ath12k_dp_link_peer *\n@@ -212,4 +214,7 @@ ath12k_dp_link_peer_get_sta(const struct ath12k_dp_link_peer *link_peer)\n \treturn link_peer \u0026\u0026 link_peer-\u003edp_peer ?\n \t\tlink_peer-\u003edp_peer-\u003esta : NULL;\n }\n+\n+void ath12k_dp_peer_hash_table_delete(struct ath12k_dp_hw *dp_hw,\n+\t\t\t\t struct ath12k_dp_peer *dp_peer);\n #endif\ndiff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c\nindex a247dcf387def8..51ee44e72abf07 100644\n--- a/drivers/net/wireless/ath/ath12k/mac.c\n+++ b/drivers/net/wireless/ath/ath12k/mac.c\n@@ -1277,16 +1277,20 @@ void ath12k_mac_peer_cleanup_all(struct ath12k *ar)\n \n void ath12k_mac_dp_peer_cleanup(struct ath12k_hw *ah)\n {\n-\tstruct list_head peers;\n-\tstruct ath12k_dp_peer *dp_peer, *tmp;\n \tstruct ath12k_dp_hw *dp_hw = \u0026ah-\u003edp_hw;\n+\tstruct ath12k_dp_peer *dp_peer;\n+\tstruct hlist_head free_list;\n+\tstruct hlist_node *tmp;\n+\tint bkt;\n \n \tlockdep_assert_wiphy(ah-\u003ehw-\u003ewiphy);\n \n-\tINIT_LIST_HEAD(\u0026peers);\n+\tINIT_HLIST_HEAD(\u0026free_list);\n \n \tspin_lock_bh(\u0026dp_hw-\u003epeer_lock);\n-\tlist_for_each_entry_safe(dp_peer, tmp, \u0026dp_hw-\u003edp_peers_list, list) {\n+\thash_for_each_safe(dp_hw-\u003epeer_hash, bkt, tmp, dp_peer, hash_node) {\n+\t\tath12k_dp_peer_hash_table_delete(dp_hw, dp_peer);\n+\n \t\tif (dp_peer-\u003eis_mlo) {\n \t\t\tif (dp_peer-\u003epeer_id != ATH12K_MLO_PEER_ID_PENDING)\n \t\t\t\trcu_assign_pointer(dp_hw-\u003edp_peers[dp_peer-\u003epeer_id],\n@@ -1294,17 +1298,15 @@ void ath12k_mac_dp_peer_cleanup(struct ath12k_hw *ah)\n \t\t\tath12k_peer_ml_free(ah, ath12k_sta_to_ahsta(dp_peer-\u003esta));\n \t\t}\n \n-\t\tlist_move(\u0026dp_peer-\u003elist, \u0026peers);\n+\t\thlist_add_head(\u0026dp_peer-\u003ehash_node, \u0026free_list);\n \t}\n \n \tspin_unlock_bh(\u0026dp_hw-\u003epeer_lock);\n \n \tsynchronize_rcu();\n \n-\tlist_for_each_entry_safe(dp_peer, tmp, \u0026peers, list) {\n-\t\tlist_del(\u0026dp_peer-\u003elist);\n+\thlist_for_each_entry_safe(dp_peer, tmp, \u0026free_list, hash_node)\n \t\tkfree(dp_peer);\n-\t}\n }\n \n static int ath12k_mac_vdev_setup_sync(struct ath12k *ar)\n@@ -15530,7 +15532,7 @@ static struct ath12k_hw *ath12k_mac_hw_allocate(struct ath12k_hw_group *ag,\n \n \tspin_lock_init(\u0026ah-\u003esurvey_lock);\n \tspin_lock_init(\u0026ah-\u003edp_hw.peer_lock);\n-\tINIT_LIST_HEAD(\u0026ah-\u003edp_hw.dp_peers_list);\n+\thash_init(ah-\u003edp_hw.peer_hash);\n \n \tfor (i = 0; i \u003c num_pdev_map; i++) {\n \t\tab = pdev_map[i].ab;\ndiff --git a/drivers/net/wireless/ath/ath12k/wifi7/hw.c b/drivers/net/wireless/ath/ath12k/wifi7/hw.c\nindex 48a2f6da16ef58..9f2b1dddfdb4ae 100644\n--- a/drivers/net/wireless/ath/ath12k/wifi7/hw.c\n+++ b/drivers/net/wireless/ath/ath12k/wifi7/hw.c\n@@ -488,7 +488,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {\n \n \t\t.dp_primary_link_only = true,\n \t\t.client = {\n-\t\t\t.max_client_single = 512,\n+\t\t\t.max_client_single = ATH12K_MAX_CLIENTS,\n \t\t\t.max_client_dbs = 128,\n \t\t\t.max_client_dbs_sbs = 128,\n \t\t},\n@@ -587,7 +587,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {\n \n \t\t.dp_primary_link_only = false,\n \t\t.client = {\n-\t\t\t.max_client_single = 512,\n+\t\t\t.max_client_single = ATH12K_MAX_CLIENTS,\n \t\t\t.max_client_dbs = 128,\n \t\t\t.max_client_dbs_sbs = 128,\n \t\t},\n@@ -682,7 +682,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {\n \n \t\t.dp_primary_link_only = true,\n \t\t.client = {\n-\t\t\t.max_client_single = 512,\n+\t\t\t.max_client_single = ATH12K_MAX_CLIENTS,\n \t\t\t.max_client_dbs = 128,\n \t\t\t.max_client_dbs_sbs = 128,\n \t\t},\n@@ -871,7 +871,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {\n \n \t\t.dp_primary_link_only = false,\n \t\t.client = {\n-\t\t\t.max_client_single = 512,\n+\t\t\t.max_client_single = ATH12K_MAX_CLIENTS,\n \t\t\t.max_client_dbs = 128,\n \t\t\t.max_client_dbs_sbs = 128,\n \t\t},\n@@ -963,7 +963,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {\n \n \t\t.dp_primary_link_only = true,\n \t\t.client = {\n-\t\t\t.max_client_single = 512,\n+\t\t\t.max_client_single = ATH12K_MAX_CLIENTS,\n \t\t\t.max_client_dbs = 128,\n \t\t\t.max_client_dbs_sbs = 128,\n \t\t},\n"
} |
| 2/1 | 2026/11/25 04:31 | agent | patch-evaluator |
6mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch converts the DP peer list into a hash table in the ath12k wireless driver to optimize MAC address lookups. The ath12k driver is a vendor driver specifically for Qualcomm Wi-Fi 7 chips (e.g., QCN9274, WCN7850 via PCI, and IPQ5332 via AHB). Standard virtualized environments (QEMU and GCE) do not emulate these Qualcomm wireless ASICs, and ath12k provides no virtual or USB-emulated devices. As such, the modified driver code is structurally unreachable during fuzzing.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 9076e1bc4c49e8d975f254607b16c32018bcbddc
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Nov 25 04:31:00 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/ath/ath12k/cmn_defs.h b/drivers/net/wireless/ath/ath12k/cmn_defs.h
index 20208ffea1c9aa..15c5e8d11afc73 100644
--- a/drivers/net/wireless/ath/ath12k/cmn_defs.h
+++ b/drivers/net/wireless/ath/ath12k/cmn_defs.h
@@ -10,6 +10,8 @@
#define MAX_RADIOS 2
#define ATH12K_MAX_DEVICES 3
+#define ATH12K_MAX_CLIENTS 512
+
#define ATH12K_GROUP_MAX_RADIO (ATH12K_MAX_DEVICES * MAX_RADIOS)
#define ATH12K_SCAN_MAX_LINKS ATH12K_GROUP_MAX_RADIO
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index 719200759ca095..6e0bb1fecc09e1 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -44,7 +44,7 @@ static const struct
ath12k_mem_profile_based_param ath12k_mem_profile_based_param[] = {
[ATH12K_QMI_MEMORY_MODE_DEFAULT] = {
.num_vdevs = 17,
- .max_client_single = 512,
+ .max_client_single = ATH12K_MAX_CLIENTS,
.max_client_dbs = 128,
.max_client_dbs_sbs = 128,
.dp_params = {
diff --git a/drivers/net/wireless/ath/ath12k/dp_cmn.h b/drivers/net/wireless/ath/ath12k/dp_cmn.h
index 88abe90767eb99..ff011fafc175c4 100644
--- a/drivers/net/wireless/ath/ath12k/dp_cmn.h
+++ b/drivers/net/wireless/ath/ath12k/dp_cmn.h
@@ -6,6 +6,7 @@
#ifndef ATH12K_DP_CMN_H
#define ATH12K_DP_CMN_H
+#include <linux/hashtable.h>
#include "cmn_defs.h"
struct ath12k_hw_group;
@@ -18,12 +19,21 @@ struct ath12k_dp_link_peer;
*/
#define MAX_DP_PEER_LIST_SIZE 16384
+/*
+ * The hash table supports ATH12K_MAX_DEVICES * ATH12K_MAX_CLIENTS clients;
+ * order_base_2() gives 2048 hash buckets.
+ */
+#define ATH12K_DP_PEER_HASH_BITS \
+ order_base_2(ATH12K_MAX_DEVICES * ATH12K_MAX_CLIENTS)
+
struct ath12k_dp_hw {
struct ath12k_dp_peer __rcu *dp_peers[MAX_DP_PEER_LIST_SIZE];
- /* Lock for protection of dp_peer_list and peers */
+ /* Lock for protection of dp_peers[] and peer_hash */
spinlock_t peer_lock;
- struct list_head dp_peers_list;
+
+ /* Generic hash table for fast MAC address lookup */
+ DECLARE_HASHTABLE(peer_hash, ATH12K_DP_PEER_HASH_BITS);
};
struct ath12k_dp_hw_group {
diff --git a/drivers/net/wireless/ath/ath12k/dp_peer.c b/drivers/net/wireless/ath/ath12k/dp_peer.c
index 4e753e6abe3ab5..5dc7f08e6292b7 100644
--- a/drivers/net/wireless/ath/ath12k/dp_peer.c
+++ b/drivers/net/wireless/ath/ath12k/dp_peer.c
@@ -4,6 +4,7 @@
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
+#include <linux/jhash.h>
#include "core.h"
#include "dp_peer.h"
#include "debug.h"
@@ -371,30 +372,58 @@ void ath12k_dp_link_peer_rhash_delete(struct ath12k_dp *dp,
peer->addr, peer->peer_id, ret);
}
+static u32 ath12k_dp_peer_addr_hash(const u8 *addr)
+{
+ return jhash(addr, ETH_ALEN, 0);
+}
+
struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr(struct ath12k_dp_hw *dp_hw, u8 *addr)
{
- struct ath12k_dp_peer *peer;
+ struct ath12k_dp_peer *dp_peer;
+ u32 hash;
lockdep_assert_held(&dp_hw->peer_lock);
- list_for_each_entry(peer, &dp_hw->dp_peers_list, list) {
- if (ether_addr_equal(peer->addr, addr))
- return peer;
+ hash = ath12k_dp_peer_addr_hash(addr);
+ hash_for_each_possible(dp_hw->peer_hash, dp_peer, hash_node, hash) {
+ if (ether_addr_equal(dp_peer->addr, addr))
+ return dp_peer;
}
return NULL;
}
EXPORT_SYMBOL(ath12k_dp_peer_find_by_addr);
+static void ath12k_dp_peer_hash_table_add(struct ath12k_dp_hw *dp_hw,
+ struct ath12k_dp_peer *dp_peer)
+{
+ u32 hash;
+
+ lockdep_assert_held(&dp_hw->peer_lock);
+
+ hash = ath12k_dp_peer_addr_hash(dp_peer->addr);
+ hash_add(dp_hw->peer_hash, &dp_peer->hash_node, hash);
+}
+
+void ath12k_dp_peer_hash_table_delete(struct ath12k_dp_hw *dp_hw,
+ struct ath12k_dp_peer *dp_peer)
+{
+ lockdep_assert_held(&dp_hw->peer_lock);
+
+ hash_del(&dp_peer->hash_node);
+}
+
struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr_and_sta(struct ath12k_dp_hw *dp_hw,
u8 *addr,
struct ieee80211_sta *sta)
{
struct ath12k_dp_peer *dp_peer;
+ u32 hash;
lockdep_assert_held(&dp_hw->peer_lock);
- list_for_each_entry(dp_peer, &dp_hw->dp_peers_list, list) {
+ hash = ath12k_dp_peer_addr_hash(addr);
+ hash_for_each_possible(dp_hw->peer_hash, dp_peer, hash_node, hash) {
if (ether_addr_equal(dp_peer->addr, addr) && (dp_peer->sta == sta))
return dp_peer;
}
@@ -408,10 +437,12 @@ static struct ath12k_dp_peer *ath12k_dp_peer_create_find(struct ath12k_dp_hw *dp
bool mlo_peer)
{
struct ath12k_dp_peer *dp_peer;
+ u32 hash;
lockdep_assert_held(&dp_hw->peer_lock);
- list_for_each_entry(dp_peer, &dp_hw->dp_peers_list, list) {
+ hash = ath12k_dp_peer_addr_hash(addr);
+ hash_for_each_possible(dp_hw->peer_hash, dp_peer, hash_node, hash) {
if (ether_addr_equal(dp_peer->addr, addr)) {
if (!sta || mlo_peer || dp_peer->is_mlo ||
dp_peer->sta == sta)
@@ -517,7 +548,7 @@ int ath12k_dp_peer_create(struct ath12k_dp_hw *dp_hw, u8 *addr,
spin_lock_bh(&dp_hw->peer_lock);
- list_add(&dp_peer->list, &dp_hw->dp_peers_list);
+ ath12k_dp_peer_hash_table_add(dp_hw, dp_peer);
/*
* For an MLO client whose ML peer ID is allocated by the host, the
@@ -555,7 +586,7 @@ void ath12k_dp_peer_delete(struct ath12k_dp_hw *dp_hw, u8 *addr,
dp_peer->peer_id != ATH12K_MLO_PEER_ID_PENDING)
rcu_assign_pointer(dp_hw->dp_peers[dp_peer->peer_id], NULL);
- list_del(&dp_peer->list);
+ ath12k_dp_peer_hash_table_delete(dp_hw, dp_peer);
spin_unlock_bh(&dp_hw->peer_lock);
diff --git a/drivers/net/wireless/ath/ath12k/dp_peer.h b/drivers/net/wireless/ath/ath12k/dp_peer.h
index 2ac4c6c6d53545..0a2b9d1814a550 100644
--- a/drivers/net/wireless/ath/ath12k/dp_peer.h
+++ b/drivers/net/wireless/ath/ath12k/dp_peer.h
@@ -127,7 +127,6 @@ void ath12k_dp_link_peer_extended_event(struct ath12k_base *ab, u8 vdev_id,
u8 logical_link_id, u8 valid);
struct ath12k_dp_peer {
- struct list_head list;
bool is_mlo;
bool dp_setup_done;
@@ -164,6 +163,9 @@ struct ath12k_dp_peer {
struct ath12k_dp_rx_tid rx_tid[IEEE80211_NUM_TIDS + 1];
bool use_4addr;
+
+ /* Hash table node for MAC address lookup */
+ struct hlist_node hash_node;
};
struct ath12k_dp_link_peer *
@@ -212,4 +214,7 @@ ath12k_dp_link_peer_get_sta(const struct ath12k_dp_link_peer *link_peer)
return link_peer && link_peer->dp_peer ?
link_peer->dp_peer->sta : NULL;
}
+
+void ath12k_dp_peer_hash_table_delete(struct ath12k_dp_hw *dp_hw,
+ struct ath12k_dp_peer *dp_peer);
#endif
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index a247dcf387def8..51ee44e72abf07 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -1277,16 +1277,20 @@ void ath12k_mac_peer_cleanup_all(struct ath12k *ar)
void ath12k_mac_dp_peer_cleanup(struct ath12k_hw *ah)
{
- struct list_head peers;
- struct ath12k_dp_peer *dp_peer, *tmp;
struct ath12k_dp_hw *dp_hw = &ah->dp_hw;
+ struct ath12k_dp_peer *dp_peer;
+ struct hlist_head free_list;
+ struct hlist_node *tmp;
+ int bkt;
lockdep_assert_wiphy(ah->hw->wiphy);
- INIT_LIST_HEAD(&peers);
+ INIT_HLIST_HEAD(&free_list);
spin_lock_bh(&dp_hw->peer_lock);
- list_for_each_entry_safe(dp_peer, tmp, &dp_hw->dp_peers_list, list) {
+ hash_for_each_safe(dp_hw->peer_hash, bkt, tmp, dp_peer, hash_node) {
+ ath12k_dp_peer_hash_table_delete(dp_hw, dp_peer);
+
if (dp_peer->is_mlo) {
if (dp_peer->peer_id != ATH12K_MLO_PEER_ID_PENDING)
rcu_assign_pointer(dp_hw->dp_peers[dp_peer->peer_id],
@@ -1294,17 +1298,15 @@ void ath12k_mac_dp_peer_cleanup(struct ath12k_hw *ah)
ath12k_peer_ml_free(ah, ath12k_sta_to_ahsta(dp_peer->sta));
}
- list_move(&dp_peer->list, &peers);
+ hlist_add_head(&dp_peer->hash_node, &free_list);
}
spin_unlock_bh(&dp_hw->peer_lock);
synchronize_rcu();
- list_for_each_entry_safe(dp_peer, tmp, &peers, list) {
- list_del(&dp_peer->list);
+ hlist_for_each_entry_safe(dp_peer, tmp, &free_list, hash_node)
kfree(dp_peer);
- }
}
static int ath12k_mac_vdev_setup_sync(struct ath12k *ar)
@@ -15530,7 +15532,7 @@ static struct ath12k_hw *ath12k_mac_hw_allocate(struct ath12k_hw_group *ag,
spin_lock_init(&ah->survey_lock);
spin_lock_init(&ah->dp_hw.peer_lock);
- INIT_LIST_HEAD(&ah->dp_hw.dp_peers_list);
+ hash_init(ah->dp_hw.peer_hash);
for (i = 0; i < num_pdev_map; i++) {
ab = pdev_map[i].ab;
diff --git a/drivers/net/wireless/ath/ath12k/wifi7/hw.c b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
index 48a2f6da16ef58..9f2b1dddfdb4ae 100644
--- a/drivers/net/wireless/ath/ath12k/wifi7/hw.c
+++ b/drivers/net/wireless/ath/ath12k/wifi7/hw.c
@@ -488,7 +488,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
.dp_primary_link_only = true,
.client = {
- .max_client_single = 512,
+ .max_client_single = ATH12K_MAX_CLIENTS,
.max_client_dbs = 128,
.max_client_dbs_sbs = 128,
},
@@ -587,7 +587,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
.dp_primary_link_only = false,
.client = {
- .max_client_single = 512,
+ .max_client_single = ATH12K_MAX_CLIENTS,
.max_client_dbs = 128,
.max_client_dbs_sbs = 128,
},
@@ -682,7 +682,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
.dp_primary_link_only = true,
.client = {
- .max_client_single = 512,
+ .max_client_single = ATH12K_MAX_CLIENTS,
.max_client_dbs = 128,
.max_client_dbs_sbs = 128,
},
@@ -871,7 +871,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
.dp_primary_link_only = false,
.client = {
- .max_client_single = 512,
+ .max_client_single = ATH12K_MAX_CLIENTS,
.max_client_dbs = 128,
.max_client_dbs_sbs = 128,
},
@@ -963,7 +963,7 @@ static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = {
.dp_primary_link_only = true,
.client = {
- .max_client_single = 512,
+ .max_client_single = ATH12K_MAX_CLIENTS,
.max_client_dbs = 128,
.max_client_dbs_sbs = 128,
},
|
| 3/2 | 2026/11/25 04:31 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7649 output: 41 thoughts: 413 Thoughts: **Analyzing the ath12k Driver Modification** Okay, so the changes are focused on `drivers/net/wireless/ath/ath12k`. My initial assessment is that they are making some significant alterations. Looks like we're bumping the maximum clients from a hardcoded 512 to a defined constant, `ATH12K_MAX_CLIENTS`, in `cmn_defs.h` and then using that constant in `core.c` and `wifi7/hw.c`. Standard practice – good to see the hardcoded magic numbers being replaced with symbolic constants. The more interesting changes are happening around peer management in `dp_cmn.h`, `dp_peer.c`, and `dp_peer.h`. It appears they're moving from a linked-list implementation (`struct list_head dp_peers_list;`) to a hash table (`DECLARE_HASHTABLE(peer_hash, ATH12K_DP_PEER_HASH_BITS);`). The structure `struct ath12k_dp_peer` is updated as well, replacing `struct list_head list` with `struct hlist_node hash_node`. The file `dp_peer.c` has all the associated changes. I see calls to `ath12k_dp_peer_find_by_addr`, `ath12k_dp_peer_hash_table_add`, `ath12k_dp_peer_hash_table_delete`, and other functions to handle the hash table operations. This is a pretty substantial performance optimization if they are anticipating lots of clients. Hash table lookups should be faster than linear searches through a linked list, especially as the number of clients grows. Finally, `mac.c` sees some changes in `ath12k_mac_dp_peer_cleanup` and `ath12k_mac_hw_allocate`, so it's a ripple effect across the codebase, as expected. Now, I need to understand the hardware implications of this. I need to know if the `ath12k` driver is even practical for my environments. Is this even reachable in a standard virtualized environment like GCE or QEMU? I have to consider the bus architecture. I wonder which buses ath12k supports – is it PCI, AHB, USB, something else? I should probably search the kernel documentation or codebase for information about the bus support for `ath12k`. That'll be my next step. |
| 4/2 | 2026/11/25 04:31 | tool | grepper |
0mArgs:{
"Expression": "ath12k_.*_probe",
"PathPrefixes": [
"drivers/net/wireless/ath/ath12k"
]
}Results: {
"Output": "drivers/net/wireless/ath/ath12k/ahb.c=1312=ath12k_ahb_get_device_family(const struct platform_device *pdev)\n--\ndrivers/net/wireless/ath/ath12k/ahb.c-1332-\ndrivers/net/wireless/ath/ath12k/ahb.c:1333:static int ath12k_ahb_probe(struct platform_device *pdev)\ndrivers/net/wireless/ath/ath12k/ahb.c-1334-{\n--\ndrivers/net/wireless/ath/ath12k/ahb.c=1513=int ath12k_ahb_register_driver(const enum ath12k_device_family device_id,\n--\ndrivers/net/wireless/ath/ath12k/ahb.c-1534-\tahb_driver-\u003edriver.of_match_table = driver-\u003eid_table;\ndrivers/net/wireless/ath/ath12k/ahb.c:1535:\tahb_driver-\u003eprobe = ath12k_ahb_probe;\ndrivers/net/wireless/ath/ath12k/ahb.c-1536-\tahb_driver-\u003eremove = ath12k_ahb_remove;\n--\ndrivers/net/wireless/ath/ath12k/mac.c=4439=static int ath12k_mac_fils_discovery(struct ath12k_link_vif *arvif,\n--\ndrivers/net/wireless/ath/ath12k/mac.c-4464-\t\tif (tmpl)\ndrivers/net/wireless/ath/ath12k/mac.c:4465:\t\t\tret = ath12k_wmi_probe_resp_tmpl(ar, arvif-\u003evdev_id,\ndrivers/net/wireless/ath/ath12k/mac.c-4466-\t\t\t\t\t\t\t tmpl);\n--\ndrivers/net/wireless/ath/ath12k/pci.c=1536=ath12k_get_device_family(const struct pci_device_id *pci_dev)\n--\ndrivers/net/wireless/ath/ath12k/pci.c-1556-\ndrivers/net/wireless/ath/ath12k/pci.c:1557:static int ath12k_pci_probe(struct pci_dev *pdev,\ndrivers/net/wireless/ath/ath12k/pci.c-1558-\t\t\t const struct pci_device_id *pci_dev)\n--\ndrivers/net/wireless/ath/ath12k/pci.c=1837=int ath12k_pci_register_driver(const enum ath12k_device_family device_id,\n--\ndrivers/net/wireless/ath/ath12k/pci.c-1858-\tpci_driver-\u003eid_table = driver-\u003eid_table;\ndrivers/net/wireless/ath/ath12k/pci.c:1859:\tpci_driver-\u003eprobe = ath12k_pci_probe;\ndrivers/net/wireless/ath/ath12k/pci.c-1860-\tpci_driver-\u003eremove = ath12k_pci_remove;\n--\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c=61=static u32 ath12k_wifi7_ahb_get_userpd_id(struct ath12k_base *ab)\n--\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c-80-\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c:81:static int ath12k_wifi7_ahb_probe(struct platform_device *pdev)\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c-82-{\n--\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c=117=static struct ath12k_ahb_driver ath12k_wifi7_ahb_driver = {\n--\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c-120-\t.reg_base = \u0026ath12k_wifi7_ahb_reg_base,\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c:121:\t.ops.probe = ath12k_wifi7_ahb_probe,\ndrivers/net/wireless/ath/ath12k/wifi7/ahb.c-122-\t.ops.arch_init = ath12k_wifi7_arch_init,\n--\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c=65=void ath12k_wifi7_pci_read_hw_version(struct ath12k_base *ab,\n--\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-74-\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c:75:static int ath12k_wifi7_pci_probe(struct pci_dev *pdev,\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-76-\t\t\t\t const struct pci_device_id *pci_dev)\n--\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c=172=static struct ath12k_pci_driver ath12k_wifi7_pci_driver = {\n--\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-174-\t.id_table = ath12k_wifi7_pci_id_table,\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c:175:\t.ops.probe = ath12k_wifi7_pci_probe,\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-176-\t.reg_base = \u0026ath12k_wifi7_reg_base,\n--\ndrivers/net/wireless/ath/ath12k/wmi.c=3981=int ath12k_wmi_fils_discovery_tmpl(struct ath12k *ar, u32 vdev_id,\n--\ndrivers/net/wireless/ath/ath12k/wmi.c-4021-\ndrivers/net/wireless/ath/ath12k/wmi.c:4022:int ath12k_wmi_probe_resp_tmpl(struct ath12k *ar, u32 vdev_id,\ndrivers/net/wireless/ath/ath12k/wmi.c-4023-\t\t\t struct sk_buff *tmpl)\n--\ndrivers/net/wireless/ath/ath12k/wmi.h=6683=int ath12k_wmi_fils_discovery(struct ath12k *ar, u32 vdev_id, u32 interval,\ndrivers/net/wireless/ath/ath12k/wmi.h-6684-\t\t\t bool unsol_bcast_probe_resp_enabled);\ndrivers/net/wireless/ath/ath12k/wmi.h:6685:int ath12k_wmi_probe_resp_tmpl(struct ath12k *ar, u32 vdev_id,\ndrivers/net/wireless/ath/ath12k/wmi.h-6686-\t\t\t struct sk_buff *tmpl);\n"
} |
| 5/2 | 2026/11/25 04:31 | llm | patch-evaluator |
1mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10547 output: 34 thoughts: 73 Thoughts: **Investigating ath12k Device Support** Okay, let's dive into the specifics of what ath12k actually supports. My immediate question is around USB; does this driver play nice with USB devices at all? Seems like the answer is no, it's PCI and AHB based, a platform device. Now, I should make sure I haven't missed any edge cases. I'm wondering if there's any mention of USB, even in a tangential way, or perhaps some hidden mac80211 hwsim or emulation features that I'm overlooking. Time to execute a quick grep to make sure nothing has gone unnoticed. I'll search for "usb" and anything related, just to be thorough. |
| 6/2 | 2026/11/25 04:33 | tool | grepper |
0mArgs:{
"Expression": "usb",
"PathPrefixes": [
"drivers/net/wireless/ath/ath12k"
]
}Results: {
"Output": "no matches"
} |
| 7/2 | 2026/11/25 04:33 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10822 output: 36 thoughts: 13 Thoughts: Okay, here's my summary, tailored for an expert audience, as if I'm thinking these thoughts myself: **Examining the ath12k PCI Landscape** Alright, let's get down to brass tacks. I need to get a clear picture of the ath12k PCI devices currently in play. I'm going to take a look at precisely what's out there on the PCI bus, specifically focusing on any devices flagged as ath12k. This is the first step; I need a foundation to build on before I start deeper diagnostics or analysis. Without this basic inventory, I'm flying blind. Let's see what's what. |
| 8/2 | 2026/11/25 04:33 | tool | grepper |
0mArgs:{
"Expression": "PCI_DEVICE",
"PathPrefixes": [
"drivers/net/wireless/ath/ath12k"
]
}Results: {
"Output": "drivers/net/wireless/ath/ath12k/pci.c=858=static int ath12k_pci_claim(struct ath12k_pci *ab_pci, struct pci_dev *pdev)\n--\ndrivers/net/wireless/ath/ath12k/pci.c-863-\ndrivers/net/wireless/ath/ath12k/pci.c:864:\tpci_read_config_word(pdev, PCI_DEVICE_ID, \u0026device_id);\ndrivers/net/wireless/ath/ath12k/pci.c-865-\tif (device_id != ab_pci-\u003edev_id) {\n"
} |
| 9/2 | 2026/11/25 04:33 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11196 output: 47 thoughts: 23 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Analyzing the ath12k_wifi7_pci_id_table** Alright, let's dive in. My immediate thought is, "What specifically does this `ath12k_wifi7_pci_id_table` reveal?" I'm assuming this is a table of PCI device IDs relevant to the ath12k driver, probably for WiFi 7 hardware. My mind is already racing through possible use cases: * **Hardware compatibility:** Is this table exhaustive, or are there gaps? I'll be looking for any entries related to chipsets I'm familiar with, hoping to see the relevant entries. * **Driver support:** Does this provide a clear picture of which hardware is actively being targeted and supported by the driver? * **Revision tracking:** Is there a revision or versioning scheme within the entries? That would indicate how aggressively new silicon revisions are incorporated. * **Power management implications:** Is there information that might suggest different power profiles or operating modes based on the device ID? * **Interoperability:** How will this table impact the co-existence of devices? * **Regulatory domains:** Do the entries implicitly support regulatory domain configurations? * **Debugging:** How could I use this table to debug driver loading issues or device detection problems? Basically, I want to understand the *scope* of the table. I need to get a baseline understanding of what it represents to start. Is it simply a list, or is there more nuanced data encoded? This table is a starting point for figuring out what the driver thinks about the hardware, so it’s going to be essential for understanding what the possibilities of the hardware are. |
| 10/2 | 2026/11/25 04:34 | tool | grepper |
0mArgs:{
"Expression": "ath12k_wifi7_pci_id_table",
"PathPrefixes": [
"drivers/net/wireless/ath/ath12k"
]
}Results: {
"Output": "drivers/net/wireless/ath/ath12k/wifi7/pci.c-30-\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c:31:static const struct pci_device_id ath12k_wifi7_pci_id_table[] = {\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-32-\t{ PCI_VDEVICE(QCOM, QCN9274_DEVICE_ID) },\n--\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-37-\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c:38:MODULE_DEVICE_TABLE(pci, ath12k_wifi7_pci_id_table);\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-39-\n--\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c=172=static struct ath12k_pci_driver ath12k_wifi7_pci_driver = {\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-173-\t.name = \"ath12k_wifi7_pci\",\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c:174:\t.id_table = ath12k_wifi7_pci_id_table,\ndrivers/net/wireless/ath/ath12k/wifi7/pci.c-175-\t.ops.probe = ath12k_wifi7_pci_probe,\n"
} |
| 11/2 | 2026/11/25 04:34 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12069 output: 47 thoughts: 81 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Initial Assessment of Wi-Fi 7 PCI ID Table** Right, so I'm looking at this `ath12k_wifi7_pci_id_table` – interesting, as expected, it's *exclusively* populated with Qualcomm Wi-Fi 7 silicon, specifically the QCN9274, WCN7850, and their ilk. No Broadcom or Intel entries here, which is pretty much the norm at this stage in the 802.11be landscape. Given this focused implementation, I'm probably going to find that the code itself has significant Qualcomm-specific dependencies. Time to dig in and see the full picture. Let's pull up the source file: `drivers/net/wireless/ath/ath12k/wifi7/pci.c`. I need to confirm the assumptions, and get a better understanding of the table's structure and any associated driver logic. |
| 12/2 | 2026/11/25 04:35 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath12k/wifi7/pci.c",
"FirstLine": 25,
"LineCount": 25
}Results: {
"Contents": " 25:\t#define ATH12K_PCI_W7_SOC_HW_VERSION_2\t2\n 26:\t\n 27:\t#define TCSR_SOC_HW_VERSION\t\t0x1B00000\n 28:\t#define TCSR_SOC_HW_VERSION_MAJOR_MASK\tGENMASK(11, 8)\n 29:\t#define TCSR_SOC_HW_VERSION_MINOR_MASK\tGENMASK(7, 4)\n 30:\t\n 31:\tstatic const struct pci_device_id ath12k_wifi7_pci_id_table[] = {\n 32:\t\t{ PCI_VDEVICE(QCOM, QCN9274_DEVICE_ID) },\n 33:\t\t{ PCI_VDEVICE(QCOM, WCN7850_DEVICE_ID) },\n 34:\t\t{ PCI_VDEVICE(QCOM, QCC2072_DEVICE_ID) },\n 35:\t\t{}\n 36:\t};\n 37:\t\n 38:\tMODULE_DEVICE_TABLE(pci, ath12k_wifi7_pci_id_table);\n 39:\t\n 40:\tstatic const struct ath12k_pci_ops ath12k_wifi7_pci_ops_qcn9274 = {\n 41:\t\t.wakeup = NULL,\n 42:\t\t.release = NULL,\n 43:\t};\n 44:\t\n 45:\tstatic int ath12k_wifi7_pci_bus_wake_up(struct ath12k_base *ab)\n 46:\t{\n 47:\t\tstruct ath12k_pci *ab_pci = ath12k_pci_priv(ab);\n 48:\t\n 49:\t\treturn mhi_device_get_sync(ab_pci-\u003emhi_ctrl-\u003emhi_dev);\n"
} |
| 13/2 | 2026/11/25 04:35 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12914 output: 28 thoughts: 369 Thoughts: **Analyzing the Fuzzing Potential of Qualcomm WiFi 7 Devices** Okay, so I'm looking at these Qualcomm WiFi 7 PCI devices, specifically the QCN9274, WCN7850, and QCC2072, alongside some AHB devices like the IPQ5332. The immediate hurdle is that neither QEMU nor Google Compute Engine (GCE) emulates these Qualcomm WiFi 7 chips. That's a problem for straightforward fuzzing. Now, I need to check the "WorthFuzzing" criteria. Specifically, the negative criteria. The key point is "Structurally unreachable hardware." It explicitly lists vendor-specific PCIe switches, SmartNICs, and GPU drivers that require physical ASICs or PCIe cards, which aren't emulated in standard QEMU. But wait, what about wireless drivers in general? Are we talking about a similar situation? Can something like mac80211 hwsim, or any virtual device, hook into and make use of ath12k? Ah, no, mac80211_hwsim is a completely separate driver. It's its own implementation of a virtual mac80211 radio. So, it's independent. And ath12k is a specific vendor driver for Qualcomm IEEE 802.11be (Wi-Fi 7) wireless LAN chips. It's clear that ath12k uses mac80211, but, crucially, mac80211 doesn't directly call *into* ath12k unless an ath12k device is actually probed and registered. Therefore, ath12k *is* vendor-specific. And, importantly, I need to verify that there are no significant external calls, and therefore no other way to get to it in the kernel. So, to double-check this, let me verify that. Are there any callers of ath12k functions from outside ath12k? Time to check for exported symbols like `ath12k_dp_peer_find_by_addr` or any other exposed functions. If there are none, that further cements the conclusion that this is structurally unreachable without the physical hardware. |
| 14/2 | 2026/11/25 04:35 | tool | grepper |
0mArgs:{
"Expression": "ath12k_dp_peer_find_by_addr"
}Results: {
"Output": "drivers/net/wireless/ath/ath12k/dp_peer.c=375=static u32 ath12k_dp_peer_addr_hash(const u8 *addr)\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c-379-\ndrivers/net/wireless/ath/ath12k/dp_peer.c:380:struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr(struct ath12k_dp_hw *dp_hw, u8 *addr)\ndrivers/net/wireless/ath/ath12k/dp_peer.c-381-{\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c-394-}\ndrivers/net/wireless/ath/ath12k/dp_peer.c:395:EXPORT_SYMBOL(ath12k_dp_peer_find_by_addr);\ndrivers/net/wireless/ath/ath12k/dp_peer.c-396-\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c=408=void ath12k_dp_peer_hash_table_delete(struct ath12k_dp_hw *dp_hw,\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c-415-\ndrivers/net/wireless/ath/ath12k/dp_peer.c:416:struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr_and_sta(struct ath12k_dp_hw *dp_hw,\ndrivers/net/wireless/ath/ath12k/dp_peer.c-417-\t\t\t\t\t\t\t u8 *addr,\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c=572=void ath12k_dp_peer_delete(struct ath12k_dp_hw *dp_hw, u8 *addr,\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c-578-\ndrivers/net/wireless/ath/ath12k/dp_peer.c:579:\tdp_peer = ath12k_dp_peer_find_by_addr_and_sta(dp_hw, addr, sta);\ndrivers/net/wireless/ath/ath12k/dp_peer.c-580-\tif (!dp_peer) {\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c=640=int ath12k_dp_link_peer_assign(struct ath12k_dp *dp, struct ath12k_dp_hw *dp_hw,\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c-661-\ndrivers/net/wireless/ath/ath12k/dp_peer.c:662:\tdp_peer = ath12k_dp_peer_find_by_addr_and_sta(dp_hw, dp_peer_mac, sta);\ndrivers/net/wireless/ath/ath12k/dp_peer.c-663-\tif (!dp_peer) {\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c=821=int ath12k_dp_peer_fixup_peer_id(struct ath12k_base *ab,\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.c-839-\t\tspin_lock_bh(\u0026ah-\u003edp_hw.peer_lock);\ndrivers/net/wireless/ath/ath12k/dp_peer.c:840:\t\tdp_peer = ath12k_dp_peer_find_by_addr(\u0026ah-\u003edp_hw,\ndrivers/net/wireless/ath/ath12k/dp_peer.c-841-\t\t\t\t\t\t (u8 *)peer_addr);\n--\ndrivers/net/wireless/ath/ath12k/dp_peer.h=190=void ath12k_dp_peer_delete(struct ath12k_dp_hw *dp_hw, u8 *addr,\ndrivers/net/wireless/ath/ath12k/dp_peer.h-191-\t\t\t struct ieee80211_sta *sta);\ndrivers/net/wireless/ath/ath12k/dp_peer.h:192:struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr(struct ath12k_dp_hw *dp_hw, u8 *addr);\ndrivers/net/wireless/ath/ath12k/dp_peer.h:193:struct ath12k_dp_peer *ath12k_dp_peer_find_by_addr_and_sta(struct ath12k_dp_hw *dp_hw,\ndrivers/net/wireless/ath/ath12k/dp_peer.h-194-\t\t\t\t\t\t\t u8 *addr,\n--\ndrivers/net/wireless/ath/ath12k/wifi7/hw.c=115=ath12k_wifi7_is_frame_link_agnostic_wcn7850(struct ath12k_link_vif *arvif,\n--\ndrivers/net/wireless/ath/ath12k/wifi7/hw.c-127-\t\tspin_lock_bh(\u0026ah-\u003edp_hw.peer_lock);\ndrivers/net/wireless/ath/ath12k/wifi7/hw.c:128:\t\tpeer = ath12k_dp_peer_find_by_addr(\u0026ah-\u003edp_hw, mgmt-\u003eda);\ndrivers/net/wireless/ath/ath12k/wifi7/hw.c-129-\t\tif (!peer || (peer \u0026\u0026 !peer-\u003eis_mlo)) {\n"
} |
| 15/2 | 2026/11/25 04:35 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15234 output: 40 thoughts: 97 Thoughts: Here's my analysis of the situation: **Investigating the Exported Symbols in the ath12k Driver** Okay, so I'm looking into these calls, and it's clear they're all *within* the `ath12k` driver's code itself, specifically in the `drivers/net/wireless/ath/ath12k/wifi7/` and `drivers/net/wireless/ath/ath12k/` directories. That's the first observation. My immediate question is: why are these symbols being *exported*? They should be internal. The only reason that I can think of is that there must be a modular build scenario in play. Aha! The driver can be split up into modules, either `ath12k` alone or `ath12k` and `ath12k_wifi7` modules. Okay, now I need to check the `Makefile` in `drivers/net/wireless/ath/ath12k/`. That should give me the crucial clues about the modularization logic and the conditional export of symbols. Time to dig into that. |
| 16/2 | 2026/11/25 04:36 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath12k/Makefile",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: BSD-3-Clause-Clear\n 2:\tobj-$(CONFIG_ATH12K) += ath12k.o\n 3:\tath12k-y += core.o \\\n 4:\t\t hal.o \\\n 5:\t\t wmi.o \\\n 6:\t\t mac.o \\\n 7:\t\t reg.o \\\n 8:\t\t htc.o \\\n 9:\t\t qmi.o \\\n 10:\t\t dp.o \\\n 11:\t\t dp_tx.o \\\n 12:\t\t dp_rx.o \\\n 13:\t\t dp_htt.o \\\n 14:\t\t dp_peer.o \\\n 15:\t\t debug.o \\\n 16:\t\t ce.o \\\n 17:\t\t peer.o \\\n 18:\t\t dbring.o \\\n 19:\t\t mhi.o \\\n 20:\t\t pci.o \\\n 21:\t\t dp_mon.o \\\n 22:\t\t fw.o \\\n 23:\t\t p2p.o\n 24:\t\n 25:\tath12k-$(CONFIG_ATH12K_AHB) += ahb.o pcic.o\n 26:\t\n 27:\tobj-$(CONFIG_ATH12K) += wifi7/\n 28:\t\n 29:\tath12k-$(CONFIG_ATH12K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o\n 30:\tath12k-$(CONFIG_ACPI) += acpi.o\n 31:\tath12k-$(CONFIG_ATH12K_TRACING) += trace.o\n 32:\tath12k-$(CONFIG_PM) += wow.o\n 33:\tath12k-$(CONFIG_ATH12K_COREDUMP) += coredump.o\n 34:\tath12k-$(CONFIG_NL80211_TESTMODE) += testmode.o\n 35:\tath12k-$(CONFIG_THERMAL) += thermal.o\n 36:\t\n 37:\t# for tracing framework to find trace.h\n 38:\tCFLAGS_trace.o := -I$(src)\n"
} |
| 17/2 | 2026/11/25 04:36 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16209 output: 43 thoughts: 13 Thoughts: Okay, let's dive into this. Here's my thought process on this: **Checking the Makefile for `wifi7`** My immediate instinct, given the context, is that we need to examine the `wifi7/Makefile`. It's a natural starting point. I need to make sure I haven't missed anything crucial, so I should see if there are any specific dependencies, build instructions, or configurations related to the `wifi7` project within that file. This is my core starting point. I should ensure that any potential issues or modifications are highlighted. |
| 18/2 | 2026/11/25 04:37 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath12k/wifi7/Makefile",
"FirstLine": 1,
"LineCount": 30
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: BSD-3-Clause-Clear\n 2:\tobj-$(CONFIG_ATH12K) += ath12k_wifi7.o\n 3:\tath12k_wifi7-y += core.o \\\n 4:\t\t pci.o \\\n 5:\t\t wmi.o \\\n 6:\t\t mhi.o \\\n 7:\t\t ce.o \\\n 8:\t\t hw.o \\\n 9:\t\t\t hal_tx.o \\\n 10:\t\t\t hal_rx.o \\\n 11:\t\t\t dp_rx.o \\\n 12:\t\t\t dp_tx.o \\\n 13:\t\t\t dp.o \\\n 14:\t\t\t dp_mon.o \\\n 15:\t\t\t hal.o \\\n 16:\t\t\t hal_qcn9274.o \\\n 17:\t\t\t hal_wcn7850.o \\\n 18:\t\t\t hal_qcc2072.o\n 19:\t\n 20:\tath12k_wifi7-$(CONFIG_ATH12K_AHB) += ahb.o\n"
} |
| 19/2 | 2026/11/25 04:37 | llm | patch-evaluator |
1mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16689 output: 158 thoughts: 1056 Thoughts: **Fuzzing Analysis of the ath12k Driver Patch** Okay, so I'm looking at this patch that touches files within the `ath12k` directory. Specifically, it seems to be refactoring peer management data structures from a linked list (`dp_peers_list`) to a hash table (`peer_hash`). I know ath12k builds both `ath12k.ko` and `ath12k_wifi7.ko`, but my initial thought is: can this code even *run* in a typical fuzzing setup? My experience tells me ath12k is the driver for those Qualcomm Wi-Fi 7 chipsets – things like the QCN9274, WCN7850, and IPQ5332. These aren't virtual devices. They're physical Qualcomm ASICs that connect via PCIe or AHB. They need that actual hardware *and* firmware to initialize. Standard QEMU, GCE – none of them emulate these ath12k devices. No QCN9274, no WCN7850, nothing. I quickly discounted the possibility of USB emulation because ath12k is strictly AHB and PCI. And, of course, QEMU's network cards are the typical suspects: e1000, rtl8139, virtio-net, etc. None of those are the ath12k. Therefore, because this driver targets hardware that is not emulated in standard fuzzing environments, I have to conclude that it's structurally unreachable in those environments. Let's double-check all aspects of this patch: 1. All modified files are in `drivers/net/wireless/ath/ath12k/`. 2. The patch modifies `ath12k` peer tracking data structures by replacing a linked list `dp_peers_list` with a hash table `peer_hash`. 3. The driver needs physical Qualcomm Wi-Fi 7 hardware (QCN9274, WCN7850, QCC2072 PCI devices or IPQ5332 platform/AHB devices). 4. Without the hardware, the `ath12k_pci_probe` or `ath12k_ahb_probe` function is never invoked, no `ath12k_hw` or `ath12k_dp_hw` is allocated, and none of the peer management functions can ever be executed. Based on this, I'm setting `WorthFuzzing = false`. My reasoning is concise: the patch targets a Wi-Fi 7 driver requiring physical ASICs not emulated in QEMU or GCE. Since the modified code is unreachable in standard fuzzing environments, it's not worth fuzzing for this setup. The focus symbols are empty and there are no required configuration options to enable for this particular test case. Now, let's make sure I'm following the tool's instructions exactly. It seems pretty straightforward: `set-results` with `WorthFuzzing: false`, concise reasoning, and empty `FocusSymbols` and `EnableConfigs` arrays. I'm ready to call the `set-results` tool now. |
| 20/2 | 2026/11/25 04:38 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch converts the DP peer list into a hash table in the ath12k wireless driver to optimize MAC address lookups. The ath12k driver is a vendor driver specifically for Qualcomm Wi-Fi 7 chips (e.g., QCN9274, WCN7850 via PCI, and IPQ5332 via AHB). Standard virtualized environments (QEMU and GCE) do not emulate these Qualcomm wireless ASICs, and ath12k provides no virtual or USB-emulated devices. As such, the modified driver code is structurally unreachable during fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch converts the DP peer list into a hash table in the ath12k wireless driver to optimize MAC address lookups. The ath12k driver is a vendor driver specifically for Qualcomm Wi-Fi 7 chips (e.g., QCN9274, WCN7850 via PCI, and IPQ5332 via AHB). Standard virtualized environments (QEMU and GCE) do not emulate these Qualcomm wireless ASICs, and ath12k provides no virtual or USB-emulated devices. As such, the modified driver code is structurally unreachable during fuzzing.",
"WorthFuzzing": false
} |
| 21/1 | 2026/11/25 04:38 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|