AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/06 06:29 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": [
    "ATH9K",
    "ATH9K_HTC",
    "MAC80211",
    "USB"
  ],
  "FocusSymbols": [
    "ath9k_hw_first_txpending",
    "ath9k_multi_regread",
    "ath9k_hw_channel_change",
    "ath9k_hw_reset",
    "ath9k_hw_start_nfcal",
    "ar5008_hw_set_delta_slope"
  ],
  "KMSANReasoning": "The patch optimizes register access routines and fast-channel-change handling in the ath9k wireless driver. Specifically, it batches register reads/writes using buffer flushing macros, introduces ath9k_hw_first_txpending() to query queue status registers using batched multi-reads (REG_READ_MULTI), and adds bounds/error checking in ath9k_multi_regread() to fill the target buffer with 0xff if an error occurs.\n\n1. Uninitialized Memory Analysis:\n   - In ath9k_hw_first_txpending(), the local arrays 'addr' and 'val' are populated across the loop chunks by REG_READ_MULTI. Both implementations (ath9k_multi_ioread32 and ath9k_multi_regread) write to every element in the requested range [val, val + count), and ath9k_multi_regread explicitly memsets 'val' with 0xff on error or out-of-bounds count. Therefore, no uninitialized stack memory is read or branched upon.\n   - None of the modified data or structures are exported or copied to user space (no copy_to_user, netlink, ioctl output, etc.).\n\n2. Detector Applicability (KASAN vs KMSAN):\n   - Any buffer-bound or array indexing issues (e.g. queue indexing or buffer overflow) would be detected by KASAN / standard runtime checks.\n   - There are no uninitialized memory reads or information leak risks that would uniquely require KMSAN.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted (NeedsKMSAN=false).",
  "NeedsKMSAN": false,
  "Reasoning": "The patch introduces a new multi-register read helper (ath9k_hw_first_txpending), adds RMW buffering across PHY/calibration routines, modifies fast channel change and reset logic, and introduces a WARN_ON_ONCE assertion with error handling in ath9k_multi_regread. These changes are in reachable code paths for USB-attached Atheros wireless devices (ath9k_htc) and standard ath9k devices.",
  "WorthFuzzing": true
}

1/1 2026/09/06 06:29 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 186363995630a73482758661ef06f9e9508e1e28\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sun Sep 6 06:29:42 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c\nindex 7a45f5f628269..af05dcf95a614 100644\n--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c\n+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c\n@@ -868,6 +868,7 @@ static void ar5008_hw_set_delta_slope(struct ath_hw *ah,\n \tath9k_hw_get_delta_slope_vals(ah, coef_scaled, \u0026ds_coef_man,\n \t\t\t\t      \u0026ds_coef_exp);\n \n+\tENABLE_REG_RMW_BUFFER(ah);\n \tREG_RMW_FIELD(ah, AR_PHY_TIMING3,\n \t\t      AR_PHY_TIMING3_DSC_MAN, ds_coef_man);\n \tREG_RMW_FIELD(ah, AR_PHY_TIMING3,\n@@ -882,6 +883,7 @@ static void ar5008_hw_set_delta_slope(struct ath_hw *ah,\n \t\t      AR_PHY_HALFGI_DSC_MAN, ds_coef_man);\n \tREG_RMW_FIELD(ah, AR_PHY_HALFGI,\n \t\t      AR_PHY_HALFGI_DSC_EXP, ds_coef_exp);\n+\tREG_RMW_BUFFER_FLUSH(ah);\n }\n \n static bool ar5008_hw_rfbus_req(struct ath_hw *ah)\ndiff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c\nindex b4ab85bd7895a..73c63ab32d53f 100644\n--- a/drivers/net/wireless/ath/ath9k/calib.c\n+++ b/drivers/net/wireless/ath/ath9k/calib.c\n@@ -224,6 +224,7 @@ void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)\n \tif (ah-\u003ecaldata)\n \t\tset_bit(NFCAL_PENDING, \u0026ah-\u003ecaldata-\u003ecal_flags);\n \n+\tENABLE_REG_RMW_BUFFER(ah);\n \tREG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah),\n \t\t    AR_PHY_AGC_CONTROL_ENABLE_NF);\n \n@@ -235,6 +236,7 @@ void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)\n \t\t    AR_PHY_AGC_CONTROL_NO_UPDATE_NF);\n \n \tREG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah), AR_PHY_AGC_CONTROL_NF);\n+\tREG_RMW_BUFFER_FLUSH(ah);\n }\n \n int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)\ndiff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c\nindex 6de78ae857268..3d4c6f9f6e951 100644\n--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c\n+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c\n@@ -258,10 +258,15 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,\n \tstruct ath_hw *ah = hw_priv;\n \tstruct ath_common *common = ath9k_hw_common(ah);\n \tstruct ath9k_htc_priv *priv = common-\u003epriv;\n-\t__be32 tmpaddr[8];\n-\t__be32 tmpval[8];\n+\t__be32 tmpaddr[ATH9K_MULTI_READ_MAX];\n+\t__be32 tmpval[ATH9K_MULTI_READ_MAX];\n \tint i, ret;\n \n+\tif (WARN_ON_ONCE(count \u003e ATH9K_MULTI_READ_MAX)) {\n+\t\tmemset(val, 0xff, sizeof(*val) * count);\n+\t\treturn;\n+\t}\n+\n \tfor (i = 0; i \u003c count; i++) {\n \t\ttmpaddr[i] = cpu_to_be32(addr[i]);\n \t}\n@@ -273,6 +278,9 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,\n \tif (unlikely(ret)) {\n \t\tath_dbg(common, WMI,\n \t\t\t\"Multiple REGISTER READ FAILED (count: %d)\\n\", count);\n+\t\t/* Callers expect what a failed single read returns. */\n+\t\tmemset(val, 0xff, sizeof(*val) * count);\n+\t\treturn;\n \t}\n \n \tfor (i = 0; i \u003c count; i++) {\ndiff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c\nindex e08ab73fcacb3..64fefbec46d58 100644\n--- a/drivers/net/wireless/ath/ath9k/hw.c\n+++ b/drivers/net/wireless/ath/ath9k/hw.c\n@@ -1547,7 +1547,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,\n \tstruct ath9k_hw_capabilities *pCap = \u0026ah-\u003ecaps;\n \tbool band_switch = false, mode_diff = false;\n \tu8 ini_reloaded = 0;\n-\tu32 qnum;\n+\tint qnum;\n \tint r;\n \n \tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_FCC_BAND_SWITCH) {\n@@ -1556,12 +1556,11 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,\n \t\tmode_diff = !!(flags_diff \u0026 ~CHANNEL_HT);\n \t}\n \n-\tfor (qnum = 0; qnum \u003c AR_NUM_QCU; qnum++) {\n-\t\tif (ath9k_hw_numtxpending(ah, qnum)) {\n-\t\t\tath_dbg(common, QUEUE,\n-\t\t\t\t\"Transmit frames pending on queue %d\\n\", qnum);\n-\t\t\treturn false;\n-\t\t}\n+\tqnum = ath9k_hw_first_txpending(ah);\n+\tif (qnum \u003e= 0) {\n+\t\tath_dbg(common, QUEUE,\n+\t\t\t\"Transmit frames pending on queue %d\\n\", qnum);\n+\t\treturn false;\n \t}\n \n \tif (!ath9k_hw_rfbus_req(ah)) {\n@@ -1879,7 +1878,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,\n \tif (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))\n \t\treturn -EIO;\n \n-\tif (ah-\u003ecurchan \u0026\u0026 !ah-\u003echip_fullsleep)\n+\t/*\n+\t * Over USB the departing channel's noise-floor readout costs several\n+\t * round trips and only feeds its history; the fast path reloads the\n+\t * arriving channel's noise floor regardless.\n+\t */\n+\tif (ah-\u003ecurchan \u0026\u0026 !ah-\u003echip_fullsleep \u0026\u0026\n+\t    !(fastcc \u0026\u0026 common-\u003ebus_ops-\u003eath_bus_type == ATH_USB))\n \t\tath9k_hw_getnf(ah, ah-\u003ecurchan);\n \n \tah-\u003ecaldata = caldata;\ndiff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h\nindex b942b8303d8f8..211d42c927963 100644\n--- a/drivers/net/wireless/ath/ath9k/hw.h\n+++ b/drivers/net/wireless/ath/ath9k/hw.h\n@@ -83,6 +83,13 @@\n #define REG_READ(_ah, _reg) \\\n \t(_ah)-\u003ereg_ops.read((_ah), (_reg))\n \n+/*\n+ * Maximum number of registers one REG_READ_MULTI() may ask for. The ath9k_htc\n+ * implementation converts the addresses and the results through fixed arrays\n+ * of this size; callers must split larger reads themselves.\n+ */\n+#define ATH9K_MULTI_READ_MAX\t8\n+\n #define REG_READ_MULTI(_ah, _addr, _val, _cnt)\t\t\\\n \t(_ah)-\u003ereg_ops.multi_read((_ah), (_addr), (_val), (_cnt))\n \ndiff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c\nindex b070403e083ff..27926b67d628a 100644\n--- a/drivers/net/wireless/ath/ath9k/mac.c\n+++ b/drivers/net/wireless/ath/ath9k/mac.c\n@@ -77,6 +77,46 @@ u32 ath9k_hw_numtxpending(struct ath_hw *ah, u32 q)\n }\n EXPORT_SYMBOL(ath9k_hw_numtxpending);\n \n+/**\n+ * ath9k_hw_first_txpending - find a tx queue that still has frames pending\n+ * @ah: hardware\n+ *\n+ * Asking ath9k_hw_numtxpending() about each queue in turn costs up to two\n+ * register reads per queue, and on the USB devices every one of those is a\n+ * synchronous WMI round trip. Collect the queue status registers and AR_Q_TXE\n+ * with the multi-read op instead, in chunks of ATH9K_MULTI_READ_MAX. A\n+ * multi-read that fails over USB reads as all ones, which counts as pending,\n+ * so a WMI timeout still refuses the fast channel change.\n+ *\n+ * Return: the first queue with frames pending, or -1 if all are drained.\n+ */\n+int ath9k_hw_first_txpending(struct ath_hw *ah)\n+{\n+\tu32 addr[AR_NUM_QCU + 1];\n+\tu32 val[AR_NUM_QCU + 1];\n+\tu32 q, txe, done = 0;\n+\n+\tfor (q = 0; q \u003c AR_NUM_QCU; q++)\n+\t\taddr[q] = AR_QSTS(q);\n+\taddr[AR_NUM_QCU] = AR_Q_TXE;\n+\n+\twhile (done \u003c ARRAY_SIZE(addr)) {\n+\t\tu32 count = min_t(u32, ARRAY_SIZE(addr) - done,\n+\t\t\t\t  ATH9K_MULTI_READ_MAX);\n+\n+\t\tREG_READ_MULTI(ah, addr + done, val + done, count);\n+\t\tdone += count;\n+\t}\n+\n+\ttxe = val[AR_NUM_QCU];\n+\tfor (q = 0; q \u003c AR_NUM_QCU; q++) {\n+\t\tif ((val[q] \u0026 AR_Q_STS_PEND_FR_CNT) || (txe \u0026 BIT(q)))\n+\t\t\treturn q;\n+\t}\n+\n+\treturn -1;\n+}\n+\n /**\n  * ath9k_hw_updatetxtriglevel - adjusts the frame trigger level\n  *\ndiff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h\nindex 16203e7ecf290..5b94ce087be2f 100644\n--- a/drivers/net/wireless/ath/ath9k/mac.h\n+++ b/drivers/net/wireless/ath/ath9k/mac.h\n@@ -721,6 +721,7 @@ u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q);\n void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp);\n void ath9k_hw_txstart(struct ath_hw *ah, u32 q);\n u32 ath9k_hw_numtxpending(struct ath_hw *ah, u32 q);\n+int ath9k_hw_first_txpending(struct ath_hw *ah);\n bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel);\n bool ath9k_hw_stop_dma_queue(struct ath_hw *ah, u32 q);\n void ath9k_hw_abort_tx_dma(struct ath_hw *ah);\n"
}

2/1 2026/09/06 06:29 agent patch-evaluator
1m Model:
core

Args:
null

Results:
{
  "EnableConfigs": [
    "ATH9K",
    "ATH9K_HTC",
    "MAC80211",
    "USB"
  ],
  "FocusSymbols": [
    "ath9k_hw_first_txpending",
    "ath9k_multi_regread",
    "ath9k_hw_channel_change",
    "ath9k_hw_reset",
    "ath9k_hw_start_nfcal",
    "ar5008_hw_set_delta_slope"
  ],
  "Reasoning": "The patch introduces a new multi-register read helper (ath9k_hw_first_txpending), adds RMW buffering across PHY/calibration routines, modifies fast channel change and reset logic, and introduces a WARN_ON_ONCE assertion with error handling in ath9k_multi_regread. These changes are in reachable code paths for USB-attached Atheros wireless devices (ath9k_htc) and standard ath9k devices.",
  "WorthFuzzing": true
}

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 186363995630a73482758661ef06f9e9508e1e28
Author: syz-cluster <triage@syzkaller.com>
Date:   Sun Sep 6 06:29:42 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 7a45f5f628269..af05dcf95a614 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -868,6 +868,7 @@ static void ar5008_hw_set_delta_slope(struct ath_hw *ah,
 	ath9k_hw_get_delta_slope_vals(ah, coef_scaled, &ds_coef_man,
 				      &ds_coef_exp);
 
+	ENABLE_REG_RMW_BUFFER(ah);
 	REG_RMW_FIELD(ah, AR_PHY_TIMING3,
 		      AR_PHY_TIMING3_DSC_MAN, ds_coef_man);
 	REG_RMW_FIELD(ah, AR_PHY_TIMING3,
@@ -882,6 +883,7 @@ static void ar5008_hw_set_delta_slope(struct ath_hw *ah,
 		      AR_PHY_HALFGI_DSC_MAN, ds_coef_man);
 	REG_RMW_FIELD(ah, AR_PHY_HALFGI,
 		      AR_PHY_HALFGI_DSC_EXP, ds_coef_exp);
+	REG_RMW_BUFFER_FLUSH(ah);
 }
 
 static bool ar5008_hw_rfbus_req(struct ath_hw *ah)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index b4ab85bd7895a..73c63ab32d53f 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -224,6 +224,7 @@ void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
 	if (ah->caldata)
 		set_bit(NFCAL_PENDING, &ah->caldata->cal_flags);
 
+	ENABLE_REG_RMW_BUFFER(ah);
 	REG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah),
 		    AR_PHY_AGC_CONTROL_ENABLE_NF);
 
@@ -235,6 +236,7 @@ void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
 		    AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
 
 	REG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah), AR_PHY_AGC_CONTROL_NF);
+	REG_RMW_BUFFER_FLUSH(ah);
 }
 
 int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 6de78ae857268..3d4c6f9f6e951 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -258,10 +258,15 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
 	struct ath_hw *ah = hw_priv;
 	struct ath_common *common = ath9k_hw_common(ah);
 	struct ath9k_htc_priv *priv = common->priv;
-	__be32 tmpaddr[8];
-	__be32 tmpval[8];
+	__be32 tmpaddr[ATH9K_MULTI_READ_MAX];
+	__be32 tmpval[ATH9K_MULTI_READ_MAX];
 	int i, ret;
 
+	if (WARN_ON_ONCE(count > ATH9K_MULTI_READ_MAX)) {
+		memset(val, 0xff, sizeof(*val) * count);
+		return;
+	}
+
 	for (i = 0; i < count; i++) {
 		tmpaddr[i] = cpu_to_be32(addr[i]);
 	}
