AI Trajectory


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

Results:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "ATH9K_HTC_DEBUGFS"
  ],
  "FocusSymbols": [
    "ath9k_htc_calcrxfilter",
    "ath9k_wmi_cmd",
    "read_file_wmi",
    "ath9k_htc_init_debug"
  ],
  "KMSANReasoning": "The patch introduces a debugfs file (\"wmi\") to report WMI command statistics, adds two counter fields to `struct wmi` (`cmds_issued` and `cmds_timed_out`), and updates RX filter flag calculations in `ath9k_htc_calcrxfilter`.\n\n1. `struct wmi` is allocated via `kzalloc_obj`, so the new counter fields are guaranteed to be zero-initialized upon creation.\n2. In `read_file_wmi`, `scnprintf` formats the counters into a local buffer and returns the exact number of bytes written (`len`), which is then passed to `simple_read_from_buffer`. No uninitialized stack bytes are copied to user space.\n3. The modifications in `ath9k_htc_calcrxfilter` only alter bitwise flag operations on initialized variables.\n\nThere are no uninitialized memory reads, info-leaks, or branching on uninitialized data introduced by this patch. Therefore, standard KASAN/lockdep testing is sufficient and a dedicated KMSAN fuzzing session is not required.",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies the Atheros ath9k_htc USB wireless driver by updating the RX filter calculation logic (ath9k_htc_calcrxfilter) to check spectral mode, tracking issued and timed out WMI command statistics in ath9k_wmi_cmd, and exposing them via a new debugfs entry (read_file_wmi). Since ath9k_htc is accessible via USB device emulation (e.g. Raw Gadget), the modified code paths are reachable and worth fuzzing.",
  "WorthFuzzing": true
}

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

Results:
{
  "PatchDiff": "commit 241d20c7132376ea36819615bdc378668dc3787a\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sun Sep 6 06:41:11 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c\nindex 9437d69877cc5..fab613199ca28 100644\n--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c\n+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c\n@@ -310,6 +310,29 @@ static const struct file_operations fops_slot = {\n \t.llseek = default_llseek,\n };\n \n+static ssize_t read_file_wmi(struct file *file, char __user *user_buf,\n+\t\t\t     size_t count, loff_t *ppos)\n+{\n+\tstruct ath9k_htc_priv *priv = file-\u003eprivate_data;\n+\tchar buf[128];\n+\tunsigned int len;\n+\n+\tlen = scnprintf(buf, sizeof(buf),\n+\t\t\t\"%20s : %10u\\n\"\n+\t\t\t\"%20s : %10u\\n\",\n+\t\t\t\"Issued\", priv-\u003ewmi-\u003ecmds_issued,\n+\t\t\t\"Timeouts\", priv-\u003ewmi-\u003ecmds_timed_out);\n+\n+\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n+}\n+\n+static const struct file_operations fops_wmi = {\n+\t.read = read_file_wmi,\n+\t.open = simple_open,\n+\t.owner = THIS_MODULE,\n+\t.llseek = default_llseek,\n+};\n+\n static ssize_t read_file_queue(struct file *file, char __user *user_buf,\n \t\t\t       size_t count, loff_t *ppos)\n {\n@@ -505,6 +528,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)\n \n \tdebugfs_create_file(\"slot\", 0400, priv-\u003edebug.debugfs_phy,\n \t\t\t    priv, \u0026fops_slot);\n+\tdebugfs_create_file(\"wmi\", 0400, priv-\u003edebug.debugfs_phy,\n+\t\t\t    priv, \u0026fops_wmi);\n \tdebugfs_create_file(\"queue\", 0400, priv-\u003edebug.debugfs_phy,\n \t\t\t    priv, \u0026fops_queue);\n \tdebugfs_create_file(\"debug\", 0600, priv-\u003edebug.debugfs_phy,\ndiff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c\nindex bed7ea2425a0e..299064a7fa492 100644\n--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c\n+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c\n@@ -868,14 +868,14 @@ int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)\n  */\n u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)\n {\n-#define\tRX_FILTER_PRESERVE (ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR)\n-\n \tstruct ath_hw *ah = priv-\u003eah;\n \tu32 rfilt;\n \n-\trfilt = (ath9k_hw_getrxfilter(ah) \u0026 RX_FILTER_PRESERVE)\n-\t\t| ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST\n-\t\t| ATH9K_RX_FILTER_MCAST;\n+\trfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST |\n+\t\tATH9K_RX_FILTER_MCAST;\n+\n+\tif (priv-\u003espec_priv.spectral_mode != SPECTRAL_DISABLED)\n+\t\trfilt |= ATH9K_RX_FILTER_PHYRADAR | ATH9K_RX_FILTER_PHYERR;\n \n \tif (priv-\u003erxfilter \u0026 FIF_PROBE_REQ)\n \t\trfilt |= ATH9K_RX_FILTER_PROBEREQ;\n@@ -906,8 +906,6 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)\n \t\trfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;\n \n \treturn rfilt;\n-\n-#undef RX_FILTER_PRESERVE\n }\n \n /*\ndiff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c\nindex 284e8c13b0430..552ae9f8bdafc 100644\n--- a/drivers/net/wireless/ath/ath9k/wmi.c\n+++ b/drivers/net/wireless/ath/ath9k/wmi.c\n@@ -345,8 +345,10 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,\n \tif (ret)\n \t\tgoto out;\n \n+\twmi-\u003ecmds_issued++;\n \ttime_left = wait_for_completion_timeout(\u0026wmi-\u003ecmd_wait, timeout);\n \tif (!time_left) {\n+\t\twmi-\u003ecmds_timed_out++;\n \t\tath_dbg(common, WMI, \"Timeout waiting for WMI command: %s\\n\",\n \t\t\twmi_cmd_to_name(cmd_id));\n \t\tspin_lock_irqsave(\u0026wmi-\u003ewmi_lock, flags);\ndiff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h\nindex 5c3b710b8f319..ee72b0fba31b2 100644\n--- a/drivers/net/wireless/ath/ath9k/wmi.h\n+++ b/drivers/net/wireless/ath/ath9k/wmi.h\n@@ -158,6 +158,8 @@ struct wmi {\n \tu8 *cmd_rsp_buf;\n \tu32 cmd_rsp_len;\n \tbool stopped;\n+\tu32 cmds_issued;\n+\tu32 cmds_timed_out;\n \n \tstruct list_head pending_tx_events;\n \tspinlock_t event_lock;\n"
}

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

Args:
null

Results:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "ATH9K_HTC_DEBUGFS"
  ],
  "FocusSymbols": [
    "ath9k_htc_calcrxfilter",
    "ath9k_wmi_cmd",
    "read_file_wmi",
    "ath9k_htc_init_debug"
  ],
  "Reasoning": "The patch modifies the Atheros ath9k_htc USB wireless driver by updating the RX filter calculation logic (ath9k_htc_calcrxfilter) to check spectral mode, tracking issued and timed out WMI command statistics in ath9k_wmi_cmd, and exposing them via a new debugfs entry (read_file_wmi). Since ath9k_htc is accessible via USB device emulation (e.g. Raw Gadget), the modified code paths are reachable and worth fuzzing.",
  "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 241d20c7132376ea36819615bdc378668dc3787a
Author: syz-cluster <triage@syzkaller.com>
Date:   Sun Sep 6 06:41:11 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index 9437d69877cc5..fab613199ca28 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -310,6 +310,29 @@ static const struct file_operations fops_slot = {
 	.llseek = default_llseek,
 };
 