@@ -273,6 +278,9 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
 	if (unlikely(ret)) {
 		ath_dbg(common, WMI,
 			"Multiple REGISTER READ FAILED (count: %d)\n", count);
+		/* Callers expect what a failed single read returns. */
+		memset(val, 0xff, sizeof(*val) * count);
+		return;
 	}
 
 	for (i = 0; i < count; i++) {
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e08ab73fcacb3..64fefbec46d58 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1547,7 +1547,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	bool band_switch = false, mode_diff = false;
 	u8 ini_reloaded = 0;
-	u32 qnum;
+	int qnum;
 	int r;
 
 	if (pCap->hw_caps & ATH9K_HW_CAP_FCC_BAND_SWITCH) {
@@ -1556,12 +1556,11 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 		mode_diff = !!(flags_diff & ~CHANNEL_HT);
 	}
 
-	for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
-		if (ath9k_hw_numtxpending(ah, qnum)) {
-			ath_dbg(common, QUEUE,
-				"Transmit frames pending on queue %d\n", qnum);
-			return false;
-		}
+	qnum = ath9k_hw_first_txpending(ah);
+	if (qnum >= 0) {
+		ath_dbg(common, QUEUE,
+			"Transmit frames pending on queue %d\n", qnum);
+		return false;
 	}
 
 	if (!ath9k_hw_rfbus_req(ah)) {
@@ -1879,7 +1878,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
 	if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
 		return -EIO;
 
-	if (ah->curchan && !ah->chip_fullsleep)
+	/*
+	 * Over USB the departing channel's noise-floor readout costs several
+	 * round trips and only feeds its history; the fast path reloads the
+	 * arriving channel's noise floor regardless.
+	 */
+	if (ah->curchan && !ah->chip_fullsleep &&
+	    !(fastcc && common->bus_ops->ath_bus_type == ATH_USB))
 		ath9k_hw_getnf(ah, ah->curchan);
 
 	ah->caldata = caldata;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index b942b8303d8f8..211d42c927963 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -83,6 +83,13 @@
 #define REG_READ(_ah, _reg) \
 	(_ah)->reg_ops.read((_ah), (_reg))
 
+/*
+ * Maximum number of registers one REG_READ_MULTI() may ask for. The ath9k_htc
+ * implementation converts the addresses and the results through fixed arrays
+ * of this size; callers must split larger reads themselves.
+ */
+#define ATH9K_MULTI_READ_MAX	8
+
 #define REG_READ_MULTI(_ah, _addr, _val, _cnt)		\
 	(_ah)->reg_ops.multi_read((_ah), (_addr), (_val), (_cnt))
 
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index b070403e083ff..27926b67d628a 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -77,6 +77,46 @@ u32 ath9k_hw_numtxpending(struct ath_hw *ah, u32 q)
 }
 EXPORT_SYMBOL(ath9k_hw_numtxpending);
 
+/**
+ * ath9k_hw_first_txpending - find a tx queue that still has frames pending
+ * @ah: hardware
+ *
+ * Asking ath9k_hw_numtxpending() about each queue in turn costs up to two
+ * register reads per queue, and on the USB devices every one of those is a
+ * synchronous WMI round trip. Collect the queue status registers and AR_Q_TXE
+ * with the multi-read op instead, in chunks of ATH9K_MULTI_READ_MAX. A
+ * multi-read that fails over USB reads as all ones, which counts as pending,
+ * so a WMI timeout still refuses the fast channel change.
+ *
+ * Return: the first queue with frames pending, or -1 if all are drained.
+ */
+int ath9k_hw_first_txpending(struct ath_hw *ah)
+{
+	u32 addr[AR_NUM_QCU + 1];
+	u32 val[AR_NUM_QCU + 1];
+	u32 q, txe, done = 0;
+
+	for (q = 0; q < AR_NUM_QCU; q++)
+		addr[q] = AR_QSTS(q);
+	addr[AR_NUM_QCU] = AR_Q_TXE;
+
+	while (done < ARRAY_SIZE(addr)) {
+		u32 count = min_t(u32, ARRAY_SIZE(addr) - done,
+				  ATH9K_MULTI_READ_MAX);
+
+		REG_READ_MULTI(ah, addr + done, val + done, count);
+		done += count;
+	}
+
+	txe = val[AR_NUM_QCU];
+	for (q = 0; q < AR_NUM_QCU; q++) {
+		if ((val[q] & AR_Q_STS_PEND_FR_CNT) || (txe & BIT(q)))
+			return q;
+	}
+
+	return -1;
+}
+
 /**
  * ath9k_hw_updatetxtriglevel - adjusts the frame trigger level
  *
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 16203e7ecf290..5b94ce087be2f 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -721,6 +721,7 @@ u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q);
 void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp);
 void ath9k_hw_txstart(struct ath_hw *ah, u32 q);
 u32 ath9k_hw_numtxpending(struct ath_hw *ah, u32 q);
+int ath9k_hw_first_txpending(struct ath_hw *ah);
 bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel);
 bool ath9k_hw_stop_dma_queue(struct ath_hw *ah, u32 q);
 void ath9k_hw_abort_tx_dma(struct ath_hw *ah);

3/2 2026/09/06 06:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 6018
							output: 34
							thoughts: 438
						

Thoughts:
**Analyzing the ath9k Wireless Driver Patch**

Okay, so this patch is clearly focused on the `ath9k` wireless driver, specifically within the `drivers/net/wireless/ath/ath9k/` directory. Let's break down what's happening.

*   `ar5008_phy.c` and `calib.c` are getting the `ENABLE_REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH` macros added. That screams potential register modification optimization or a change in how register writes are handled, maybe to handle race conditions or improve performance on certain hardware. I should note those macros are usually needed in low level drivers that touch hardware.
*   `htc_drv_init.c` introduces some interesting logic in `ath9k_multi_regread`. A `WARN_ON_ONCE` if the read count exceeds `ATH9K_MULTI_READ_MAX` (which, by the way, is defined as 8 in `hw.h`) and defaults an error response to 0xff if there is an error. That multi-read limit is important, and the 0xff default on error is something that I might need to consider when fuzzing since it may produce interesting test conditions.
*   `hw.c` has some changes around channel changes, specifically using `ath9k_hw_first_txpending` in `ath9k_hw_channel_change` and a modification to the `ath9k_hw_reset` condition. I should look into how that function works and why the reset condition is being modified in relation to channel change, it could be a race condition.
*   `mac.c` implements `ath9k_hw_first_txpending` by using `REG_READ_MULTI`, which makes me think there might be more multi-register reads or writes throughout this patch.

Now, a critical question arises: how can I reach these changes for fuzzing? Since it is `ath9k`, I should verify if `ath9k` and `ath9k_htc` are accessible via USB or PCI. Ah, right, `ath9k_htc` is a USB Wi-Fi driver! That opens the door to USB emulation. I can probably reach this code through `raw-gadget`, a `usb-fuzzer`, or standard USB fuzzing in syzkaller.

But first, I need to confirm whether `ath9k_htc` leverages the common `ath9k` or hardware code. I'll need to dig into the `Kconfig` and `Makefile` structure to confirm how these modules are related, but it is likely they share some common code.



4/2 2026/09/06 06:29 tool grepper
0m Args:
{
  "Expression": "ATH9K",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 5098 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/ath/ath9k/Kconfig-1-# SPDX-License-Identifier: ISC\ndrivers/net/wireless/ath/ath9k/Kconfig:2:config ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig-3-\ttristate\ndrivers/net/wireless/ath/ath9k/Kconfig:4:config ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-5-\ttristate\ndrivers/net/wireless/ath/ath9k/Kconfig-6-\tselect ATH_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig:7:config ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-8-\tbool\ndrivers/net/wireless/ath/ath9k/Kconfig:9:config ATH9K_DFS_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-10-\tdef_bool y\ndrivers/net/wireless/ath/ath9k/Kconfig:11:\tdepends on ATH9K_DEBUGFS \u0026\u0026 ATH9K_DFS_CERTIFIED\ndrivers/net/wireless/ath/ath9k/Kconfig-12-\ndrivers/net/wireless/ath/ath9k/Kconfig:13:config ATH9K_BTCOEX_SUPPORT\ndrivers/net/wireless/ath/ath9k/Kconfig-14-\tbool \"Atheros bluetooth coexistence support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:15:\tdepends on (ATH9K || ATH9K_HTC)\ndrivers/net/wireless/ath/ath9k/Kconfig-16-\tdefault y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-20-\ndrivers/net/wireless/ath/ath9k/Kconfig:21:config ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-22-\ttristate \"Atheros 802.11n wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-24-\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\ndrivers/net/wireless/ath/ath9k/Kconfig:25:\tselect ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig:26:\tselect ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-27-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-38-\ndrivers/net/wireless/ath/ath9k/Kconfig:39:config ATH9K_PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-40-\tbool \"Atheros ath9k PCI/PCIe bus support\"\ndrivers/net/wireless/ath/ath9k/Kconfig-41-\tdefault y\ndrivers/net/wireless/ath/ath9k/Kconfig:42:\tdepends on ATH9K \u0026\u0026 PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-43-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-47-\ndrivers/net/wireless/ath/ath9k/Kconfig:48:config ATH9K_AHB\ndrivers/net/wireless/ath/ath9k/Kconfig-49-\tbool \"Atheros ath9k AHB bus support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:50:\tdepends on ATH9K \u0026\u0026 OF\ndrivers/net/wireless/ath/ath9k/Kconfig-51-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-57-\ndrivers/net/wireless/ath/ath9k/Kconfig:58:config ATH9K_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-59-\tbool \"Atheros ath9k debugging\"\ndrivers/net/wireless/ath/ath9k/Kconfig:60:\tdepends on ATH9K \u0026\u0026 DEBUG_FS \u0026\u0026 MAC80211_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig:61:\tselect ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-62-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-68-\ndrivers/net/wireless/ath/ath9k/Kconfig:69:config ATH9K_STATION_STATISTICS\ndrivers/net/wireless/ath/ath9k/Kconfig-70-\tbool \"Detailed station statistics\"\ndrivers/net/wireless/ath/ath9k/Kconfig:71:\tdepends on ATH9K \u0026\u0026 ATH9K_DEBUGFS \u0026\u0026 DEBUG_FS\ndrivers/net/wireless/ath/ath9k/Kconfig-72-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-75-\ndrivers/net/wireless/ath/ath9k/Kconfig:76:config ATH9K_TX99\ndrivers/net/wireless/ath/ath9k/Kconfig-77-\tbool \"Atheros ath9k TX99 testing support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:78:\tdepends on ATH9K_DEBUGFS \u0026\u0026 CFG80211_CERTIFICATION_ONUS\ndrivers/net/wireless/ath/ath9k/Kconfig-79-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-95-\ndrivers/net/wireless/ath/ath9k/Kconfig:96:config ATH9K_DFS_CERTIFIED\ndrivers/net/wireless/ath/ath9k/Kconfig-97-\tbool \"Atheros DFS support for certified platforms\"\ndrivers/net/wireless/ath/ath9k/Kconfig:98:\tdepends on ATH9K \u0026\u0026 CFG80211_CERTIFICATION_ONUS\ndrivers/net/wireless/ath/ath9k/Kconfig-99-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-114-\ndrivers/net/wireless/ath/ath9k/Kconfig:115:config ATH9K_DYNACK\ndrivers/net/wireless/ath/ath9k/Kconfig-116-\tbool \"Atheros ath9k ACK timeout estimation algorithm\"\ndrivers/net/wireless/ath/ath9k/Kconfig:117:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-118-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-123-\ndrivers/net/wireless/ath/ath9k/Kconfig:124:config ATH9K_WOW\ndrivers/net/wireless/ath/ath9k/Kconfig-125-\tbool \"Wake on Wireless LAN support (EXPERIMENTAL)\"\ndrivers/net/wireless/ath/ath9k/Kconfig:126:\tdepends on ATH9K \u0026\u0026 PM\ndrivers/net/wireless/ath/ath9k/Kconfig-127-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-131-\ndrivers/net/wireless/ath/ath9k/Kconfig:132:config ATH9K_RFKILL\ndrivers/net/wireless/ath/ath9k/Kconfig-133-\tbool \"Atheros ath9k rfkill support\" if EXPERT\ndrivers/net/wireless/ath/ath9k/Kconfig:134:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig:135:\tdepends on RFKILL=y || RFKILL=ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-136-\tdefault y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-141-\ndrivers/net/wireless/ath/ath9k/Kconfig:142:config ATH9K_CHANNEL_CONTEXT\ndrivers/net/wireless/ath/ath9k/Kconfig-143-\tbool \"Channel Context support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:144:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-145-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-150-\ndrivers/net/wireless/ath/ath9k/Kconfig:151:config ATH9K_PCOEM\ndrivers/net/wireless/ath/ath9k/Kconfig-152-\tbool \"Atheros ath9k support for PC OEM cards\" if EXPERT\ndrivers/net/wireless/ath/ath9k/Kconfig:153:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-154-\tdefault y\ndrivers/net/wireless/ath/ath9k/Kconfig-155-\ndrivers/net/wireless/ath/ath9k/Kconfig:156:config ATH9K_PCI_NO_EEPROM\ndrivers/net/wireless/ath/ath9k/Kconfig-157-\ttristate \"Atheros ath9k pci loader for EEPROM-less chips\"\ndrivers/net/wireless/ath/ath9k/Kconfig:158:\tdepends on ATH9K_PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-159-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-171-\ndrivers/net/wireless/ath/ath9k/Kconfig:172:config ATH9K_HTC\ndrivers/net/wireless/ath/ath9k/Kconfig-173-\ttristate \"Atheros HTC based wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-175-\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\ndrivers/net/wireless/ath/ath9k/Kconfig:176:\tselect ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig:177:\tselect ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-178-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-186-\ndrivers/net/wireless/ath/ath9k/Kconfig:187:config ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-188-\tbool \"Atheros ath9k_htc debugging\"\ndrivers/net/wireless/ath/ath9k/Kconfig:189:\tdepends on ATH9K_HTC \u0026\u0026 DEBUG_FS\ndrivers/net/wireless/ath/ath9k/Kconfig:190:\tselect ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-191-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-194-\ndrivers/net/wireless/ath/ath9k/Kconfig:195:config ATH9K_HWRNG\ndrivers/net/wireless/ath/ath9k/Kconfig-196-\tbool \"Random number generator support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:197:\tdepends on ATH9K \u0026\u0026 (HW_RANDOM = y || HW_RANDOM = ATH9K)\ndrivers/net/wireless/ath/ath9k/Kconfig-198-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-205-\ndrivers/net/wireless/ath/ath9k/Kconfig:206:config ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/Kconfig-207-\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:208:\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-209-\tselect RELAY\n--\ndrivers/net/wireless/ath/ath9k/Makefile=2=ath9k-y +=\tbeacon.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-11-\ndrivers/net/wireless/ath/ath9k/Makefile:12:ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o\ndrivers/net/wireless/ath/ath9k/Makefile:13:ath9k-$(CONFIG_ATH9K_PCI) += pci.o\ndrivers/net/wireless/ath/ath9k/Makefile:14:ath9k-$(CONFIG_ATH9K_AHB) += ahb.o\ndrivers/net/wireless/ath/ath9k/Makefile:15:ath9k-$(CONFIG_ATH9K_DFS_DEBUGFS) += dfs_debug.o\ndrivers/net/wireless/ath/ath9k/Makefile:16:ath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += dfs.o\ndrivers/net/wireless/ath/ath9k/Makefile:17:ath9k-$(CONFIG_ATH9K_TX99) += tx99.o\ndrivers/net/wireless/ath/ath9k/Makefile:18:ath9k-$(CONFIG_ATH9K_WOW) += wow.o\ndrivers/net/wireless/ath/ath9k/Makefile:19:ath9k-$(CONFIG_ATH9K_HWRNG) += rng.o\ndrivers/net/wireless/ath/ath9k/Makefile-20-\ndrivers/net/wireless/ath/ath9k/Makefile:21:ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o\ndrivers/net/wireless/ath/ath9k/Makefile-22-\ndrivers/net/wireless/ath/ath9k/Makefile:23:ath9k-$(CONFIG_ATH9K_STATION_STATISTICS) += debug_sta.o\ndrivers/net/wireless/ath/ath9k/Makefile-24-\ndrivers/net/wireless/ath/ath9k/Makefile:25:obj-$(CONFIG_ATH9K) += ath9k.o\ndrivers/net/wireless/ath/ath9k/Makefile-26-\ndrivers/net/wireless/ath/ath9k/Makefile=27=ath9k_hw-y:=\t\\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-47-\ndrivers/net/wireless/ath/ath9k/Makefile:48:ath9k_hw-$(CONFIG_ATH9K_WOW) += ar9003_wow.o\ndrivers/net/wireless/ath/ath9k/Makefile-49-\ndrivers/net/wireless/ath/ath9k/Makefile:50:ath9k_hw-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += btcoex.o \\\ndrivers/net/wireless/ath/ath9k/Makefile-51-\t\t\t\t\t   ar9003_mci.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-53-\ndrivers/net/wireless/ath/ath9k/Makefile:54:ath9k_hw-$(CONFIG_ATH9K_PCOEM) += ar9003_rtt.o\ndrivers/net/wireless/ath/ath9k/Makefile-55-\ndrivers/net/wireless/ath/ath9k/Makefile:56:ath9k_hw-$(CONFIG_ATH9K_DYNACK) += dynack.o\ndrivers/net/wireless/ath/ath9k/Makefile-57-\ndrivers/net/wireless/ath/ath9k/Makefile:58:obj-$(CONFIG_ATH9K_HW) += ath9k_hw.o\ndrivers/net/wireless/ath/ath9k/Makefile-59-\ndrivers/net/wireless/ath/ath9k/Makefile:60:obj-$(CONFIG_ATH9K_COMMON) += ath9k_common.o\ndrivers/net/wireless/ath/ath9k/Makefile-61-ath9k_common-y:=\tcommon.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-64-\ndrivers/net/wireless/ath/ath9k/Makefile:65:ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o\ndrivers/net/wireless/ath/ath9k/Makefile:66:ath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o\ndrivers/net/wireless/ath/ath9k/Makefile-67-\ndrivers/net/wireless/ath/ath9k/Makefile=68=ath9k_htc-y +=\thtc_hst.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-76-\ndrivers/net/wireless/ath/ath9k/Makefile:77:ath9k_htc-$(CONFIG_ATH9K_HTC_DEBUGFS) += htc_drv_debug.o\ndrivers/net/wireless/ath/ath9k/Makefile-78-\ndrivers/net/wireless/ath/ath9k/Makefile:79:obj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o\ndrivers/net/wireless/ath/ath9k/Makefile-80-\ndrivers/net/wireless/ath/ath9k/Makefile:81:obj-$(CONFIG_ATH9K_PCI_NO_EEPROM) += ath9k_pci_owl_loader.o\n--\ndrivers/net/wireless/ath/ath9k/ani.c=39=static const struct ani_ofdm_level_entry ofdm_level_table[] = {\n--\ndrivers/net/wireless/ath/ath9k/ani.c-51-};\ndrivers/net/wireless/ath/ath9k/ani.c:52:#define ATH9K_ANI_OFDM_NUM_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-53-\tARRAY_SIZE(ofdm_level_table)\ndrivers/net/wireless/ath/ath9k/ani.c:54:#define ATH9K_ANI_OFDM_MAX_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c:55:\t(ATH9K_ANI_OFDM_NUM_LEVEL-1)\ndrivers/net/wireless/ath/ath9k/ani.c:56:#define ATH9K_ANI_OFDM_DEF_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-57-\t3 /* default level - matches the INI settings */\n--\ndrivers/net/wireless/ath/ath9k/ani.c=85=static const struct ani_cck_level_entry cck_level_table[] = {\n--\ndrivers/net/wireless/ath/ath9k/ani.c-97-\ndrivers/net/wireless/ath/ath9k/ani.c:98:#define ATH9K_ANI_CCK_NUM_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-99-\tARRAY_SIZE(cck_level_table)\ndrivers/net/wireless/ath/ath9k/ani.c:100:#define ATH9K_ANI_CCK_MAX_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c:101:\t(ATH9K_ANI_CCK_NUM_LEVEL-1)\ndrivers/net/wireless/ath/ath9k/ani.c:102:#define ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI \\\ndrivers/net/wireless/ath/ath9k/ani.c:103:\t(ATH9K_ANI_CCK_NUM_LEVEL-3)\ndrivers/net/wireless/ath/ath9k/ani.c:104:#define ATH9K_ANI_CCK_DEF_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-105-\t2 /* default level - matches the INI settings */\n--\ndrivers/net/wireless/ath/ath9k/ani.c=149=static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-160-\t\timmunityLevel, BEACON_RSSI(ah),\ndrivers/net/wireless/ath/ath9k/ani.c:161:\t\tATH9K_ANI_RSSI_THR_LOW,\ndrivers/net/wireless/ath/ath9k/ani.c:162:\t\tATH9K_ANI_RSSI_THR_HIGH);\ndrivers/net/wireless/ath/ath9k/ani.c-163-\ndrivers/net/wireless/ath/ath9k/ani.c:164:\tif (AR_SREV_9100(ah) \u0026\u0026 immunityLevel \u003c ATH9K_ANI_OFDM_DEF_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c:165:\t\timmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-166-\n--\ndrivers/net/wireless/ath/ath9k/ani.c-174-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:175:\t\t\t\t     ATH9K_ANI_SPUR_IMMUNITY_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-176-\t\t\t\t     entry_ofdm-\u003espur_immunity_level);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-180-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:181:\t\t\t\t     ATH9K_ANI_FIRSTEP_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-182-\t\t\t\t     entry_ofdm-\u003efir_step_level);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-185-\tif (ah-\u003eopmode == NL80211_IFTYPE_STATION \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ani.c:186:\t    BEACON_RSSI(ah) \u003c= ATH9K_ANI_RSSI_THR_HIGH)\ndrivers/net/wireless/ath/ath9k/ani.c-187-\t\tweak_sig = true;\n--\ndrivers/net/wireless/ath/ath9k/ani.c-202-\tif (aniState-\u003eofdmWeakSigDetect != weak_sig)\ndrivers/net/wireless/ath/ath9k/ani.c:203:\t\tath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,\ndrivers/net/wireless/ath/ath9k/ani.c-204-\t\t\t\t     weak_sig);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-208-\ndrivers/net/wireless/ath/ath9k/ani.c:209:\tif (aniState-\u003eofdmNoiseImmunityLevel \u003e= ATH9K_ANI_OFDM_DEF_LEVEL) {\ndrivers/net/wireless/ath/ath9k/ani.c:210:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;\ndrivers/net/wireless/ath/ath9k/ani.c:211:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI;\ndrivers/net/wireless/ath/ath9k/ani.c-212-\t} else {\ndrivers/net/wireless/ath/ath9k/ani.c:213:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI;\ndrivers/net/wireless/ath/ath9k/ani.c:214:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;\ndrivers/net/wireless/ath/ath9k/ani.c-215-\t}\n--\ndrivers/net/wireless/ath/ath9k/ani.c=218=static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-221-\ndrivers/net/wireless/ath/ath9k/ani.c:222:\tif (aniState-\u003eofdmNoiseImmunityLevel \u003c ATH9K_ANI_OFDM_MAX_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c-223-\t\tath9k_hw_set_ofdm_nil(ah, aniState-\u003eofdmNoiseImmunityLevel + 1, false);\n--\ndrivers/net/wireless/ath/ath9k/ani.c=229=static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-238-\t\taniState-\u003ecckNoiseImmunityLevel, immunityLevel,\ndrivers/net/wireless/ath/ath9k/ani.c:239:\t\tBEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW,\ndrivers/net/wireless/ath/ath9k/ani.c:240:\t\tATH9K_ANI_RSSI_THR_HIGH);\ndrivers/net/wireless/ath/ath9k/ani.c-241-\ndrivers/net/wireless/ath/ath9k/ani.c:242:\tif (AR_SREV_9100(ah) \u0026\u0026 immunityLevel \u003c ATH9K_ANI_CCK_DEF_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c:243:\t\timmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-244-\ndrivers/net/wireless/ath/ath9k/ani.c-245-\tif (ah-\u003eopmode == NL80211_IFTYPE_STATION \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ani.c:246:\t    BEACON_RSSI(ah) \u003c= ATH9K_ANI_RSSI_THR_LOW \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ani.c:247:\t    immunityLevel \u003e ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)\ndrivers/net/wireless/ath/ath9k/ani.c:248:\t\timmunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;\ndrivers/net/wireless/ath/ath9k/ani.c-249-\n--\ndrivers/net/wireless/ath/ath9k/ani.c-258-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:259:\t\t\t\t     ATH9K_ANI_FIRSTEP_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-260-\t\t\t\t     entry_cck-\u003efir_step_level);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-268-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:269:\t\t\t\t     ATH9K_ANI_MRC_CCK,\ndrivers/net/wireless/ath/ath9k/ani.c-270-\t\t\t\t     entry_cck-\u003emrc_cck_on);\n--\ndrivers/net/wireless/ath/ath9k/ani.c=273=static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-276-\ndrivers/net/wireless/ath/ath9k/ani.c:277:\tif (aniState-\u003ecckNoiseImmunityLevel \u003c ATH9K_ANI_CCK_MAX_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c-278-\t\tath9k_hw_set_cck_nil(ah, aniState-\u003ecckNoiseImmunityLevel + 1,\n--\ndrivers/net/wireless/ath/ath9k/ani.c=309=void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-321-\ndrivers/net/wireless/ath/ath9k/ani.c:322:\tofdm_nil = max_t(int, ATH9K_ANI_OFDM_DEF_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-323-\t\t\t aniState-\u003eofdmNoiseImmunityLevel);\ndrivers/net/wireless/ath/ath9k/ani.c:324:\tcck_nil = max_t(int, ATH9K_ANI_CCK_DEF_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-325-\t\t\t aniState-\u003ecckNoiseImmunityLevel);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-336-\t\tif (aniState-\u003eofdmNoiseImmunityLevel !=\ndrivers/net/wireless/ath/ath9k/ani.c:337:\t\t    ATH9K_ANI_OFDM_DEF_LEVEL ||\ndrivers/net/wireless/ath/ath9k/ani.c-338-\t\t    aniState-\u003ecckNoiseImmunityLevel !=\ndrivers/net/wireless/ath/ath9k/ani.c:339:\t\t    ATH9K_ANI_CCK_DEF_LEVEL) {\ndrivers/net/wireless/ath/ath9k/ani.c-340-\t\t\tath_dbg(common, ANI,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-347-\ndrivers/net/wireless/ath/ath9k/ani.c:348:\t\t\tofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c:349:\t\t\tcck_nil = ATH9K_ANI_CCK_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-350-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/ani.c=477=void ath9k_hw_ani_init(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-484-\tif (AR_SREV_9300_20_OR_LATER(ah)) {\ndrivers/net/wireless/ath/ath9k/ani.c:485:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;\ndrivers/net/wireless/ath/ath9k/ani.c:486:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;\ndrivers/net/wireless/ath/ath9k/ani.c:487:\t\tah-\u003econfig.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH;\ndrivers/net/wireless/ath/ath9k/ani.c:488:\t\tah-\u003econfig.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW;\ndrivers/net/wireless/ath/ath9k/ani.c-489-\t} else {\ndrivers/net/wireless/ath/ath9k/ani.c:490:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c:491:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c:492:\t\tah-\u003econfig.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c:493:\t\tah-\u003econfig.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c-494-\t}\ndrivers/net/wireless/ath/ath9k/ani.c-495-\ndrivers/net/wireless/ath/ath9k/ani.c:496:\tani-\u003espurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;\ndrivers/net/wireless/ath/ath9k/ani.c:497:\tani-\u003efirstepLevel = ATH9K_ANI_FIRSTEP_LVL;\ndrivers/net/wireless/ath/ath9k/ani.c-498-\tani-\u003emrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false;\n--\ndrivers/net/wireless/ath/ath9k/ani.c-500-\tani-\u003eofdmWeakSigDetect = true;\ndrivers/net/wireless/ath/ath9k/ani.c:501:\tani-\u003ecckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c:502:\tani-\u003eofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-503-\n--\ndrivers/net/wireless/ath/ath9k/ani.c-507-\t */\ndrivers/net/wireless/ath/ath9k/ani.c:508:\tah-\u003eaniperiod = ATH9K_ANI_PERIOD;\ndrivers/net/wireless/ath/ath9k/ani.c:509:\tah-\u003econfig.ani_poll_interval = ATH9K_ANI_POLLINTERVAL;\ndrivers/net/wireless/ath/ath9k/ani.c-510-\n--\ndrivers/net/wireless/ath/ath9k/ani.h-22-/* units are errors per second */\ndrivers/net/wireless/ath/ath9k/ani.h:23:#define ATH9K_ANI_OFDM_TRIG_HIGH           3500\ndrivers/net/wireless/ath/ath9k/ani.h:24:#define ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI 1000\ndrivers/net/wireless/ath/ath9k/ani.h:25:#define ATH9K_ANI_OFDM_TRIG_HIGH_OLD       500\ndrivers/net/wireless/ath/ath9k/ani.h-26-\ndrivers/net/wireless/ath/ath9k/ani.h:27:#define ATH9K_ANI_OFDM_TRIG_LOW           400\ndrivers/net/wireless/ath/ath9k/ani.h:28:#define ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI 900\ndrivers/net/wireless/ath/ath9k/ani.h:29:#define ATH9K_ANI_OFDM_TRIG_LOW_OLD       200\ndrivers/net/wireless/ath/ath9k/ani.h-30-\ndrivers/net/wireless/ath/ath9k/ani.h:31:#define ATH9K_ANI_CCK_TRIG_HIGH           600\ndrivers/net/wireless/ath/ath9k/ani.h:32:#define ATH9K_ANI_CCK_TRIG_HIGH_OLD       200\ndrivers/net/wireless/ath/ath9k/ani.h:33:#define ATH9K_ANI_CCK_TRIG_LOW            300\ndrivers/net/wireless/ath/ath9k/ani.h:34:#define ATH9K_ANI_CCK_TRIG_LOW_OLD        100\ndrivers/net/wireless/ath/ath9k/ani.h-35-\ndrivers/net/wireless/ath/ath9k/ani.h:36:#define ATH9K_ANI_SPUR_IMMUNE_LVL         3\ndrivers/net/wireless/ath/ath9k/ani.h:37:#define ATH9K_ANI_FIRSTEP_LVL             2\ndrivers/net/wireless/ath/ath9k/ani.h-38-\ndrivers/net/wireless/ath/ath9k/ani.h:39:#define ATH9K_ANI_RSSI_THR_HIGH           40\ndrivers/net/wireless/ath/ath9k/ani.h:40:#define ATH9K_ANI_RSSI_THR_LOW            7\ndrivers/net/wireless/ath/ath9k/ani.h-41-\ndrivers/net/wireless/ath/ath9k/ani.h:42:#define ATH9K_ANI_PERIOD                  300\ndrivers/net/wireless/ath/ath9k/ani.h-43-\ndrivers/net/wireless/ath/ath9k/ani.h-44-/* in ms */\ndrivers/net/wireless/ath/ath9k/ani.h:45:#define ATH9K_ANI_POLLINTERVAL            1000\ndrivers/net/wireless/ath/ath9k/ani.h-46-\ndrivers/net/wireless/ath/ath9k/ani.h:47:#define ATH9K_SIG_FIRSTEP_SETTING_MIN     0\ndrivers/net/wireless/ath/ath9k/ani.h:48:#define ATH9K_SIG_FIRSTEP_SETTING_MAX     20\ndrivers/net/wireless/ath/ath9k/ani.h:49:#define ATH9K_SIG_SPUR_IMM_SETTING_MIN    0\ndrivers/net/wireless/ath/ath9k/ani.h:50:#define ATH9K_SIG_SPUR_IMM_SETTING_MAX    22\ndrivers/net/wireless/ath/ath9k/ani.h-51-\n--\ndrivers/net/wireless/ath/ath9k/ani.h=54=enum ath9k_ani_cmd {\ndrivers/net/wireless/ath/ath9k/ani.h:55:\tATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION = 0x1,\ndrivers/net/wireless/ath/ath9k/ani.h:56:\tATH9K_ANI_FIRSTEP_LEVEL = 0x2,\ndrivers/net/wireless/ath/ath9k/ani.h:57:\tATH9K_ANI_SPUR_IMMUNITY_LEVEL = 0x4,\ndrivers/net/wireless/ath/ath9k/ani.h:58:\tATH9K_ANI_MRC_CCK = 0x8,\ndrivers/net/wireless/ath/ath9k/ani.h:59:\tATH9K_ANI_ALL = 0xfff\ndrivers/net/wireless/ath/ath9k/ani.h-60-};\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=955=static bool ar5008_hw_ani_control_new(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-964-\tswitch (cmd \u0026 ah-\u003eani_function) {\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:965:\tcase ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION:{\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-966-\t\t/*\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1045-\t}\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1046:\tcase ATH9K_ANI_FIRSTEP_LEVEL:{\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1047-\t\tu32 level = param;\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1060-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1061:\t\t\t\tATH9K_ANI_FIRSTEP_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1062-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1068-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1069:\t\t\t\tATH9K_ANI_FIRSTEP_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1070-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1079-\t}\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1080:\tcase ATH9K_ANI_SPUR_IMMUNITY_LEVEL:{\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1081-\t\tu32 level = param;\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1095-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1096:\t\t\t\tATH9K_ANI_SPUR_IMMUNE_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1097-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1103-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1104:\t\t\t\tATH9K_ANI_SPUR_IMMUNE_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1105-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1114-\t}\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1115:\tcase ATH9K_ANI_MRC_CCK:\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1116-\t\t/*\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=1171=static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1215-\t/* these levels just got reset to defaults by the INI */\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1216:\taniState-\u003espurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1217:\taniState-\u003efirstepLevel = ATH9K_ANI_FIRSTEP_LVL;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1218-\taniState-\u003eofdmWeakSigDetect = true;\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c=32=static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-66-\t\t\tif (isr2 \u0026 AR_ISR_S2_TIM)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:67:\t\t\t\tmask2 |= ATH9K_INT_TIM;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-68-\t\t\tif (isr2 \u0026 AR_ISR_S2_DTIM)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:69:\t\t\t\tmask2 |= ATH9K_INT_DTIM;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-70-\t\t\tif (isr2 \u0026 AR_ISR_S2_DTIMSYNC)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:71:\t\t\t\tmask2 |= ATH9K_INT_DTIMSYNC;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-72-\t\t\tif (isr2 \u0026 (AR_ISR_S2_CABEND))\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:73:\t\t\t\tmask2 |= ATH9K_INT_CABEND;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-74-\t\t\tif (isr2 \u0026 AR_ISR_S2_GTT)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:75:\t\t\t\tmask2 |= ATH9K_INT_GTT;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-76-\t\t\tif (isr2 \u0026 AR_ISR_S2_CST)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:77:\t\t\t\tmask2 |= ATH9K_INT_CST;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-78-\t\t\tif (isr2 \u0026 AR_ISR_S2_TSFOOR)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:79:\t\t\t\tmask2 |= ATH9K_INT_TSFOOR;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-80-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:81:\t\t\tif (!(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-82-\t\t\t\tREG_WRITE(ah, AR_ISR_S2, isr2);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-86-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:87:\t\tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-88-\t\t\tisr = REG_READ(ah, AR_ISR_RAC);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-94-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:95:\t\t*masked = isr \u0026 ATH9K_INT_COMMON;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-96-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-98-\t\t\t   AR_ISR_RXOK | AR_ISR_RXERR))\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:99:\t\t\t*masked |= ATH9K_INT_RX;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-100-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-105-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:106:\t\t\t*masked |= ATH9K_INT_TX;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-107-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:108:\t\t\tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-109-\t\t\t\ts0_s = REG_READ(ah, AR_ISR_S0_S);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-139-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:140:\t\tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-141-\t\t\ts5_s = REG_READ(ah, AR_ISR_S5_S(ah));\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-152-\t\tif (ah-\u003eintr_gen_timer_trigger)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:153:\t\t\t*masked |= ATH9K_INT_GENTIMER;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-154-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-155-\t\tif ((s5_s \u0026 AR_ISR_S5_TIM_TIMER) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:156:\t\t    !(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_AUTOSLEEP))\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:157:\t\t\t*masked |= ATH9K_INT_TIM_TIMER;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-158-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:159:\t\tif (!(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-160-\t\t\tREG_WRITE(ah, AR_ISR_S5, s5_s);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-164-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:165:\tif (!(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-166-\t\tREG_WRITE(ah, AR_ISR, isr);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-189-\t\t\t}\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:190:\t\t\t*masked |= ATH9K_INT_FATAL;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-191-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-196-\t\t\tREG_WRITE(ah, AR_RC, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:197:\t\t\t*masked |= ATH9K_INT_FATAL;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-198-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c=212=ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-260-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:261:\tctl1 |= (i-\u003ekeyix != ATH9K_TXKEYIX_INVALID ? SM(i-\u003ekeyix, AR_DestIdx) : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-262-\t\t| SM(i-\u003etype, AR_FrameType)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:263:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_NOACK ? AR_NoAck : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:264:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_EXT_ONLY ? AR_ExtOnly : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:265:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_EXT_AND_CTL ? AR_ExtAndCtl : 0);\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-266-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-282-\tWRITE_ONCE(ads-\u003eds_ctl0, (i-\u003epkt_len \u0026 AR_FrameLen)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:283:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_VMF ? AR_VirtMoreFrag : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-284-\t\t| SM(i-\u003etxpower[0], AR_XmitPower0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:285:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_VEOL ? AR_VEOL : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:286:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_INTREQ ? AR_TxIntrReq : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:287:\t\t| (i-\u003ekeyix != ATH9K_TXKEYIX_INVALID ? AR_DestIdxValid : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:288:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_CLRDMASK ? AR_ClrDestMask : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:289:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_RTSENA ? AR_RTSEnable :\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:290:\t\t   (i-\u003eflags \u0026 ATH9K_TXDESC_CTSENA ? AR_CTSEnable : 0)));\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-291-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c=316=static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-330-\tif (status \u0026 AR_TxOpExceeded)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:331:\t\tts-\u003ets_status |= ATH9K_TXERR_XTXOP;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-332-\tts-\u003etid = MS(status, AR_TxTid);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-340-\tif (status \u0026 AR_TxBaStatus) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:341:\t\tts-\u003ets_flags |= ATH9K_TX_BA;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-342-\t\tts-\u003eba_low = ads-\u003eAR_BaBitmapLow;\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-347-\tif (status \u0026 AR_FrmXmitOK)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:348:\t\tts-\u003ets_status |= ATH9K_TX_ACKED;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-349-\telse {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-350-\t\tif (status \u0026 AR_ExcessiveRetries)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:351:\t\t\tts-\u003ets_status |= ATH9K_TXERR_XRETRY;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-352-\t\tif (status \u0026 AR_Filtered)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:353:\t\t\tts-\u003ets_status |= ATH9K_TXERR_FILT;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-354-\t\tif (status \u0026 AR_FIFOUnderrun) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:355:\t\t\tts-\u003ets_status |= ATH9K_TXERR_FIFO;\n\n"
}

5/2 2026/09/06 06:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 21591
							output: 48
							thoughts: 105
						

Thoughts:
**Analyzing the ath9k_htc Driver Initialization**

Okay, let's break this down. First, I see `ath9k_htc`, and my initial thought is, "Ah, that's a USB wireless card driver, specifically the one controlled by `CONFIG_ATH9K_HTC`." Then, I spot `ath9k_multi_regread` and the file it resides within, `htc_drv_init.c`. This is intriguing because it's right there in `htc_drv_init.c`, so I'm already piecing together that it's part of the `ath9k_htc` driver's initialization sequence. Seems like a good spot to dig deeper. Consequently, my next move is to check the `htc_drv_init.c` file itself. That should give me a better understanding of what's happening.



6/2 2026/09/06 06:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/htc_drv_init.c",
  "FirstLine": 245,
  "LineCount": 50
}

Results:
{
  "Contents": " 245:\t\t\t\t  100);\n 246:\t\tif (unlikely(r)) {\n 247:\t\t\tath_dbg(common, WMI, \"REGISTER READ FAILED: (0x%04x, %d)\\n\",\n 248:\t\t\t\treg_offset, r);\n 249:\t\t\treturn -1;\n 250:\t\t}\n 251:\t\n 252:\t\treturn be32_to_cpu(val);\n 253:\t}\n 254:\t\n 255:\tstatic void ath9k_multi_regread(void *hw_priv, u32 *addr,\n 256:\t\t\t\t\tu32 *val, u16 count)\n 257:\t{\n 258:\t\tstruct ath_hw *ah = hw_priv;\n 259:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 260:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 261:\t\t__be32 tmpaddr[ATH9K_MULTI_READ_MAX];\n 262:\t\t__be32 tmpval[ATH9K_MULTI_READ_MAX];\n 263:\t\tint i, ret;\n 264:\t\n 265:\t\tif (WARN_ON_ONCE(count \u003e ATH9K_MULTI_READ_MAX)) {\n 266:\t\t\tmemset(val, 0xff, sizeof(*val) * count);\n 267:\t\t\treturn;\n 268:\t\t}\n 269:\t\n 270:\t\tfor (i = 0; i \u003c count; i++) {\n 271:\t\t\ttmpaddr[i] = cpu_to_be32(addr[i]);\n 272:\t\t}\n 273:\t\n 274:\t\tret = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_READ_CMDID,\n 275:\t\t\t\t   (u8 *)tmpaddr , sizeof(u32) * count,\n 276:\t\t\t\t   (u8 *)tmpval, sizeof(u32) * count,\n 277:\t\t\t\t   100);\n 278:\t\tif (unlikely(ret)) {\n 279:\t\t\tath_dbg(common, WMI,\n 280:\t\t\t\t\"Multiple REGISTER READ FAILED (count: %d)\\n\", count);\n 281:\t\t\t/* Callers expect what a failed single read returns. */\n 282:\t\t\tmemset(val, 0xff, sizeof(*val) * count);\n 283:\t\t\treturn;\n 284:\t\t}\n 285:\t\n 286:\t\tfor (i = 0; i \u003c count; i++) {\n 287:\t\t\tval[i] = be32_to_cpu(tmpval[i]);\n 288:\t\t}\n 289:\t}\n 290:\t\n 291:\tstatic void ath9k_regwrite_multi(struct ath_common *common)\n 292:\t{\n 293:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 294:\t\tu32 rsp_status;\n"
}

7/2 2026/09/06 06:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 22758
							output: 23
							thoughts: 1522
						

Thoughts:
**Analyzing the ath9k_htc USB Driver and Related Changes**

Okay, so I'm diving into this `ath9k_htc` USB driver. My initial thought is to figure out if we can fuzz it effectively, and the obvious first step is understanding how USB devices, in general, are handled within the system. Good news! Syzkaller *does* have support for fuzzing USB drivers via methods like raw-gadget, dummy_hcd, and vhci. Specifically, I see that Syzkaller utilizes `syz_usb_connect` and `syz_usb_control_io` and similar calls, so that's promising.

Given that `ath9k_htc` interacts with the mac80211, cfg80211, and nl80211 wireless stacks, there are numerous potential attack surfaces. Now, let's get into the nitty-gritty of this specific diff. It looks like the changes span several files.

1.  In `ar5008_phy.c`, it seems that register access using `REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH` is added to `ar5008_hw_set_delta_slope` and also, the fields for manipulating the timing and delta slopes of the PHY are being modified.

2.  Similarly, in `calib.c`, the `ath9k_hw_start_nfcal` function is being modified to include `ENABLE_REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH` and adds `set_bit(NFCAL_PENDING, &ah->caldata->cal_flags)`. These changes suggest that buffered register writes are being enabled for the noise floor calibration process.

3.  In `htc_drv_init.c`, the `ath9k_multi_regread` function has changes that restrict the number of registers that can be read to a maximum of `ATH9K_MULTI_READ_MAX`, with added WARN_ON_ONCE to indicate misuse, and the added return of memset(val, 0xff, sizeof(*val) * count) in the case where the count exceeds the number of reads or the register read fails. It seems that this function is updated to prevent a potential buffer overflow vulnerability.

4.  Moving to `hw.c`, there are interesting changes. The `ath9k_hw_channel_change` function is simplified to check for pending transmissions by first determining the first pending queue, using `ath9k_hw_first_txpending`, instead of looping through all possible queues. The `ath9k_hw_reset` function also has a conditional statement where it now skips the noise floor readout on USB if the fast channel change is disabled or if the bus type is ATH_USB, which probably indicates some optimization or a workaround specific to USB devices.

5.  Finally, in `mac.c`, the new function `ath9k_hw_first_txpending` is introduced, which uses `REG_READ_MULTI` to read multiple registers (`AR_QSTS` and `AR_Q_TXE`) at once, to efficiently determine which transmit queue has pending frames. This likely reduces the overhead of checking for pending transmissions, and the logic now does multi-register reads.

Now, my next step is to trace the call graph, specifically where `ath9k_hw_channel_change` is used, and try to get a better understanding of how the ath9k and ath9k\_htc drivers work together and how they interact with each other and the rest of the stack.



8/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "ath9k_hw_channel_change"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/hw.c=1514=static bool ath9k_hw_chip_reset(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/hw.c-1542-\ndrivers/net/wireless/ath/ath9k/hw.c:1543:static bool ath9k_hw_channel_change(struct ath_hw *ah,\ndrivers/net/wireless/ath/ath9k/hw.c-1544-\t\t\t\t    struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/hw.c=1787=static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/hw.c-1831-\ndrivers/net/wireless/ath/ath9k/hw.c:1832:\tret = ath9k_hw_channel_change(ah, chan);\ndrivers/net/wireless/ath/ath9k/hw.c-1833-\tif (!ret)\n"
}

9/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 25384
							output: 24
							thoughts: 20
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Investigating the `ath9k_hw_do_fastcc` Call Chain**

Okay, so I need to understand the execution context of `ath9k_hw_do_fastcc`. My immediate approach is to trace its call sites. I want to see *where* this function is being invoked within the `ath9k` driver. Is it from a context I'm already familiar with? Is it from interrupt handlers, tasklets, workqueues, or some other part of the driver's logic? I'm expecting this is probably related to channel change or calibration, but I need to confirm the exact workflow. Knowing the calling function(s) gives me critical insights into the purpose and timing of the "fast channel change" logic. I'll probably be using grep or some other source code search tool. I might also consider looking at the surrounding code of that function to better understand what triggers that specific call.



10/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "ath9k_hw_do_fastcc"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/hw.c=1748=static void ath9k_hw_init_desc(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/hw.c-1786- */\ndrivers/net/wireless/ath/ath9k/hw.c:1787:static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan)\ndrivers/net/wireless/ath/ath9k/hw.c-1788-{\n--\ndrivers/net/wireless/ath/ath9k/hw.c=1858=int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,\n--\ndrivers/net/wireless/ath/ath9k/hw.c-1901-\tif (fastcc) {\ndrivers/net/wireless/ath/ath9k/hw.c:1902:\t\tr = ath9k_hw_do_fastcc(ah, chan);\ndrivers/net/wireless/ath/ath9k/hw.c-1903-\t\tif (!r)\n"
}

11/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 25939
							output: 22
							thoughts: 77
						

Thoughts:
**Investigating the Root Cause of Potential Atheros Driver Issues**

Okay, so I'm looking into the Atheros ath9k driver, and I need to understand what's triggering these hardware resets, channel switches, and scans. The `ath9k_hw_reset` function, in particular, seems like a key player here, as does `ath9k_hw_start_nfcal`. I'll want to check where those functions are being called from to get a better sense of the control flow. Right, and I should probably look at what calls `ath9k_multi_regread`. Let's grep for that function name and see what comes up. That should give me some solid clues.



12/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "ath9k_multi_regread"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=234=static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-254-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:255:static void ath9k_multi_regread(void *hw_priv, u32 *addr,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-256-\t\t\t\tu32 *val, u16 count)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=614=static int ath9k_init_priv(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-631-\tah-\u003ereg_ops.read = ath9k_regread;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:632:\tah-\u003ereg_ops.multi_read = ath9k_multi_regread;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-633-\tah-\u003ereg_ops.write = ath9k_regwrite;\n"
}

13/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 26547
							output: 39
							thoughts: 313
						

Thoughts:
**My Analysis of a Potential Vulnerability in `ath9k_htc`**

Okay, so I'm digging into this `ath9k_htc` driver, and it looks like `ah->reg_ops.multi_read` is set to `ath9k_multi_regread`. Interesting, and this is called within `ath9k_hw_first_txpending(ah)` using that `REG_READ_MULTI` macro. Now, the key here is that `ath9k_multi_regread` function has a `WARN_ON_ONCE` check: `WARN_ON_ONCE(count > ATH9K_MULTI_READ_MAX)`. That's a good first line of defense, but it's making me think...

I remember that guideline about patches introducing runtime checks or assertions, like this `WARN_ON_ONCE`. The text mentions that even if the author *thinks* the invariant always holds (in this case, that `count` will never exceed `ATH9K_MULTI_READ_MAX`), fuzzing is critical to verify. We need to be sure that an unusual sequence of operations can't violate this check!

And here's where it gets interesting: the text highlights that reachable drivers, especially those accessible via virtual buses, are prime targets for fuzzing. `ath9k_htc` is a USB driver, and USB drivers can be emulated and fuzzed through things like USB gadget, raw-gadget, and Syzkaller. This connection between the virtual bus and fuzzing is important.

So, where do we go from here? Let's check the Kconfig requirements for `ATH9K_HTC` and `ATH9K`. I want to identify which configurations are needed to build `ath9k_htc` and `ath9k_hw`, to understand the possible attack surface better. By knowing this, I can figure out the options to enable the fuzzing. It's time to build a test environment!



14/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "config ATH9K_HTC\\b",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/Kconfig=156=config ATH9K_PCI_NO_EEPROM\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-171-\ndrivers/net/wireless/ath/ath9k/Kconfig:172:config ATH9K_HTC\ndrivers/net/wireless/ath/ath9k/Kconfig-173-\ttristate \"Atheros HTC based wireless cards support\"\n"
}

15/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 27454
							output: 40
							thoughts: 21
						

Thoughts:
Okay, here's my interpretation of that thought process, assuming I'm deep in the weeds of kernel development and familiar with Kconfig files:

**Diving into the ATH9K Configuration**

Alright, time to crack open the Kconfig files for both `ATH9K_HTC` and `ATH9K`. This likely means I'm troubleshooting some build issue, trying to understand dependencies, or maybe just brushing up on the configurations for these two Atheros WiFi drivers. I need to see how the features are controlled, what options are available, and how these two related modules interact with each other. This is likely part of either adding new functionality, fixing a bug or porting for new hardware. I'll be looking for relationships between options, default values, any conditional logic, and any conflicting settings. I need to understand the configuration landscape to move forward. Let's see what gems we can unearth!



16/2 2026/09/06 06:30 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/Kconfig",
  "FirstLine": 1,
  "LineCount": 45
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: ISC\n   2:\tconfig ATH9K_HW\n   3:\t\ttristate\n   4:\tconfig ATH9K_COMMON\n   5:\t\ttristate\n   6:\t\tselect ATH_COMMON\n   7:\tconfig ATH9K_COMMON_DEBUG\n   8:\t\tbool\n   9:\tconfig ATH9K_DFS_DEBUGFS\n  10:\t\tdef_bool y\n  11:\t\tdepends on ATH9K_DEBUGFS \u0026\u0026 ATH9K_DFS_CERTIFIED\n  12:\t\n  13:\tconfig ATH9K_BTCOEX_SUPPORT\n  14:\t\tbool \"Atheros bluetooth coexistence support\"\n  15:\t\tdepends on (ATH9K || ATH9K_HTC)\n  16:\t\tdefault y\n  17:\t\thelp\n  18:\t\t  Say Y, if you want to use the ath9k/ath9k_htc radios together with\n  19:\t\t  Bluetooth modules in the same system.\n  20:\t\n  21:\tconfig ATH9K\n  22:\t\ttristate \"Atheros 802.11n wireless cards support\"\n  23:\t\tdepends on MAC80211 \u0026\u0026 HAS_DMA\n  24:\t\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\n  25:\t\tselect ATH9K_HW\n  26:\t\tselect ATH9K_COMMON\n  27:\t\thelp\n  28:\t\t  This module adds support for wireless adapters based on\n  29:\t\t  Atheros IEEE 802.11n AR5008, AR9001 and AR9002 family\n  30:\t\t  of chipsets. For a specific list of supported external\n  31:\t\t  cards, laptops that already ship with these cards and\n  32:\t\t  APs that come with these cards refer to ath9k wiki\n  33:\t\t  products page:\n  34:\t\n  35:\t\t  https://wireless.wiki.kernel.org/en/users/Drivers/ath9k/products\n  36:\t\n  37:\t\t  If you choose to build a module, it'll be called ath9k.\n  38:\t\n  39:\tconfig ATH9K_PCI\n  40:\t\tbool \"Atheros ath9k PCI/PCIe bus support\"\n  41:\t\tdefault y\n  42:\t\tdepends on ATH9K \u0026\u0026 PCI\n  43:\t\thelp\n  44:\t\t  This option enables the PCI bus support in ath9k.\n  45:\t\n"
}

17/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 28354
							output: 42
							thoughts: 16
						

Thoughts:
Here's my summary, as though I'm thinking it:

**Digging into the Atheros Driver Configuration**

Okay, time to get down to brass tacks. I need to take a look at the configuration for the Atheros HTC driver. Specifically, I need to check out the `ATH9K_HTC` section within the `Kconfig` file. I'm going to want to understand the various options and dependencies that are defined within that section, any associated default settings, and of course, if there are any specific conditions that trigger this driver's inclusion. I'll be looking for things like: what features can be enabled or disabled, potential conflicts with other drivers or hardware, and any platform-specific considerations that might be present. Let's see what's in there!



18/2 2026/09/06 06:30 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/Kconfig",
  "FirstLine": 170,
  "LineCount": 40
}

Results:
{
  "Contents": " 170:\t\t  If unsure say N.\n 171:\t\n 172:\tconfig ATH9K_HTC\n 173:\t\ttristate \"Atheros HTC based wireless cards support\"\n 174:\t\tdepends on USB \u0026\u0026 MAC80211\n 175:\t\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\n 176:\t\tselect ATH9K_HW\n 177:\t\tselect ATH9K_COMMON\n 178:\t\thelp\n 179:\t\t  Support for Atheros HTC based cards.\n 180:\t\t  Chipsets supported: AR9271\n 181:\t\n 182:\t\t  For more information:\n 183:\t\t  https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc\n 184:\t\n 185:\t\t  The built module will be ath9k_htc.\n 186:\t\n 187:\tconfig ATH9K_HTC_DEBUGFS\n 188:\t\tbool \"Atheros ath9k_htc debugging\"\n 189:\t\tdepends on ATH9K_HTC \u0026\u0026 DEBUG_FS\n 190:\t\tselect ATH9K_COMMON_DEBUG\n 191:\t\thelp\n 192:\t\t  Say Y, if you need access to ath9k_htc's statistics.\n 193:\t\t  As well as access to the FFT/spectral data.\n 194:\t\n 195:\tconfig ATH9K_HWRNG\n 196:\t\tbool \"Random number generator support\"\n 197:\t\tdepends on ATH9K \u0026\u0026 (HW_RANDOM = y || HW_RANDOM = ATH9K)\n 198:\t\tdefault n\n 199:\t\thelp\n 200:\t\t  This option incorporates the ADC register output as a source of\n 201:\t\t  randomness into Linux entropy pool (/dev/urandom and /dev/random)\n 202:\t\n 203:\t\t  Say Y, feeds the entropy directly from the WiFi driver to the input\n 204:\t\t  pool.\n 205:\t\n 206:\tconfig ATH9K_COMMON_SPECTRAL\n 207:\t\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\n 208:\t\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\n 209:\t\tselect RELAY\n"
}

19/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 29216
							output: 30
							thoughts: 16
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving Deeper into the Wireless Atheros Configuration**

Okay, so we've covered the basics, but we need to ensure we're thorough. My instincts tell me we should cross-reference our findings with the `drivers/net/wireless/ath/Kconfig` file. This is where the core configuration options for the Atheros wireless drivers are defined, right? I want to make sure we haven't missed any dependencies, feature flags, or potential conflicts that are specified there. This Kconfig file will be the canonical source of truth for the Atheros driver build options, including any dependencies on other kernel subsystems or external packages. Checking this file will ensure the final config is robust.