+static ssize_t read_file_wmi(struct file *file, char __user *user_buf,
+			     size_t count, loff_t *ppos)
+{
+	struct ath9k_htc_priv *priv = file->private_data;
+	char buf[128];
+	unsigned int len;
+
+	len = scnprintf(buf, sizeof(buf),
+			"%20s : %10u\n"
+			"%20s : %10u\n",
+			"Issued", priv->wmi->cmds_issued,
+			"Timeouts", priv->wmi->cmds_timed_out);
+
+	return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static const struct file_operations fops_wmi = {
+	.read = read_file_wmi,
+	.open = simple_open,
+	.owner = THIS_MODULE,
+	.llseek = default_llseek,
+};
+
 static ssize_t read_file_queue(struct file *file, char __user *user_buf,
 			       size_t count, loff_t *ppos)
 {
@@ -505,6 +528,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
 
 	debugfs_create_file("slot", 0400, priv->debug.debugfs_phy,
 			    priv, &fops_slot);
+	debugfs_create_file("wmi", 0400, priv->debug.debugfs_phy,
+			    priv, &fops_wmi);
 	debugfs_create_file("queue", 0400, priv->debug.debugfs_phy,
 			    priv, &fops_queue);
 	debugfs_create_file("debug", 0600, priv->debug.debugfs_phy,
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index bed7ea2425a0e..299064a7fa492 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -868,14 +868,14 @@ int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)
  */
 u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
 {
-#define	RX_FILTER_PRESERVE (ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR)
-
 	struct ath_hw *ah = priv->ah;
 	u32 rfilt;
 
-	rfilt = (ath9k_hw_getrxfilter(ah) & RX_FILTER_PRESERVE)
-		| ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
-		| ATH9K_RX_FILTER_MCAST;
+	rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST |
+		ATH9K_RX_FILTER_MCAST;
+
+	if (priv->spec_priv.spectral_mode != SPECTRAL_DISABLED)
+		rfilt |= ATH9K_RX_FILTER_PHYRADAR | ATH9K_RX_FILTER_PHYERR;
 
 	if (priv->rxfilter & FIF_PROBE_REQ)
 		rfilt |= ATH9K_RX_FILTER_PROBEREQ;
@@ -906,8 +906,6 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
 		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
 
 	return rfilt;
-
-#undef RX_FILTER_PRESERVE
 }
 
 /*
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index 284e8c13b0430..552ae9f8bdafc 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -345,8 +345,10 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 	if (ret)
 		goto out;
 
+	wmi->cmds_issued++;
 	time_left = wait_for_completion_timeout(&wmi->cmd_wait, timeout);
 	if (!time_left) {
+		wmi->cmds_timed_out++;
 		ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
 			wmi_cmd_to_name(cmd_id));
 		spin_lock_irqsave(&wmi->wmi_lock, flags);
diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h
index 5c3b710b8f319..ee72b0fba31b2 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.h
+++ b/drivers/net/wireless/ath/ath9k/wmi.h
@@ -158,6 +158,8 @@ struct wmi {
 	u8 *cmd_rsp_buf;
 	u32 cmd_rsp_len;
 	bool stopped;
+	u32 cmds_issued;
+	u32 cmds_timed_out;
 
 	struct list_head pending_tx_events;
 	spinlock_t event_lock;

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

Args:
null

Results:
null

Tokens:
							input: 4379
							output: 37
							thoughts: 207
						

Thoughts:
**Analyzing the Patch for Fuzzing Potential**

Okay, let's dive into this. My initial thought is to assess this patch's fuzzing viability. First, I need to figure out if it's even worth the effort. What configurations are going to be necessary to get this thing up and running for fuzzing? And, critically, what are the key symbols, the focus points, that I should specify to maximize the fuzzing's effectiveness?

Alright, the next step is to examine the modified files. Let's see... we've got:

*   `drivers/net/wireless/ath/ath9k/htc_drv_debug.c`
*   `drivers/net/wireless/ath/ath9k/htc_drv_txrx.c`
*   `drivers/net/wireless/ath/ath9k/wmi.c`
*   `drivers/net/wireless/ath/ath9k/wmi.h`

Okay, so we're dealing with `ath9k_htc`, a USB wireless driver, specifically for Atheros AR9271 and AR7010 chipsets. A lightbulb just went off! The core question here is whether `ath9k_htc` can be reached via USB emulation within a fuzzer like syzkaller. Can we use raw-gadget, the usb-fuzzer, or perhaps vhci or dummy\_hcd to get this driver exercising?

Let's quickly check the Kconfig file for the `ath9k` subsystem to confirm my suspicions and to verify the appropriate dependencies and options.



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

Results:
{
  "Output": "drivers/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=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--\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\n--\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=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-\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3390=static bool ath9k_hw_ar9300_fill_eeprom(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3400-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3401:#if defined(CONFIG_ATH9K_DEBUGFS) || defined(CONFIG_ATH9K_HTC_DEBUGFS)\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3402-static u32 ar9003_dump_modal_eeprom(char *buf, u32 len, u32 size,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=232=static inline void ath9k_skb_queue_complete(struct hif_device_usb *hif_dev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-238-\twhile ((skb = __skb_dequeue(queue)) != NULL) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:239:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/hif_usb.c-240-\t\tint ln = skb-\u003elen;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=376=static int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-399-\t/* Mgmt/Beacon frames don't use the TX buffer pool */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:400:\tif ((tx_ctl-\u003etype == ATH9K_HTC_MGMT) ||\ndrivers/net/wireless/ath/ath9k/hif_usb.c:401:\t    (tx_ctl-\u003etype == ATH9K_HTC_BEACON)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-402-\t\tret = hif_usb_send_mgmt(hif_dev, skb);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-406-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:407:\tif ((tx_ctl-\u003etype == ATH9K_HTC_NORMAL) ||\ndrivers/net/wireless/ath/ath9k/hif_usb.c:408:\t    (tx_ctl-\u003etype == ATH9K_HTC_AMPDU)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-409-\t\t__skb_queue_tail(\u0026hif_dev-\u003etx.tx_skb_queue, skb);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=487=static inline bool check_index(struct sk_buff *skb, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-492-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:493:\tif ((tx_ctl-\u003etype == ATH9K_HTC_AMPDU) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/hif_usb.c-494-\t    (tx_ctl-\u003esta_idx == idx))\n--\ndrivers/net/wireless/ath/ath9k/htc.h=56=enum htc_opmode {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-64-\ndrivers/net/wireless/ath/ath9k/htc.h:65:#define ATH9K_HTC_AMPDU  1\ndrivers/net/wireless/ath/ath9k/htc.h:66:#define ATH9K_HTC_NORMAL 2\ndrivers/net/wireless/ath/ath9k/htc.h:67:#define ATH9K_HTC_BEACON 3\ndrivers/net/wireless/ath/ath9k/htc.h:68:#define ATH9K_HTC_MGMT   4\ndrivers/net/wireless/ath/ath9k/htc.h-69-\ndrivers/net/wireless/ath/ath9k/htc.h:70:#define ATH9K_HTC_TX_CTSONLY      0x1\ndrivers/net/wireless/ath/ath9k/htc.h:71:#define ATH9K_HTC_TX_RTSCTS       0x2\ndrivers/net/wireless/ath/ath9k/htc.h-72-\ndrivers/net/wireless/ath/ath9k/htc.h=73=struct tx_frame_hdr {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-77-\tu8 tidno;\ndrivers/net/wireless/ath/ath9k/htc.h:78:\t__be32 flags; /* ATH9K_HTC_TX_* */\ndrivers/net/wireless/ath/ath9k/htc.h-79-\tu8 key_type;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=194=struct ath9k_htc_target_rx_stats {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-199-\ndrivers/net/wireless/ath/ath9k/htc.h:200:#define ATH9K_HTC_MAX_VIF 2\ndrivers/net/wireless/ath/ath9k/htc.h:201:#define ATH9K_HTC_MAX_BCN_VIF 2\ndrivers/net/wireless/ath/ath9k/htc.h-202-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=249=struct ath9k_vif_iter_data {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-253-\ndrivers/net/wireless/ath/ath9k/htc.h:254:#define ATH9K_HTC_MAX_STA 8\ndrivers/net/wireless/ath/ath9k/htc.h:255:#define ATH9K_HTC_MAX_TID 8\ndrivers/net/wireless/ath/ath9k/htc.h-256-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=264=struct ath9k_htc_sta {\ndrivers/net/wireless/ath/ath9k/htc.h-265-\tu8 index;\ndrivers/net/wireless/ath/ath9k/htc.h:266:\tenum tid_aggr_state tid_state[ATH9K_HTC_MAX_TID];\ndrivers/net/wireless/ath/ath9k/htc.h-267-\tstruct work_struct rc_update_work;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-270-\ndrivers/net/wireless/ath/ath9k/htc.h:271:#define ATH9K_HTC_RXBUF 256\ndrivers/net/wireless/ath/ath9k/htc.h-272-#define HTC_RX_FRAME_HEADER_SIZE 40\n--\ndrivers/net/wireless/ath/ath9k/htc.h=281=struct ath9k_htc_rx {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-286-\ndrivers/net/wireless/ath/ath9k/htc.h:287:#define ATH9K_HTC_TX_CLEANUP_INTERVAL 50 /* ms */\ndrivers/net/wireless/ath/ath9k/htc.h:288:#define ATH9K_HTC_TX_TIMEOUT_INTERVAL 3000 /* ms */\ndrivers/net/wireless/ath/ath9k/htc.h:289:#define ATH9K_HTC_TX_RESERVE 10\ndrivers/net/wireless/ath/ath9k/htc.h:290:#define ATH9K_HTC_TX_TIMEOUT_COUNT 40\ndrivers/net/wireless/ath/ath9k/htc.h:291:#define ATH9K_HTC_TX_THRESHOLD (MAX_TX_BUF_NUM - ATH9K_HTC_TX_RESERVE)\ndrivers/net/wireless/ath/ath9k/htc.h-292-\ndrivers/net/wireless/ath/ath9k/htc.h:293:#define ATH9K_HTC_OP_TX_QUEUES_STOP BIT(0)\ndrivers/net/wireless/ath/ath9k/htc.h:294:#define ATH9K_HTC_OP_TX_DRAIN       BIT(1)\ndrivers/net/wireless/ath/ath9k/htc.h-295-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=311=struct ath9k_htc_tx_ctl {\ndrivers/net/wireless/ath/ath9k/htc.h:312:\tu8 type; /* ATH9K_HTC_* */\ndrivers/net/wireless/ath/ath9k/htc.h-313-\tu8 epid;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=319=static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-327-\ndrivers/net/wireless/ath/ath9k/htc.h:328:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-329-#define __STAT_SAFE(hif_dev, expr)\tdo { ((hif_dev)-\u003ehtc_handle-\u003edrv_priv ? (expr) : 0); } while (0)\n--\ndrivers/net/wireless/ath/ath9k/htc.h=388=static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc.h-392-\ndrivers/net/wireless/ath/ath9k/htc.h:393:#endif /* CONFIG_ATH9K_HTC_DEBUGFS */\ndrivers/net/wireless/ath/ath9k/htc.h-394-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=409=struct htc_beacon {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-415-\ndrivers/net/wireless/ath/ath9k/htc.h:416:\tstruct ieee80211_vif *bslot[ATH9K_HTC_MAX_BCN_VIF];\ndrivers/net/wireless/ath/ath9k/htc.h-417-\tu32 bmisscnt;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=456=struct ath9k_htc_priv {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-478-\tu8 sta_slot;\ndrivers/net/wireless/ath/ath9k/htc.h:479:\tu8 vif_sta_pos[ATH9K_HTC_MAX_VIF];\ndrivers/net/wireless/ath/ath9k/htc.h-480-\tu8 num_ibss_vif;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-535-\tstruct delayed_work duty_cycle_work;\ndrivers/net/wireless/ath/ath9k/htc.h:536:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-537-\tstruct ath9k_debug debug;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=641=int ath9k_htc_resume(struct htc_target *htc_handle);\ndrivers/net/wireless/ath/ath9k/htc.h-642-#endif\ndrivers/net/wireless/ath/ath9k/htc.h:643:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-644-int ath9k_htc_init_debug(struct ath_hw *ah);\n--\ndrivers/net/wireless/ath/ath9k/htc.h=648=static inline void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-650-}\ndrivers/net/wireless/ath/ath9k/htc.h:651:#endif /* CONFIG_ATH9K_HTC_DEBUGFS */\ndrivers/net/wireless/ath/ath9k/htc.h-652-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=111=static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-116-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:117:\tath9k_cmn_beacon_config_ap(ah, conf, ATH9K_HTC_MAX_BCN_VIF);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-118-\tath9k_htc_beacon_init(priv, conf, false);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=191=static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-242-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:243:\ttx_ctl-\u003etype = ATH9K_HTC_BEACON;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-244-\ttx_ctl-\u003eepid = priv-\u003ebeacon_ep;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=264=static int ath9k_htc_choose_bslot(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-276-\ttsftu = TSF_TO_TU(tsf \u003e\u003e 32, tsf);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:277:\tslot = ((tsftu % intval) * ATH9K_HTC_MAX_BCN_VIF) / intval;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:278:\tslot = ATH9K_HTC_MAX_BCN_VIF - slot - 1;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-279-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=325=void ath9k_htc_assign_bslot(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-332-\tspin_lock_bh(\u0026priv-\u003ebeacon_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:333:\tfor (i = 0; i \u003c ATH9K_HTC_MAX_BCN_VIF; i++) {\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-334-\t\tif (priv-\u003ebeacon.bslot[i] == NULL) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=365=void ath9k_htc_set_tsfadjust(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-380-\t */\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:381:\ttsfadjust = cur_conf-\u003ebeacon_interval * avp-\u003ebslot / ATH9K_HTC_MAX_BCN_VIF;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-382-\tavp-\u003etsfadjust = cpu_to_le64(TU_TO_USEC(tsfadjust));\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=421=static const char ath9k_htc_gstrings_stats[][ETH_GSTRING_LEN] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-441-};\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:442:#define ATH9K_HTC_SSTATS_LEN ARRAY_SIZE(ath9k_htc_gstrings_stats)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-443-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=453=int ath9k_htc_get_et_sset_count(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-456-\tif (sset == ETH_SS_STATS)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:457:\t\treturn ATH9K_HTC_SSTATS_LEN;\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-458-\treturn 0;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=471=void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-496-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:497:\tWARN_ON(i != ATH9K_HTC_SSTATS_LEN);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-498-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=606=static int ath9k_init_priv(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-673-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:674:\tfor (i = 0; i \u003c ATH9K_HTC_MAX_BCN_VIF; i++)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-675-\t\tpriv-\u003ebeacon.bslot[i] = NULL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=184=void ath9k_htc_reset(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-233-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:234:\t\t  jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-235-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=240=static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-311-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:312:\t\t  jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-313-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=350=static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-357-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:358:\tif ((priv-\u003envifs \u003e= ATH9K_HTC_MAX_VIF) ||\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:359:\t    (priv-\u003enstations \u003e= ATH9K_HTC_MAX_STA)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-360-\t\tret = -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-364-\tsta_idx = ffz(priv-\u003esta_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:365:\tif ((sta_idx \u003c 0) || (sta_idx \u003e ATH9K_HTC_MAX_STA)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-366-\t\tret = -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=466=static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-477-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:478:\tif (priv-\u003enstations \u003e= ATH9K_HTC_MAX_STA)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-479-\t\treturn -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-481-\tsta_idx = ffz(priv-\u003esta_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:482:\tif ((sta_idx \u003c 0) || (sta_idx \u003e ATH9K_HTC_MAX_STA))\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-483-\t\treturn -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=702=static int ath9k_htc_tx_aggr_oper(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-713-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:714:\tif (tid \u003e= ATH9K_HTC_MAX_TID)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-715-\t\treturn -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=907=static int ath9k_htc_start(struct ieee80211_hw *hw)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-960-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:961:\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-962-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-966-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:967:\t\t  jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-968-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1658=static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1688-\tcase IEEE80211_AMPDU_TX_OPERATIONAL:\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1689:\t\tif (tid \u003e= ATH9K_HTC_MAX_TID) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1690-\t\t\tret = -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1874=struct ieee80211_ops ath9k_htc_ops = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1906-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1907:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1908-\t.get_et_sset_count  = ath9k_htc_get_et_sset_count,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=23=static const int subtype_txq_to_hwq[] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-29-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:30:#define ATH9K_HTC_INIT_TXQ(subtype) do {\t\t\t\\\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-31-\t\tqi.tqi_subtype = subtype_txq_to_hwq[subtype];\t\\\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=56=void ath9k_htc_check_stop_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-59-\tpriv-\u003etx.queued_cnt++;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:60:\tif ((priv-\u003etx.queued_cnt \u003e= ATH9K_HTC_TX_THRESHOLD) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:61:\t    !(priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_QUEUES_STOP)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:62:\t\tpriv-\u003etx.flags |= ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-63-\t\tieee80211_stop_queues(priv-\u003ehw);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=68=void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-70-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:71:\tif ((priv-\u003etx.queued_cnt \u003c ATH9K_HTC_TX_THRESHOLD) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:72:\t    (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_QUEUES_STOP)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:73:\t\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-74-\t\tieee80211_wake_queues(priv-\u003ehw);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=214=static void ath9k_htc_tx_mgmt(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-240-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:241:\ttx_ctl-\u003etype = ATH9K_HTC_MGMT;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-242-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=260=static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-292-\tif (tx_info-\u003eflags \u0026 IEEE80211_TX_CTL_AMPDU) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:293:\t\ttx_ctl-\u003etype = ATH9K_HTC_AMPDU;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:294:\t\ttx_hdr.data_type = ATH9K_HTC_AMPDU;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-295-\t} else {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:296:\t\ttx_ctl-\u003etype = ATH9K_HTC_NORMAL;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:297:\t\ttx_hdr.data_type = ATH9K_HTC_NORMAL;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-298-\t}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-312-\t\tif (skb-\u003elen \u003e priv-\u003ehw-\u003ewiphy-\u003erts_threshold)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:313:\t\t\tflags |= ATH9K_HTC_TX_RTSCTS;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-314-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-315-\t/* CTS-to-self */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:316:\tif (!(flags \u0026 ATH9K_HTC_TX_RTSCTS) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-317-\t    (vif \u0026\u0026 vif-\u003ebss_conf.use_cts_prot))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:318:\t\tflags |= ATH9K_HTC_TX_CTSONLY;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-319-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=392=static inline bool __ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-397-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:398:\tif ((tid \u003c ATH9K_HTC_MAX_TID) \u0026\u0026 (ista-\u003etid_state[tid] == AGGR_STOP))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-399-\t\tret = true;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=445=static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-478-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:479:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_ACK) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-480-\t\ttx_info-\u003eflags |= IEEE80211_TX_STAT_ACK;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-484-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:485:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_FILT)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-486-\t\ttx_info-\u003eflags |= IEEE80211_TX_STAT_TX_FILTERED;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-487-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:488:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_RTC_CTS)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-489-\t\trate-\u003eflags |= IEEE80211_TX_RC_USE_RTS_CTS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-491-\trate-\u003ecount = 1;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:492:\trate-\u003eidx = MS(txs-\u003ets_rate, ATH9K_HTC_TXSTAT_RATE);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-493-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:494:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_MCS) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-495-\t\trate-\u003eflags |= IEEE80211_TX_RC_MCS;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-496-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:497:\t\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_CW40)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-498-\t\t\trate-\u003eflags |= IEEE80211_TX_RC_40_MHZ_WIDTH;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:499:\t\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_SGI)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-500-\t\t\trate-\u003eflags |= IEEE80211_TX_RC_SHORT_GI;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=539=void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-543-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:544:\tpriv-\u003etx.flags |= ATH9K_HTC_OP_TX_DRAIN;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-545-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-573-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:574:\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_DRAIN;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-575-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=578=void ath9k_tx_failed_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-582-\tspin_lock(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:583:\tif (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_DRAIN) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-584-\t\tspin_unlock(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=618=static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-624-\tunsigned long flags;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:625:\tu8 epid = MS(txs-\u003ets_rate, ATH9K_HTC_TXSTAT_EPID);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-626-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=716=static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-724-\t\t       tx_ctl-\u003etimestamp +\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:725:\t\t       msecs_to_jiffies(ATH9K_HTC_TX_TIMEOUT_INTERVAL))) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-726-\t\tath_dbg(common, XMIT, \"Dropping a packet due to TX timeout\\n\");\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=761=void ath9k_htc_tx_cleanup_timer(struct timer_list *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-776-\t\t\t\tevent-\u003etxs.cookie,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:777:\t\t\t\tMS(event-\u003etxs.ts_rate, ATH9K_HTC_TXSTAT_EPID));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-778-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-784-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:785:\t\tif (++event-\u003ecount \u003e= ATH9K_HTC_TX_TIMEOUT_COUNT) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-786-\t\t\tlist_del(\u0026event-\u003elist);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-805-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:806:\t\t  jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-807-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=827=bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-834-\tmemset(\u0026qi, 0, sizeof(qi));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:835:\tATH9K_HTC_INIT_TXQ(subtype);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-836-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=852=int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-856-\tmemset(\u0026qi, 0, sizeof(qi));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:857:\tATH9K_HTC_INIT_TXQ(0);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-858-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=1185=int ath9k_rx_init(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1191-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1192:\tfor (i = 0; i \u003c ATH9K_HTC_RXBUF; i++) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1193-\t\tstruct ath9k_htc_rxbuf *rxbuf =\n--\ndrivers/net/wireless/ath/ath9k/wmi.c=138=void ath9k_wmi_event_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-178-\t\t\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/wmi.c:179:\t\t\tif (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_DRAIN) {\ndrivers/net/wireless/ath/ath9k/wmi.c-180-\t\t\t\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=39=struct wmi_event_swba {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-50-\ndrivers/net/wireless/ath/ath9k/wmi.h:51:#define ATH9K_HTC_TXSTAT_ACK        BIT(0)\ndrivers/net/wireless/ath/ath9k/wmi.h:52:#define ATH9K_HTC_TXSTAT_FILT       BIT(1)\ndrivers/net/wireless/ath/ath9k/wmi.h:53:#define ATH9K_HTC_TXSTAT_RTC_CTS    BIT(2)\ndrivers/net/wireless/ath/ath9k/wmi.h:54:#define ATH9K_HTC_TXSTAT_MCS        BIT(3)\ndrivers/net/wireless/ath/ath9k/wmi.h:55:#define ATH9K_HTC_TXSTAT_CW40       BIT(4)\ndrivers/net/wireless/ath/ath9k/wmi.h:56:#define ATH9K_HTC_TXSTAT_SGI        BIT(5)\ndrivers/net/wireless/ath/ath9k/wmi.h-57-\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-63- */\ndrivers/net/wireless/ath/ath9k/wmi.h:64:#define ATH9K_HTC_TXSTAT_RATE       0x0f\ndrivers/net/wireless/ath/ath9k/wmi.h:65:#define ATH9K_HTC_TXSTAT_RATE_S     0\ndrivers/net/wireless/ath/ath9k/wmi.h-66-\ndrivers/net/wireless/ath/ath9k/wmi.h:67:#define ATH9K_HTC_TXSTAT_EPID       0xf0\ndrivers/net/wireless/ath/ath9k/wmi.h:68:#define ATH9K_HTC_TXSTAT_EPID_S     4\ndrivers/net/wireless/ath/ath9k/wmi.h-69-\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 17429
							output: 42
							thoughts: 25
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating ATH9K_HTC Configuration**

Alright, time to dig into this. The mental model dictates I need to navigate to the driver configuration for the ath9k wireless driver, specifically focusing on the part concerning ATH9K_HTC. This likely means I'm looking for a configuration file, probably named "Kconfig," situated within the "drivers/net/wireless/ath/ath9k/" directory. I'm assuming that "ATH9K_HTC" is a relevant symbol or option within that file, potentially a feature flag, dependency, or a conditional build setting related to the Atheros 9k driver and the Host Transport Controller (HTC) framework. It's probably key to how the ath9k driver interacts with a certain set of hardware or firmware. I'm expecting this to shed light on how this aspect of the driver is enabled, disabled, configured, or its dependencies. Let's see what we can find.



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

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"
}

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

Args:
null

Results:
null

Tokens:
							input: 18271
							output: 43
							thoughts: 479
						

Thoughts:
**Analyzing the ath9k_htc Driver Changes**

Okay, let's break this down. We're looking at modifications to the `ath9k_htc` USB wireless network driver, which, importantly, relies on USB and MAC80211.  Good, that means we can likely poke at it using USB emulation within our standard syzkaller or virtualized environments, specifically using Raw Gadget, dummy_hcd, or vhci. Makes testing this much more manageable.

Now, focusing on the specific code changes, I've identified four key areas:

1.  `drivers/net/wireless/ath/ath9k/htc_drv_debug.c`: This is straightforward. They've added a `read_file_wmi` debugfs handler. Effectively, a new debugfs file `"wmi"` has been created inside `ath9k_htc_init_debug`. This is potentially interesting for debugging purposes; a new mechanism for retrieving information.

2.  `drivers/net/wireless/ath/ath9k/htc_drv_txrx.c`: The change to `ath9k_htc_calcrxfilter` is the most important to understand because it modifies how we compute the receive filter.  Originally, the filter logic preserved an existing `RX_FILTER_PRESERVE` mask.  Now, that has been removed.  Instead, `ATH9K_RX_FILTER_UCAST`, `ATH9K_RX_FILTER_BCAST`, and `ATH9K_RX_FILTER_MCAST` are always enabled. Critically, there's also now a conditional that includes `ATH9K_RX_FILTER_PHYRADAR` and `ATH9K_RX_FILTER_PHYERR` only if `priv->spec_priv.spectral_mode` is *not* `SPECTRAL_DISABLED`. This is a big change, potentially impacting how the driver handles certain types of packets or interference detection, but only when spectral mode is enabled. I need to investigate the implications of this change on the RX behavior. I wonder how it interacts with the base filter settings, which are no longer preserved?

3.  `drivers/net/wireless/ath/ath9k/wmi.c`:  Here, `ath9k_wmi_cmd` now increments counters `wmi->cmds_issued` and `wmi->cmds_timed_out` when timeouts occur. This suggests that there were potential issues with command timeouts. These counters will likely give insights into the command failures or network instabilities.

4.  `drivers/net/wireless/ath/ath9k/wmi.h`:  This is just the addition of `cmds_issued` and `cmds_timed_out` to the `struct wmi`. The support for the updated command tracking.

So, where is `ath9k_htc_calcrxfilter` called?  I need to figure out what's *calling* that RX filter function. That's the next step; understanding the context of the RX filter calculation will clarify the impact of the change.



8/2 2026/09/06 06:41 tool grepper
0m Args:
{
  "Expression": "ath9k_htc_calcrxfilter",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc.h=599=void ath9k_rx_tasklet(struct tasklet_struct *t);\ndrivers/net/wireless/ath/ath9k/htc.h:600:u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-601-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1257=static void ath9k_htc_configure_filter(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1277-\tpriv-\u003erxfilter = *total_flags;\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1278:\trfilt = ath9k_htc_calcrxfilter(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1279-\tath9k_hw_setrxfilter(priv-\u003eah, rfilt);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=852=int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-868- */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:869:u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-870-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=914=static void ath9k_htc_opmode_init(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-919-\t/* configure rx filter */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:920:\trfilt = ath9k_htc_calcrxfilter(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-921-\tath9k_hw_setrxfilter(ah, rfilt);\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 20111
							output: 42
							thoughts: 123
						

Thoughts:
**Debugging a Potential Null Pointer Dereference**

Okay, time to dive in. I need to make sure `read_file_wmi` and `ath9k_htc_init_debug` are behaving as expected. Let's see... looking at the code, it seems `read_file_wmi` is directly accessing `priv->wmi->cmds_issued` and `priv->wmi->cmds_timed_out`. *Hold on a minute.* The nagging question is: what if `priv->wmi` is NULL at that point? Is there a condition that guarantees that `priv->wmi` is always initialized before `read_file_wmi` is ever called? Does the debugfs initialization or file creation somehow guarantee that `priv->wmi` is non-NULL? I need to check those initialization paths. I better go through `htc_drv_init.c` and `htc_drv_debug.c` to trace the variable's lifecycle. I'll probably be hunting for where `priv->wmi` is allocated and assigned.



10/2 2026/09/06 06:41 tool grepper
0m Args:
{
  "Expression": "ath9k_htc_init_debug",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc.h=641=int ath9k_htc_resume(struct htc_target *htc_handle);\n--\ndrivers/net/wireless/ath/ath9k/htc.h-643-#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h:644:int ath9k_htc_init_debug(struct ath_hw *ah);\ndrivers/net/wireless/ath/ath9k/htc.h-645-void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-646-#else\ndrivers/net/wireless/ath/ath9k/htc.h:647:static inline int ath9k_htc_init_debug(struct ath_hw *ah) { return 0; };\ndrivers/net/wireless/ath/ath9k/htc.h-648-static inline void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=500=void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-504-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:505:int ath9k_htc_init_debug(struct ath_hw *ah)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-506-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=828=static int ath9k_init_device(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-888-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:889:\terror = ath9k_htc_init_debug(priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-890-\tif (error) {\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 21111
							output: 35
							thoughts: 973
						

Thoughts:
**Analysis of Ath9k_htc Driver Patch for Fuzzing Suitability**

Okay, let's break this down. My initial thought is to examine this patch targeting the `ath9k_htc` driver, specifically focusing on `ath9k_htc_calcrxfilter`, `ath9k_wmi_cmd`, and `read_file_wmi`. The key question is whether the modified code is actually reachable by syzkaller fuzzing.

My analysis immediately points to a positive answer. USB wifi devices can be emulated via USB Raw Gadget within syzkaller's USB fuzzing capabilities. I know that `mac80211` and `nl80211` syscalls, combined with debugfs reads, can interact with `ath9k_htc`. Furthermore, `ath9k_htc_calcrxfilter` gets called during packet filter configuration and opmode initialization.  `ath9k_wmi_cmd` is directly involved whenever a WMI command is sent to the firmware over USB, and `read_file_wmi` is a debugfs read handler.

Now, let's apply the established criteria: "WorthFuzzing=true" if the patch impacts reachable executable code, especially within drivers accessible via virtual buses. Since `ath9k_htc` is a USB wireless driver, perfectly reachable through USB emulation, and given that the patch modifies RX filter logic, adds WMI stats, and provides a debugfs interface, this clearly hits the "reachable executable code" criteria. WorthFuzzing has to be set to true.

Next, I need to list the FocusSymbols, so I will list the modified symbols: `ath9k_htc_calcrxfilter`, `ath9k_wmi_cmd`, and `read_file_wmi`. Also, the function that creates the debugfs file, `ath9k_htc_init_debug`, needs to be added.

Now the static vs. non-static symbols are important. `read_file_wmi` is declared as static within `htc_drv_debug.c`. However, since its address is taken and used in `fops_wmi.read = read_file_wmi`, it will be a distinct symbol in the kernel image or module. On the other hand, `ath9k_htc_calcrxfilter`, `ath9k_wmi_cmd`, and `ath9k_htc_init_debug` are non-static symbols.

So, let's confirm the complete set of symbols: `read_file_wmi`, `ath9k_htc_init_debug`, `ath9k_htc_calcrxfilter`, and `ath9k_wmi_cmd`.

Finally, configuration dependencies are important. I'll need to double-check the Kconfig. `ATH9K_HTC` depends on both `USB` and `MAC80211`, which are expected. `ATH9K_HTC_DEBUGFS` then depends on `ATH9K_HTC` and `DEBUG_FS`. And `ATH9K_COMMON_SPECTRAL` depends on either `ATH9K_DEBUGFS` or `ATH9K_HTC_DEBUGFS`. I note that in `ath9k_htc_calcrxfilter`, the code references `spec_priv.spectral_mode`. I need to grep for both `spec_priv` and `spectral_mode` to ensure no other dependencies are involved.



12/2 2026/09/06 06:41 tool grepper
0m Args:
{
  "Expression": "spec_priv",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/ath9k.h=983=struct ath_softc {\n--\ndrivers/net/wireless/ath/ath9k/ath9k.h-1063-\ndrivers/net/wireless/ath/ath9k/ath9k.h:1064:\tstruct ath_spec_scan_priv spec_priv;\ndrivers/net/wireless/ath/ath9k/ath9k.h-1065-\n--\ndrivers/net/wireless/ath/ath9k/channel.c=23=static int ath_set_channel(struct ath_softc *sc)\n--\ndrivers/net/wireless/ath/ath9k/channel.c-95-\t\tif (test_bit(ATH_OP_SCANNING, \u0026common-\u003eop_flags) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/channel.c:96:\t\t\tsc-\u003espec_priv.spectral_mode == SPECTRAL_CHANSCAN)\ndrivers/net/wireless/ath/ath9k/channel.c:97:\t\t\tath9k_cmn_spectral_scan_trigger(common, \u0026sc-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/channel.c-98-\t}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=22=static s8 fix_rssi_inv_only(u8 rssi_val)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-28-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:29:static void ath_debug_send_fft_sample(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-30-\t\t\t\t      struct fft_sample_tlv *fft_sample_tlv)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-32-\tint length;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:33:\tif (!spec_priv-\u003erfs_chan_spec_scan)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-34-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-37-\t\t sizeof(*fft_sample_tlv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:38:\trelay_write(spec_priv-\u003erfs_chan_spec_scan, fft_sample_tlv, length);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-39-}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=127=typedef int (ath_cmn_fft_sample_handler) (struct ath_rx_status *rs,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:128:\t\t\tstruct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-129-\t\t\tu8 *sample_buf, u64 tsf, u16 freq, int chan_type);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=132=ath_cmn_process_ht20_fft(struct ath_rx_status *rs,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:133:\t\t\tstruct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-134-\t\t\tu8 *sample_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-137-\tstruct fft_sample_ht20 fft_sample_20;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:138:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:139:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-140-\tstruct ath_ht20_mag_info *mag_info;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-229-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:230:\tath_debug_send_fft_sample(spec_priv, tlv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-231-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=236=ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:237:\t\t\tstruct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-238-\t\t\tu8 *sample_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-241-\tstruct fft_sample_ht20_40 fft_sample_40;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:242:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:243:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-244-\tstruct ath9k_hw_cal_data *caldata = ah-\u003ecaldata;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-406-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:407:\tath_debug_send_fft_sample(spec_priv, tlv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-408-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=448=static int\ndrivers/net/wireless/ath/ath9k/common-spectral.c:449:ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-450-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-453-\tstruct rchan_buf *buf;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:454:\tstruct rchan *rc = spec_priv-\u003erfs_chan_spec_scan;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-455-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-468-/* returns 1 if this was a spectral frame, even if not handled. */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:469:int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-470-\t\t    struct ath_rx_status *rs, u64 tsf)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-472-\tu8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};\ndrivers/net/wireless/ath/ath9k/common-spectral.c:473:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:474:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-475-\tstruct ath_softc *sc = common-\u003epriv;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-504-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:505:\tif (!spec_priv-\u003erfs_chan_spec_scan)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-506-\t\treturn 1;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-510-\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:511:\tret = ath_cmn_is_fft_buf_full(spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-512-\tif (ret == 1) {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-623-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:624:\t\t\t\tret = fft_handler(rs, spec_priv, sample_buf,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-625-\t\t\t\t\t\t  tsf, freq, chan_type);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-641-\t\t\tif (sample_bytes == sample_len) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:642:\t\t\t\tret = fft_handler(rs, spec_priv, sample_start,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-643-\t\t\t\t\t\t  tsf, freq, chan_type);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=690=static ssize_t read_file_spec_scan_ctl(struct file *file, char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-692-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:693:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-694-\tchar *mode = \"\";\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-696-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:697:\tswitch (spec_priv-\u003espectral_mode) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c-698-\tcase SPECTRAL_DISABLED:\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=715=void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:716:\t\t\t\t struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-717-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:718:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-719-\tu32 rxfilter;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-728-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:729:\tif (!spec_priv-\u003espec_config.enabled)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-730-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-742-\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:743:\tath9k_cmn_spectral_scan_config(common, spec_priv, spec_priv-\u003espectral_mode);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-744-\tath9k_hw_ops(ah)-\u003espectral_scan_trigger(ah);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=749=int ath9k_cmn_spectral_scan_config(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:750:\t\t\t       struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-751-\t\t\t       enum spectral_mode spectral_mode)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-752-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:753:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-754-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-761-\tcase SPECTRAL_DISABLED:\ndrivers/net/wireless/ath/ath9k/common-spectral.c:762:\t\tspec_priv-\u003espec_config.enabled = 0;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-763-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-767-\t\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:768:\t\tspec_priv-\u003espec_config.endless = 1;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:769:\t\tspec_priv-\u003espec_config.enabled = 1;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-770-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-772-\tcase SPECTRAL_MANUAL:\ndrivers/net/wireless/ath/ath9k/common-spectral.c:773:\t\tspec_priv-\u003espec_config.endless = 0;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:774:\t\tspec_priv-\u003espec_config.enabled = 1;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-775-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-780-\tath_ps_ops(common)-\u003ewakeup(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:781:\tath9k_hw_ops(ah)-\u003espectral_scan_config(ah, \u0026spec_priv-\u003espec_config);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-782-\tath_ps_ops(common)-\u003erestore(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-783-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:784:\tspec_priv-\u003espectral_mode = spectral_mode;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-785-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=790=static ssize_t write_file_spec_scan_ctl(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-793-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:794:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:795:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-796-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-808-\tif (strncmp(\"trigger\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:809:\t\tath9k_cmn_spectral_scan_trigger(common, spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-810-\t} else if (strncmp(\"background\", buf, 10) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:811:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_BACKGROUND);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-812-\t\tath_dbg(common, CONFIG, \"spectral scan: background mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-813-\t} else if (strncmp(\"chanscan\", buf, 8) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:814:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_CHANSCAN);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-815-\t\tath_dbg(common, CONFIG, \"spectral scan: channel scan mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-816-\t} else if (strncmp(\"manual\", buf, 6) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:817:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_MANUAL);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-818-\t\tath_dbg(common, CONFIG, \"spectral scan: manual mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-819-\t} else if (strncmp(\"disable\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:820:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_DISABLED);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-821-\t\tath_dbg(common, CONFIG, \"spectral scan: disabled\\n\");\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=841=static ssize_t read_file_spectral_short_repeat(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-844-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:845:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-846-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-848-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:849:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.short_repeat);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-850-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=853=static ssize_t write_file_spectral_short_repeat(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-856-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:857:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-858-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-867-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:868:\tspec_priv-\u003espec_config.short_repeat = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-869-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=884=static ssize_t read_file_spectral_count(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-887-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:888:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-889-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-891-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:892:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.count);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-893-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=896=static ssize_t write_file_spectral_count(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-899-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:900:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-901-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-909-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:910:\tspec_priv-\u003espec_config.count = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-911-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=926=static ssize_t read_file_spectral_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-929-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:930:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-931-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-933-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:934:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.period);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-935-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=938=static ssize_t write_file_spectral_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-941-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:942:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-943-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-952-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:953:\tspec_priv-\u003espec_config.period = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-954-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=969=static ssize_t read_file_spectral_fft_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-972-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:973:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-974-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-976-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:977:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.fft_period);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-978-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=981=static ssize_t write_file_spectral_fft_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-984-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:985:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-986-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-995-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:996:\tspec_priv-\u003espec_config.fft_period = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-997-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=1036=static const struct rchan_callbacks rfs_spec_scan_cb = {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1044-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1045:void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1046-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1047:\tif (spec_priv-\u003erfs_chan_spec_scan) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1048:\t\trelay_close(spec_priv-\u003erfs_chan_spec_scan);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1049:\t\tspec_priv-\u003erfs_chan_spec_scan = NULL;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1050-\t}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=1052=EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1053-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1054:void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1055-\t\t\t\t   struct dentry *debugfs_phy)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1056-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1057:\tspec_priv-\u003erfs_chan_spec_scan = relay_open(\"spectral_scan\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1058-\t\t\t\t\t    debugfs_phy,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1060-\t\t\t\t\t    NULL);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1061:\tif (!spec_priv-\u003erfs_chan_spec_scan)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1062-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1065-\t\t\t    0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1066:\t\t\t    debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1067-\t\t\t    \u0026fops_spec_scan_ctl);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1069-\t\t\t    0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1070:\t\t\t    debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1071-\t\t\t    \u0026fops_spectral_short_repeat);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1073-\t\t\t    0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1074:\t\t\t    debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1075-\t\t\t    \u0026fops_spectral_count);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1077-\t\t\t    0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1078:\t\t\t    debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1079-\t\t\t    \u0026fops_spectral_period);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1081-\t\t\t    0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1082:\t\t\t    debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1083-\t\t\t    \u0026fops_spectral_fft_period);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h=166=static inline u8 spectral_bitmap_weight(u8 *bins)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-171-#ifdef CONFIG_ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/common-spectral.h:172:void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);\ndrivers/net/wireless/ath/ath9k/common-spectral.h:173:void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-174-\ndrivers/net/wireless/ath/ath9k/common-spectral.h=175=void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.h:176:\t\t\t\t struct ath_spec_scan_priv *spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-177-int ath9k_cmn_spectral_scan_config(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.h:178:\t\t\t       struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-179-\t\t\t       enum spectral_mode spectral_mode);\ndrivers/net/wireless/ath/ath9k/common-spectral.h:180:int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-181-\t\t    struct ath_rx_status *rs, u64 tsf);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-182-#else\ndrivers/net/wireless/ath/ath9k/common-spectral.h:183:static inline void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-184-\t\t\t\t\t\t struct dentry *debugfs_phy)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-187-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:188:static inline void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-189-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h=192=static inline void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.h:193:\t\t\t\t\t\t   struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-194-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-196-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:197:static inline int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-198-\t\t\t\t      struct ieee80211_hdr *hdr,\n--\ndrivers/net/wireless/ath/ath9k/debug.c=1372=void ath9k_deinit_debug(struct ath_softc *sc)\ndrivers/net/wireless/ath/ath9k/debug.c-1373-{\ndrivers/net/wireless/ath/ath9k/debug.c:1374:\tath9k_cmn_spectral_deinit_debug(\u0026sc-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/debug.c-1375-}\n--\ndrivers/net/wireless/ath/ath9k/debug.c=1377=int ath9k_init_debug(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/debug.c-1391-\tath9k_tx99_init_debug(sc);\ndrivers/net/wireless/ath/ath9k/debug.c:1392:\tath9k_cmn_spectral_init_debug(\u0026sc-\u003espec_priv, sc-\u003edebug.debugfs_phy);\ndrivers/net/wireless/ath/ath9k/debug.c-1393-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=456=struct ath9k_htc_priv {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-496-\tstruct ath9k_hw_cal_data caldata;\ndrivers/net/wireless/ath/ath9k/htc.h:497:\tstruct ath_spec_scan_priv spec_priv;\ndrivers/net/wireless/ath/ath9k/htc.h-498-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=500=void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-501-{\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:502:\tath9k_cmn_spectral_deinit_debug(\u0026priv-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-503-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=505=int ath9k_htc_init_debug(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-512-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:513:\tath9k_cmn_spectral_init_debug(\u0026priv-\u003espec_priv, priv-\u003edebug.debugfs_phy);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-514-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=588=static void ath9k_init_misc(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-596-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:597:\tpriv-\u003espec_priv.ah = priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:598:\tpriv-\u003espec_priv.spec_config.enabled = 0;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:599:\tpriv-\u003espec_priv.spec_config.short_repeat = true;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:600:\tpriv-\u003espec_priv.spec_config.count = 8;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:601:\tpriv-\u003espec_priv.spec_config.endless = false;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:602:\tpriv-\u003espec_priv.spec_config.period = 0x12;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:603:\tpriv-\u003espec_priv.spec_config.fft_period = 0x02;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-604-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=240=static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-315-\tif (test_bit(ATH_OP_SCANNING, \u0026common-\u003eop_flags) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:316:\t\t     priv-\u003espec_priv.spectral_mode == SPECTRAL_CHANSCAN)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:317:\t\tath9k_cmn_spectral_scan_trigger(common, \u0026priv-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-318-err:\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=869=u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-876-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:877:\tif (priv-\u003espec_priv.spectral_mode != SPECTRAL_DISABLED)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-878-\t\trfilt |= ATH9K_RX_FILTER_PHYRADAR | ATH9K_RX_FILTER_PHYERR;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=970=static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1045-\t\t/* TODO: Not using DFS processing now. */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1046:\t\tif (ath_cmn_process_fft(\u0026priv-\u003espec_priv, hdr,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1047-\t\t\t\t    \u0026rx_stats, rx_status-\u003emactime)) {\n--\ndrivers/net/wireless/ath/ath9k/init.c=420=static void ath9k_init_misc(struct ath_softc *sc)\n--\ndrivers/net/wireless/ath/ath9k/init.c-436-\ndrivers/net/wireless/ath/ath9k/init.c:437:\tsc-\u003espec_priv.ah = sc-\u003esc_ah;\ndrivers/net/wireless/ath/ath9k/init.c:438:\tsc-\u003espec_priv.spec_config.enabled = 0;\ndrivers/net/wireless/ath/ath9k/init.c:439:\tsc-\u003espec_priv.spec_config.short_repeat = true;\ndrivers/net/wireless/ath/ath9k/init.c:440:\tsc-\u003espec_priv.spec_config.count = 8;\ndrivers/net/wireless/ath/ath9k/init.c:441:\tsc-\u003espec_priv.spec_config.endless = false;\ndrivers/net/wireless/ath/ath9k/init.c:442:\tsc-\u003espec_priv.spec_config.period = 0xFF;\ndrivers/net/wireless/ath/ath9k/init.c:443:\tsc-\u003espec_priv.spec_config.fft_period = 0xF;\ndrivers/net/wireless/ath/ath9k/init.c-444-}\n--\ndrivers/net/wireless/ath/ath9k/recv.c=806=static int ath9k_rx_skb_preprocess(struct ath_softc *sc,\n--\ndrivers/net/wireless/ath/ath9k/recv.c-882-\t\t\t\t\t\t rx_status-\u003emactime);\ndrivers/net/wireless/ath/ath9k/recv.c:883:\t\t} else if (sc-\u003espec_priv.spectral_mode != SPECTRAL_DISABLED \u0026\u0026\ndrivers/net/wireless/ath/ath9k/recv.c:884:\t\t\t   ath_cmn_process_fft(\u0026sc-\u003espec_priv, hdr, rx_stats,\ndrivers/net/wireless/ath/ath9k/recv.c-885-\t\t\t\t\t       rx_status-\u003emactime)) {\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 33807
							output: 203
							thoughts: 561
						

Thoughts:
**My Fuzzing Strategy: ath9k_htc Driver**

Okay, here's the rundown. I've been dissecting the `ath9k_htc` driver, and I've zeroed in on what configurations and symbols are relevant for fuzzing.

First, I identified the key configurations: `ATH9K_HTC` and `ATH9K_HTC_DEBUGFS`. I found these by tracing the compilation paths of functions like `htc_drv_debug.c`, which is only built with `CONFIG_ATH9K_HTC_DEBUGFS` enabled, and `htc_drv_txrx.c` and `wmi.c`, which are linked with `CONFIG_ATH9K_HTC`.

I confirmed that `ATH9K_HTC_DEBUGFS` depends on `ATH9K_HTC` and `DEBUG_FS` in the Kconfig, and `ATH9K_HTC` itself depends on `USB` and `MAC80211`. So, we're dealing with a specific subset of functionality tied to these dependencies. I also checked if there are other relevant configurations like `ATH9K_COMMON_SPECTRAL`.

Next, I looked at the specific symbols I wanted to target: `ath9k_htc_calcrxfilter`, `ath9k_wmi_cmd`, `read_file_wmi`, and `ath9k_htc_init_debug`. My analysis indicates that these are not general-purpose functions (e.g., memory allocators, lock primitives) but are very specific to the `ath9k_htc` wireless driver. That's good, because they provide a focused target.

Therefore, the set of configurations, symbols, and values for the fuzzing analysis are:

*   **WorthFuzzing:** true
*   **EnableConfigs:** `["ATH9K_HTC", "ATH9K_HTC_DEBUGFS"]`
*   **FocusSymbols:** `["ath9k_htc_calcrxfilter", "ath9k_wmi_cmd", "read_file_wmi", "ath9k_htc_init_debug"]`
*   **Reasoning:** Concise explanation of the changes and why they are reachable and worth fuzzing.

I'm confident in this approach. Time to call `set-results`.



14/2 2026/09/06 06:41 tool set-results
0m Args:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "ATH9K_HTC_DEBUGFS"
  ],
  "FocusSymbols": [
    "ath9k_htc_calcrxfilter",
    "ath9k_wmi_cmd",
    "read_file_wmi",
    "ath9k_htc_init_debug"
  ],
  "Reasoning": "The patch modifies the Atheros ath9k_htc USB wireless driver by updating the RX filter calculation logic (ath9k_htc_calcrxfilter) to check spectral mode, tracking issued and timed out WMI command statistics in ath9k_wmi_cmd, and exposing them via a new debugfs entry (read_file_wmi). Since ath9k_htc is accessible via USB device emulation (e.g. Raw Gadget), the modified code paths are reachable and worth fuzzing.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "ATH9K_HTC_DEBUGFS"
  ],
  "FocusSymbols": [
    "ath9k_htc_calcrxfilter",
    "ath9k_wmi_cmd",
    "read_file_wmi",
    "ath9k_htc_init_debug"
  ],
  "Reasoning": "The patch modifies the Atheros ath9k_htc USB wireless driver by updating the RX filter calculation logic (ath9k_htc_calcrxfilter) to check spectral mode, tracking issued and timed out WMI command statistics in ath9k_wmi_cmd, and exposing them via a new debugfs entry (read_file_wmi). Since ath9k_htc is accessible via USB device emulation (e.g. Raw Gadget), the modified code paths are reachable and worth fuzzing.",
  "WorthFuzzing": true
}

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

Results:
null

16/2 2026/09/06 06:41 agent kmsan-evaluator
0m Model:
core

Args:
null

Results:
{
  "KMSANReasoning": "The patch introduces a debugfs file (\"wmi\") to report WMI command statistics, adds two counter fields to `struct wmi` (`cmds_issued` and `cmds_timed_out`), and updates RX filter flag calculations in `ath9k_htc_calcrxfilter`.\n\n1. `struct wmi` is allocated via `kzalloc_obj`, so the new counter fields are guaranteed to be zero-initialized upon creation.\n2. In `read_file_wmi`, `scnprintf` formats the counters into a local buffer and returns the exact number of bytes written (`len`), which is then passed to `simple_read_from_buffer`. No uninitialized stack bytes are copied to user space.\n3. The modifications in `ath9k_htc_calcrxfilter` only alter bitwise flag operations on initialized variables.\n\nThere are no uninitialized memory reads, info-leaks, or branching on uninitialized data introduced by this patch. Therefore, standard KASAN/lockdep testing is sufficient and a dedicated KMSAN fuzzing session is not required.",
  "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 241d20c7132376ea36819615bdc378668dc3787a
Author: syz-cluster <triage@syzkaller.com>
Date:   Sun Sep 6 06:41:11 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index 9437d69877cc5..fab613199ca28 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -310,6 +310,29 @@ static const struct file_operations fops_slot = {
 	.llseek = default_llseek,
 };
 
+static ssize_t read_file_wmi(struct file *file, char __user *user_buf,
+			     size_t count, loff_t *ppos)
+{
+	struct ath9k_htc_priv *priv = file->private_data;
+	char buf[128];
+	unsigned int len;
+
+	len = scnprintf(buf, sizeof(buf),
+			"%20s : %10u\n"
+			"%20s : %10u\n",
+			"Issued", priv->wmi->cmds_issued,
+			"Timeouts", priv->wmi->cmds_timed_out);
+
+	return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static const struct file_operations fops_wmi = {
+	.read = read_file_wmi,
+	.open = simple_open,
+	.owner = THIS_MODULE,
+	.llseek = default_llseek,
+};
+
 static ssize_t read_file_queue(struct file *file, char __user *user_buf,
 			       size_t count, loff_t *ppos)
 {
@@ -505,6 +528,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
 
 	debugfs_create_file("slot", 0400, priv->debug.debugfs_phy,
 			    priv, &fops_slot);
+	debugfs_create_file("wmi", 0400, priv->debug.debugfs_phy,
+			    priv, &fops_wmi);
 	debugfs_create_file("queue", 0400, priv->debug.debugfs_phy,
 			    priv, &fops_queue);
 	debugfs_create_file("debug", 0600, priv->debug.debugfs_phy,
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index bed7ea2425a0e..299064a7fa492 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -868,14 +868,14 @@ int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)
  */
 u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
 {
-#define	RX_FILTER_PRESERVE (ATH9K_RX_FILTER_PHYERR | ATH9K_RX_FILTER_PHYRADAR)
-
 	struct ath_hw *ah = priv->ah;
 	u32 rfilt;
 
-	rfilt = (ath9k_hw_getrxfilter(ah) & RX_FILTER_PRESERVE)
-		| ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
-		| ATH9K_RX_FILTER_MCAST;
+	rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST |
+		ATH9K_RX_FILTER_MCAST;
+
+	if (priv->spec_priv.spectral_mode != SPECTRAL_DISABLED)
+		rfilt |= ATH9K_RX_FILTER_PHYRADAR | ATH9K_RX_FILTER_PHYERR;
 
 	if (priv->rxfilter & FIF_PROBE_REQ)
 		rfilt |= ATH9K_RX_FILTER_PROBEREQ;
@@ -906,8 +906,6 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
 		rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
 
 	return rfilt;
-
-#undef RX_FILTER_PRESERVE
 }
 
 /*
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index 284e8c13b0430..552ae9f8bdafc 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -345,8 +345,10 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 	if (ret)
 		goto out;
 
+	wmi->cmds_issued++;
 	time_left = wait_for_completion_timeout(&wmi->cmd_wait, timeout);
 	if (!time_left) {
+		wmi->cmds_timed_out++;
 		ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
 			wmi_cmd_to_name(cmd_id));
 		spin_lock_irqsave(&wmi->wmi_lock, flags);
diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h
index 5c3b710b8f319..ee72b0fba31b2 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.h
+++ b/drivers/net/wireless/ath/ath9k/wmi.h
@@ -158,6 +158,8 @@ struct wmi {
 	u8 *cmd_rsp_buf;
 	u32 cmd_rsp_len;
 	bool stopped;
+	u32 cmds_issued;
+	u32 cmds_timed_out;
 
 	struct list_head pending_tx_events;
 	spinlock_t event_lock;

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

Args:
null

Results:
null

Tokens:
							input: 3591
							output: 22
							thoughts: 714
						

Thoughts:
**KMSAN Evaluation for ath9k_htc Patch Series**

Okay, so I've got a patch series here for the `ath9k_htc` driver, and the task is to determine if it warrants a dedicated KMSAN fuzzing session. Let's break this down. From a security perspective, this is a benign, defensive code review, so the action is to fully fulfill the request.

First, I need to understand the changes. It looks like we have a few files affected:

*   **`htc_drv_debug.c`**: This is adding a debug file called "wmi" under debugfs. The `read_file_wmi` function uses `scnprintf` to format some WMI statistics (commands issued and timeouts) into a buffer (`buf`), and then copies it to userspace using `simple_read_from_buffer`. This is standard debugfs stuff. Nothing immediately jumps out as KMSAN-worthy here, but let's keep an eye on buffer sizes and potential integer overflows in the statistics.
*   **`htc_drv_txrx.c`**: This modifies the RX filter calculation. It's now checking for a `spectral_mode` and conditionally setting `ATH9K_RX_FILTER_PHYRADAR` and `ATH9K_RX_FILTER_PHYERR`. This is a bit more interesting from a functional perspective; it's related to radar detection and PHY errors, which can involve complex hardware interactions, but on its own, does not raise any KMSAN red flags.
*   **`wmi.c`**: This increments `cmds_issued` and `cmds_timed_out` counters. This is expected, but I want to see *how* these counters are used. Are they used in any arithmetic, or used as array indices?
*   **`wmi.h`**: This adds the `cmds_issued` and `cmds_timed_out` fields to the `struct wmi`. Okay, this helps.

Now, the critical question is the allocation and initialization of the `struct wmi`. The buffer in the debugfs entry looks small, but that means it could have issues if the counters overflow and we don't have sanitization to handle those edge cases. I need to understand the lifecycle of this `struct wmi`. Is it allocated on the stack, statically, or dynamically? If dynamically, where? The `grepper` tool is my best friend here. I'll search for `ath9k_wmi_init`, `kzalloc struct wmi`, or similar patterns to trace where `struct wmi` is created, initialized and how it's handled. Based on the allocation, I can consider how it's referenced and if a race condition is possible in the usage of the counters. This will inform my decision on whether a KMSAN session is truly needed, to evaluate read-after-free, uninitialized-value or buffer-overflow-based memory errors.



18/3 2026/09/06 06:42 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "ath9k_wmi_init"
}

Results:
{
  "error": "no matches"
}

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

Args:
null

Results:
null

Tokens:
							input: 4972
							output: 36
							thoughts: 26
						

Thoughts:
Here's my thought process, summarized as if I were considering the provided search query:

**Analyzing the Search Query: `struct wmi` Allocation in `drivers/net/wireless/ath/ath9k/`**

Okay, so I'm presented with a focused search. The core concern is the allocation of a `struct wmi` within a specific area of the kernel, specifically the Atheros (ath9k) wireless driver. This is interesting. The fact that they are looking at allocation implies they are likely debugging a memory-related issue, a potential memory leak, or perhaps analyzing how the WMI interface is being initialized.

The `struct wmi` itself is a key data structure. I'd need to remember what it represents in the Atheros context – likely related to the Wireless Management Interface. Knowing its purpose is critical; it informs my next steps. Are we looking at *where* it's allocated, *how often*, or perhaps how it's handled during device initialization, data transfer, or shutdown?

The `drivers/net/wireless/ath/ath9k/` directory is the target. This narrows the scope *significantly*. I'm thinking about the typical files in this directory: likely various .c files, header files, and possibly some platform-specific code. I'll need to use search tools like `grep`, `git grep`, or even a code-browsing tool like `LXR` to perform the actual search. Knowing the exact file names within that path isn't necessary, but helps to be methodical in my approach.

I'll be looking for common allocation functions: `kmalloc`, `kzalloc`, `vmalloc`, or perhaps custom allocator functions defined within that code base. I also need to consider placement new operators, if C++ is being used in the driver. The surrounding code is likely more important than the exact allocation. What are the calling functions? Where is the allocated structure stored? What are the synchronization primitives around its usage?

Ultimately, this request points to a deeper dive into the memory management and potentially the lifecycle of a key data structure within an important kernel driver. I'm ready to dig in.



20/3 2026/09/06 06:42 tool grepper
0m Args:
{
  "Expression": "kzalloc.*wmi",
  "PathPrefix": "drivers/net/wireless/ath/ath9k"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/wmi.c=91=struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-94-\ndrivers/net/wireless/ath/ath9k/wmi.c:95:\twmi = kzalloc_obj(struct wmi);\ndrivers/net/wireless/ath/ath9k/wmi.c-96-\tif (!wmi)\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 5631
							output: 256
							thoughts: 848
						

Thoughts:
**Uninitialized Memory Risk Assessment**

Okay, let's break this down. First, the `wmi` struct. It's allocated with `kzalloc_obj`, which is key. That means `cmds_issued` and `cmds_timed_out` are guaranteed to be zero-initialized right off the bat. No worries there.

Now, `read_file_wmi`. I'm using `scnprintf` to format the data into a buffer `buf`. `scnprintf` gives me the length, `len`, of the formatted string. Then, `simple_read_from_buffer` is used, reading exactly `len` bytes from `buf` to the user buffer. `scnprintf` guarantees that `buf`'s first `len` bytes are initialized, so there's no way `simple_read_from_buffer` is going to leak uninitialized data. Perfect.

Next, `ath9k_htc_calcrxfilter`. This one seems straightforward. It's just boolean logic on `spectral_mode` and some bitwise arithmetic. `rfilt` is initialized to `ATH9K_RX_FILTER_UCAST` and then bitwise OR'd.  No uninitialized memory is involved at any point.

I want to do a thorough check of `priv->spec_priv.spectral_mode` and `priv->rxfilter`, but at first glance, the code is using them as one would expect. Nothing jumps out as problematic in the immediate context of these changes.

Alright, let's zoom out and consider the patch as a whole. What have we got? `ath9k_htc_calcrxfilter` is just simple bit manipulation. `ath9k_wmi_cmd` is incrementing counters in the `wmi` struct. `read_file_wmi` is the reading the counters, formatting the output, and using `simple_read_from_buffer`. And, finally, we have debugfs file creation.

The critical question: is there any risk of uninitialized memory usage, info leakage, or branching on uninitialized data introduced here?

*   `wmi` is `kzalloc`'d.  Counters are initialized to zero. Done.
*   `buf` in `read_file_wmi` is carefully handled.  `scnprintf` writes initialized characters, and `simple_read_from_buffer` copies exactly the initialized portion. No problem.
*   `calcrxfilter` operates on initialized fields and returns a bitmask. Good to go.
*   No `copy_to_user` of uninitialized structs or padding is happening.
*   The control flow doesn't depend on uninitialized data.

Conclusion: This patch does *not* introduce any uninitialized memory risks. Standard sanitizers (KASAN, etc.) should be sufficient. We **do not need KMSAN** (`NeedsKMSAN=false`).

Just to be absolutely certain, let's quickly review the criteria for setting `NeedsKMSAN=true`:

1.  Kernel structs sent to userspace with potentially uninitialized fields? No.
2.  Conditional logic based on potentially uninitialized variables? No.
3.  Complex data structures with uninitialized fields? No.
4.  Bounds checks/lengths leading to uninitialized byte access? Nope.

All clear. `read_file_wmi` is safe. `wmi` is zero-initialized. The filter calculation is sound.

Let's call `set-results` and explain this reasoning.



22/3 2026/09/06 06:42 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch introduces a debugfs file (\"wmi\") to report WMI command statistics, adds two counter fields to `struct wmi` (`cmds_issued` and `cmds_timed_out`), and updates RX filter flag calculations in `ath9k_htc_calcrxfilter`.\n\n1. `struct wmi` is allocated via `kzalloc_obj`, so the new counter fields are guaranteed to be zero-initialized upon creation.\n2. In `read_file_wmi`, `scnprintf` formats the counters into a local buffer and returns the exact number of bytes written (`len`), which is then passed to `simple_read_from_buffer`. No uninitialized stack bytes are copied to user space.\n3. The modifications in `ath9k_htc_calcrxfilter` only alter bitwise flag operations on initialized variables.\n\nThere are no uninitialized memory reads, info-leaks, or branching on uninitialized data introduced by this patch. Therefore, standard KASAN/lockdep testing is sufficient and a dedicated KMSAN fuzzing session is not required.",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch introduces a debugfs file (\"wmi\") to report WMI command statistics, adds two counter fields to `struct wmi` (`cmds_issued` and `cmds_timed_out`), and updates RX filter flag calculations in `ath9k_htc_calcrxfilter`.\n\n1. `struct wmi` is allocated via `kzalloc_obj`, so the new counter fields are guaranteed to be zero-initialized upon creation.\n2. In `read_file_wmi`, `scnprintf` formats the counters into a local buffer and returns the exact number of bytes written (`len`), which is then passed to `simple_read_from_buffer`. No uninitialized stack bytes are copied to user space.\n3. The modifications in `ath9k_htc_calcrxfilter` only alter bitwise flag operations on initialized variables.\n\nThere are no uninitialized memory reads, info-leaks, or branching on uninitialized data introduced by this patch. Therefore, standard KASAN/lockdep testing is sufficient and a dedicated KMSAN fuzzing session is not required.",
  "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)