20/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "ATH9K",
  "PathPrefix": "drivers/net/wireless/ath"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 5102 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/ath/Makefile=2=obj-$(CONFIG_ATH5K)\t\t+= ath5k/\ndrivers/net/wireless/ath/Makefile:3:obj-$(CONFIG_ATH9K_HW)\t\t+= ath9k/\ndrivers/net/wireless/ath/Makefile-4-obj-$(CONFIG_CARL9170)\t\t+= carl9170/\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-1-# SPDX-License-Identifier: ISC\ndrivers/net/wireless/ath/ath9k/Kconfig:2:config ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig-3-\ttristate\ndrivers/net/wireless/ath/ath9k/Kconfig:4:config ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-5-\ttristate\ndrivers/net/wireless/ath/ath9k/Kconfig-6-\tselect ATH_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig:7:config ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-8-\tbool\ndrivers/net/wireless/ath/ath9k/Kconfig:9:config ATH9K_DFS_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-10-\tdef_bool y\ndrivers/net/wireless/ath/ath9k/Kconfig:11:\tdepends on ATH9K_DEBUGFS \u0026\u0026 ATH9K_DFS_CERTIFIED\ndrivers/net/wireless/ath/ath9k/Kconfig-12-\ndrivers/net/wireless/ath/ath9k/Kconfig:13:config ATH9K_BTCOEX_SUPPORT\ndrivers/net/wireless/ath/ath9k/Kconfig-14-\tbool \"Atheros bluetooth coexistence support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:15:\tdepends on (ATH9K || ATH9K_HTC)\ndrivers/net/wireless/ath/ath9k/Kconfig-16-\tdefault y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-20-\ndrivers/net/wireless/ath/ath9k/Kconfig:21:config ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-22-\ttristate \"Atheros 802.11n wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-24-\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\ndrivers/net/wireless/ath/ath9k/Kconfig:25:\tselect ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig:26:\tselect ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-27-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-38-\ndrivers/net/wireless/ath/ath9k/Kconfig:39:config ATH9K_PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-40-\tbool \"Atheros ath9k PCI/PCIe bus support\"\ndrivers/net/wireless/ath/ath9k/Kconfig-41-\tdefault y\ndrivers/net/wireless/ath/ath9k/Kconfig:42:\tdepends on ATH9K \u0026\u0026 PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-43-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-47-\ndrivers/net/wireless/ath/ath9k/Kconfig:48:config ATH9K_AHB\ndrivers/net/wireless/ath/ath9k/Kconfig-49-\tbool \"Atheros ath9k AHB bus support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:50:\tdepends on ATH9K \u0026\u0026 OF\ndrivers/net/wireless/ath/ath9k/Kconfig-51-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-57-\ndrivers/net/wireless/ath/ath9k/Kconfig:58:config ATH9K_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-59-\tbool \"Atheros ath9k debugging\"\ndrivers/net/wireless/ath/ath9k/Kconfig:60:\tdepends on ATH9K \u0026\u0026 DEBUG_FS \u0026\u0026 MAC80211_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig:61:\tselect ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-62-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-68-\ndrivers/net/wireless/ath/ath9k/Kconfig:69:config ATH9K_STATION_STATISTICS\ndrivers/net/wireless/ath/ath9k/Kconfig-70-\tbool \"Detailed station statistics\"\ndrivers/net/wireless/ath/ath9k/Kconfig:71:\tdepends on ATH9K \u0026\u0026 ATH9K_DEBUGFS \u0026\u0026 DEBUG_FS\ndrivers/net/wireless/ath/ath9k/Kconfig-72-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-75-\ndrivers/net/wireless/ath/ath9k/Kconfig:76:config ATH9K_TX99\ndrivers/net/wireless/ath/ath9k/Kconfig-77-\tbool \"Atheros ath9k TX99 testing support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:78:\tdepends on ATH9K_DEBUGFS \u0026\u0026 CFG80211_CERTIFICATION_ONUS\ndrivers/net/wireless/ath/ath9k/Kconfig-79-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-95-\ndrivers/net/wireless/ath/ath9k/Kconfig:96:config ATH9K_DFS_CERTIFIED\ndrivers/net/wireless/ath/ath9k/Kconfig-97-\tbool \"Atheros DFS support for certified platforms\"\ndrivers/net/wireless/ath/ath9k/Kconfig:98:\tdepends on ATH9K \u0026\u0026 CFG80211_CERTIFICATION_ONUS\ndrivers/net/wireless/ath/ath9k/Kconfig-99-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-114-\ndrivers/net/wireless/ath/ath9k/Kconfig:115:config ATH9K_DYNACK\ndrivers/net/wireless/ath/ath9k/Kconfig-116-\tbool \"Atheros ath9k ACK timeout estimation algorithm\"\ndrivers/net/wireless/ath/ath9k/Kconfig:117:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-118-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-123-\ndrivers/net/wireless/ath/ath9k/Kconfig:124:config ATH9K_WOW\ndrivers/net/wireless/ath/ath9k/Kconfig-125-\tbool \"Wake on Wireless LAN support (EXPERIMENTAL)\"\ndrivers/net/wireless/ath/ath9k/Kconfig:126:\tdepends on ATH9K \u0026\u0026 PM\ndrivers/net/wireless/ath/ath9k/Kconfig-127-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-131-\ndrivers/net/wireless/ath/ath9k/Kconfig:132:config ATH9K_RFKILL\ndrivers/net/wireless/ath/ath9k/Kconfig-133-\tbool \"Atheros ath9k rfkill support\" if EXPERT\ndrivers/net/wireless/ath/ath9k/Kconfig:134:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig:135:\tdepends on RFKILL=y || RFKILL=ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-136-\tdefault y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-141-\ndrivers/net/wireless/ath/ath9k/Kconfig:142:config ATH9K_CHANNEL_CONTEXT\ndrivers/net/wireless/ath/ath9k/Kconfig-143-\tbool \"Channel Context support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:144:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-145-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-150-\ndrivers/net/wireless/ath/ath9k/Kconfig:151:config ATH9K_PCOEM\ndrivers/net/wireless/ath/ath9k/Kconfig-152-\tbool \"Atheros ath9k support for PC OEM cards\" if EXPERT\ndrivers/net/wireless/ath/ath9k/Kconfig:153:\tdepends on ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-154-\tdefault y\ndrivers/net/wireless/ath/ath9k/Kconfig-155-\ndrivers/net/wireless/ath/ath9k/Kconfig:156:config ATH9K_PCI_NO_EEPROM\ndrivers/net/wireless/ath/ath9k/Kconfig-157-\ttristate \"Atheros ath9k pci loader for EEPROM-less chips\"\ndrivers/net/wireless/ath/ath9k/Kconfig:158:\tdepends on ATH9K_PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-159-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-171-\ndrivers/net/wireless/ath/ath9k/Kconfig:172:config ATH9K_HTC\ndrivers/net/wireless/ath/ath9k/Kconfig-173-\ttristate \"Atheros HTC based wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-175-\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\ndrivers/net/wireless/ath/ath9k/Kconfig:176:\tselect ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig:177:\tselect ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-178-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-186-\ndrivers/net/wireless/ath/ath9k/Kconfig:187:config ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-188-\tbool \"Atheros ath9k_htc debugging\"\ndrivers/net/wireless/ath/ath9k/Kconfig:189:\tdepends on ATH9K_HTC \u0026\u0026 DEBUG_FS\ndrivers/net/wireless/ath/ath9k/Kconfig:190:\tselect ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-191-\thelp\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-194-\ndrivers/net/wireless/ath/ath9k/Kconfig:195:config ATH9K_HWRNG\ndrivers/net/wireless/ath/ath9k/Kconfig-196-\tbool \"Random number generator support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:197:\tdepends on ATH9K \u0026\u0026 (HW_RANDOM = y || HW_RANDOM = ATH9K)\ndrivers/net/wireless/ath/ath9k/Kconfig-198-\tdefault n\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-205-\ndrivers/net/wireless/ath/ath9k/Kconfig:206:config ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/Kconfig-207-\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:208:\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-209-\tselect RELAY\n--\ndrivers/net/wireless/ath/ath9k/Makefile=2=ath9k-y +=\tbeacon.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-11-\ndrivers/net/wireless/ath/ath9k/Makefile:12:ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o\ndrivers/net/wireless/ath/ath9k/Makefile:13:ath9k-$(CONFIG_ATH9K_PCI) += pci.o\ndrivers/net/wireless/ath/ath9k/Makefile:14:ath9k-$(CONFIG_ATH9K_AHB) += ahb.o\ndrivers/net/wireless/ath/ath9k/Makefile:15:ath9k-$(CONFIG_ATH9K_DFS_DEBUGFS) += dfs_debug.o\ndrivers/net/wireless/ath/ath9k/Makefile:16:ath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += dfs.o\ndrivers/net/wireless/ath/ath9k/Makefile:17:ath9k-$(CONFIG_ATH9K_TX99) += tx99.o\ndrivers/net/wireless/ath/ath9k/Makefile:18:ath9k-$(CONFIG_ATH9K_WOW) += wow.o\ndrivers/net/wireless/ath/ath9k/Makefile:19:ath9k-$(CONFIG_ATH9K_HWRNG) += rng.o\ndrivers/net/wireless/ath/ath9k/Makefile-20-\ndrivers/net/wireless/ath/ath9k/Makefile:21:ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o\ndrivers/net/wireless/ath/ath9k/Makefile-22-\ndrivers/net/wireless/ath/ath9k/Makefile:23:ath9k-$(CONFIG_ATH9K_STATION_STATISTICS) += debug_sta.o\ndrivers/net/wireless/ath/ath9k/Makefile-24-\ndrivers/net/wireless/ath/ath9k/Makefile:25:obj-$(CONFIG_ATH9K) += ath9k.o\ndrivers/net/wireless/ath/ath9k/Makefile-26-\ndrivers/net/wireless/ath/ath9k/Makefile=27=ath9k_hw-y:=\t\\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-47-\ndrivers/net/wireless/ath/ath9k/Makefile:48:ath9k_hw-$(CONFIG_ATH9K_WOW) += ar9003_wow.o\ndrivers/net/wireless/ath/ath9k/Makefile-49-\ndrivers/net/wireless/ath/ath9k/Makefile:50:ath9k_hw-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += btcoex.o \\\ndrivers/net/wireless/ath/ath9k/Makefile-51-\t\t\t\t\t   ar9003_mci.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-53-\ndrivers/net/wireless/ath/ath9k/Makefile:54:ath9k_hw-$(CONFIG_ATH9K_PCOEM) += ar9003_rtt.o\ndrivers/net/wireless/ath/ath9k/Makefile-55-\ndrivers/net/wireless/ath/ath9k/Makefile:56:ath9k_hw-$(CONFIG_ATH9K_DYNACK) += dynack.o\ndrivers/net/wireless/ath/ath9k/Makefile-57-\ndrivers/net/wireless/ath/ath9k/Makefile:58:obj-$(CONFIG_ATH9K_HW) += ath9k_hw.o\ndrivers/net/wireless/ath/ath9k/Makefile-59-\ndrivers/net/wireless/ath/ath9k/Makefile:60:obj-$(CONFIG_ATH9K_COMMON) += ath9k_common.o\ndrivers/net/wireless/ath/ath9k/Makefile-61-ath9k_common-y:=\tcommon.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-64-\ndrivers/net/wireless/ath/ath9k/Makefile:65:ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o\ndrivers/net/wireless/ath/ath9k/Makefile:66:ath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o\ndrivers/net/wireless/ath/ath9k/Makefile-67-\ndrivers/net/wireless/ath/ath9k/Makefile=68=ath9k_htc-y +=\thtc_hst.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-76-\ndrivers/net/wireless/ath/ath9k/Makefile:77:ath9k_htc-$(CONFIG_ATH9K_HTC_DEBUGFS) += htc_drv_debug.o\ndrivers/net/wireless/ath/ath9k/Makefile-78-\ndrivers/net/wireless/ath/ath9k/Makefile:79:obj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o\ndrivers/net/wireless/ath/ath9k/Makefile-80-\ndrivers/net/wireless/ath/ath9k/Makefile:81:obj-$(CONFIG_ATH9K_PCI_NO_EEPROM) += ath9k_pci_owl_loader.o\n--\ndrivers/net/wireless/ath/ath9k/ani.c=39=static const struct ani_ofdm_level_entry ofdm_level_table[] = {\n--\ndrivers/net/wireless/ath/ath9k/ani.c-51-};\ndrivers/net/wireless/ath/ath9k/ani.c:52:#define ATH9K_ANI_OFDM_NUM_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-53-\tARRAY_SIZE(ofdm_level_table)\ndrivers/net/wireless/ath/ath9k/ani.c:54:#define ATH9K_ANI_OFDM_MAX_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c:55:\t(ATH9K_ANI_OFDM_NUM_LEVEL-1)\ndrivers/net/wireless/ath/ath9k/ani.c:56:#define ATH9K_ANI_OFDM_DEF_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-57-\t3 /* default level - matches the INI settings */\n--\ndrivers/net/wireless/ath/ath9k/ani.c=85=static const struct ani_cck_level_entry cck_level_table[] = {\n--\ndrivers/net/wireless/ath/ath9k/ani.c-97-\ndrivers/net/wireless/ath/ath9k/ani.c:98:#define ATH9K_ANI_CCK_NUM_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-99-\tARRAY_SIZE(cck_level_table)\ndrivers/net/wireless/ath/ath9k/ani.c:100:#define ATH9K_ANI_CCK_MAX_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c:101:\t(ATH9K_ANI_CCK_NUM_LEVEL-1)\ndrivers/net/wireless/ath/ath9k/ani.c:102:#define ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI \\\ndrivers/net/wireless/ath/ath9k/ani.c:103:\t(ATH9K_ANI_CCK_NUM_LEVEL-3)\ndrivers/net/wireless/ath/ath9k/ani.c:104:#define ATH9K_ANI_CCK_DEF_LEVEL \\\ndrivers/net/wireless/ath/ath9k/ani.c-105-\t2 /* default level - matches the INI settings */\n--\ndrivers/net/wireless/ath/ath9k/ani.c=149=static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-160-\t\timmunityLevel, BEACON_RSSI(ah),\ndrivers/net/wireless/ath/ath9k/ani.c:161:\t\tATH9K_ANI_RSSI_THR_LOW,\ndrivers/net/wireless/ath/ath9k/ani.c:162:\t\tATH9K_ANI_RSSI_THR_HIGH);\ndrivers/net/wireless/ath/ath9k/ani.c-163-\ndrivers/net/wireless/ath/ath9k/ani.c:164:\tif (AR_SREV_9100(ah) \u0026\u0026 immunityLevel \u003c ATH9K_ANI_OFDM_DEF_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c:165:\t\timmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-166-\n--\ndrivers/net/wireless/ath/ath9k/ani.c-174-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:175:\t\t\t\t     ATH9K_ANI_SPUR_IMMUNITY_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-176-\t\t\t\t     entry_ofdm-\u003espur_immunity_level);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-180-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:181:\t\t\t\t     ATH9K_ANI_FIRSTEP_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-182-\t\t\t\t     entry_ofdm-\u003efir_step_level);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-185-\tif (ah-\u003eopmode == NL80211_IFTYPE_STATION \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ani.c:186:\t    BEACON_RSSI(ah) \u003c= ATH9K_ANI_RSSI_THR_HIGH)\ndrivers/net/wireless/ath/ath9k/ani.c-187-\t\tweak_sig = true;\n--\ndrivers/net/wireless/ath/ath9k/ani.c-202-\tif (aniState-\u003eofdmWeakSigDetect != weak_sig)\ndrivers/net/wireless/ath/ath9k/ani.c:203:\t\tath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,\ndrivers/net/wireless/ath/ath9k/ani.c-204-\t\t\t\t     weak_sig);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-208-\ndrivers/net/wireless/ath/ath9k/ani.c:209:\tif (aniState-\u003eofdmNoiseImmunityLevel \u003e= ATH9K_ANI_OFDM_DEF_LEVEL) {\ndrivers/net/wireless/ath/ath9k/ani.c:210:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;\ndrivers/net/wireless/ath/ath9k/ani.c:211:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI;\ndrivers/net/wireless/ath/ath9k/ani.c-212-\t} else {\ndrivers/net/wireless/ath/ath9k/ani.c:213:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI;\ndrivers/net/wireless/ath/ath9k/ani.c:214:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;\ndrivers/net/wireless/ath/ath9k/ani.c-215-\t}\n--\ndrivers/net/wireless/ath/ath9k/ani.c=218=static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-221-\ndrivers/net/wireless/ath/ath9k/ani.c:222:\tif (aniState-\u003eofdmNoiseImmunityLevel \u003c ATH9K_ANI_OFDM_MAX_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c-223-\t\tath9k_hw_set_ofdm_nil(ah, aniState-\u003eofdmNoiseImmunityLevel + 1, false);\n--\ndrivers/net/wireless/ath/ath9k/ani.c=229=static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-238-\t\taniState-\u003ecckNoiseImmunityLevel, immunityLevel,\ndrivers/net/wireless/ath/ath9k/ani.c:239:\t\tBEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW,\ndrivers/net/wireless/ath/ath9k/ani.c:240:\t\tATH9K_ANI_RSSI_THR_HIGH);\ndrivers/net/wireless/ath/ath9k/ani.c-241-\ndrivers/net/wireless/ath/ath9k/ani.c:242:\tif (AR_SREV_9100(ah) \u0026\u0026 immunityLevel \u003c ATH9K_ANI_CCK_DEF_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c:243:\t\timmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-244-\ndrivers/net/wireless/ath/ath9k/ani.c-245-\tif (ah-\u003eopmode == NL80211_IFTYPE_STATION \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ani.c:246:\t    BEACON_RSSI(ah) \u003c= ATH9K_ANI_RSSI_THR_LOW \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ani.c:247:\t    immunityLevel \u003e ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)\ndrivers/net/wireless/ath/ath9k/ani.c:248:\t\timmunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;\ndrivers/net/wireless/ath/ath9k/ani.c-249-\n--\ndrivers/net/wireless/ath/ath9k/ani.c-258-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:259:\t\t\t\t     ATH9K_ANI_FIRSTEP_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-260-\t\t\t\t     entry_cck-\u003efir_step_level);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-268-\t\tath9k_hw_ani_control(ah,\ndrivers/net/wireless/ath/ath9k/ani.c:269:\t\t\t\t     ATH9K_ANI_MRC_CCK,\ndrivers/net/wireless/ath/ath9k/ani.c-270-\t\t\t\t     entry_cck-\u003emrc_cck_on);\n--\ndrivers/net/wireless/ath/ath9k/ani.c=273=static void ath9k_hw_ani_cck_err_trigger(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-276-\ndrivers/net/wireless/ath/ath9k/ani.c:277:\tif (aniState-\u003ecckNoiseImmunityLevel \u003c ATH9K_ANI_CCK_MAX_LEVEL)\ndrivers/net/wireless/ath/ath9k/ani.c-278-\t\tath9k_hw_set_cck_nil(ah, aniState-\u003ecckNoiseImmunityLevel + 1,\n--\ndrivers/net/wireless/ath/ath9k/ani.c=309=void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-321-\ndrivers/net/wireless/ath/ath9k/ani.c:322:\tofdm_nil = max_t(int, ATH9K_ANI_OFDM_DEF_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-323-\t\t\t aniState-\u003eofdmNoiseImmunityLevel);\ndrivers/net/wireless/ath/ath9k/ani.c:324:\tcck_nil = max_t(int, ATH9K_ANI_CCK_DEF_LEVEL,\ndrivers/net/wireless/ath/ath9k/ani.c-325-\t\t\t aniState-\u003ecckNoiseImmunityLevel);\n--\ndrivers/net/wireless/ath/ath9k/ani.c-336-\t\tif (aniState-\u003eofdmNoiseImmunityLevel !=\ndrivers/net/wireless/ath/ath9k/ani.c:337:\t\t    ATH9K_ANI_OFDM_DEF_LEVEL ||\ndrivers/net/wireless/ath/ath9k/ani.c-338-\t\t    aniState-\u003ecckNoiseImmunityLevel !=\ndrivers/net/wireless/ath/ath9k/ani.c:339:\t\t    ATH9K_ANI_CCK_DEF_LEVEL) {\ndrivers/net/wireless/ath/ath9k/ani.c-340-\t\t\tath_dbg(common, ANI,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-347-\ndrivers/net/wireless/ath/ath9k/ani.c:348:\t\t\tofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c:349:\t\t\tcck_nil = ATH9K_ANI_CCK_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-350-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/ani.c=477=void ath9k_hw_ani_init(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ani.c-484-\tif (AR_SREV_9300_20_OR_LATER(ah)) {\ndrivers/net/wireless/ath/ath9k/ani.c:485:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;\ndrivers/net/wireless/ath/ath9k/ani.c:486:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;\ndrivers/net/wireless/ath/ath9k/ani.c:487:\t\tah-\u003econfig.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH;\ndrivers/net/wireless/ath/ath9k/ani.c:488:\t\tah-\u003econfig.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW;\ndrivers/net/wireless/ath/ath9k/ani.c-489-\t} else {\ndrivers/net/wireless/ath/ath9k/ani.c:490:\t\tah-\u003econfig.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c:491:\t\tah-\u003econfig.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c:492:\t\tah-\u003econfig.cck_trig_high = ATH9K_ANI_CCK_TRIG_HIGH_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c:493:\t\tah-\u003econfig.cck_trig_low = ATH9K_ANI_CCK_TRIG_LOW_OLD;\ndrivers/net/wireless/ath/ath9k/ani.c-494-\t}\ndrivers/net/wireless/ath/ath9k/ani.c-495-\ndrivers/net/wireless/ath/ath9k/ani.c:496:\tani-\u003espurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;\ndrivers/net/wireless/ath/ath9k/ani.c:497:\tani-\u003efirstepLevel = ATH9K_ANI_FIRSTEP_LVL;\ndrivers/net/wireless/ath/ath9k/ani.c-498-\tani-\u003emrcCCK = AR_SREV_9300_20_OR_LATER(ah) ? true : false;\n--\ndrivers/net/wireless/ath/ath9k/ani.c-500-\tani-\u003eofdmWeakSigDetect = true;\ndrivers/net/wireless/ath/ath9k/ani.c:501:\tani-\u003ecckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c:502:\tani-\u003eofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;\ndrivers/net/wireless/ath/ath9k/ani.c-503-\n--\ndrivers/net/wireless/ath/ath9k/ani.c-507-\t */\ndrivers/net/wireless/ath/ath9k/ani.c:508:\tah-\u003eaniperiod = ATH9K_ANI_PERIOD;\ndrivers/net/wireless/ath/ath9k/ani.c:509:\tah-\u003econfig.ani_poll_interval = ATH9K_ANI_POLLINTERVAL;\ndrivers/net/wireless/ath/ath9k/ani.c-510-\n--\ndrivers/net/wireless/ath/ath9k/ani.h-22-/* units are errors per second */\ndrivers/net/wireless/ath/ath9k/ani.h:23:#define ATH9K_ANI_OFDM_TRIG_HIGH           3500\ndrivers/net/wireless/ath/ath9k/ani.h:24:#define ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI 1000\ndrivers/net/wireless/ath/ath9k/ani.h:25:#define ATH9K_ANI_OFDM_TRIG_HIGH_OLD       500\ndrivers/net/wireless/ath/ath9k/ani.h-26-\ndrivers/net/wireless/ath/ath9k/ani.h:27:#define ATH9K_ANI_OFDM_TRIG_LOW           400\ndrivers/net/wireless/ath/ath9k/ani.h:28:#define ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI 900\ndrivers/net/wireless/ath/ath9k/ani.h:29:#define ATH9K_ANI_OFDM_TRIG_LOW_OLD       200\ndrivers/net/wireless/ath/ath9k/ani.h-30-\ndrivers/net/wireless/ath/ath9k/ani.h:31:#define ATH9K_ANI_CCK_TRIG_HIGH           600\ndrivers/net/wireless/ath/ath9k/ani.h:32:#define ATH9K_ANI_CCK_TRIG_HIGH_OLD       200\ndrivers/net/wireless/ath/ath9k/ani.h:33:#define ATH9K_ANI_CCK_TRIG_LOW            300\ndrivers/net/wireless/ath/ath9k/ani.h:34:#define ATH9K_ANI_CCK_TRIG_LOW_OLD        100\ndrivers/net/wireless/ath/ath9k/ani.h-35-\ndrivers/net/wireless/ath/ath9k/ani.h:36:#define ATH9K_ANI_SPUR_IMMUNE_LVL         3\ndrivers/net/wireless/ath/ath9k/ani.h:37:#define ATH9K_ANI_FIRSTEP_LVL             2\ndrivers/net/wireless/ath/ath9k/ani.h-38-\ndrivers/net/wireless/ath/ath9k/ani.h:39:#define ATH9K_ANI_RSSI_THR_HIGH           40\ndrivers/net/wireless/ath/ath9k/ani.h:40:#define ATH9K_ANI_RSSI_THR_LOW            7\ndrivers/net/wireless/ath/ath9k/ani.h-41-\ndrivers/net/wireless/ath/ath9k/ani.h:42:#define ATH9K_ANI_PERIOD                  300\ndrivers/net/wireless/ath/ath9k/ani.h-43-\ndrivers/net/wireless/ath/ath9k/ani.h-44-/* in ms */\ndrivers/net/wireless/ath/ath9k/ani.h:45:#define ATH9K_ANI_POLLINTERVAL            1000\ndrivers/net/wireless/ath/ath9k/ani.h-46-\ndrivers/net/wireless/ath/ath9k/ani.h:47:#define ATH9K_SIG_FIRSTEP_SETTING_MIN     0\ndrivers/net/wireless/ath/ath9k/ani.h:48:#define ATH9K_SIG_FIRSTEP_SETTING_MAX     20\ndrivers/net/wireless/ath/ath9k/ani.h:49:#define ATH9K_SIG_SPUR_IMM_SETTING_MIN    0\ndrivers/net/wireless/ath/ath9k/ani.h:50:#define ATH9K_SIG_SPUR_IMM_SETTING_MAX    22\ndrivers/net/wireless/ath/ath9k/ani.h-51-\n--\ndrivers/net/wireless/ath/ath9k/ani.h=54=enum ath9k_ani_cmd {\ndrivers/net/wireless/ath/ath9k/ani.h:55:\tATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION = 0x1,\ndrivers/net/wireless/ath/ath9k/ani.h:56:\tATH9K_ANI_FIRSTEP_LEVEL = 0x2,\ndrivers/net/wireless/ath/ath9k/ani.h:57:\tATH9K_ANI_SPUR_IMMUNITY_LEVEL = 0x4,\ndrivers/net/wireless/ath/ath9k/ani.h:58:\tATH9K_ANI_MRC_CCK = 0x8,\ndrivers/net/wireless/ath/ath9k/ani.h:59:\tATH9K_ANI_ALL = 0xfff\ndrivers/net/wireless/ath/ath9k/ani.h-60-};\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=955=static bool ar5008_hw_ani_control_new(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-964-\tswitch (cmd \u0026 ah-\u003eani_function) {\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:965:\tcase ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION:{\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-966-\t\t/*\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1045-\t}\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1046:\tcase ATH9K_ANI_FIRSTEP_LEVEL:{\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1047-\t\tu32 level = param;\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1060-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1061:\t\t\t\tATH9K_ANI_FIRSTEP_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1062-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1068-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1069:\t\t\t\tATH9K_ANI_FIRSTEP_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1070-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1079-\t}\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1080:\tcase ATH9K_ANI_SPUR_IMMUNITY_LEVEL:{\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1081-\t\tu32 level = param;\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1095-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1096:\t\t\t\tATH9K_ANI_SPUR_IMMUNE_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1097-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1103-\t\t\t\tlevel,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1104:\t\t\t\tATH9K_ANI_SPUR_IMMUNE_LVL,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1105-\t\t\t\tvalue,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1114-\t}\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1115:\tcase ATH9K_ANI_MRC_CCK:\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1116-\t\t/*\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=1171=static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1215-\t/* these levels just got reset to defaults by the INI */\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1216:\taniState-\u003espurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1217:\taniState-\u003efirstepLevel = ATH9K_ANI_FIRSTEP_LVL;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1218-\taniState-\u003eofdmWeakSigDetect = true;\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c=32=static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-66-\t\t\tif (isr2 \u0026 AR_ISR_S2_TIM)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:67:\t\t\t\tmask2 |= ATH9K_INT_TIM;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-68-\t\t\tif (isr2 \u0026 AR_ISR_S2_DTIM)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:69:\t\t\t\tmask2 |= ATH9K_INT_DTIM;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-70-\t\t\tif (isr2 \u0026 AR_ISR_S2_DTIMSYNC)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:71:\t\t\t\tmask2 |= ATH9K_INT_DTIMSYNC;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-72-\t\t\tif (isr2 \u0026 (AR_ISR_S2_CABEND))\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:73:\t\t\t\tmask2 |= ATH9K_INT_CABEND;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-74-\t\t\tif (isr2 \u0026 AR_ISR_S2_GTT)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:75:\t\t\t\tmask2 |= ATH9K_INT_GTT;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-76-\t\t\tif (isr2 \u0026 AR_ISR_S2_CST)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:77:\t\t\t\tmask2 |= ATH9K_INT_CST;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-78-\t\t\tif (isr2 \u0026 AR_ISR_S2_TSFOOR)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:79:\t\t\t\tmask2 |= ATH9K_INT_TSFOOR;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-80-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:81:\t\t\tif (!(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-82-\t\t\t\tREG_WRITE(ah, AR_ISR_S2, isr2);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-86-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:87:\t\tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-88-\t\t\tisr = REG_READ(ah, AR_ISR_RAC);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-94-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:95:\t\t*masked = isr \u0026 ATH9K_INT_COMMON;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-96-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-98-\t\t\t   AR_ISR_RXOK | AR_ISR_RXERR))\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:99:\t\t\t*masked |= ATH9K_INT_RX;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-100-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-105-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:106:\t\t\t*masked |= ATH9K_INT_TX;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-107-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:108:\t\t\tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-109-\t\t\t\ts0_s = REG_READ(ah, AR_ISR_S0_S);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-139-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:140:\t\tif (pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-141-\t\t\ts5_s = REG_READ(ah, AR_ISR_S5_S(ah));\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-152-\t\tif (ah-\u003eintr_gen_timer_trigger)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:153:\t\t\t*masked |= ATH9K_INT_GENTIMER;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-154-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-155-\t\tif ((s5_s \u0026 AR_ISR_S5_TIM_TIMER) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:156:\t\t    !(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_AUTOSLEEP))\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:157:\t\t\t*masked |= ATH9K_INT_TIM_TIMER;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-158-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:159:\t\tif (!(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-160-\t\t\tREG_WRITE(ah, AR_ISR_S5, s5_s);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-164-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:165:\tif (!(pCap-\u003ehw_caps \u0026 ATH9K_HW_CAP_RAC_SUPPORTED)) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-166-\t\tREG_WRITE(ah, AR_ISR, isr);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-189-\t\t\t}\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:190:\t\t\t*masked |= ATH9K_INT_FATAL;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-191-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-196-\t\t\tREG_WRITE(ah, AR_RC, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:197:\t\t\t*masked |= ATH9K_INT_FATAL;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-198-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c=212=ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-260-\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:261:\tctl1 |= (i-\u003ekeyix != ATH9K_TXKEYIX_INVALID ? SM(i-\u003ekeyix, AR_DestIdx) : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-262-\t\t| SM(i-\u003etype, AR_FrameType)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:263:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_NOACK ? AR_NoAck : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:264:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_EXT_ONLY ? AR_ExtOnly : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:265:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_EXT_AND_CTL ? AR_ExtAndCtl : 0);\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-266-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-282-\tWRITE_ONCE(ads-\u003eds_ctl0, (i-\u003epkt_len \u0026 AR_FrameLen)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:283:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_VMF ? AR_VirtMoreFrag : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-284-\t\t| SM(i-\u003etxpower[0], AR_XmitPower0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:285:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_VEOL ? AR_VEOL : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:286:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_INTREQ ? AR_TxIntrReq : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:287:\t\t| (i-\u003ekeyix != ATH9K_TXKEYIX_INVALID ? AR_DestIdxValid : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:288:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_CLRDMASK ? AR_ClrDestMask : 0)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:289:\t\t| (i-\u003eflags \u0026 ATH9K_TXDESC_RTSENA ? AR_RTSEnable :\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:290:\t\t   (i-\u003eflags \u0026 ATH9K_TXDESC_CTSENA ? AR_CTSEnable : 0)));\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-291-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c=316=static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-330-\tif (status \u0026 AR_TxOpExceeded)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:331:\t\tts-\u003ets_status |= ATH9K_TXERR_XTXOP;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-332-\tts-\u003etid = MS(status, AR_TxTid);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-340-\tif (status \u0026 AR_TxBaStatus) {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:341:\t\tts-\u003ets_flags |= ATH9K_TX_BA;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-342-\t\tts-\u003eba_low = ads-\u003eAR_BaBitmapLow;\n--\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-347-\tif (status \u0026 AR_FrmXmitOK)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:348:\t\tts-\u003ets_status |= ATH9K_TX_ACKED;\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-349-\telse {\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c-350-\t\tif (status \u0026 AR_ExcessiveRetries)\ndrivers/net/wireless/ath/ath9k/ar9002_mac.c:351:\t\t\tts-\u003ets_status |= ATH9K_TXERR_XRETRY;\n\n"
}

21/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 43874
							output: 24
							thoughts: 1051
						

Thoughts:
**Fuzzing Target Assessment: ath9k_hw for USB Wi-Fi (ath9k_htc)**

Okay, let's break this down. My initial thought is to assess the fuzzing potential of the `ath9k_hw` component, specifically focusing on the changes introduced by this patch within the `ath9k_htc` USB Wi-Fi driver.

First, I examined the makefile (`drivers/net/wireless/ath/ath9k/Makefile`) to understand the structure. I see that `ath9k_hw` is a critical component, built from several source files (`hw.o`, `ar9003_hw.o`, etc.). Both `CONFIG_ATH9K` and `CONFIG_ATH9K_HTC` select `CONFIG_ATH9K_HW` and `CONFIG_ATH9K_COMMON`. That gives me a good starting point. `ath9k_htc` is USB-based, which makes it particularly interesting because I can interact with it using virtual USB, like what's available in Syzkaller.

Next, I look at reachability. The patch touches key functions, and that's where things get interesting. The patch touches `ath9k_multi_regread` (in `htc_drv_init.c`), which is key as it adds error handling and a `WARN_ON_ONCE` assertion. This assertion, in conjunction with the changes to functions shared by `ath9k_hw` (such as `ath9k_hw_first_txpending`, `ath9k_hw_channel_change`, `ath9k_hw_reset`, `ath9k_hw_start_nfcal`, and `ar5008_hw_set_delta_slope`), means these routines will be hit frequently with our fuzzing methodology. The new `ath9k_hw_first_txpending` function that involves iterating and issuing `REG_READ_MULTI` calls, and the addition of the `WARN_ON_ONCE` in `ath9k_multi_regread` are particularly compelling targets. My instinct tells me that we'll be exercising these new paths and checks due to USB transactions, channel changes, scans, resets, and those multi-read queries.

Given this analysis, I'm confident that this is *worth fuzzing*.

Now, the important part: focus symbols. I have to be very precise here. The critical functions modified or introduced are:

*   `ath9k_hw_first_txpending` (mac.c)
*   `ath9k_multi_regread` (htc_drv_init.c)
*   `ath9k_hw_channel_change` (hw.c)
*   `ath9k_hw_reset` (hw.c)
*   `ath9k_hw_start_nfcal` (calib.c)
*   `ar5008_hw_set_delta_slope` (ar5008_phy.c)

Next, I need to check for static or inlined functions that may hamper my fuzzing efforts. After analysis:

*   `ath9k_hw_first_txpending`: Not static, good.
*   `ath9k_multi_regread`: Static, but it's assigned to a function pointer `ah->reg_ops.multi_read`. That's important! Because it's called through a function pointer, the compiler *cannot* inline it. It's a key target.
*   `ath9k_hw_channel_change`: static and called from `ath9k_hw_do_fastcc`. It's a candidate.
*   `ath9k_hw_reset`: Not static, also good.
*   `ath9k_hw_start_nfcal`: Not static, also good.
*   `ar5008_hw_set_delta_slope`: Static, so a question mark.

With that information, I'm ready to proceed with symbol selection, and a strong awareness of how the new code will interact during fuzzing.



22/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "ath9k_hw_start_nfcal"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/ar9002_calib.c=668=static int ar9002_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-735-\t\t\t\t\t  \u0026ah-\u003ecaldata-\u003ecal_flags);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:736:\t\t\tath9k_hw_start_nfcal(ah, false);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-737-\t\t\t/* Do periodic PAOffset Cal */\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=845=static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-890-\tath9k_hw_loadnf(ah, chan);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:891:\tath9k_hw_start_nfcal(ah, true);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-892-\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=123=static int ar9003_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-168-\t\t/* start NF calibration, without updating BB NF register */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:169:\t\tath9k_hw_start_nfcal(ah, false);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-170-\t}\n--\ndrivers/net/wireless/ath/ath9k/calib.c=220=EXPORT_SYMBOL(ath9k_hw_reset_calvalid);\ndrivers/net/wireless/ath/ath9k/calib.c-221-\ndrivers/net/wireless/ath/ath9k/calib.c:222:void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)\ndrivers/net/wireless/ath/ath9k/calib.c-223-{\n--\ndrivers/net/wireless/ath/ath9k/calib.c=459=void ath9k_hw_bstuck_nfcal(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/calib.c-474-\tif (!test_bit(NFCAL_PENDING, \u0026caldata-\u003ecal_flags))\ndrivers/net/wireless/ath/ath9k/calib.c:475:\t\tath9k_hw_start_nfcal(ah, true);\ndrivers/net/wireless/ath/ath9k/calib.c-476-\telse if (!(REG_READ(ah, AR_PHY_AGC_CONTROL(ah)) \u0026 AR_PHY_AGC_CONTROL_NF))\n--\ndrivers/net/wireless/ath/ath9k/calib.h=110=bool ath9k_hw_reset_calvalid(struct ath_hw *ah);\ndrivers/net/wireless/ath/ath9k/calib.h:111:void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update);\ndrivers/net/wireless/ath/ath9k/calib.h-112-int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan);\n--\ndrivers/net/wireless/ath/ath9k/hw.c=1787=static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/hw.c-1839-\tath9k_hw_loadnf(ah, ah-\u003ecurchan);\ndrivers/net/wireless/ath/ath9k/hw.c:1840:\tath9k_hw_start_nfcal(ah, true);\ndrivers/net/wireless/ath/ath9k/hw.c-1841-\n--\ndrivers/net/wireless/ath/ath9k/hw.c=1858=int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,\n--\ndrivers/net/wireless/ath/ath9k/hw.c-2061-\t\tath9k_hw_loadnf(ah, chan);\ndrivers/net/wireless/ath/ath9k/hw.c:2062:\t\tath9k_hw_start_nfcal(ah, true);\ndrivers/net/wireless/ath/ath9k/hw.c-2063-\t}\n"
}

23/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 47134
							output: 27
							thoughts: 21
						

Thoughts:
Here's my take on those thoughts:

**Analyzing `ar5008_hw_set_delta_slope` Callers**

Okay, time to dig in. I need to get a handle on how this `ar5008_hw_set_delta_slope` function is being used. Specifically, I need to identify all the points in the code where it's called. Knowing the call graph will give me a better understanding of its overall purpose, dependencies, and potential impact if I were to modify it. This is a standard first step in my workflow when dealing with unfamiliar or potentially critical functions – understanding the context of its use is paramount before doing anything else. Let's see what we can find.



24/2 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "ar5008_hw_set_delta_slope"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/ar5008_phy.c=848=static void ar5008_hw_mark_phy_inactive(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-852-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:853:static void ar5008_hw_set_delta_slope(struct ath_hw *ah,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-854-\t\t\t\t      struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=1345=int ar5008_hw_attach_phy_ops(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1370-\tpriv_ops-\u003emark_phy_inactive = ar5008_hw_mark_phy_inactive;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1371:\tpriv_ops-\u003eset_delta_slope = ar5008_hw_set_delta_slope;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1372-\tpriv_ops-\u003erfbus_req = ar5008_hw_rfbus_req;\n"
}

25/2 2026/09/06 06:30 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 47725
							output: 225
							thoughts: 507
						

Thoughts:
**My Analysis of This Patch**

Okay, so I'm looking at this patch and immediately, I see that `ar5008_hw_set_delta_slope` is being assigned to `priv_ops->set_delta_slope`. This is interesting, and it means I should zero in on a few key symbols here: `ath9k_hw_first_txpending`, `ath9k_multi_regread`, `ath9k_hw_channel_change`, `ath9k_hw_reset`, `ath9k_hw_start_nfcal`, and, of course, `ar5008_hw_set_delta_slope` itself. Those are the functions that have likely changed and are now important to examine.

Now, let's make sure the configuration is appropriate for all this. I see that `ATH9K_HTC` relies on both `USB` and `MAC80211`, while `ATH9K` needs `MAC80211` and `HAS_DMA`.  `ATH9K_HW` and `ATH9K_COMMON` are selected by `ATH9K` and `ATH9K_HTC`. Makes sense, and also `ATH_COMMON`, `CFG80211`, `MAC80211`. So to enable everything relevant, I need to enable `ATH9K`, `ATH9K_HTC`, `MAC80211`, and `USB` in my configuration.

Alright, before I finalize this, let me just double-check everything. It's marked as WorthFuzzing, which is correct because this patch does touch hardware abstraction, specifically the USB-based driver (`ath9k_htc`). It adds `ath9k_hw_first_txpending`, handles multi-register reads in chunks defined by `ATH9K_MULTI_READ_MAX`, implements RMW buffering, and includes a `WARN_ON_ONCE` assertion. These are all things that are reachable with emulation and wireless traffic. That means I’m good to go on the reasoning. So, my enable configs are ["ATH9K", "ATH9K_HTC", "MAC80211", "USB"], and my `FocusSymbols` are confirmed:  ["ath9k_hw_first_txpending", "ath9k_multi_regread", "ath9k_hw_channel_change", "ath9k_hw_reset", "ath9k_hw_start_nfcal", "ar5008_hw_set_delta_slope"].

Yep, everything checks out. Let's call `set-results`.



26/2 2026/09/06 06:30 tool set-results
0m Args:
{
  "EnableConfigs": [
    "ATH9K",
    "ATH9K_HTC",
    "MAC80211",
    "USB"
  ],
  "FocusSymbols": [
    "ath9k_hw_first_txpending",
    "ath9k_multi_regread",
    "ath9k_hw_channel_change",
    "ath9k_hw_reset",
    "ath9k_hw_start_nfcal",
    "ar5008_hw_set_delta_slope"
  ],
  "Reasoning": "The patch introduces a new multi-register read helper (ath9k_hw_first_txpending), adds RMW buffering across PHY/calibration routines, modifies fast channel change and reset logic, and introduces a WARN_ON_ONCE assertion with error handling in ath9k_multi_regread. These changes are in reachable code paths for USB-attached Atheros wireless devices (ath9k_htc) and standard ath9k devices.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "ATH9K",
    "ATH9K_HTC",
    "MAC80211",
    "USB"
  ],
  "FocusSymbols": [
    "ath9k_hw_first_txpending",
    "ath9k_multi_regread",
    "ath9k_hw_channel_change",
    "ath9k_hw_reset",
    "ath9k_hw_start_nfcal",
    "ar5008_hw_set_delta_slope"
  ],
  "Reasoning": "The patch introduces a new multi-register read helper (ath9k_hw_first_txpending), adds RMW buffering across PHY/calibration routines, modifies fast channel change and reset logic, and introduces a WARN_ON_ONCE assertion with error handling in ath9k_multi_regread. These changes are in reachable code paths for USB-attached Atheros wireless devices (ath9k_htc) and standard ath9k devices.",
  "WorthFuzzing": true
}

27/1 2026/09/06 06:30 action If
0m Args:
{
  "WorthFuzzing": true
}

Results:
null

28/2 2026/09/06 06:30 agent kmsan-evaluator
0m Model:
core

Args:
null

Results:
{
  "KMSANReasoning": "The patch optimizes register access routines and fast-channel-change handling in the ath9k wireless driver. Specifically, it batches register reads/writes using buffer flushing macros, introduces ath9k_hw_first_txpending() to query queue status registers using batched multi-reads (REG_READ_MULTI), and adds bounds/error checking in ath9k_multi_regread() to fill the target buffer with 0xff if an error occurs.\n\n1. Uninitialized Memory Analysis:\n   - In ath9k_hw_first_txpending(), the local arrays 'addr' and 'val' are populated across the loop chunks by REG_READ_MULTI. Both implementations (ath9k_multi_ioread32 and ath9k_multi_regread) write to every element in the requested range [val, val + count), and ath9k_multi_regread explicitly memsets 'val' with 0xff on error or out-of-bounds count. Therefore, no uninitialized stack memory is read or branched upon.\n   - None of the modified data or structures are exported or copied to user space (no copy_to_user, netlink, ioctl output, etc.).\n\n2. Detector Applicability (KASAN vs KMSAN):\n   - Any buffer-bound or array indexing issues (e.g. queue indexing or buffer overflow) would be detected by KASAN / standard runtime checks.\n   - There are no uninitialized memory reads or information leak risks that would uniquely require KMSAN.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted (NeedsKMSAN=false).",
  "NeedsKMSAN": false
}

Instruction:
You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.

CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
  a comprehensive suite of debugging tools and sanitizers, including KASAN
  (out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
  (locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
  or page allocations) and kernel-to-user memory info-leaks.

Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.

Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.

Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
   attributes, ioctl output arguments, socket options, or BPF buffers) where fields
   or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
   or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
   could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
   uninitialized bytes of existing buffers.

Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
  dereferences, locking deadlocks, or use-after-free bugs (these are already caught
  by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
  or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.

Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
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 186363995630a73482758661ef06f9e9508e1e28
Author: syz-cluster <triage@syzkaller.com>
Date:   Sun Sep 6 06:29:42 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index 7a45f5f628269..af05dcf95a614 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -868,6 +868,7 @@ static void ar5008_hw_set_delta_slope(struct ath_hw *ah,
 	ath9k_hw_get_delta_slope_vals(ah, coef_scaled, &ds_coef_man,
 				      &ds_coef_exp);
 
+	ENABLE_REG_RMW_BUFFER(ah);
 	REG_RMW_FIELD(ah, AR_PHY_TIMING3,
 		      AR_PHY_TIMING3_DSC_MAN, ds_coef_man);
 	REG_RMW_FIELD(ah, AR_PHY_TIMING3,
@@ -882,6 +883,7 @@ static void ar5008_hw_set_delta_slope(struct ath_hw *ah,
 		      AR_PHY_HALFGI_DSC_MAN, ds_coef_man);
 	REG_RMW_FIELD(ah, AR_PHY_HALFGI,
 		      AR_PHY_HALFGI_DSC_EXP, ds_coef_exp);
+	REG_RMW_BUFFER_FLUSH(ah);
 }
 
 static bool ar5008_hw_rfbus_req(struct ath_hw *ah)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index b4ab85bd7895a..73c63ab32d53f 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -224,6 +224,7 @@ void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
 	if (ah->caldata)
 		set_bit(NFCAL_PENDING, &ah->caldata->cal_flags);
 
+	ENABLE_REG_RMW_BUFFER(ah);
 	REG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah),
 		    AR_PHY_AGC_CONTROL_ENABLE_NF);
 
@@ -235,6 +236,7 @@ void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
 		    AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
 
 	REG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah), AR_PHY_AGC_CONTROL_NF);
+	REG_RMW_BUFFER_FLUSH(ah);
 }
 
 int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 6de78ae857268..3d4c6f9f6e951 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -258,10 +258,15 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
 	struct ath_hw *ah = hw_priv;
 	struct ath_common *common = ath9k_hw_common(ah);
 	struct ath9k_htc_priv *priv = common->priv;
-	__be32 tmpaddr[8];
-	__be32 tmpval[8];
+	__be32 tmpaddr[ATH9K_MULTI_READ_MAX];
+	__be32 tmpval[ATH9K_MULTI_READ_MAX];
 	int i, ret;
 
+	if (WARN_ON_ONCE(count > ATH9K_MULTI_READ_MAX)) {
+		memset(val, 0xff, sizeof(*val) * count);
+		return;
+	}
+
 	for (i = 0; i < count; i++) {
 		tmpaddr[i] = cpu_to_be32(addr[i]);
 	}
@@ -273,6 +278,9 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
 	if (unlikely(ret)) {
 		ath_dbg(common, WMI,
 			"Multiple REGISTER READ FAILED (count: %d)\n", count);
+		/* Callers expect what a failed single read returns. */
+		memset(val, 0xff, sizeof(*val) * count);
+		return;
 	}
 
 	for (i = 0; i < count; i++) {
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e08ab73fcacb3..64fefbec46d58 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1547,7 +1547,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	bool band_switch = false, mode_diff = false;
 	u8 ini_reloaded = 0;
-	u32 qnum;
+	int qnum;
 	int r;
 
 	if (pCap->hw_caps & ATH9K_HW_CAP_FCC_BAND_SWITCH) {
@@ -1556,12 +1556,11 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
 		mode_diff = !!(flags_diff & ~CHANNEL_HT);
 	}
 
-	for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
-		if (ath9k_hw_numtxpending(ah, qnum)) {
-			ath_dbg(common, QUEUE,
-				"Transmit frames pending on queue %d\n", qnum);
-			return false;
-		}
+	qnum = ath9k_hw_first_txpending(ah);
+	if (qnum >= 0) {
+		ath_dbg(common, QUEUE,
+			"Transmit frames pending on queue %d\n", qnum);
+		return false;
 	}
 
 	if (!ath9k_hw_rfbus_req(ah)) {
@@ -1879,7 +1878,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
 	if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
 		return -EIO;
 
-	if (ah->curchan && !ah->chip_fullsleep)
+	/*
+	 * Over USB the departing channel's noise-floor readout costs several
+	 * round trips and only feeds its history; the fast path reloads the
+	 * arriving channel's noise floor regardless.
+	 */
+	if (ah->curchan && !ah->chip_fullsleep &&
+	    !(fastcc && common->bus_ops->ath_bus_type == ATH_USB))
 		ath9k_hw_getnf(ah, ah->curchan);
 
 	ah->caldata = caldata;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index b942b8303d8f8..211d42c927963 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -83,6 +83,13 @@
 #define REG_READ(_ah, _reg) \
 	(_ah)->reg_ops.read((_ah), (_reg))
 
+/*
+ * Maximum number of registers one REG_READ_MULTI() may ask for. The ath9k_htc
+ * implementation converts the addresses and the results through fixed arrays
+ * of this size; callers must split larger reads themselves.
+ */
+#define ATH9K_MULTI_READ_MAX	8
+
 #define REG_READ_MULTI(_ah, _addr, _val, _cnt)		\
 	(_ah)->reg_ops.multi_read((_ah), (_addr), (_val), (_cnt))
 
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index b070403e083ff..27926b67d628a 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -77,6 +77,46 @@ u32 ath9k_hw_numtxpending(struct ath_hw *ah, u32 q)
 }
 EXPORT_SYMBOL(ath9k_hw_numtxpending);
 
+/**
+ * ath9k_hw_first_txpending - find a tx queue that still has frames pending
+ * @ah: hardware
+ *
+ * Asking ath9k_hw_numtxpending() about each queue in turn costs up to two
+ * register reads per queue, and on the USB devices every one of those is a
+ * synchronous WMI round trip. Collect the queue status registers and AR_Q_TXE
+ * with the multi-read op instead, in chunks of ATH9K_MULTI_READ_MAX. A
+ * multi-read that fails over USB reads as all ones, which counts as pending,
+ * so a WMI timeout still refuses the fast channel change.
+ *
+ * Return: the first queue with frames pending, or -1 if all are drained.
+ */
+int ath9k_hw_first_txpending(struct ath_hw *ah)
+{
+	u32 addr[AR_NUM_QCU + 1];
+	u32 val[AR_NUM_QCU + 1];
+	u32 q, txe, done = 0;
+
+	for (q = 0; q < AR_NUM_QCU; q++)
+		addr[q] = AR_QSTS(q);
+	addr[AR_NUM_QCU] = AR_Q_TXE;
+
+	while (done < ARRAY_SIZE(addr)) {
+		u32 count = min_t(u32, ARRAY_SIZE(addr) - done,
+				  ATH9K_MULTI_READ_MAX);
+
+		REG_READ_MULTI(ah, addr + done, val + done, count);
+		done += count;
+	}
+
+	txe = val[AR_NUM_QCU];
+	for (q = 0; q < AR_NUM_QCU; q++) {
+		if ((val[q] & AR_Q_STS_PEND_FR_CNT) || (txe & BIT(q)))
+			return q;
+	}
+
+	return -1;
+}
+
 /**
  * ath9k_hw_updatetxtriglevel - adjusts the frame trigger level
  *
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 16203e7ecf290..5b94ce087be2f 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -721,6 +721,7 @@ u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q);
 void ath9k_hw_puttxbuf(struct ath_hw *ah, u32 q, u32 txdp);
 void ath9k_hw_txstart(struct ath_hw *ah, u32 q);
 u32 ath9k_hw_numtxpending(struct ath_hw *ah, u32 q);
+int ath9k_hw_first_txpending(struct ath_hw *ah);
 bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel);
 bool ath9k_hw_stop_dma_queue(struct ath_hw *ah, u32 q);
 void ath9k_hw_abort_tx_dma(struct ath_hw *ah);

29/3 2026/09/06 06:30 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 5230
							output: 17
							thoughts: 890
						

Thoughts:
**KMSAN Fuzzing Evaluation for This Patch Series**

Okay, let's break this down. My goal is to determine if this patch series introduces changes that warrant a KMSAN fuzzing session. I need to be methodical.

First, let's dissect these patches one by one. I see changes across several files within the `ath9k` wireless driver. It looks like they are touching register access and handling.

*   `ar5008_phy.c` and `calib.c` in `ath9k` are adding `ENABLE_REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH`. This is interesting; register read-modify-write operations are a classic KMSAN target. Any new usage of those could introduce potential issues with concurrent access or stale data. Let's make a mental note to keep an eye on how these buffers are managed and used in conjunction with the existing codebase.
*   `htc_drv_init.c` contains a change to `ath9k_multi_regread`. The fixed array size is changed, but more importantly, there's a added check on count, and explicit `memset` calls on failure. It seems a bit more robust now. KMSAN might be useful here, but it looks like a precaution against a potential buffer overflow condition which, if it existed, could already be exploited via a fuzz.
*   `hw.c` has `ath9k_hw_channel_change` change, which seems like a functional change. Replacing a loop with a function to find the first TX pending, it also skips `ath9k_hw_getnf` under USB.
*   `hw.h` defines `ATH9K_MULTI_READ_MAX`. That's a key constant, especially when coupled with the change in `htc_drv_init.c` and `mac.c`.
*   `mac.c` implements `ath9k_hw_first_txpending`. This is a new function involving multi-register reads using `REG_READ_MULTI`. This is where my attention sharpens. A multiregister read is a big KMSAN red flag. I want to see if this implementation uses potentially problematic `REG_READ_MULTI` calls or similar multiread operations. I'll need to scrutinize how those are handled. The loop and potential for concurrent access to the same register addresses (especially since they are in an array), could be a fertile ground for KMSAN to expose data races or read-modify-write issues.

Now, my next step is to perform a cross-reference. I'll need to figure out how `REG_READ_MULTI` is defined and used. I'll `grep` for `multi_read` or related functions to understand how this multi-read operation is implemented and which bus operations are involved. I'll want to see where `multi_read` calls may exist or how this function is used elsewhere. This will give me the best picture if this warrants KMSAN. If those implementations themselves are complex and potentially racy, or are called in interrupt context, I am even more inclined.



30/3 2026/09/06 06:30 tool grepper
0m Args:
{
  "Expression": "multi_read"
}

Results:
{
  "Output": "drivers/base/regmap/regmap-kunit.c=379=static void multi_write(struct kunit *test)\n--\ndrivers/base/regmap/regmap-kunit.c-417-\ndrivers/base/regmap/regmap-kunit.c:418:static void multi_read(struct kunit *test)\ndrivers/base/regmap/regmap-kunit.c-419-{\n--\ndrivers/base/regmap/regmap-kunit.c=2139=static struct kunit_case regmap_test_cases[] = {\n--\ndrivers/base/regmap/regmap-kunit.c-2145-\tKUNIT_CASE_PARAM(multi_write, regcache_types_gen_params),\ndrivers/base/regmap/regmap-kunit.c:2146:\tKUNIT_CASE_PARAM(multi_read, regcache_types_gen_params),\ndrivers/base/regmap/regmap-kunit.c-2147-\tKUNIT_CASE_PARAM(write_readonly, regcache_types_gen_params),\n--\ndrivers/iio/accel/st_accel_core.c=111=static const struct st_sensor_settings st_accel_sensors_settings[] = {\n--\ndrivers/iio/accel/st_accel_core.c-194-\t\t},\ndrivers/iio/accel/st_accel_core.c:195:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-196-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-276-\t\t},\ndrivers/iio/accel/st_accel_core.c:277:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-278-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-366-\t\t},\ndrivers/iio/accel/st_accel_core.c:367:\t\t.multi_read_bit = false,\ndrivers/iio/accel/st_accel_core.c-368-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-438-\t\t},\ndrivers/iio/accel/st_accel_core.c:439:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-440-\t\t.bootime = 2, /* guess */\n--\ndrivers/iio/accel/st_accel_core.c-511-\t\t},\ndrivers/iio/accel/st_accel_core.c:512:\t\t.multi_read_bit = false,\ndrivers/iio/accel/st_accel_core.c-513-\t\t.bootime = 2, /* guess */\n--\ndrivers/iio/accel/st_accel_core.c-582-\t\t},\ndrivers/iio/accel/st_accel_core.c:583:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-584-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-653-\t\t},\ndrivers/iio/accel/st_accel_core.c:654:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-655-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-710-\t\t},\ndrivers/iio/accel/st_accel_core.c:711:\t\t.multi_read_bit = false,\ndrivers/iio/accel/st_accel_core.c-712-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-785-\t\t},\ndrivers/iio/accel/st_accel_core.c:786:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-787-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-866-\t\t},\ndrivers/iio/accel/st_accel_core.c:867:\t\t.multi_read_bit = false,\ndrivers/iio/accel/st_accel_core.c-868-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-918-\t\t},\ndrivers/iio/accel/st_accel_core.c:919:\t\t.multi_read_bit = false,\ndrivers/iio/accel/st_accel_core.c-920-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-994-\t\t},\ndrivers/iio/accel/st_accel_core.c:995:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-996-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-1075-\t\t},\ndrivers/iio/accel/st_accel_core.c:1076:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-1077-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-1152-\t\t},\ndrivers/iio/accel/st_accel_core.c:1153:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-1154-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-1241-\t\t},\ndrivers/iio/accel/st_accel_core.c:1242:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-1243-\t\t.bootime = 2,\n--\ndrivers/iio/accel/st_accel_core.c-1324-\t\t},\ndrivers/iio/accel/st_accel_core.c:1325:\t\t.multi_read_bit = true,\ndrivers/iio/accel/st_accel_core.c-1326-\t\t.bootime = 2,\n--\ndrivers/iio/common/st_sensors/st_sensors_i2c.c=38=int st_sensors_i2c_configure(struct iio_dev *indio_dev,\n--\ndrivers/iio/common/st_sensors/st_sensors_i2c.c-43-\ndrivers/iio/common/st_sensors/st_sensors_i2c.c:44:\tif (sdata-\u003esensor_settings-\u003emulti_read_bit)\ndrivers/iio/common/st_sensors/st_sensors_i2c.c-45-\t\tconfig = \u0026st_sensors_i2c_regmap_multiread_bit_config;\n--\ndrivers/iio/common/st_sensors/st_sensors_spi.c=82=int st_sensors_spi_configure(struct iio_dev *indio_dev,\n--\ndrivers/iio/common/st_sensors/st_sensors_spi.c-95-\ndrivers/iio/common/st_sensors/st_sensors_spi.c:96:\tif (sdata-\u003esensor_settings-\u003emulti_read_bit)\ndrivers/iio/common/st_sensors/st_sensors_spi.c-97-\t\tconfig = \u0026st_sensors_spi_regmap_multiread_bit_config;\n--\ndrivers/iio/gyro/st_gyro_core.c=68=static const struct st_sensor_settings st_gyro_sensors_settings[] = {\n--\ndrivers/iio/gyro/st_gyro_core.c-140-\t\t},\ndrivers/iio/gyro/st_gyro_core.c:141:\t\t.multi_read_bit = true,\ndrivers/iio/gyro/st_gyro_core.c-142-\t\t.bootime = 2,\n--\ndrivers/iio/gyro/st_gyro_core.c-218-\t\t},\ndrivers/iio/gyro/st_gyro_core.c:219:\t\t.multi_read_bit = true,\ndrivers/iio/gyro/st_gyro_core.c-220-\t\t.bootime = 2,\n--\ndrivers/iio/gyro/st_gyro_core.c-292-\t\t},\ndrivers/iio/gyro/st_gyro_core.c:293:\t\t.multi_read_bit = true,\ndrivers/iio/gyro/st_gyro_core.c-294-\t\t.bootime = 2,\n--\ndrivers/iio/gyro/st_gyro_core.c-366-\t\t},\ndrivers/iio/gyro/st_gyro_core.c:367:\t\t.multi_read_bit = true,\ndrivers/iio/gyro/st_gyro_core.c-368-\t\t.bootime = 2,\n--\ndrivers/iio/magnetometer/st_magn_core.c=144=static const struct st_sensor_settings st_magn_sensors_settings[] = {\n--\ndrivers/iio/magnetometer/st_magn_core.c-219-\t\t},\ndrivers/iio/magnetometer/st_magn_core.c:220:\t\t.multi_read_bit = false,\ndrivers/iio/magnetometer/st_magn_core.c-221-\t\t.bootime = 2,\n--\ndrivers/iio/magnetometer/st_magn_core.c-298-\t\t},\ndrivers/iio/magnetometer/st_magn_core.c:299:\t\t.multi_read_bit = false,\ndrivers/iio/magnetometer/st_magn_core.c-300-\t\t.bootime = 2,\n--\ndrivers/iio/magnetometer/st_magn_core.c-371-\t\t},\ndrivers/iio/magnetometer/st_magn_core.c:372:\t\t.multi_read_bit = true,\ndrivers/iio/magnetometer/st_magn_core.c-373-\t\t.bootime = 2,\n--\ndrivers/iio/magnetometer/st_magn_core.c-421-\t\t},\ndrivers/iio/magnetometer/st_magn_core.c:422:\t\t.multi_read_bit = false,\ndrivers/iio/magnetometer/st_magn_core.c-423-\t\t.bootime = 2,\n--\ndrivers/iio/magnetometer/st_magn_core.c-498-\t\t},\ndrivers/iio/magnetometer/st_magn_core.c:499:\t\t.multi_read_bit = true,\ndrivers/iio/magnetometer/st_magn_core.c-500-\t\t.bootime = 2,\n--\ndrivers/iio/pressure/st_pressure_core.c=224=static const struct st_sensor_settings st_press_sensors_settings[] = {\n--\ndrivers/iio/pressure/st_pressure_core.c-296-\t\t},\ndrivers/iio/pressure/st_pressure_core.c:297:\t\t.multi_read_bit = true,\ndrivers/iio/pressure/st_pressure_core.c-298-\t\t.bootime = 2,\n--\ndrivers/iio/pressure/st_pressure_core.c-346-\t\t},\ndrivers/iio/pressure/st_pressure_core.c:347:\t\t.multi_read_bit = true,\ndrivers/iio/pressure/st_pressure_core.c-348-\t\t.bootime = 2,\n--\ndrivers/iio/pressure/st_pressure_core.c-413-\t\t},\ndrivers/iio/pressure/st_pressure_core.c:414:\t\t.multi_read_bit = true,\ndrivers/iio/pressure/st_pressure_core.c-415-\t\t.bootime = 2,\n--\ndrivers/iio/pressure/st_pressure_core.c-482-\t\t},\ndrivers/iio/pressure/st_pressure_core.c:483:\t\t.multi_read_bit = false,\ndrivers/iio/pressure/st_pressure_core.c-484-\t\t.bootime = 2,\n--\ndrivers/iio/pressure/st_pressure_core.c-551-\t\t},\ndrivers/iio/pressure/st_pressure_core.c:552:\t\t.multi_read_bit = false,\ndrivers/iio/pressure/st_pressure_core.c-553-\t\t.bootime = 2,\n--\ndrivers/iio/pressure/st_pressure_core.c-621-\t\t},\ndrivers/iio/pressure/st_pressure_core.c:622:\t\t.multi_read_bit = false,\ndrivers/iio/pressure/st_pressure_core.c-623-\t\t.bootime = 2,\n--\ndrivers/input/joystick/gamecon.c=355=static void gc_nes_process_packet(struct gc *gc)\n--\ndrivers/input/joystick/gamecon.c-453-/*\ndrivers/input/joystick/gamecon.c:454: * gc_multi_read_packet() reads a Multisystem joystick packet.\ndrivers/input/joystick/gamecon.c-455- */\ndrivers/input/joystick/gamecon.c-456-\ndrivers/input/joystick/gamecon.c:457:static void gc_multi_read_packet(struct gc *gc, int length, unsigned char *data)\ndrivers/input/joystick/gamecon.c-458-{\n--\ndrivers/input/joystick/gamecon.c=467=static void gc_multi_process_packet(struct gc *gc)\n--\ndrivers/input/joystick/gamecon.c-474-\ndrivers/input/joystick/gamecon.c:475:\tgc_multi_read_packet(gc, data_len, data);\ndrivers/input/joystick/gamecon.c-476-\n--\ndrivers/media/tuners/r820t.c=1461=static int r820t_imr_prepare(struct r820t_priv *priv)\n--\ndrivers/media/tuners/r820t.c-1518-\ndrivers/media/tuners/r820t.c:1519:static int r820t_multi_read(struct r820t_priv *priv)\ndrivers/media/tuners/r820t.c-1520-{\n--\ndrivers/media/tuners/r820t.c=1545=static int r820t_imr_cross(struct r820t_priv *priv,\n--\ndrivers/media/tuners/r820t.c-1591-\ndrivers/media/tuners/r820t.c:1592:\t\trc = r820t_multi_read(priv);\ndrivers/media/tuners/r820t.c-1593-\t\tif (rc \u003c 0)\n--\ndrivers/media/tuners/r820t.c=1628=static int r820t_compre_step(struct r820t_priv *priv,\n--\ndrivers/media/tuners/r820t.c-1659-\ndrivers/media/tuners/r820t.c:1660:\t\trc = r820t_multi_read(priv);\ndrivers/media/tuners/r820t.c-1661-\t\tif (rc \u003c 0)\n--\ndrivers/media/tuners/r820t.c=1678=static int r820t_iq_tree(struct r820t_priv *priv,\n--\ndrivers/media/tuners/r820t.c-1704-\ndrivers/media/tuners/r820t.c:1705:\t\trc = r820t_multi_read(priv);\ndrivers/media/tuners/r820t.c-1706-\t\tif (rc \u003c 0)\n--\ndrivers/media/tuners/r820t.c=1800=static int r820t_vga_adjust(struct r820t_priv *priv)\n--\ndrivers/media/tuners/r820t.c-1812-\ndrivers/media/tuners/r820t.c:1813:\t\trc = r820t_multi_read(priv);\ndrivers/media/tuners/r820t.c-1814-\t\tif (rc \u003c 0)\n--\ndrivers/mmc/core/mmc_test.c=1051=static int mmc_test_multi_write(struct mmc_test_card *test)\n--\ndrivers/mmc/core/mmc_test.c-1071-\ndrivers/mmc/core/mmc_test.c:1072:static int mmc_test_multi_read(struct mmc_test_card *test)\ndrivers/mmc/core/mmc_test.c-1073-{\n--\ndrivers/mmc/core/mmc_test.c=1195=static int mmc_test_align_multi_write(struct mmc_test_card *test)\n--\ndrivers/mmc/core/mmc_test.c-1221-\ndrivers/mmc/core/mmc_test.c:1222:static int mmc_test_align_multi_read(struct mmc_test_card *test)\ndrivers/mmc/core/mmc_test.c-1223-{\n--\ndrivers/mmc/core/mmc_test.c=1321=static int mmc_test_multi_write_high(struct mmc_test_card *test)\n--\ndrivers/mmc/core/mmc_test.c-1342-\ndrivers/mmc/core/mmc_test.c:1343:static int mmc_test_multi_read_high(struct mmc_test_card *test)\ndrivers/mmc/core/mmc_test.c-1344-{\n--\ndrivers/mmc/core/mmc_test.c=2547=static const struct mmc_test_case mmc_test_cases[] = {\n--\ndrivers/mmc/core/mmc_test.c-2581-\t\t.prepare = mmc_test_prepare_read,\ndrivers/mmc/core/mmc_test.c:2582:\t\t.run = mmc_test_multi_read,\ndrivers/mmc/core/mmc_test.c-2583-\t\t.cleanup = mmc_test_cleanup,\n--\ndrivers/mmc/core/mmc_test.c-2637-\t\t.prepare = mmc_test_prepare_read,\ndrivers/mmc/core/mmc_test.c:2638:\t\t.run = mmc_test_align_multi_read,\ndrivers/mmc/core/mmc_test.c-2639-\t\t.cleanup = mmc_test_cleanup,\n--\ndrivers/mmc/core/mmc_test.c-2687-\t\t.prepare = mmc_test_prepare_read,\ndrivers/mmc/core/mmc_test.c:2688:\t\t.run = mmc_test_multi_read_high,\ndrivers/mmc/core/mmc_test.c-2689-\t\t.cleanup = mmc_test_cleanup,\n--\ndrivers/mmc/host/sh_mmcif.c=618=static bool sh_mmcif_read_block(struct sh_mmcif_host *host)\n--\ndrivers/mmc/host/sh_mmcif.c-652-\ndrivers/mmc/host/sh_mmcif.c:653:static void sh_mmcif_multi_read(struct sh_mmcif_host *host,\ndrivers/mmc/host/sh_mmcif.c-654-\t\t\t\tstruct mmc_request *mrq)\n--\ndrivers/mmc/host/sh_mmcif.c=922=static int sh_mmcif_data_trans(struct sh_mmcif_host *host,\n--\ndrivers/mmc/host/sh_mmcif.c-928-\tcase MMC_READ_MULTIPLE_BLOCK:\ndrivers/mmc/host/sh_mmcif.c:929:\t\tsh_mmcif_multi_read(host, mrq);\ndrivers/mmc/host/sh_mmcif.c-930-\t\treturn 0;\n--\ndrivers/net/wireless/ath/ath.h=108=enum ath_cipher {\n--\ndrivers/net/wireless/ath/ath.h-121- * @read: Register read\ndrivers/net/wireless/ath/ath.h:122: * @multi_read: Multiple register read\ndrivers/net/wireless/ath/ath.h-123- * @write: Register write\n--\ndrivers/net/wireless/ath/ath.h=127=struct ath_ops {\ndrivers/net/wireless/ath/ath.h-128-\tunsigned int (*read)(void *, u32 reg_offset);\ndrivers/net/wireless/ath/ath.h:129:\tvoid (*multi_read)(void *, u32 *addr, u32 *val, u16 count);\ndrivers/net/wireless/ath/ath.h-130-\tvoid (*write)(void *, u32 val, u32 reg_offset);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=614=static int ath9k_init_priv(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-631-\tah-\u003ereg_ops.read = ath9k_regread;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:632:\tah-\u003ereg_ops.multi_read = ath9k_multi_regread;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-633-\tah-\u003ereg_ops.write = ath9k_regwrite;\n--\ndrivers/net/wireless/ath/ath9k/hw.h-93-#define REG_READ_MULTI(_ah, _addr, _val, _cnt)\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h:94:\t(_ah)-\u003ereg_ops.multi_read((_ah), (_addr), (_val), (_cnt))\ndrivers/net/wireless/ath/ath9k/hw.h-95-\n--\ndrivers/net/wireless/ath/ath9k/init.c=656=static int ath9k_init_softc(u16 devid, struct ath_softc *sc,\n--\ndrivers/net/wireless/ath/ath9k/init.c-674-\tah-\u003ereg_ops.read = ath9k_ioread32;\ndrivers/net/wireless/ath/ath9k/init.c:675:\tah-\u003ereg_ops.multi_read = ath9k_multi_ioread32;\ndrivers/net/wireless/ath/ath9k/init.c-676-\tah-\u003ereg_ops.write = ath9k_iowrite32;\n--\ndrivers/platform/arm64/huawei-gaokun-ec.c=244=EXPORT_SYMBOL_GPL(gaokun_ec_unregister_notify);\n--\ndrivers/platform/arm64/huawei-gaokun-ec.c-249-/**\ndrivers/platform/arm64/huawei-gaokun-ec.c:250: * gaokun_ec_psy_multi_read - Read contiguous registers\ndrivers/platform/arm64/huawei-gaokun-ec.c-251- * @ec: The gaokun_ec structure\n--\ndrivers/platform/arm64/huawei-gaokun-ec.c-257- */\ndrivers/platform/arm64/huawei-gaokun-ec.c:258:int gaokun_ec_psy_multi_read(struct gaokun_ec *ec, u8 reg,\ndrivers/platform/arm64/huawei-gaokun-ec.c-259-\t\t\t     size_t resp_len, u8 *resp)\n--\ndrivers/platform/arm64/huawei-gaokun-ec.c-274-}\ndrivers/platform/arm64/huawei-gaokun-ec.c:275:EXPORT_SYMBOL_GPL(gaokun_ec_psy_multi_read);\ndrivers/platform/arm64/huawei-gaokun-ec.c-276-\n--\ndrivers/power/supply/huawei-gaokun-battery.c=201=static int gaokun_psy_get_bat_info(struct gaokun_psy *ecbat)\n--\ndrivers/power/supply/huawei-gaokun-battery.c-206-\ndrivers/power/supply/huawei-gaokun-battery.c:207:\treturn gaokun_ec_psy_multi_read(ecbat-\u003eec, EC_BAT_INFO_START,\ndrivers/power/supply/huawei-gaokun-battery.c-208-\t\t\t\t\tsizeof(ecbat-\u003einfo), (u8 *)\u0026ecbat-\u003einfo);\n--\ndrivers/power/supply/huawei-gaokun-battery.c=232=static int gaokun_psy_get_bat_status(struct gaokun_psy *ecbat)\n--\ndrivers/power/supply/huawei-gaokun-battery.c-241-\tgaokun_psy_update_bat_charge(ecbat);\ndrivers/power/supply/huawei-gaokun-battery.c:242:\tret = gaokun_ec_psy_multi_read(ecbat-\u003eec, EC_BAT_STATUS_START,\ndrivers/power/supply/huawei-gaokun-battery.c-243-\t\t\t\t       sizeof(ecbat-\u003estatus), (u8 *)\u0026ecbat-\u003estatus);\n--\ndrivers/power/supply/huawei-gaokun-battery.c=250=static void gaokun_psy_init(struct gaokun_psy *ecbat)\n--\ndrivers/power/supply/huawei-gaokun-battery.c-260-\ndrivers/power/supply/huawei-gaokun-battery.c:261:\tgaokun_ec_psy_multi_read(ecbat-\u003eec, EC_BAT_VENDOR,\ndrivers/power/supply/huawei-gaokun-battery.c-262-\t\t\t\t sizeof(ecbat-\u003ebattery_vendor) - 1,\n--\ndrivers/power/supply/huawei-gaokun-battery.c-264-\ndrivers/power/supply/huawei-gaokun-battery.c:265:\tgaokun_ec_psy_multi_read(ecbat-\u003eec, EC_BAT_MODEL,\ndrivers/power/supply/huawei-gaokun-battery.c-266-\t\t\t\t sizeof(ecbat-\u003ebattery_model) - 1,\n--\ndrivers/scsi/nsp32_io.h=213=static inline void nsp32_mmio_index_write2(unsigned long  base,\n--\ndrivers/scsi/nsp32_io.h-227-\ndrivers/scsi/nsp32_io.h:228:static inline void nsp32_multi_read4(unsigned int   base,\ndrivers/scsi/nsp32_io.h-229-\t\t\t\t     unsigned int   reg,\n--\ndrivers/scsi/nsp32_io.h=236=static inline void nsp32_fifo_read(unsigned int   base,\n--\ndrivers/scsi/nsp32_io.h-239-{\ndrivers/scsi/nsp32_io.h:240:\tnsp32_multi_read4(base, FIFO_DATA_LOW, buf, count);\ndrivers/scsi/nsp32_io.h-241-}\n--\ndrivers/scsi/pcmcia/nsp_io.h=54=static inline void nsp_index_write(unsigned int  BaseAddr,\n--\ndrivers/scsi/pcmcia/nsp_io.h-66-/* read 8 bit FIFO */\ndrivers/scsi/pcmcia/nsp_io.h:67:static inline void nsp_multi_read_1(unsigned int   BaseAddr,\ndrivers/scsi/pcmcia/nsp_io.h-68-\t\t\t\t    unsigned int   Register,\n--\ndrivers/scsi/pcmcia/nsp_io.h=75=static inline void nsp_fifo8_read(unsigned int   base,\n--\ndrivers/scsi/pcmcia/nsp_io.h-79-\t/*nsp_dbg(NSP_DEBUG_DATA_IO, \"buf=0x%p, count=0x%lx\", buf, count);*/\ndrivers/scsi/pcmcia/nsp_io.h:80:\tnsp_multi_read_1(base, FIFODATA, buf, count);\ndrivers/scsi/pcmcia/nsp_io.h-81-}\n--\ndrivers/scsi/pcmcia/nsp_io.h-85-/* read 16 bit FIFO */\ndrivers/scsi/pcmcia/nsp_io.h:86:static inline void nsp_multi_read_2(unsigned int   BaseAddr,\ndrivers/scsi/pcmcia/nsp_io.h-87-\t\t\t\t    unsigned int   Register,\n--\ndrivers/scsi/pcmcia/nsp_io.h=94=static inline void nsp_fifo16_read(unsigned int   base,\n--\ndrivers/scsi/pcmcia/nsp_io.h-98-\t//nsp_dbg(NSP_DEBUG_DATA_IO, \"buf=0x%p, count=0x%lx*2\", buf, count);\ndrivers/scsi/pcmcia/nsp_io.h:99:\tnsp_multi_read_2(base, FIFODATA, buf, count);\ndrivers/scsi/pcmcia/nsp_io.h-100-}\n--\ndrivers/scsi/pcmcia/nsp_io.h-104-/* read 32bit FIFO */\ndrivers/scsi/pcmcia/nsp_io.h:105:static inline void nsp_multi_read_4(unsigned int   BaseAddr,\ndrivers/scsi/pcmcia/nsp_io.h-106-\t\t\t\t    unsigned int   Register,\n--\ndrivers/scsi/pcmcia/nsp_io.h=113=static inline void nsp_fifo32_read(unsigned int   base,\n--\ndrivers/scsi/pcmcia/nsp_io.h-117-\t//nsp_dbg(NSP_DEBUG_DATA_IO, \"buf=0x%p, count=0x%lx*4\", buf, count);\ndrivers/scsi/pcmcia/nsp_io.h:118:\tnsp_multi_read_4(base, FIFODATA, buf, count);\ndrivers/scsi/pcmcia/nsp_io.h-119-}\n--\ndrivers/scsi/pcmcia/nsp_io.h=207=static inline void nsp_mmio_index_write(unsigned long base,\n--\ndrivers/scsi/pcmcia/nsp_io.h-218-/* read 32bit FIFO */\ndrivers/scsi/pcmcia/nsp_io.h:219:static inline void nsp_mmio_multi_read_4(unsigned long  base,\ndrivers/scsi/pcmcia/nsp_io.h-220-\t\t\t\t\t unsigned int   Register,\n--\ndrivers/scsi/pcmcia/nsp_io.h=237=static inline void nsp_mmio_fifo32_read(unsigned int   base,\n--\ndrivers/scsi/pcmcia/nsp_io.h-241-\t//nsp_dbg(NSP_DEBUG_DATA_IO, \"buf=0x%p, count=0x%lx*4\", buf, count);\ndrivers/scsi/pcmcia/nsp_io.h:242:\tnsp_mmio_multi_read_4(base, FIFODATA, buf, count);\ndrivers/scsi/pcmcia/nsp_io.h-243-}\n--\ndrivers/staging/iio/addac/adt7316-i2c.c=42=static int adt7316_i2c_write(void *client, u8 reg, u8 data)\n--\ndrivers/staging/iio/addac/adt7316-i2c.c-53-\ndrivers/staging/iio/addac/adt7316-i2c.c:54:static int adt7316_i2c_multi_read(void *client, u8 reg, u8 count, u8 *data)\ndrivers/staging/iio/addac/adt7316-i2c.c-55-{\n--\ndrivers/staging/iio/addac/adt7316-i2c.c=96=static int adt7316_i2c_probe(struct i2c_client *client)\n--\ndrivers/staging/iio/addac/adt7316-i2c.c-103-\t\t.write = adt7316_i2c_write,\ndrivers/staging/iio/addac/adt7316-i2c.c:104:\t\t.multi_read = adt7316_i2c_multi_read,\ndrivers/staging/iio/addac/adt7316-i2c.c-105-\t\t.multi_write = adt7316_i2c_multi_write,\n--\ndrivers/staging/iio/addac/adt7316-spi.c-24-\ndrivers/staging/iio/addac/adt7316-spi.c:25:static int adt7316_spi_multi_read(void *client, u8 reg, u8 count, u8 *data)\ndrivers/staging/iio/addac/adt7316-spi.c-26-{\n--\ndrivers/staging/iio/addac/adt7316-spi.c=77=static int adt7316_spi_read(void *client, u8 reg, u8 *data)\ndrivers/staging/iio/addac/adt7316-spi.c-78-{\ndrivers/staging/iio/addac/adt7316-spi.c:79:\treturn adt7316_spi_multi_read(client, reg, 1, data);\ndrivers/staging/iio/addac/adt7316-spi.c-80-}\n--\ndrivers/staging/iio/addac/adt7316-spi.c=91=static int adt7316_spi_probe(struct spi_device *spi_dev)\n--\ndrivers/staging/iio/addac/adt7316-spi.c-97-\t\t.write = adt7316_spi_write,\ndrivers/staging/iio/addac/adt7316-spi.c:98:\t\t.multi_read = adt7316_spi_multi_read,\ndrivers/staging/iio/addac/adt7316-spi.c-99-\t\t.multi_write = adt7316_spi_multi_write,\n--\ndrivers/staging/iio/addac/adt7316.h=16=struct adt7316_bus {\n--\ndrivers/staging/iio/addac/adt7316.h-20-\tint (*write)(void *client, u8 reg, u8 val);\ndrivers/staging/iio/addac/adt7316.h:21:\tint (*multi_read)(void *client, u8 first_reg, u8 count, u8 *data);\ndrivers/staging/iio/addac/adt7316.h-22-\tint (*multi_write)(void *client, u8 first_reg, u8 count, u8 *data);\n--\ninclude/linux/iio/common/st_sensors.h=172=struct st_sensor_data_ready_irq {\n--\ninclude/linux/iio/common/st_sensors.h-201- * @sim: SPI serial interface mode register of the sensor.\ninclude/linux/iio/common/st_sensors.h:202: * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read.\ninclude/linux/iio/common/st_sensors.h-203- * @bootime: samples to discard when sensor passing from power-down to power-up.\n--\ninclude/linux/iio/common/st_sensors.h=205=struct st_sensor_settings {\n--\ninclude/linux/iio/common/st_sensors.h-218-\tstruct st_sensor_sim sim;\ninclude/linux/iio/common/st_sensors.h:219:\tbool multi_read_bit;\ninclude/linux/iio/common/st_sensors.h-220-\tunsigned int bootime;\n--\ninclude/linux/platform_data/huawei-gaokun-ec.h=41=int gaokun_ec_read_byte(struct gaokun_ec *ec, const u8 *req, u8 *byte);\n--\ninclude/linux/platform_data/huawei-gaokun-ec.h-45-\ninclude/linux/platform_data/huawei-gaokun-ec.h:46:int gaokun_ec_psy_multi_read(struct gaokun_ec *ec, u8 reg,\ninclude/linux/platform_data/huawei-gaokun-ec.h-47-\t\t\t     size_t resp_len, u8 *resp);\n--\ninclude/linux/platform_data/huawei-gaokun-ec.h=49=static inline int gaokun_ec_psy_read_byte(struct gaokun_ec *ec,\n--\ninclude/linux/platform_data/huawei-gaokun-ec.h-51-{\ninclude/linux/platform_data/huawei-gaokun-ec.h:52:\treturn gaokun_ec_psy_multi_read(ec, reg, sizeof(*byte), byte);\ninclude/linux/platform_data/huawei-gaokun-ec.h-53-}\n--\ninclude/linux/platform_data/huawei-gaokun-ec.h=55=static inline int gaokun_ec_psy_read_word(struct gaokun_ec *ec,\n--\ninclude/linux/platform_data/huawei-gaokun-ec.h-57-{\ninclude/linux/platform_data/huawei-gaokun-ec.h:58:\treturn gaokun_ec_psy_multi_read(ec, reg, sizeof(*word), (u8 *)word);\ninclude/linux/platform_data/huawei-gaokun-ec.h-59-}\n"
}

31/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 16812
							output: 37
							thoughts: 45
						

Thoughts:
Okay, let's dive into the `ath9k` driver and see what's happening with these multi-read functions. My first thought is to meticulously examine `ath9k_multi_ioread32` and `ath9k_multi_regread`. I need to understand how the `multi_read` functionality is actually implemented in each of these specific scenarios. I'm looking for the nuances of their respective approaches, the core logic they employ, and any differences in their handling of the hardware. The goal here is to grasp the underlying mechanisms – the bit-level operations, potential optimizations, and any potential areas of concern regarding efficiency or correctness. I need a clear picture of how they're handling those multiple register reads, whether they're leveraging any specific hardware features, or if they're employing any particular tricks to streamline the process. The details matter, and I intend to understand them.



32/3 2026/09/06 06:31 tool grepper
0m Args:
{
  "Expression": "ath9k_multi_",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=234=static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-254-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:255:static void ath9k_multi_regread(void *hw_priv, u32 *addr,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-256-\t\t\t\tu32 *val, u16 count)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=614=static int ath9k_init_priv(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-631-\tah-\u003ereg_ops.read = ath9k_regread;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:632:\tah-\u003ereg_ops.multi_read = ath9k_multi_regread;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-633-\tah-\u003ereg_ops.write = ath9k_regwrite;\n--\ndrivers/net/wireless/ath/ath9k/init.c=187=static unsigned int ath9k_ioread32(void *hw_priv, u32 reg_offset)\n--\ndrivers/net/wireless/ath/ath9k/init.c-203-\ndrivers/net/wireless/ath/ath9k/init.c:204:static void ath9k_multi_ioread32(void *hw_priv, u32 *addr,\ndrivers/net/wireless/ath/ath9k/init.c-205-                                u32 *val, u16 count)\n--\ndrivers/net/wireless/ath/ath9k/init.c=656=static int ath9k_init_softc(u16 devid, struct ath_softc *sc,\n--\ndrivers/net/wireless/ath/ath9k/init.c-674-\tah-\u003ereg_ops.read = ath9k_ioread32;\ndrivers/net/wireless/ath/ath9k/init.c:675:\tah-\u003ereg_ops.multi_read = ath9k_multi_ioread32;\ndrivers/net/wireless/ath/ath9k/init.c-676-\tah-\u003ereg_ops.write = ath9k_iowrite32;\n"
}

33/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 17763
							output: 43
							thoughts: 41
						

Thoughts:
Here's my take on the thought process:

**Diving into the Atheros 9k Driver Initialization**

Okay, so I need to refresh my memory on how the Atheros 9k driver handles those multi-read operations. Specifically, I should check out the `ath9k_multi_ioread32` function. It's likely involved in initial register probing or perhaps some early hardware configuration during initialization. I'll head over to the `drivers/net/wireless/ath/ath9k/init.c` file, and I'll jump right around line 204. That should put me in the right ballpark to see how they're handling these 32-bit reads. I'm hoping to get a quick refresher on how this is structured and whether there's anything interesting I should note. Let's get to it.



34/3 2026/09/06 06:31 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/init.c",
  "FirstLine": 200,
  "LineCount": 25
}

Results:
{
  "Contents": " 200:\t\t\tval = ioread32(sc-\u003emem + reg_offset);\n 201:\t\treturn val;\n 202:\t}\n 203:\t\n 204:\tstatic void ath9k_multi_ioread32(void *hw_priv, u32 *addr,\n 205:\t                                u32 *val, u16 count)\n 206:\t{\n 207:\t\tint i;\n 208:\t\n 209:\t\tfor (i = 0; i \u003c count; i++)\n 210:\t\t\tval[i] = ath9k_ioread32(hw_priv, addr[i]);\n 211:\t}\n 212:\t\n 213:\t\n 214:\tstatic unsigned int __ath9k_reg_rmw(struct ath_softc *sc, u32 reg_offset,\n 215:\t\t\t\t\t    u32 set, u32 clr)\n 216:\t{\n 217:\t\tu32 val;\n 218:\t\n 219:\t\tval = ioread32(sc-\u003emem + reg_offset);\n 220:\t\tval \u0026= ~clr;\n 221:\t\tval |= set;\n 222:\t\tiowrite32(val, sc-\u003emem + reg_offset);\n 223:\t\n 224:\t\treturn val;\n"
}

35/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 18406
							output: 48
							thoughts: 38
						

Thoughts:
Here's my summary, as if I were the one thinking these thoughts:

**Analyzing ath9k_multi_regread in ath9k's HTC driver initialization**

Okay, so I need to dig into the `ath9k` driver, specifically focusing on its HTC (Host-Target Communication) aspects. The code mentions `ath9k_multi_regread`, which I'm assuming is a function related to reading multiple registers. This is key, especially during driver initialization, as getting the right register values at the start is fundamental for everything that follows. I should find where it's defined and how it's used within `htc_drv_init.c`. Understanding how the firmware communicates with the hardware is critical. I'm keen to see if this function handles some kind of synchronization or error handling when reading multiple registers at once. Often, register reads are the first things I need to look at when chasing down initial hardware issues. The HTC part implies this driver relies heavily on shared memory or a control channel, which gives me more information that the firmware is probably involved, so I'm interested in the overall flow. I need to get an idea of the read procedure used, what registers are read in sequence, and what their significance is.



36/3 2026/09/06 06:31 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/htc_drv_init.c",
  "FirstLine": 250,
  "LineCount": 45
}

Results:
{
  "Contents": " 250:\t\t}\n 251:\t\n 252:\t\treturn be32_to_cpu(val);\n 253:\t}\n 254:\t\n 255:\tstatic void ath9k_multi_regread(void *hw_priv, u32 *addr,\n 256:\t\t\t\t\tu32 *val, u16 count)\n 257:\t{\n 258:\t\tstruct ath_hw *ah = hw_priv;\n 259:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 260:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 261:\t\t__be32 tmpaddr[ATH9K_MULTI_READ_MAX];\n 262:\t\t__be32 tmpval[ATH9K_MULTI_READ_MAX];\n 263:\t\tint i, ret;\n 264:\t\n 265:\t\tif (WARN_ON_ONCE(count \u003e ATH9K_MULTI_READ_MAX)) {\n 266:\t\t\tmemset(val, 0xff, sizeof(*val) * count);\n 267:\t\t\treturn;\n 268:\t\t}\n 269:\t\n 270:\t\tfor (i = 0; i \u003c count; i++) {\n 271:\t\t\ttmpaddr[i] = cpu_to_be32(addr[i]);\n 272:\t\t}\n 273:\t\n 274:\t\tret = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_READ_CMDID,\n 275:\t\t\t\t   (u8 *)tmpaddr , sizeof(u32) * count,\n 276:\t\t\t\t   (u8 *)tmpval, sizeof(u32) * count,\n 277:\t\t\t\t   100);\n 278:\t\tif (unlikely(ret)) {\n 279:\t\t\tath_dbg(common, WMI,\n 280:\t\t\t\t\"Multiple REGISTER READ FAILED (count: %d)\\n\", count);\n 281:\t\t\t/* Callers expect what a failed single read returns. */\n 282:\t\t\tmemset(val, 0xff, sizeof(*val) * count);\n 283:\t\t\treturn;\n 284:\t\t}\n 285:\t\n 286:\t\tfor (i = 0; i \u003c count; i++) {\n 287:\t\t\tval[i] = be32_to_cpu(tmpval[i]);\n 288:\t\t}\n 289:\t}\n 290:\t\n 291:\tstatic void ath9k_regwrite_multi(struct ath_common *common)\n 292:\t{\n 293:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 294:\t\tu32 rsp_status;\n"
}

37/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 19491
							output: 40
							thoughts: 23
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Analyzing `ath9k_wmi_cmd` Response Buffer Handling**

Okay, so I'm thinking about the `ath9k_wmi_cmd` function, specifically how it's dealing with reading data into `rsp_buf`. I need to re-examine the mechanics of this operation. My immediate concern is ensuring data integrity and correct handling of the response buffer within this command execution flow. Are there any potential race conditions? Overflow issues? Boundary conditions I'm missing? I should also check if the function handles response sizes appropriately and if there are any subtle bugs related to error checking or data validation during the read operation. This could be where that intermittent issue is occurring, so, let's start with a deep dive into the code for this area, especially examining pointer arithmetic and memory copy functions involved in the read.



38/3 2026/09/06 06:31 tool grepper
0m Args:
{
  "Expression": "int ath9k_wmi_cmd",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/wmi.c=262=int ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-285-\ndrivers/net/wireless/ath/ath9k/wmi.c:286:static int ath9k_wmi_cmd_issue(struct wmi *wmi,\ndrivers/net/wireless/ath/ath9k/wmi.c-287-\t\t\t       struct sk_buff *skb,\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-309-\ndrivers/net/wireless/ath/ath9k/wmi.c:310:int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,\ndrivers/net/wireless/ath/ath9k/wmi.c-311-\t\t  u8 *cmd_buf, u32 cmd_len,\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=182=int ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,\ndrivers/net/wireless/ath/ath9k/wmi.h-183-\t\t      enum htc_endpoint_id *wmi_ctrl_epid);\ndrivers/net/wireless/ath/ath9k/wmi.h:184:int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,\ndrivers/net/wireless/ath/ath9k/wmi.h-185-\t\t  u8 *cmd_buf, u32 cmd_len,\n"
}

39/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 20192
							output: 44
							thoughts: 21
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience and written in the first person:

**Diving into `ath9k_wmi_cmd` in `wmi.c`**

Okay, let's get down to brass tacks. I need to understand how the `ath9k_wmi_cmd` function works. It's obviously critical to the Atheros WiFi driver's WMI (Windows Management Instrumentation) interaction, and probably the central point where commands are marshaled to the firmware. I'm hoping I can trace the command flow to figure out the exact sequence of events, what data structures are involved and if there are any obvious bottlenecks or potential issues. I'll need to understand how the WMI command buffer is constructed, populated, and sent to the firmware and crucially, how the response is handled and interpreted. I'm looking for the details on the command ID encoding and any error handling in place. Are there specific checks for firmware versions or capabilities? Also, I need to see what sort of mutex protection and locking are used to synchronize access to the WMI interface.



40/3 2026/09/06 06:31 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/wmi.c",
  "FirstLine": 305,
  "LineCount": 60
}

Results:
{
  "Contents": " 305:\t\tspin_unlock_irqrestore(\u0026wmi-\u003ewmi_lock, flags);\n 306:\t\n 307:\t\treturn htc_send_epid(wmi-\u003ehtc, skb, wmi-\u003ectrl_epid);\n 308:\t}\n 309:\t\n 310:\tint ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,\n 311:\t\t\t  u8 *cmd_buf, u32 cmd_len,\n 312:\t\t\t  u8 *rsp_buf, u32 rsp_len,\n 313:\t\t\t  u32 timeout)\n 314:\t{\n 315:\t\tstruct ath_hw *ah = wmi-\u003edrv_priv-\u003eah;\n 316:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 317:\t\tu16 headroom = sizeof(struct htc_frame_hdr) +\n 318:\t\t\t       sizeof(struct wmi_cmd_hdr);\n 319:\t\tunsigned long time_left, flags;\n 320:\t\tstruct sk_buff *skb;\n 321:\t\tint ret = 0;\n 322:\t\n 323:\t\tif (ah-\u003eah_flags \u0026 AH_UNPLUGGED)\n 324:\t\t\treturn 0;\n 325:\t\n 326:\t\tskb = alloc_skb(headroom + cmd_len, GFP_ATOMIC);\n 327:\t\tif (!skb)\n 328:\t\t\treturn -ENOMEM;\n 329:\t\n 330:\t\tskb_reserve(skb, headroom);\n 331:\t\n 332:\t\tif (cmd_len != 0 \u0026\u0026 cmd_buf != NULL) {\n 333:\t\t\tskb_put_data(skb, cmd_buf, cmd_len);\n 334:\t\t}\n 335:\t\n 336:\t\tmutex_lock(\u0026wmi-\u003eop_mutex);\n 337:\t\n 338:\t\t/* check if wmi stopped flag is set */\n 339:\t\tif (unlikely(wmi-\u003estopped)) {\n 340:\t\t\tret = -EPROTO;\n 341:\t\t\tgoto out;\n 342:\t\t}\n 343:\t\n 344:\t\tret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len, rsp_buf, rsp_len);\n 345:\t\tif (ret)\n 346:\t\t\tgoto out;\n 347:\t\n 348:\t\ttime_left = wait_for_completion_timeout(\u0026wmi-\u003ecmd_wait, timeout);\n 349:\t\tif (!time_left) {\n 350:\t\t\tath_dbg(common, WMI, \"Timeout waiting for WMI command: %s\\n\",\n 351:\t\t\t\twmi_cmd_to_name(cmd_id));\n 352:\t\t\tspin_lock_irqsave(\u0026wmi-\u003ewmi_lock, flags);\n 353:\t\t\twmi-\u003elast_seq_id = 0;\n 354:\t\t\tspin_unlock_irqrestore(\u0026wmi-\u003ewmi_lock, flags);\n 355:\t\t\tmutex_unlock(\u0026wmi-\u003eop_mutex);\n 356:\t\t\treturn -ETIMEDOUT;\n 357:\t\t}\n 358:\t\n 359:\t\tmutex_unlock(\u0026wmi-\u003eop_mutex);\n 360:\t\n 361:\t\treturn 0;\n 362:\t\n 363:\tout:\n 364:\t\tath_dbg(common, WMI, \"WMI failure for: %s\\n\", wmi_cmd_to_name(cmd_id));\n"
}

41/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 21475
							output: 39
							thoughts: 1530
						

Thoughts:
**Analyzing Register Read Operations in ath9k Driver**

Okay, let's break this down. Line 323 in `ath9k_wmi_cmd`... right, if `ah->ah_flags & AH_UNPLUGGED` is set, it returns immediately without writing to the response buffer, `rsp_buf`. That seems like an existing check, not something introduced by this patch. I need to verify, but it's important to remember in the context of register reads.

Now, looking at `ath9k_multi_regread`, that's where the heart of the matter lies. This function is *critical* for efficient multi-register reads. The patch clearly addresses a critical flaw in this function. Before the patch, if `count` exceeded 8, there would be a buffer overflow, corrupting memory, particularly in the `tmpaddr` and `tmpval` buffers. Furthermore, if `ath9k_wmi_cmd` returned an error (`ret`), the uninitialized `tmpval` data was copied into `val`, resulting in potentially undefined behavior.

The patch fixes this with two key additions:

1.  A `WARN_ON_ONCE` check that aborts the read if the `count` is larger than the limit, and writes `0xff` to the output buffer (`val`).
2.  An error check after the WMI command, which also writes `0xff` to the output buffer on failure.

These safeguards make the function much more robust and prevent those memory corruption and undefined behavior bugs. The updated code will ensure that the caller receives sensible defaults (0xff) in case of a problem.

Moving on to `ath9k_hw_first_txpending`, I see that the function uses a similar approach with `REG_READ_MULTI`. The `addr` and `val` arrays are of size `AR_NUM_QCU + 1`, and the code reads in chunks of up to `ATH9K_MULTI_READ_MAX` elements. `REG_READ_MULTI` is a macro, I need to see if it calls `ath9k_multi_regread` or something else in the `ath9k_multi_ioread32`. In the `REG_READ_MULTI` macro, it should eventually call one of the read functions.  Critically, `val` *should* be fully populated because `ath9k_multi_regread` or `ath9k_multi_ioread32` either succeeds and populates elements or fails and fills all elements with `0xff`. Therefore, the subsequent access to `val[AR_NUM_QCU]` and the loop through `val[q]` are safe.

Finally, I need to look into how the `ENABLE_REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH` macros play into this, just to see if there are any additional buffer management considerations in the register read and write process. I'll need to grep through the codebase to trace their usage.



42/3 2026/09/06 06:31 tool grepper
0m Args:
{
  "Expression": "ENABLE_REG_RMW_BUFFER",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/ar5008_phy.c=853=static void ar5008_hw_set_delta_slope(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-870-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:871:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-872-\tREG_RMW_FIELD(ah, AR_PHY_TIMING3,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=437=static void ar9271_hw_pa_cal(struct ath_hw *ah, bool is_reset)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-453-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:454:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-455-\t/* 7834, b1=0 */\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-526-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:527:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-528-\t/* 7834, b1=1 */\n--\ndrivers/net/wireless/ath/ath9k/calib.c=222=void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)\n--\ndrivers/net/wireless/ath/ath9k/calib.c-226-\ndrivers/net/wireless/ath/ath9k/calib.c:227:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/calib.c-228-\tREG_SET_BIT(ah, AR_PHY_AGC_CONTROL(ah),\n--\ndrivers/net/wireless/ath/ath9k/calib.c=242=int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/calib.c-253-\ndrivers/net/wireless/ath/ath9k/calib.c:254:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/calib.c-255-\tfor (i = 0; i \u003c NUM_NF_READINGS; i++) {\n--\ndrivers/net/wireless/ath/ath9k/calib.c-285-\t\tREG_RMW_BUFFER_FLUSH(ah);\ndrivers/net/wireless/ath/ath9k/calib.c:286:\t\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/calib.c-287-\t}\n--\ndrivers/net/wireless/ath/ath9k/calib.c-316-\tif (bb_agc_ctl \u0026 AR_PHY_AGC_CONTROL_NF) {\ndrivers/net/wireless/ath/ath9k/calib.c:317:\t\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/calib.c-318-\t\tif (bb_agc_ctl \u0026 AR_PHY_AGC_CONTROL_ENABLE_NF)\n--\ndrivers/net/wireless/ath/ath9k/calib.c-348-\t */\ndrivers/net/wireless/ath/ath9k/calib.c:349:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/calib.c-350-\tfor (i = 0; i \u003c NUM_NF_READINGS; i++) {\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c=283=static void ath9k_hw_set_4k_power_cal_table(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-321-\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c:322:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-323-\tREG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_NUM_PD_GAIN,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c=699=static void ath9k_hw_4k_set_gain(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-703-{\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c:704:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-705-\tREG_RMW(ah, AR_PHY_SWITCH_CHAIN_0,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c=756=static void ath9k_hw_4k_set_board_values(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-860-\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c:861:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-862-\tif (AR_SREV_9271(ah)) {\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-967-\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c:968:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-969-\tREG_RMW_FIELD(ah, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-1014-\t\tclr = mask * 0x1f;\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c:1015:\t\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/eeprom_4k.c-1016-\t\tREG_RMW(ah, AR_PHY_TX_PWRCTRL8, pwrctrl, clr);\n--\ndrivers/net/wireless/ath/ath9k/eeprom_def.c=416=static void ath9k_hw_def_set_gain(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/eeprom_def.c-420-{\ndrivers/net/wireless/ath/ath9k/eeprom_def.c:421:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/eeprom_def.c-422-\tif (ath9k_hw_def_get_eeprom_rev(ah) \u003e= AR5416_EEP_MINOR_VER_3) {\n--\ndrivers/net/wireless/ath/ath9k/hw.c=1267=static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode)\n--\ndrivers/net/wireless/ath/ath9k/hw.c-1271-\ndrivers/net/wireless/ath/ath9k/hw.c:1272:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/hw.c-1273-\tswitch (opmode) {\n--\ndrivers/net/wireless/ath/ath9k/hw.c=1858=int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,\n--\ndrivers/net/wireless/ath/ath9k/hw.c-2018-\ndrivers/net/wireless/ath/ath9k/hw.c:2019:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/hw.c-2020-\tif (ah-\u003econfig.rx_intr_mitigation) {\n--\ndrivers/net/wireless/ath/ath9k/hw.h-110-\ndrivers/net/wireless/ath/ath9k/hw.h:111:#define ENABLE_REG_RMW_BUFFER(_ah)\t\t\t\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h-112-\tdo {\t\t\t\t\t\t\t\t\\\n"
}

43/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 26025
							output: 43
							thoughts: 35
						

Thoughts:
Okay, let's dive into this. Here's how I'd approach this task, as if these were my internal thoughts:

**Dissecting Hardware Definitions**

Right, let's get down to brass tacks. I need to understand how the system's managing its register file interactions. The goal here is to grasp the nuances of `ENABLE_REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH`, and their interplay. I'm assuming, of course, these are defined within `hw.h`. So, I'll start by checking the include file, looking for the preprocessor definitions. I'll be looking for clues about the hardware design - are these buffering mechanisms for read-modify-write operations? Are they controlling a cache, a queue, or something else entirely to minimize latency or resource contention? The details of each definition will inform the rest of my thought process. What conditions enable these features? What triggers the flush? I need the exact bit-level representation or macro expansion to truly understand the underlying behavior and its implications on performance, power, and potentially, even correctness. I'll need to think about how these definitions interact with the memory hierarchy and any potential data hazards that might arise. This is critical for optimizing the code that interacts with the registers or the hardware I'm currently working on.



44/3 2026/09/06 06:31 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/hw.h",
  "FirstLine": 100,
  "LineCount": 40
}

Results:
{
  "Contents": " 100:\t\tdo {\t\t\t\t\t\t\t\t\\\n 101:\t\t\tif ((_ah)-\u003ereg_ops.enable_write_buffer)\t\\\n 102:\t\t\t\t(_ah)-\u003ereg_ops.enable_write_buffer((_ah)); \\\n 103:\t\t} while (0)\n 104:\t\n 105:\t#define REGWRITE_BUFFER_FLUSH(_ah)\t\t\t\t\t\\\n 106:\t\tdo {\t\t\t\t\t\t\t\t\\\n 107:\t\t\tif ((_ah)-\u003ereg_ops.write_flush)\t\t\\\n 108:\t\t\t\t(_ah)-\u003ereg_ops.write_flush((_ah));\t\\\n 109:\t\t} while (0)\n 110:\t\n 111:\t#define ENABLE_REG_RMW_BUFFER(_ah)\t\t\t\t\t\\\n 112:\t\tdo {\t\t\t\t\t\t\t\t\\\n 113:\t\t\tif ((_ah)-\u003ereg_ops.enable_rmw_buffer)\t\\\n 114:\t\t\t\t(_ah)-\u003ereg_ops.enable_rmw_buffer((_ah)); \\\n 115:\t\t} while (0)\n 116:\t\n 117:\t#define REG_RMW_BUFFER_FLUSH(_ah)\t\t\t\t\t\\\n 118:\t\tdo {\t\t\t\t\t\t\t\t\\\n 119:\t\t\tif ((_ah)-\u003ereg_ops.rmw_flush)\t\t\\\n 120:\t\t\t\t(_ah)-\u003ereg_ops.rmw_flush((_ah));\t\\\n 121:\t\t} while (0)\n 122:\t\n 123:\t#define PR_EEP(_s, _val)\t\t\t\t\t\t\\\n 124:\t\tdo {\t\t\t\t\t\t\t\t\\\n 125:\t\t\tlen += scnprintf(buf + len, size - len, \"%20s : %10d\\n\",\\\n 126:\t\t\t\t\t _s, (_val));\t\t\t\t\\\n 127:\t\t} while (0)\n 128:\t\n 129:\t#define SM(_v, _f)  (((_v) \u003c\u003c _f##_S) \u0026 _f)\n 130:\t#define MS(_v, _f)  (((_v) \u0026 _f) \u003e\u003e _f##_S)\n 131:\t#define REG_RMW_FIELD(_a, _r, _f, _v) \\\n 132:\t\tREG_RMW(_a, _r, (((_v) \u003c\u003c _f##_S) \u0026 _f), (_f))\n 133:\t#define REG_READ_FIELD(_a, _r, _f) \\\n 134:\t\t(((REG_READ(_a, _r) \u0026 _f) \u003e\u003e _f##_S))\n 135:\t#define REG_SET_BIT(_a, _r, _f) \\\n 136:\t\tREG_RMW(_a, _r, (_f), 0)\n 137:\t#define REG_CLR_BIT(_a, _r, _f) \\\n 138:\t\tREG_RMW(_a, _r, 0, (_f))\n 139:\t\n"
}

45/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 27153
							output: 36
							thoughts: 28
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Investigating `ath9k_multi_regread` Usage**

Okay, so I need to understand the full scope of where `ath9k_multi_regread` is actually used, or where the more general `REG_READ_MULTI` macro is invoked within the Atheros ath9k driver context. I know this function is used to read several registers at once from the hardware, so I want to identify all the places the driver is trying to do that. I'm thinking I need to find the specific instances where this is happening. The goal is to see not only *where* this function is called, but also *why* and *how* it's being used. I need to understand the data it's handling, how it interacts with other parts of the driver, and if there are any potential optimizations or areas for concern based on the context of its use. Finding the callers will provide this overview.



46/3 2026/09/06 06:31 tool grepper
0m Args:
{
  "Expression": "REG_READ_MULTI",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/ani.c=107=static void ath9k_hw_update_mibstats(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ani.c-113-\ndrivers/net/wireless/ath/ath9k/ani.c:114:\tREG_READ_MULTI(ah, \u0026addr[0], \u0026data[0], 5);\ndrivers/net/wireless/ath/ath9k/ani.c-115-\t/* AR_RTS_OK */\n--\ndrivers/net/wireless/ath/ath9k/eeprom.c=79=void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data,\n--\ndrivers/net/wireless/ath/ath9k/eeprom.c-90-\t\tif (i == 8) {\ndrivers/net/wireless/ath/ath9k/eeprom.c:91:\t\t\tREG_READ_MULTI(ah, addrdata, data, i);\ndrivers/net/wireless/ath/ath9k/eeprom.c-92-\n--\ndrivers/net/wireless/ath/ath9k/eeprom.c-101-\tif (i != 0) {\ndrivers/net/wireless/ath/ath9k/eeprom.c:102:\t\tREG_READ_MULTI(ah, addrdata, data, i);\ndrivers/net/wireless/ath/ath9k/eeprom.c-103-\n--\ndrivers/net/wireless/ath/ath9k/hw.c=125=void ath9k_hw_read_array(struct ath_hw *ah, u32 array[][2], int size)\n--\ndrivers/net/wireless/ath/ath9k/hw.c-144-\ndrivers/net/wireless/ath/ath9k/hw.c:145:\tREG_READ_MULTI(ah, tmp_reg_list, tmp_data, size);\ndrivers/net/wireless/ath/ath9k/hw.c-146-\n--\ndrivers/net/wireless/ath/ath9k/hw.h-86-/*\ndrivers/net/wireless/ath/ath9k/hw.h:87: * Maximum number of registers one REG_READ_MULTI() may ask for. The ath9k_htc\ndrivers/net/wireless/ath/ath9k/hw.h-88- * implementation converts the addresses and the results through fixed arrays\n--\ndrivers/net/wireless/ath/ath9k/hw.h-92-\ndrivers/net/wireless/ath/ath9k/hw.h:93:#define REG_READ_MULTI(_ah, _addr, _val, _cnt)\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h-94-\t(_ah)-\u003ereg_ops.multi_read((_ah), (_addr), (_val), (_cnt))\n--\ndrivers/net/wireless/ath/ath9k/mac.c=93=int ath9k_hw_first_txpending(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/mac.c-106-\ndrivers/net/wireless/ath/ath9k/mac.c:107:\t\tREG_READ_MULTI(ah, addr + done, val + done, count);\ndrivers/net/wireless/ath/ath9k/mac.c-108-\t\tdone += count;\n"
}

47/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 28285
							output: 43
							thoughts: 27
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into the Atheros Hardware Abstraction**

Okay, time to get to the bottom of this. Let's start digging into the `ath9k` driver, specifically the hardware access code. I need to refresh my memory on how this all works. I'm going to jump straight to the heart of the matter and examine `ath9k_hw_read_array`. That function is probably where the low-level register reads are happening, so let's check it in `hw.c`, and I'm guessing the relevant bits are around line 125, give or take a few lines. Hopefully, I can quickly identify the register addressing scheme and data transfer mechanisms used there.



48/3 2026/09/06 06:31 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/hw.c",
  "FirstLine": 125,
  "LineCount": 35
}

Results:
{
  "Contents": " 125:\tvoid ath9k_hw_read_array(struct ath_hw *ah, u32 array[][2], int size)\n 126:\t{\n 127:\t\tu32 *tmp_reg_list, *tmp_data;\n 128:\t\tint i;\n 129:\t\n 130:\t\ttmp_reg_list = kmalloc_array(size, sizeof(u32), GFP_KERNEL);\n 131:\t\tif (!tmp_reg_list) {\n 132:\t\t\tdev_err(ah-\u003edev, \"%s: tmp_reg_list: alloc filed\\n\", __func__);\n 133:\t\t\treturn;\n 134:\t\t}\n 135:\t\n 136:\t\ttmp_data = kmalloc_array(size, sizeof(u32), GFP_KERNEL);\n 137:\t\tif (!tmp_data) {\n 138:\t\t\tdev_err(ah-\u003edev, \"%s tmp_data: alloc filed\\n\", __func__);\n 139:\t\t\tgoto error_tmp_data;\n 140:\t\t}\n 141:\t\n 142:\t\tfor (i = 0; i \u003c size; i++)\n 143:\t\t\ttmp_reg_list[i] = array[i][0];\n 144:\t\n 145:\t\tREG_READ_MULTI(ah, tmp_reg_list, tmp_data, size);\n 146:\t\n 147:\t\tfor (i = 0; i \u003c size; i++)\n 148:\t\t\tarray[i][1] = tmp_data[i];\n 149:\t\n 150:\t\tkfree(tmp_data);\n 151:\terror_tmp_data:\n 152:\t\tkfree(tmp_reg_list);\n 153:\t}\n 154:\t\n 155:\tu32 ath9k_hw_reverse_bits(u32 val, u32 n)\n 156:\t{\n 157:\t\tu32 retval;\n 158:\t\tint i;\n 159:\t\n"
}

49/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 29073
							output: 40
							thoughts: 19
						

Thoughts:
Here's my thought process, as if I were analyzing that code:

**Diving into `ath9k_hw_read_array` Usage**

Okay, so I need to understand where this `ath9k_hw_read_array` function is being called. It's a fundamental part of the ath9k driver, no doubt, but to grasp its role, I need to see its context. I need to trace its usage. I'll need to use my tools - grep, maybe some static analysis – to find all the places in the code where this function is actually *used*. Knowing where it's called is the crucial first step. Is it called during initialization, data transmission, reception, or error handling? Understanding *that* will immediately illuminate what data it is working with and where. I'll likely find its primary purpose right away once I know its context. This is the starting point to understanding its significance within the driver.



50/3 2026/09/06 06:31 tool grepper
0m Args:
{
  "Expression": "ath9k_hw_read_array",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/hw.c=111=void ath9k_hw_write_array(struct ath_hw *ah, const struct ar5416IniArray *array,\n--\ndrivers/net/wireless/ath/ath9k/hw.c-124-\ndrivers/net/wireless/ath/ath9k/hw.c:125:void ath9k_hw_read_array(struct ath_hw *ah, u32 array[][2], int size)\ndrivers/net/wireless/ath/ath9k/hw.c-126-{\n--\ndrivers/net/wireless/ath/ath9k/hw.h-149-#define REG_READ_ARRAY(ah, array, size) \\\ndrivers/net/wireless/ath/ath9k/hw.h:150:\tath9k_hw_read_array(ah, array, size)\ndrivers/net/wireless/ath/ath9k/hw.h-151-\n--\ndrivers/net/wireless/ath/ath9k/hw.h=1053=void ath9k_hw_write_array(struct ath_hw *ah, const struct ar5416IniArray *array,\ndrivers/net/wireless/ath/ath9k/hw.h-1054-\t\t\t  int column, unsigned int *writecnt);\ndrivers/net/wireless/ath/ath9k/hw.h:1055:void ath9k_hw_read_array(struct ath_hw *ah, u32 array[][2], int size);\ndrivers/net/wireless/ath/ath9k/hw.h-1056-u32 ath9k_hw_reverse_bits(u32 val, u32 n);\n"
}

51/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 29766
							output: 36
							thoughts: 15
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Analyzing `REG_READ_ARRAY` Usage**

Alright, let's dive in. My immediate thought is to trace the utilization of `REG_READ_ARRAY`. I need to understand its context. Where is this function/macro actually employed within the code base? Is it used for low-level hardware access, for handling memory-mapped registers, or perhaps in some higher-level abstraction layer? Knowing this will immediately inform my understanding of its purpose and potential implications. I'll need to use my usual tools - a combination of static analysis (likely `grep` or a similar utility if I'm dealing with a large codebase), cross-referencing capabilities within my IDE, or maybe even a debugger if I'm curious about runtime behavior. The goal is to identify all call sites, paying close attention to the arguments passed, and the surrounding code. From there, I can start forming a mental model of its operational context. This information is key to understanding the data flow and potential performance bottlenecks.



52/3 2026/09/06 06:31 tool grepper
0m Args:
{
  "Expression": "REG_READ_ARRAY",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/ar9002_calib.c=437=static void ar9271_hw_pa_cal(struct ath_hw *ah, bool is_reset)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-451-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:452:\tREG_READ_ARRAY(ah, regList, ARRAY_SIZE(regList));\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-453-\n--\ndrivers/net/wireless/ath/ath9k/hw.h-148-\tath9k_hw_write_array(ah, iniarray, column, \u0026(regWr))\ndrivers/net/wireless/ath/ath9k/hw.h:149:#define REG_READ_ARRAY(ah, array, size) \\\ndrivers/net/wireless/ath/ath9k/hw.h-150-\tath9k_hw_read_array(ah, array, size)\n"
}

53/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 30330
							output: 50
							thoughts: 30
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into the AR9271 PA Calibration**

Okay, time to dig into this. I'm going to start by taking a look at `ar9271_hw_pa_cal` within `ar9002_calib.c`. This is where the low-level hardware PA calibration routine for the AR9271 is likely implemented. I'm assuming that it is in the `ar9002_calib.c` file since the `ar9271` is built on that technology. I'll need to understand how the calibration parameters are read, calculated, and applied to the RF front-end. I'm especially interested in how the driver handles temperature compensation and any potential power-tracking mechanisms, as those are critical for performance and regulatory compliance. My focus will be on the details of that specific function and how it interfaces with the other calibration-related components. Let's see what's in there...



54/3 2026/09/06 06:31 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/ar9002_calib.c",
  "FirstLine": 440,
  "LineCount": 25
}

Results:
{
  "Contents": " 440:\t\tunsigned int i;\n 441:\t\tu32 regList[][2] = {\n 442:\t\t\t{ AR9285_AN_TOP3, 0 },\n 443:\t\t\t{ AR9285_AN_RXTXBB1, 0 },\n 444:\t\t\t{ AR9285_AN_RF2G1, 0 },\n 445:\t\t\t{ AR9285_AN_RF2G2, 0 },\n 446:\t\t\t{ AR9285_AN_TOP2, 0 },\n 447:\t\t\t{ AR9285_AN_RF2G8, 0 },\n 448:\t\t\t{ AR9285_AN_RF2G7, 0 },\n 449:\t\t\t{ AR9285_AN_RF2G3, 0 },\n 450:\t\t};\n 451:\t\n 452:\t\tREG_READ_ARRAY(ah, regList, ARRAY_SIZE(regList));\n 453:\t\n 454:\t\tENABLE_REG_RMW_BUFFER(ah);\n 455:\t\t/* 7834, b1=0 */\n 456:\t\tREG_CLR_BIT(ah, AR9285_AN_RF2G6, 1 \u003c\u003c 0);\n 457:\t\t/* 9808, b27=1 */\n 458:\t\tREG_SET_BIT(ah, 0x9808, 1 \u003c\u003c 27);\n 459:\t\t/* 786c,b23,1, pwddac=1 */\n 460:\t\tREG_SET_BIT(ah, AR9285_AN_TOP3, AR9285_AN_TOP3_PWDDAC);\n 461:\t\t/* 7854, b5,1, pdrxtxbb=1 */\n 462:\t\tREG_SET_BIT(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDRXTXBB1);\n 463:\t\t/* 7854, b7,1, pdv2i=1 */\n 464:\t\tREG_SET_BIT(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDV2I);\n"
}

55/3 2026/09/06 06:31 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 31250
							output: 370
							thoughts: 897
						

Thoughts:
**My Analysis of the ath9k Driver Patch**

Okay, so ARRAY_SIZE(regList) is indeed 8, and so is ATH9K_MULTI_READ_MAX, which is good. Let's walk through this patch carefully, component by component, to ensure there are no surprises, especially regarding uninitialized memory reads, which is my main concern.

1.  `ar5008_hw_set_delta_slope`: This looks clean. It's just adding register write batching/flushing optimizations via `ENABLE_REG_RMW_BUFFER` and `REG_RMW_BUFFER_FLUSH`. Pure hardware-level stuff, no immediate risks.

2.  `ath9k_hw_start_nfcal`: Same as above, focusing on register bit sets with the same optimization macros. Safe.

3.  `ath9k_multi_regread`: Aha, this one is interesting. We're replacing a hardcoded '8' with the macro `ATH9K_MULTI_READ_MAX`, which *is* 8, so no functional change there. The critical addition is the sanity check, `WARN_ON_ONCE(count > ATH9K_MULTI_READ_MAX)`. If the count is too large, it sets the `val` to 0xff and returns. Smart! This is a *protection* against a potential stack buffer overflow, effectively preventing uninitialized memory reads if something goes wrong with the `count`. The added check for `ret` (WMI command failure) also sets `val` to 0xff, ensuring there's no attempt to use uninitialized values. This is *positive* from a KMSAN perspective.

4.  `ath9k_hw_channel_change`: A simple replacement of a loop with a call to `ath9k_hw_first_txpending(ah)`. Reduces code complexity, no apparent KMSAN issues.

5.  `ath9k_hw_reset`: Skipping `ath9k_hw_getnf` under certain conditions. Looks benign, no uninitialized memory hazards.

6.  `ath9k_hw_first_txpending`: This is the most complex function here. It sets up an `addr` array and reads values in chunks up to `ATH9K_MULTI_READ_MAX` via `REG_READ_MULTI`. The crucial point is that `REG_READ_MULTI` fills `val + done` with read values. If it fails it sets the value to 0xff. The critical part is that *all* entries of `val` are written *before* any reads from it. This prevents uninitialized reads.

Now, let's rigorously test the KMSAN implications:

*   **No User Space Exposure:** Does this patch alter kernel structures sent to user space? No. This patch is exclusively about internal hardware register interactions, so no data is leaked via `copy_to_user`, `put_user`, netlink, or ioctls. This is a crucial point, and it's a big "no" to this criterion.
*   **No Uninitialized Branching:** Does it introduce conditional logic dependent on uninitialized variables? No. The code ensures full initialization of all relevant variables (`val`) before their use within those branches.
*   **No Uninitialized Allocation:** Does it introduce allocation of complex structures with uninitialized fields? No. Everything is stack-based and initialized before use.
*   **No Bounds Check Vulnerabilities:** Does it alter bounds checks in a way that allows uninitialized memory reads? No, it *adds* a bounds check and sets values to 0xff if the count is greater than the max read. That's a *safety* feature.

**My conclusion:** This patch is not introducing any known risks to uninitialized memory. KMSAN fuzzing is *not* warranted here. There are no information leaks or uninitialized memory reads being introduced. The checks added actually strengthen the code against such issues. The patch actually adds safety to the code, especially in `ath9k_multi_regread` and `ath9k_hw_first_txpending`. We are safe to conclude this.

```
NeedsKMSAN: false
KMSANReasoning: The patch primarily optimizes hardware register access and introduces/improves bounds checks and error handling to *prevent* uninitialized memory reads. All operations are internal driver operations and do not expose kernel structures to user space. The key functions, `ath9k_multi_regread` and `ath9k_hw_first_txpending`, ensure full initialization of all read buffers (`val`) *before* use, preventing potential uninitialized reads. Therefore, KMSAN is not necessary.
```



56/3 2026/09/06 06:31 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch optimizes register access routines and fast-channel-change handling in the ath9k wireless driver. Specifically, it batches register reads/writes using buffer flushing macros, introduces ath9k_hw_first_txpending() to query queue status registers using batched multi-reads (REG_READ_MULTI), and adds bounds/error checking in ath9k_multi_regread() to fill the target buffer with 0xff if an error occurs.\n\n1. Uninitialized Memory Analysis:\n   - In ath9k_hw_first_txpending(), the local arrays 'addr' and 'val' are populated across the loop chunks by REG_READ_MULTI. Both implementations (ath9k_multi_ioread32 and ath9k_multi_regread) write to every element in the requested range [val, val + count), and ath9k_multi_regread explicitly memsets 'val' with 0xff on error or out-of-bounds count. Therefore, no uninitialized stack memory is read or branched upon.\n   - None of the modified data or structures are exported or copied to user space (no copy_to_user, netlink, ioctl output, etc.).\n\n2. Detector Applicability (KASAN vs KMSAN):\n   - Any buffer-bound or array indexing issues (e.g. queue indexing or buffer overflow) would be detected by KASAN / standard runtime checks.\n   - There are no uninitialized memory reads or information leak risks that would uniquely require KMSAN.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted (NeedsKMSAN=false).",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch optimizes register access routines and fast-channel-change handling in the ath9k wireless driver. Specifically, it batches register reads/writes using buffer flushing macros, introduces ath9k_hw_first_txpending() to query queue status registers using batched multi-reads (REG_READ_MULTI), and adds bounds/error checking in ath9k_multi_regread() to fill the target buffer with 0xff if an error occurs.\n\n1. Uninitialized Memory Analysis:\n   - In ath9k_hw_first_txpending(), the local arrays 'addr' and 'val' are populated across the loop chunks by REG_READ_MULTI. Both implementations (ath9k_multi_ioread32 and ath9k_multi_regread) write to every element in the requested range [val, val + count), and ath9k_multi_regread explicitly memsets 'val' with 0xff on error or out-of-bounds count. Therefore, no uninitialized stack memory is read or branched upon.\n   - None of the modified data or structures are exported or copied to user space (no copy_to_user, netlink, ioctl output, etc.).\n\n2. Detector Applicability (KASAN vs KMSAN):\n   - Any buffer-bound or array indexing issues (e.g. queue indexing or buffer overflow) would be detected by KASAN / standard runtime checks.\n   - There are no uninitialized memory reads or information leak risks that would uniquely require KMSAN.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted (NeedsKMSAN=false).",
  "NeedsKMSAN": false
}

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)