| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/11 02:22 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"ATH9K_COMMON_SPECTRAL",
"ATH9K_HW",
"ATH9K_HTC",
"ATH9K_HTC_DEBUGFS",
"ATH9K",
"ATH9K_DEBUGFS"
],
"FocusSymbols": [
"ath9k_hw_enable_rxfilter",
"ath9k_hw_disable_rxfilter",
"ath9k_cmn_spectral_scan_trigger",
"ath9k_cmn_spectral_scan_config"
],
"KMSANReasoning": "The patch introduces helper functions ath9k_hw_enable_rxfilter() and ath9k_hw_disable_rxfilter() and updates spectral scan routines in the ath9k driver to enable and disable hardware RX filter bits without performing register readbacks. All local variables in the newly introduced and modified code are explicitly initialized, and the operations perform direct hardware register manipulation without allocating buffers, exposing structure padding, reading uninitialized stack/heap memory, or copying data to user space. Therefore, there are no uninitialized memory risks requiring a dedicated KMSAN fuzzing session.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies ath9k spectral scan configuration and trigger paths and introduces new RX filter manipulation functions (ath9k_hw_enable_rxfilter and ath9k_hw_disable_rxfilter) in the ath9k hardware layer to avoid read-modify-write register access issues. This code is reachable via userspace debugfs spectral scan controls and scanning operations on ath9k/ath9k_htc devices (emulatable via USB).",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/11 02:22 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit fa7d39a0a6ee1daf8122d84f8fbe7eec7a75310d\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Sep 11 02:22:38 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c\nindex ca01a07f6630c..841075d904f8d 100644\n--- a/drivers/net/wireless/ath/ath9k/common-spectral.c\n+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c\n@@ -716,7 +716,6 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\n \t\t\t\t struct ath_spec_scan_priv *spec_priv)\n {\n \tstruct ath_hw *ah = spec_priv-\u003eah;\n-\tu32 rxfilter;\n \n \tif (IS_ENABLED(CONFIG_ATH9K_TX99))\n \t\treturn;\n@@ -730,10 +729,8 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\n \t\treturn;\n \n \tath_ps_ops(common)-\u003ewakeup(common);\n-\trxfilter = ath9k_hw_getrxfilter(ah);\n-\tath9k_hw_setrxfilter(ah, rxfilter |\n-\t\t\t\t ATH9K_RX_FILTER_PHYRADAR |\n-\t\t\t\t ATH9K_RX_FILTER_PHYERR);\n+\tath9k_hw_enable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |\n+\t\t\t\t ATH9K_RX_FILTER_PHYERR);\n \n \t/* TODO: usually this should not be necessary, but for some reason\n \t * (or in some mode?) the trigger must be called after the\n@@ -779,6 +776,12 @@ int ath9k_cmn_spectral_scan_config(struct ath_common *common,\n \n \tath_ps_ops(common)-\u003ewakeup(common);\n \tath9k_hw_ops(ah)-\u003espectral_scan_config(ah, \u0026spec_priv-\u003espec_config);\n+\n+\t/* Radar detection needs the same bits. */\n+\tif (spectral_mode == SPECTRAL_DISABLED \u0026\u0026\n+\t !common-\u003ehw-\u003econf.radar_enabled)\n+\t\tath9k_hw_disable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |\n+\t\t\t\t\t ATH9K_RX_FILTER_PHYERR);\n \tath_ps_ops(common)-\u003erestore(common);\n \n \tspec_priv-\u003espectral_mode = spectral_mode;\ndiff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c\nindex e08ab73fcacb3..6f86a89675485 100644\n--- a/drivers/net/wireless/ath/ath9k/hw.c\n+++ b/drivers/net/wireless/ath/ath9k/hw.c\n@@ -2905,6 +2905,52 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)\n }\n EXPORT_SYMBOL(ath9k_hw_setrxfilter);\n \n+/*\n+ * Set bits in the RX filter without reading it back: on USB a failed read\n+ * returns all ones, and writing that back would open every filter bit.\n+ */\n+void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits)\n+{\n+\tu32 phybits = 0;\n+\n+\tif (bits \u0026 ATH9K_RX_FILTER_PHYRADAR)\n+\t\tphybits |= AR_PHY_ERR_RADAR;\n+\tif (bits \u0026 ATH9K_RX_FILTER_PHYERR)\n+\t\tphybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;\n+\n+\tREG_SET_BIT(ah, AR_RX_FILTER, bits);\n+\n+\tif (phybits) {\n+\t\tREG_SET_BIT(ah, AR_PHY_ERR, phybits);\n+\t\t/* PHY errors are reported in zero length frames. */\n+\t\tREG_SET_BIT(ah, AR_RXCFG, AR_RXCFG_ZLFDMA);\n+\t}\n+}\n+EXPORT_SYMBOL(ath9k_hw_enable_rxfilter);\n+\n+/*\n+ * Counterpart of ath9k_hw_enable_rxfilter(). AR_RXCFG_ZLFDMA goes with the\n+ * PHY error mask or the frames keep coming; callers clear all the PHY error\n+ * bits together, as checking for a remaining one would need a read.\n+ */\n+void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits)\n+{\n+\tu32 phybits = 0;\n+\n+\tif (bits \u0026 ATH9K_RX_FILTER_PHYRADAR)\n+\t\tphybits |= AR_PHY_ERR_RADAR;\n+\tif (bits \u0026 ATH9K_RX_FILTER_PHYERR)\n+\t\tphybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;\n+\n+\tREG_CLR_BIT(ah, AR_RX_FILTER, bits);\n+\n+\tif (phybits) {\n+\t\tREG_CLR_BIT(ah, AR_PHY_ERR, phybits);\n+\t\tREG_CLR_BIT(ah, AR_RXCFG, AR_RXCFG_ZLFDMA);\n+\t}\n+}\n+EXPORT_SYMBOL(ath9k_hw_disable_rxfilter);\n+\n bool ath9k_hw_phy_disable(struct ath_hw *ah)\n {\n \tif (ath9k_hw_mci_is_enabled(ah))\ndiff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h\nindex b942b8303d8f8..983146208f264 100644\n--- a/drivers/net/wireless/ath/ath9k/hw.h\n+++ b/drivers/net/wireless/ath/ath9k/hw.h\n@@ -1055,6 +1055,8 @@ void ath9k_hw_get_channel_centers(struct ath_hw *ah,\n \t\t\t\t struct chan_centers *centers);\n u32 ath9k_hw_getrxfilter(struct ath_hw *ah);\n void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits);\n+void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits);\n+void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits);\n bool ath9k_hw_phy_disable(struct ath_hw *ah);\n bool ath9k_hw_disable(struct ath_hw *ah);\n void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test);\n"
} |
| 2/1 | 2026/09/11 02:22 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": [
"ATH9K_COMMON_SPECTRAL",
"ATH9K_HW",
"ATH9K_HTC",
"ATH9K_HTC_DEBUGFS",
"ATH9K",
"ATH9K_DEBUGFS"
],
"FocusSymbols": [
"ath9k_hw_enable_rxfilter",
"ath9k_hw_disable_rxfilter",
"ath9k_cmn_spectral_scan_trigger",
"ath9k_cmn_spectral_scan_config"
],
"Reasoning": "The patch modifies ath9k spectral scan configuration and trigger paths and introduces new RX filter manipulation functions (ath9k_hw_enable_rxfilter and ath9k_hw_disable_rxfilter) in the ath9k hardware layer to avoid read-modify-write register access issues. This code is reachable via userspace debugfs spectral scan controls and scanning operations on ath9k/ath9k_htc devices (emulatable via USB).",
"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 fa7d39a0a6ee1daf8122d84f8fbe7eec7a75310d
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 11 02:22:38 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index ca01a07f6630c..841075d904f8d 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -716,7 +716,6 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
struct ath_spec_scan_priv *spec_priv)
{
struct ath_hw *ah = spec_priv->ah;
- u32 rxfilter;
if (IS_ENABLED(CONFIG_ATH9K_TX99))
return;
@@ -730,10 +729,8 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
return;
ath_ps_ops(common)->wakeup(common);
- rxfilter = ath9k_hw_getrxfilter(ah);
- ath9k_hw_setrxfilter(ah, rxfilter |
- ATH9K_RX_FILTER_PHYRADAR |
- ATH9K_RX_FILTER_PHYERR);
+ ath9k_hw_enable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |
+ ATH9K_RX_FILTER_PHYERR);
/* TODO: usually this should not be necessary, but for some reason
* (or in some mode?) the trigger must be called after the
@@ -779,6 +776,12 @@ int ath9k_cmn_spectral_scan_config(struct ath_common *common,
ath_ps_ops(common)->wakeup(common);
ath9k_hw_ops(ah)->spectral_scan_config(ah, &spec_priv->spec_config);
+
+ /* Radar detection needs the same bits. */
+ if (spectral_mode == SPECTRAL_DISABLED &&
+ !common->hw->conf.radar_enabled)
+ ath9k_hw_disable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |
+ ATH9K_RX_FILTER_PHYERR);
ath_ps_ops(common)->restore(common);
spec_priv->spectral_mode = spectral_mode;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e08ab73fcacb3..6f86a89675485 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2905,6 +2905,52 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
}
EXPORT_SYMBOL(ath9k_hw_setrxfilter);
+/*
+ * Set bits in the RX filter without reading it back: on USB a failed read
+ * returns all ones, and writing that back would open every filter bit.
+ */
+void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits)
+{
+ u32 phybits = 0;
+
+ if (bits & ATH9K_RX_FILTER_PHYRADAR)
+ phybits |= AR_PHY_ERR_RADAR;
+ if (bits & ATH9K_RX_FILTER_PHYERR)
+ phybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;
+
+ REG_SET_BIT(ah, AR_RX_FILTER, bits);
+
+ if (phybits) {
+ REG_SET_BIT(ah, AR_PHY_ERR, phybits);
+ /* PHY errors are reported in zero length frames. */
+ REG_SET_BIT(ah, AR_RXCFG, AR_RXCFG_ZLFDMA);
+ }
+}
+EXPORT_SYMBOL(ath9k_hw_enable_rxfilter);
+
+/*
+ * Counterpart of ath9k_hw_enable_rxfilter(). AR_RXCFG_ZLFDMA goes with the
+ * PHY error mask or the frames keep coming; callers clear all the PHY error
+ * bits together, as checking for a remaining one would need a read.
+ */
+void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits)
+{
+ u32 phybits = 0;
+
+ if (bits & ATH9K_RX_FILTER_PHYRADAR)
+ phybits |= AR_PHY_ERR_RADAR;
+ if (bits & ATH9K_RX_FILTER_PHYERR)
+ phybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;
+
+ REG_CLR_BIT(ah, AR_RX_FILTER, bits);
+
+ if (phybits) {
+ REG_CLR_BIT(ah, AR_PHY_ERR, phybits);
+ REG_CLR_BIT(ah, AR_RXCFG, AR_RXCFG_ZLFDMA);
+ }
+}
+EXPORT_SYMBOL(ath9k_hw_disable_rxfilter);
+
bool ath9k_hw_phy_disable(struct ath_hw *ah)
{
if (ath9k_hw_mci_is_enabled(ah))
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index b942b8303d8f8..983146208f264 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -1055,6 +1055,8 @@ void ath9k_hw_get_channel_centers(struct ath_hw *ah,
struct chan_centers *centers);
u32 ath9k_hw_getrxfilter(struct ath_hw *ah);
void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits);
+void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits);
+void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits);
bool ath9k_hw_phy_disable(struct ath_hw *ah);
bool ath9k_hw_disable(struct ath_hw *ah);
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test);
|
| 3/2 | 2026/09/11 02:22 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4400 output: 39 thoughts: 254 Thoughts: **Patch Evaluation for Syzkaller Fuzzing** Okay, let's dive into this patch and decide if it's a good candidate for syzkaller. My initial instinct is to focus on the potential attack surface. First, I need to see exactly what's been changed. The modifications are in `drivers/net/wireless/ath/ath9k/common-spectral.c`, `drivers/net/wireless/ath/ath9k/hw.c`, and `drivers/net/wireless/ath/ath9k/hw.h`. This suggests we're dealing with Atheros wireless drivers, specifically related to spectral scanning. Now, the critical question: can we even *reach* this code with fuzzing? I need to quickly determine if `ath9k` or `ath9k_htc` are emulatable. Are they accessible through USB, USB gadget mode, the mac80211 stack, or something else? Wait, right, `ath9k` is PCI or USB (`ath9k_htc`). That makes a big difference. I need to be sure the relevant parts of the `ath9k` driver, the `ath9k_hw` or common code, are actually utilized by the USB version. To make sure this is relevant to the USB version, I need to check how `ath9k_htc` interacts with the common and hw code. Are these functions that have been changed actually used when `ath9k` is a USB driver? I need to determine if `ath9k_htc` leverages `common-spectral.c` or `ath9k_hw` functionality. Is it only PCI or is USB also relevant? I'll use grepper. Let's search for calls to `ath9k_cmn_spectral_scan_trigger`, `ath9k_cmn_spectral_scan_config`, and `ath9k_hw_enable_rxfilter`. That will quickly tell me if the changes are reachable via the USB path or are PCI only, and if they are, then that might make them good candidates for fuzzing. |
| 4/2 | 2026/09/11 02:22 | tool | grepper |
0mArgs:{
"Expression": "ath9k_cmn_spectral",
"PathPrefix": "drivers/net/wireless/ath/ath9k"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/channel.c=23=static int ath_set_channel(struct ath_softc *sc)\n--\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=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-714-\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)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-739-\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:740:\tath9k_cmn_spectral_scan_config(common, spec_priv, spec_priv-\u003espectral_mode);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-741-\tath9k_hw_ops(ah)-\u003espectral_scan_trigger(ah);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-743-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:744:EXPORT_SYMBOL(ath9k_cmn_spectral_scan_trigger);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-745-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:746:int ath9k_cmn_spectral_scan_config(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-747-\t\t\t struct ath_spec_scan_priv *spec_priv,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-790-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:791:EXPORT_SYMBOL(ath9k_cmn_spectral_scan_config);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-792-\ndrivers/net/wireless/ath/ath9k/common-spectral.c=793=static ssize_t write_file_spec_scan_ctl(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-811-\tif (strncmp(\"trigger\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:812:\t\tath9k_cmn_spectral_scan_trigger(common, spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-813-\t} else if (strncmp(\"background\", buf, 10) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:814:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_BACKGROUND);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-815-\t\tath_dbg(common, CONFIG, \"spectral scan: background mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-816-\t} else if (strncmp(\"chanscan\", buf, 8) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:817:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_CHANSCAN);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-818-\t\tath_dbg(common, CONFIG, \"spectral scan: channel scan mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-819-\t} else if (strncmp(\"manual\", buf, 6) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:820:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_MANUAL);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-821-\t\tath_dbg(common, CONFIG, \"spectral scan: manual mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-822-\t} else if (strncmp(\"disable\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:823:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_DISABLED);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-824-\t\tath_dbg(common, CONFIG, \"spectral scan: disabled\\n\");\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=1039=static const struct rchan_callbacks rfs_spec_scan_cb = {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1047-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1048:void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1049-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1054-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1055:EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1056-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1057:void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1058-\t\t\t\t struct dentry *debugfs_phy)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1087-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1088:EXPORT_SYMBOL(ath9k_cmn_spectral_init_debug);\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,\n--\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,\n--\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-191-\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)\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_drv_debug.c=477=void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-478-{\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:479:\tath9k_cmn_spectral_deinit_debug(\u0026priv-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-480-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=482=int ath9k_htc_init_debug(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-489-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:490:\tath9k_cmn_spectral_init_debug(\u0026priv-\u003espec_priv, priv-\u003edebug.debugfs_phy);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-491-\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-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"
} |
| 5/2 | 2026/09/11 02:22 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 8408 output: 35 thoughts: 245 Thoughts: **Fuzzing the ath9k_htc USB Wi-Fi Driver with Syzkaller** Okay, so *ath9k_htc*… that's the USB Wi-Fi driver, right? Got it. Hmm, immediately my mind jumps to fuzzing possibilities. Can we hit this thing with syzkaller through USB emulation, or maybe Raw Gadget, or even USB-fuzz? Wait a second… of course! Syzkaller *does* fuzz USB drivers, and this *is* a USB Wi-Fi driver! That's a target-rich environment! Now, hold on… let me think about what potential vulnerabilities might be interesting here. That patch comment, specifically that one that says: ```c /* * Set bits in the RX filter without reading it back: on USB a failed read * returns all ones, and writing that back would open every filter bit. */ void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits) ``` …that screams "potential race condition" or "uninitialized read" to me. That's a really interesting point to focus on for fuzzing. And, let's not forget about the debugfs interface! `write_file_spec_scan_ctl` calls `ath9k_cmn_spectral_scan_trigger` and `ath9k_cmn_spectral_scan_config`. That's another obvious area to dig into - debug interfaces are often overlooked. Right, time to get practical. Let's dig into the Kconfig files in `drivers/net/wireless/ath/ath9k/` to get a handle on the configuration options and see how everything fits together. I need to understand the dependencies and how this driver is exposed to the user space. This is going to be fun! |
| 6/2 | 2026/09/11 02:22 | tool | grepper |
0mArgs:{
"Expression": "config ATH9K",
"PathPrefix": "drivers/net/wireless/ath/ath9k"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/Kconfig-1-# SPDX-License-Identifier: ISC\ndrivers/net/wireless/ath/ath9k/Kconfig:2:config ATH9K_HW\ndrivers/net/wireless/ath/ath9k/Kconfig-3-\ttristate\ndrivers/net/wireless/ath/ath9k/Kconfig:4:config ATH9K_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig-5-\ttristate\ndrivers/net/wireless/ath/ath9k/Kconfig-6-\tselect ATH_COMMON\ndrivers/net/wireless/ath/ath9k/Kconfig:7:config ATH9K_COMMON_DEBUG\ndrivers/net/wireless/ath/ath9k/Kconfig-8-\tbool\ndrivers/net/wireless/ath/ath9k/Kconfig:9:config ATH9K_DFS_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-10-\tdef_bool y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-12-\ndrivers/net/wireless/ath/ath9k/Kconfig:13:config ATH9K_BTCOEX_SUPPORT\ndrivers/net/wireless/ath/ath9k/Kconfig-14-\tbool \"Atheros bluetooth coexistence support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-20-\ndrivers/net/wireless/ath/ath9k/Kconfig:21:config ATH9K\ndrivers/net/wireless/ath/ath9k/Kconfig-22-\ttristate \"Atheros 802.11n wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-38-\ndrivers/net/wireless/ath/ath9k/Kconfig:39:config ATH9K_PCI\ndrivers/net/wireless/ath/ath9k/Kconfig-40-\tbool \"Atheros ath9k PCI/PCIe bus support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-47-\ndrivers/net/wireless/ath/ath9k/Kconfig:48:config ATH9K_AHB\ndrivers/net/wireless/ath/ath9k/Kconfig-49-\tbool \"Atheros ath9k AHB bus support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-57-\ndrivers/net/wireless/ath/ath9k/Kconfig:58:config ATH9K_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-59-\tbool \"Atheros ath9k debugging\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-68-\ndrivers/net/wireless/ath/ath9k/Kconfig:69:config ATH9K_STATION_STATISTICS\ndrivers/net/wireless/ath/ath9k/Kconfig-70-\tbool \"Detailed station statistics\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-75-\ndrivers/net/wireless/ath/ath9k/Kconfig:76:config ATH9K_TX99\ndrivers/net/wireless/ath/ath9k/Kconfig-77-\tbool \"Atheros ath9k TX99 testing support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-95-\ndrivers/net/wireless/ath/ath9k/Kconfig:96:config ATH9K_DFS_CERTIFIED\ndrivers/net/wireless/ath/ath9k/Kconfig-97-\tbool \"Atheros DFS support for certified platforms\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-114-\ndrivers/net/wireless/ath/ath9k/Kconfig:115:config ATH9K_DYNACK\ndrivers/net/wireless/ath/ath9k/Kconfig-116-\tbool \"Atheros ath9k ACK timeout estimation algorithm\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-123-\ndrivers/net/wireless/ath/ath9k/Kconfig:124:config ATH9K_WOW\ndrivers/net/wireless/ath/ath9k/Kconfig-125-\tbool \"Wake on Wireless LAN support (EXPERIMENTAL)\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-131-\ndrivers/net/wireless/ath/ath9k/Kconfig:132:config ATH9K_RFKILL\ndrivers/net/wireless/ath/ath9k/Kconfig-133-\tbool \"Atheros ath9k rfkill support\" if EXPERT\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-141-\ndrivers/net/wireless/ath/ath9k/Kconfig:142:config ATH9K_CHANNEL_CONTEXT\ndrivers/net/wireless/ath/ath9k/Kconfig-143-\tbool \"Channel Context support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-150-\ndrivers/net/wireless/ath/ath9k/Kconfig:151:config ATH9K_PCOEM\ndrivers/net/wireless/ath/ath9k/Kconfig-152-\tbool \"Atheros ath9k support for PC OEM cards\" if EXPERT\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-155-\ndrivers/net/wireless/ath/ath9k/Kconfig:156:config ATH9K_PCI_NO_EEPROM\ndrivers/net/wireless/ath/ath9k/Kconfig-157-\ttristate \"Atheros ath9k pci loader for EEPROM-less chips\"\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\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-194-\ndrivers/net/wireless/ath/ath9k/Kconfig:195:config ATH9K_HWRNG\ndrivers/net/wireless/ath/ath9k/Kconfig-196-\tbool \"Random number generator support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-205-\ndrivers/net/wireless/ath/ath9k/Kconfig:206:config ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/Kconfig-207-\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\n"
} |
| 7/2 | 2026/09/11 02:22 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 10809 output: 39 thoughts: 19 Thoughts: Here's my analysis of the provided text, rendered as though I'm thinking it: **Diving into the ATH9K Spectral Configuration** Alright, let's get down to brass tacks. I need to understand how the `ATH9K_COMMON_SPECTRAL` feature is being handled. My immediate move is to dissect the relevant `Makefile` and `Kconfig` files. I'm going to carefully trace how this option impacts the build process and what conditions govern its availability. I expect to find dependencies, potential hardware limitations, and maybe some conditional compilation directives. I'll be looking for clues on how the driver handles this spectral analysis functionality; is it a core component, or something modular and optional? Are there any performance implications I should be aware of? I'm anticipating that these files will reveal the nuances of how spectral scanning is integrated into the ath9k driver framework. I'm especially keen on identifying any related module dependencies or configuration variables that dictate how users can interact with this feature. |
| 8/2 | 2026/09/11 02:22 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/Makefile",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: ISC\n 2:\tath9k-y +=\tbeacon.o \\\n 3:\t\t\tgpio.o \\\n 4:\t\t\tinit.o \\\n 5:\t\t\tmain.o \\\n 6:\t\t\trecv.o \\\n 7:\t\t\txmit.o \\\n 8:\t\t\tlink.o \\\n 9:\t\t\tantenna.o \\\n 10:\t\t\tchannel.o\n 11:\t\n 12:\tath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o\n 13:\tath9k-$(CONFIG_ATH9K_PCI) += pci.o\n 14:\tath9k-$(CONFIG_ATH9K_AHB) += ahb.o\n 15:\tath9k-$(CONFIG_ATH9K_DFS_DEBUGFS) += dfs_debug.o\n 16:\tath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += dfs.o\n 17:\tath9k-$(CONFIG_ATH9K_TX99) += tx99.o\n 18:\tath9k-$(CONFIG_ATH9K_WOW) += wow.o\n 19:\tath9k-$(CONFIG_ATH9K_HWRNG) += rng.o\n 20:\t\n 21:\tath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o\n 22:\t\n 23:\tath9k-$(CONFIG_ATH9K_STATION_STATISTICS) += debug_sta.o\n 24:\t\n 25:\tobj-$(CONFIG_ATH9K) += ath9k.o\n 26:\t\n 27:\tath9k_hw-y:=\t\\\n 28:\t\t\tar9002_hw.o \\\n 29:\t\t\tar9003_hw.o \\\n 30:\t\t\thw.o \\\n 31:\t\t\tar9003_phy.o \\\n 32:\t\t\tar9002_phy.o \\\n 33:\t\t\tar5008_phy.o \\\n 34:\t\t\tar9002_calib.o \\\n 35:\t\t\tar9003_calib.o \\\n 36:\t\t\tcalib.o \\\n 37:\t\t\teeprom.o \\\n 38:\t\t\teeprom_def.o \\\n 39:\t\t\teeprom_4k.o \\\n 40:\t\t\teeprom_9287.o \\\n 41:\t\t\tani.o \\\n 42:\t\t\tmac.o \\\n 43:\t\t\tar9002_mac.o \\\n 44:\t\t\tar9003_mac.o \\\n 45:\t\t\tar9003_eeprom.o \\\n 46:\t\t\tar9003_paprd.o\n 47:\t\n 48:\tath9k_hw-$(CONFIG_ATH9K_WOW) += ar9003_wow.o\n 49:\t\n 50:\tath9k_hw-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += btcoex.o \\\n 51:\t\t\t\t\t\t ar9003_mci.o \\\n 52:\t\t\t\t\t\t ar9003_aic.o\n 53:\t\n 54:\tath9k_hw-$(CONFIG_ATH9K_PCOEM) += ar9003_rtt.o\n 55:\t\n 56:\tath9k_hw-$(CONFIG_ATH9K_DYNACK) += dynack.o\n 57:\t\n 58:\tobj-$(CONFIG_ATH9K_HW) += ath9k_hw.o\n 59:\t\n 60:\tobj-$(CONFIG_ATH9K_COMMON) += ath9k_common.o\n 61:\tath9k_common-y:=\tcommon.o \\\n 62:\t\t\t\tcommon-init.o \\\n 63:\t\t\t\tcommon-beacon.o \\\n 64:\t\n 65:\tath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o\n 66:\tath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o\n 67:\t\n 68:\tath9k_htc-y +=\thtc_hst.o \\\n 69:\t\t\thif_usb.o \\\n 70:\t\t\twmi.o \\\n 71:\t\t\thtc_drv_txrx.o \\\n 72:\t\t\thtc_drv_main.o \\\n 73:\t\t\thtc_drv_beacon.o \\\n 74:\t\t\thtc_drv_init.o \\\n 75:\t\t\thtc_drv_gpio.o\n 76:\t\n 77:\tath9k_htc-$(CONFIG_ATH9K_HTC_DEBUGFS) += htc_drv_debug.o\n 78:\t\n 79:\tobj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o\n 80:\t\n"
} |
| 9/2 | 2026/09/11 02:22 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 12349 output: 42 thoughts: 28 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Checking the Kconfig for ATH9K Components** Alright, before diving too deep into this particular problem, I need to get a clear picture of what's enabled and disabled in the configuration. The first thing that comes to mind is the Kconfig file – that's where the heart of the matter lies. I need to quickly check the status of a few key components related to the ath9k driver. Specifically, I need to make sure `ATH9K_COMMON_SPECTRAL`, `ATH9K_HW`, and `ATH9K_HTC` are appropriately configured. Are they enabled as modules, built-in, or perhaps even disabled? The interaction between these modules is critical, so I need to understand their state within the current build environment. Getting that foundation established will help me narrow down the specific area causing issues later. Let's see what Kconfig has to say. |
| 10/2 | 2026/09/11 02:23 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/Kconfig",
"FirstLine": 170,
"LineCount": 50
}Results: {
"Contents": " 170:\t\t If unsure say N.\n 171:\t\n 172:\tconfig ATH9K_HTC\n 173:\t\ttristate \"Atheros HTC based wireless cards support\"\n 174:\t\tdepends on USB \u0026\u0026 MAC80211\n 175:\t\tselect MAC80211_LEDS if LEDS_CLASS=y || LEDS_CLASS=MAC80211\n 176:\t\tselect ATH9K_HW\n 177:\t\tselect ATH9K_COMMON\n 178:\t\thelp\n 179:\t\t Support for Atheros HTC based cards.\n 180:\t\t Chipsets supported: AR9271\n 181:\t\n 182:\t\t For more information:\n 183:\t\t https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc\n 184:\t\n 185:\t\t The built module will be ath9k_htc.\n 186:\t\n 187:\tconfig ATH9K_HTC_DEBUGFS\n 188:\t\tbool \"Atheros ath9k_htc debugging\"\n 189:\t\tdepends on ATH9K_HTC \u0026\u0026 DEBUG_FS\n 190:\t\tselect ATH9K_COMMON_DEBUG\n 191:\t\thelp\n 192:\t\t Say Y, if you need access to ath9k_htc's statistics.\n 193:\t\t As well as access to the FFT/spectral data.\n 194:\t\n 195:\tconfig ATH9K_HWRNG\n 196:\t\tbool \"Random number generator support\"\n 197:\t\tdepends on ATH9K \u0026\u0026 (HW_RANDOM = y || HW_RANDOM = ATH9K)\n 198:\t\tdefault n\n 199:\t\thelp\n 200:\t\t This option incorporates the ADC register output as a source of\n 201:\t\t randomness into Linux entropy pool (/dev/urandom and /dev/random)\n 202:\t\n 203:\t\t Say Y, feeds the entropy directly from the WiFi driver to the input\n 204:\t\t pool.\n 205:\t\n 206:\tconfig ATH9K_COMMON_SPECTRAL\n 207:\t\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\n 208:\t\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\n 209:\t\tselect RELAY\n 210:\t\tdefault n\n 211:\t\thelp\n 212:\t\t Say Y to enable access to the FFT/spectral data via debugfs.\n"
} |
| 11/2 | 2026/09/11 02:23 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 13302 output: 33 thoughts: 146 Thoughts: **My Analysis of the ath9k_htc Driver Dependencies** Okay, let's break this down. From what I see here, `ATH9K_HTC` is the USB-based driver we're dealing with, and it's built on a foundation of `USB` and `MAC80211`, which makes perfect sense given its role. It automatically pulls in `ATH9K_HW` and `ATH9K_COMMON` – essential hardware and common components, as expected. Then there's `ATH9K_HTC_DEBUGFS`, which relies on the core `ATH9K_HTC` and the debugging file system, `DEBUG_FS`. Obviously, it's for enabling debug features. Now, the interesting bit: `ATH9K_COMMON_SPECTRAL`. This depends on either `ATH9K_DEBUGFS` or `ATH9K_HTC_DEBUGFS`, and it also selects `RELAY`. My immediate thought is, 'Aha! This is how spectral scanning functionality is introduced!' So, if either the debugfs or debug-centric HTC module is present and built, spectral scan capabilities can be included in the build. The inclusion of `RELAY` could indicate a data transfer mechanism. So, where does `spectral` come into play in `ath9k_htc`? I need to search the code base for how that works. I'll need to go hunting for the implementation. |
| 12/2 | 2026/09/11 02:23 | tool | grepper |
0mArgs:{
"Expression": "spectral",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 561 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/ath/ath9k/Kconfig=187=config ATH9K_HTC_DEBUGFS\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-192-\t Say Y, if you need access to ath9k_htc's statistics.\ndrivers/net/wireless/ath/ath9k/Kconfig:193:\t As well as access to the FFT/spectral data.\ndrivers/net/wireless/ath/ath9k/Kconfig-194-\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\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-211-\thelp\ndrivers/net/wireless/ath/ath9k/Kconfig:212:\t Say Y to enable access to the FFT/spectral data via debugfs.\n--\ndrivers/net/wireless/ath/ath9k/Makefile=65=ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o\ndrivers/net/wireless/ath/ath9k/Makefile:66:ath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o\ndrivers/net/wireless/ath/ath9k/Makefile-67-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c=416=static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-476-\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:477:static void ar9002_hw_spectral_scan_config(struct ath_hw *ah,\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-478-\t\t\t\t struct ath_spec_scan *param)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-501-\t/* on AR92xx, the highest bit of count will make the chip send\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:502:\t * spectral samples endlessly. Check if this really was intended,\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-503-\t * and fix otherwise.\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-533-\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:534:static void ar9002_hw_spectral_scan_trigger(struct ath_hw *ah)\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-535-{\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-536-\tREG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ENABLE);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:537:\t/* Activate spectral scan */\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-538-\tREG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-541-\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:542:static void ar9002_hw_spectral_scan_wait(struct ath_hw *ah)\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-543-{\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-545-\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:546:\t/* Poll for spectral scan complete */\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-547-\tif (!ath9k_hw_wait(ah, AR_PHY_SPECTRAL_SCAN,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-549-\t\t\t 0, AH_WAIT_TIMEOUT)) {\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:550:\t\tath_err(common, \"spectral scan wait failed\\n\");\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-551-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c=575=void ar9002_hw_attach_phy_ops(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-588-\tops-\u003eantdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set;\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:589:\tops-\u003espectral_scan_config = ar9002_hw_spectral_scan_config;\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:590:\tops-\u003espectral_scan_trigger = ar9002_hw_spectral_scan_trigger;\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:591:\tops-\u003espectral_scan_wait = ar9002_hw_spectral_scan_wait;\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-592-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h-167-\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h:168:#define AR_PHY_SPECTRAL_SCAN\t\t\t0x9910 /* AR9280 spectral scan configuration register */\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h-169-#define\tAR_PHY_SPECTRAL_SCAN_ENABLE\t\t0x1\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h:170:#define AR_PHY_SPECTRAL_SCAN_ENA\t\t0x00000001 /* Enable spectral scan, reg 68, bit 0 */\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h:171:#define AR_PHY_SPECTRAL_SCAN_ENA_S\t\t0 /* Enable spectral scan, reg 68, bit 0 */\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h:172:#define AR_PHY_SPECTRAL_SCAN_ACTIVE\t\t0x00000002 /* Activate spectral scan reg 68, bit 1*/\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h:173:#define AR_PHY_SPECTRAL_SCAN_ACTIVE_S\t\t1 /* Activate spectral scan reg 68, bit 1*/\ndrivers/net/wireless/ath/ath9k/ar9002_phy.h-174-#define AR_PHY_SPECTRAL_SCAN_FFT_PERIOD\t\t0x000000F0 /* Interval for FFT reports, reg 68, bits 4-7*/\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c=1664=static int ar9003_hw_fast_chan_change(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1729-\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1730:static void ar9003_hw_spectral_scan_config(struct ath_hw *ah,\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1731-\t\t\t\t\t struct ath_spec_scan *param)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1744-\t/* on AR93xx and newer, count = 0 will make the chip send\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1745:\t * spectral samples endlessly. Check if this really was intended,\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1746-\t * and fix otherwise.\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1770-\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1771:static void ar9003_hw_spectral_scan_trigger(struct ath_hw *ah)\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1772-{\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1774-\t\t AR_PHY_SPECTRAL_SCAN_ENABLE);\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1775:\t/* Activate spectral scan */\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1776-\tREG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1779-\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1780:static void ar9003_hw_spectral_scan_wait(struct ath_hw *ah)\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1781-{\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1783-\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1784:\t/* Poll for spectral scan complete */\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1785-\tif (!ath9k_hw_wait(ah, AR_PHY_SPECTRAL_SCAN,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1787-\t\t\t 0, AH_WAIT_TIMEOUT)) {\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1788:\t\tath_err(common, \"spectral scan wait failed\\n\");\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1789-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c=1918=void ar9003_hw_attach_phy_ops(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1955-\tops-\u003eantdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1956:\tops-\u003espectral_scan_config = ar9003_hw_spectral_scan_config;\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1957:\tops-\u003espectral_scan_trigger = ar9003_hw_spectral_scan_trigger;\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c:1958:\tops-\u003espectral_scan_wait = ar9003_hw_spectral_scan_wait;\ndrivers/net/wireless/ath/ath9k/ar9003_phy.c-1959-\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-93-\t} else {\ndrivers/net/wireless/ath/ath9k/channel.c:94:\t\t/* perform spectral scan if requested. */\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-debug.c=124=static ssize_t read_file_recv(struct file *file, char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-debug.c-146-\tRXS_ERR(\"FRAGS\", rx_frags);\ndrivers/net/wireless/ath/ath9k/common-debug.c:147:\tRXS_ERR(\"SPECTRAL\", rx_spectral);\ndrivers/net/wireless/ath/ath9k/common-debug.c:148:\tRXS_ERR(\"SPECTRAL SMPL GOOD\", rx_spectral_sample_good);\ndrivers/net/wireless/ath/ath9k/common-debug.c:149:\tRXS_ERR(\"SPECTRAL SMPL ERR\", rx_spectral_sample_err);\ndrivers/net/wireless/ath/ath9k/common-debug.c-150-\n--\ndrivers/net/wireless/ath/ath9k/common-debug.h-40- * @rx_frags: No. of rx-fragements received.\ndrivers/net/wireless/ath/ath9k/common-debug.h:41: * @rx_spectral: No of spectral packets received.\ndrivers/net/wireless/ath/ath9k/common-debug.h:42: * @rx_spectral_sample_good: No. of good spectral samples\ndrivers/net/wireless/ath/ath9k/common-debug.h:43: * @rx_spectral_sample_err: No. of good spectral samples\ndrivers/net/wireless/ath/ath9k/common-debug.h-44- */\ndrivers/net/wireless/ath/ath9k/common-debug.h=45=struct ath_rx_stats {\n--\ndrivers/net/wireless/ath/ath9k/common-debug.h-61-\tu32 rx_frags;\ndrivers/net/wireless/ath/ath9k/common-debug.h:62:\tu32 rx_spectral;\ndrivers/net/wireless/ath/ath9k/common-debug.h:63:\tu32 rx_spectral_sample_good;\ndrivers/net/wireless/ath/ath9k/common-debug.h:64:\tu32 rx_spectral_sample_err;\ndrivers/net/wireless/ath/ath9k/common-debug.h-65-};\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=44=ath_cmn_max_idx_verify_ht20_fft(u8 *sample_end, int bytes_read)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-62-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:63:\tmax_index = spectral_max_index_ht20(mag_info-\u003eall_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:64:\tmax_magnitude = spectral_max_magnitude(mag_info-\u003eall_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-65-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=82=ath_cmn_max_idx_verify_ht20_40_fft(u8 *sample_end, int bytes_read)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-101-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:102:\tlower_mag = spectral_max_magnitude(mag_info-\u003elower_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:103:\tlower_max_index = spectral_max_index_ht40(mag_info-\u003elower_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-104-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:105:\tupper_mag = spectral_max_magnitude(mag_info-\u003eupper_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:106:\tupper_max_index = spectral_max_index_ht40(mag_info-\u003eupper_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-107-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=132=ath_cmn_process_ht20_fft(struct ath_rx_status *rs,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-157-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:158:\tmagnitude = spectral_max_magnitude(mag_info-\u003eall_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-159-\tfft_sample_20.max_magnitude = __cpu_to_be16(magnitude);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-160-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:161:\tmax_index = spectral_max_index_ht20(mag_info-\u003eall_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-162-\tfft_sample_20.max_index = max_index;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-163-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:164:\tbitmap_w = spectral_bitmap_weight(mag_info-\u003eall_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-165-\tfft_sample_20.bitmap_weight = bitmap_w;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-184-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:185:\t/* DC value (value in the middle) is the blind spot of the spectral\ndrivers/net/wireless/ath/ath9k/common-spectral.c-186-\t * sample and invalid, interpolate it.\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=236=ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-287-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:288:\tlower_mag = spectral_max_magnitude(mag_info-\u003elower_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-289-\tfft_sample_40.lower_max_magnitude = __cpu_to_be16(lower_mag);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-290-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:291:\tupper_mag = spectral_max_magnitude(mag_info-\u003eupper_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-292-\tfft_sample_40.upper_max_magnitude = __cpu_to_be16(upper_mag);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-293-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:294:\tlower_max_index = spectral_max_index_ht40(mag_info-\u003elower_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-295-\tfft_sample_40.lower_max_index = lower_max_index;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-296-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:297:\tupper_max_index = spectral_max_index_ht40(mag_info-\u003eupper_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-298-\tfft_sample_40.upper_max_index = upper_max_index;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-299-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:300:\tlower_bitmap_w = spectral_bitmap_weight(mag_info-\u003elower_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-301-\tfft_sample_40.lower_bitmap_weight = lower_bitmap_w;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-302-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:303:\tupper_bitmap_w = spectral_bitmap_weight(mag_info-\u003eupper_bins);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-304-\tfft_sample_40.upper_bitmap_weight = upper_bitmap_w;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-331-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:332:\t/* DC value (value in the middle) is the blind spot of the spectral\ndrivers/net/wireless/ath/ath9k/common-spectral.c-333-\t * sample and invalid, interpolate it.\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=449=ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-467-\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,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-497-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:498:\t/* check if spectral scan bit is set. This does not have to be checked\ndrivers/net/wireless/ath/ath9k/common-spectral.c-499-\t * if received through a SPECTRAL phy error, but shouldn't hurt.\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-627-\t\t\t\tif (ret == 0)\ndrivers/net/wireless/ath/ath9k/common-spectral.c:628:\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_good);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-629-\t\t\t\telse\ndrivers/net/wireless/ath/ath9k/common-spectral.c:630:\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_err);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-631-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-645-\t\t\t\tif (ret == 0)\ndrivers/net/wireless/ath/ath9k/common-spectral.c:646:\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_good);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-647-\t\t\t\telse\ndrivers/net/wireless/ath/ath9k/common-spectral.c:648:\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_err);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-649-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=684=EXPORT_SYMBOL(ath_cmn_process_fft);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-686-/*********************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c:687:/* spectral_scan_ctl */\ndrivers/net/wireless/ath/ath9k/common-spectral.c-688-/*********************/\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-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-714-\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)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-722-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:723:\tif (!ath9k_hw_ops(ah)-\u003espectral_scan_trigger) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c-724-\t\tath_err(common, \"spectrum analyzer not implemented on this hardware\\n\");\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-739-\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:740:\tath9k_cmn_spectral_scan_config(common, spec_priv, spec_priv-\u003espectral_mode);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:741:\tath9k_hw_ops(ah)-\u003espectral_scan_trigger(ah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-742-\tath_ps_ops(common)-\u003erestore(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-743-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:744:EXPORT_SYMBOL(ath9k_cmn_spectral_scan_trigger);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-745-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:746:int ath9k_cmn_spectral_scan_config(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-747-\t\t\t struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:748:\t\t\t enum spectral_mode spectral_mode)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-749-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-751-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:752:\tif (!ath9k_hw_ops(ah)-\u003espectral_scan_trigger) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c-753-\t\tath_err(common, \"spectrum analyzer not implemented on this hardware\\n\");\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-756-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:757:\tswitch (spectral_mode) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c-758-\tcase SPECTRAL_DISABLED:\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-777-\tath_ps_ops(common)-\u003ewakeup(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:778:\tath9k_hw_ops(ah)-\u003espectral_scan_config(ah, \u0026spec_priv-\u003espec_config);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-779-\ndrivers/net/wireless/ath/ath9k/common-spectral.c-780-\t/* Radar detection needs the same bits. */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:781:\tif (spectral_mode == SPECTRAL_DISABLED \u0026\u0026\ndrivers/net/wireless/ath/ath9k/common-spectral.c-782-\t !common-\u003ehw-\u003econf.radar_enabled)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-786-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:787:\tspec_priv-\u003espectral_mode = spectral_mode;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-788-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-790-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:791:EXPORT_SYMBOL(ath9k_cmn_spectral_scan_config);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-792-\ndrivers/net/wireless/ath/ath9k/common-spectral.c=793=static ssize_t write_file_spec_scan_ctl(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-811-\tif (strncmp(\"trigger\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:812:\t\tath9k_cmn_spectral_scan_trigger(common, spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-813-\t} else if (strncmp(\"background\", buf, 10) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:814:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_BACKGROUND);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:815:\t\tath_dbg(common, CONFIG, \"spectral scan: background mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-816-\t} else if (strncmp(\"chanscan\", buf, 8) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:817:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_CHANSCAN);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:818:\t\tath_dbg(common, CONFIG, \"spectral scan: channel scan mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-819-\t} else if (strncmp(\"manual\", buf, 6) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:820:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_MANUAL);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:821:\t\tath_dbg(common, CONFIG, \"spectral scan: manual mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-822-\t} else if (strncmp(\"disable\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:823:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_DISABLED);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:824:\t\tath_dbg(common, CONFIG, \"spectral scan: disabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-825-\t} else {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=832=static const struct file_operations fops_spec_scan_ctl = {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-840-/*************************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c:841:/* spectral_short_repeat */\ndrivers/net/wireless/ath/ath9k/common-spectral.c-842-/*************************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c-843-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:844:static ssize_t read_file_spectral_short_repeat(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-845-\t\t\t\t\t char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-855-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:856:static ssize_t write_file_spectral_short_repeat(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-857-\t\t\t\t\t\tconst char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-874-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:875:static const struct file_operations fops_spectral_short_repeat = {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:876:\t.read = read_file_spectral_short_repeat,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:877:\t.write = write_file_spectral_short_repeat,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-878-\t.open = simple_open,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-883-/******************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c:884:/* spectral_count */\ndrivers/net/wireless/ath/ath9k/common-spectral.c-885-/******************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c-886-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:887:static ssize_t read_file_spectral_count(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-888-\t\t\t\t\tchar __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-898-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:899:static ssize_t write_file_spectral_count(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-900-\t\t\t\t\t const char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-916-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:917:static const struct file_operations fops_spectral_count = {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:918:\t.read = read_file_spectral_count,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:919:\t.write = write_file_spectral_count,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-920-\t.open = simple_open,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-925-/*******************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c:926:/* spectral_period */\ndrivers/net/wireless/ath/ath9k/common-spectral.c-927-/*******************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c-928-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:929:static ssize_t read_file_spectral_period(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-930-\t\t\t\t\t char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-940-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:941:static ssize_t write_file_spectral_period(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-942-\t\t\t\t\t const char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-959-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:960:static const struct file_operations fops_spectral_period = {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:961:\t.read = read_file_spectral_period,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:962:\t.write = write_file_spectral_period,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-963-\t.open = simple_open,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-968-/***********************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c:969:/* spectral_fft_period */\ndrivers/net/wireless/ath/ath9k/common-spectral.c-970-/***********************/\ndrivers/net/wireless/ath/ath9k/common-spectral.c-971-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:972:static ssize_t read_file_spectral_fft_period(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-973-\t\t\t\t\t char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-983-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:984:static ssize_t write_file_spectral_fft_period(struct file *file,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-985-\t\t\t\t\t const char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1002-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1003:static const struct file_operations fops_spectral_fft_period = {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1004:\t.read = read_file_spectral_fft_period,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1005:\t.write = write_file_spectral_fft_period,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1006-\t.open = simple_open,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=1039=static const struct rchan_callbacks rfs_spec_scan_cb = {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1047-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1048:void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1049-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1054-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1055:EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1056-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1057:void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1058-\t\t\t\t struct dentry *debugfs_phy)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1059-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1060:\tspec_priv-\u003erfs_chan_spec_scan = relay_open(\"spectral_scan\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1061-\t\t\t\t\t debugfs_phy,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1066-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1067:\tdebugfs_create_file(\"spectral_scan_ctl\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1068-\t\t\t 0600,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1070-\t\t\t \u0026fops_spec_scan_ctl);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1071:\tdebugfs_create_file(\"spectral_short_repeat\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1072-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1073-\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1074:\t\t\t \u0026fops_spectral_short_repeat);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1075:\tdebugfs_create_file(\"spectral_count\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1076-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1077-\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1078:\t\t\t \u0026fops_spectral_count);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1079:\tdebugfs_create_file(\"spectral_period\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1080-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1081-\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1082:\t\t\t \u0026fops_spectral_period);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1083:\tdebugfs_create_file(\"spectral_fft_period\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1084-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1085-\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1086:\t\t\t \u0026fops_spectral_fft_period);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1087-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1088:EXPORT_SYMBOL(ath9k_cmn_spectral_init_debug);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-19-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:20:#include \"../spectral_common.h\"\ndrivers/net/wireless/ath/ath9k/common-spectral.h-21-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:22:/* enum spectral_mode:\ndrivers/net/wireless/ath/ath9k/common-spectral.h-23- *\ndrivers/net/wireless/ath/ath9k/common-spectral.h:24: * @SPECTRAL_DISABLED: spectral mode is disabled\ndrivers/net/wireless/ath/ath9k/common-spectral.h-25- * @SPECTRAL_BACKGROUND: hardware sends samples when it is not busy with\ndrivers/net/wireless/ath/ath9k/common-spectral.h-26- *\tsomething else.\ndrivers/net/wireless/ath/ath9k/common-spectral.h:27: * @SPECTRAL_MANUAL: spectral scan is enabled, triggering for samples\ndrivers/net/wireless/ath/ath9k/common-spectral.h-28- *\tis performed manually.\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-31- */\ndrivers/net/wireless/ath/ath9k/common-spectral.h:32:enum spectral_mode {\ndrivers/net/wireless/ath/ath9k/common-spectral.h-33-\tSPECTRAL_DISABLED = 0,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-39-#define SPECTRAL_SCAN_BITMASK\t\t0x10\ndrivers/net/wireless/ath/ath9k/common-spectral.h:40:/* Radar info packet format, used for DFS and spectral formats. */\ndrivers/net/wireless/ath/ath9k/common-spectral.h-41-struct ath_radar_info {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-46-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:47:/* The HT20 spectral data has 4 bytes of additional information at it's end.\ndrivers/net/wireless/ath/ath9k/common-spectral.h-48- *\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h=97=struct ath_spec_scan_priv {\ndrivers/net/wireless/ath/ath9k/common-spectral.h-98-\tstruct ath_hw *ah;\ndrivers/net/wireless/ath/ath9k/common-spectral.h:99:\t/* relay(fs) channel for spectral scan */\ndrivers/net/wireless/ath/ath9k/common-spectral.h-100-\tstruct rchan *rfs_chan_spec_scan;\ndrivers/net/wireless/ath/ath9k/common-spectral.h:101:\tenum spectral_mode spectral_mode;\ndrivers/net/wireless/ath/ath9k/common-spectral.h-102-\tstruct ath_spec_scan spec_config;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-111-/* grabs the max magnitude from the all/upper/lower bins */\ndrivers/net/wireless/ath/ath9k/common-spectral.h:112:static inline u16 spectral_max_magnitude(u8 *bins)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-113-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-119-/* return the max magnitude from the all/upper/lower bins */\ndrivers/net/wireless/ath/ath9k/common-spectral.h:120:static inline u8 spectral_max_index(u8 *bins, int num_bins)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-121-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-147-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:148:static inline u8 spectral_max_index_ht40(u8 *bins)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-149-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-151-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:152:\tidx = spectral_max_index(bins, SPECTRAL_HT20_40_NUM_BINS);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-153-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-159-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:160:static inline u8 spectral_max_index_ht20(u8 *bins)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-161-{\ndrivers/net/wireless/ath/ath9k/common-spectral.h:162:\treturn spectral_max_index(bins, SPECTRAL_HT20_NUM_BINS);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-163-}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-165-/* return the bitmap weight from the all/upper/lower bins */\ndrivers/net/wireless/ath/ath9k/common-spectral.h:166:static inline u8 spectral_bitmap_weight(u8 *bins)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-167-{\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,\n--\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-191-\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)\n--\ndrivers/net/wireless/ath/ath9k/common.h-26-#include \"common-debug.h\"\ndrivers/net/wireless/ath/ath9k/common.h:27:#include \"common-spectral.h\"\ndrivers/net/wireless/ath/ath9k/common.h-28-\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_drv_debug.c=477=void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-478-{\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:479:\tath9k_cmn_spectral_deinit_debug(\u0026priv-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-480-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=482=int ath9k_htc_init_debug(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-489-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:490:\tath9k_cmn_spectral_init_debug(\u0026priv-\u003espec_priv, priv-\u003edebug.debugfs_phy);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-491-\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-313-\n\n"
} |
| 13/2 | 2026/09/11 02:23 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 28220 output: 43 thoughts: 1116 Thoughts: **Analyzing the ath9k_htc Wi-Fi Driver for Fuzzing Potential** Okay, let's break this down. `ath9k_htc` is a USB Wi-Fi driver. That means it's accessible through USB device emulation, like what syzkaller can do with `dummy_hcd` or `raw-gadget`. The key question is, can I configure and interact with `mac80211` and specifically `ath9k_htc` in this emulated environment? The answer is yes, through USB and tools like `nl80211`, `debugfs`, and `cfg80211`. Notably, userspace can directly write to debugfs files like `spectral_scan_ctl`. Now, the important question for syzkaller: is `ath9k` or `ath9k_htc` reachable? Following the triage philosophy, I need to check the negative criteria. Specifically, it's *not* structurally unreachable hardware (like those vendor-specific PCIe components that require a physical card). This is a driver accessible via a virtual bus: USB gadget, which falls into the "WorthFuzzing=true" category. `ath9k_htc`'s a USB Wi-Fi driver, so it's *definitely* accessible via emulated USB devices. It's also worth noting that `ath9k_common` and `ath9k_hw` are shared between the PCI version (`ath9k`) and the USB version (`ath9k_htc`). This could be very interesting for finding shared vulnerabilities. Now, let's delve into the patch itself. Looking at the diff, it seems that there has been modification of the `ath9k_cmn_spectral_scan_trigger` and `ath9k_cmn_spectral_scan_config` functions. In `ath9k_cmn_spectral_scan_trigger`, `ath9k_hw_enable_rxfilter` is called, with `ATH9K_RX_FILTER_PHYRADAR` and `ATH9K_RX_FILTER_PHYERR` as arguments, replacing the previous method of setting the RX filter. The same `ath9k_hw_enable_rxfilter` is used in `ath9k_cmn_spectral_scan_config`, but this time it is conditionally set via the `spectral_mode` argument. `ath9k_hw_disable_rxfilter` is called if this is not the case. The `ath9k_hw_enable_rxfilter` and `ath9k_hw_disable_rxfilter` functions themselves have been introduced. These functions are responsible for enabling and disabling the receiver filters respectively. Notably, these functions manipulate the hardware registers `AR_RX_FILTER`, `AR_PHY_ERR`, and `AR_RXCFG`. They map the provided bit flags to corresponding hardware bits, setting `AR_RXCFG_ZLFDMA` when PHY errors are enabled, and setting `AR_PHY_ERR_RADAR`, `AR_PHY_ERR_OFDM_TIMING`, and `AR_PHY_ERR_CCK_TIMING` as appropriate. Now I need to see what else calls those new functions, `ath9k_hw_enable_rxfilter` and `ath9k_hw_disable_rxfilter`, and also see where the old `setrxfilter` function is used. This will help determine the impact and breadth of this patch. |
| 14/2 | 2026/09/11 02:23 | tool | grepper |
0mArgs:{
"Expression": "ath9k_hw_(enable|disable)_rxfilter",
"PathPrefix": "drivers/net/wireless/ath/ath9k"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/common-spectral.c=715=void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-731-\tath_ps_ops(common)-\u003ewakeup(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:732:\tath9k_hw_enable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |\ndrivers/net/wireless/ath/ath9k/common-spectral.c-733-\t\t\t\t ATH9K_RX_FILTER_PHYERR);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=746=int ath9k_cmn_spectral_scan_config(struct ath_common *common,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-782-\t !common-\u003ehw-\u003econf.radar_enabled)\ndrivers/net/wireless/ath/ath9k/common-spectral.c:783:\t\tath9k_hw_disable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |\ndrivers/net/wireless/ath/ath9k/common-spectral.c-784-\t\t\t\t\t ATH9K_RX_FILTER_PHYERR);\n--\ndrivers/net/wireless/ath/ath9k/hw.c=2906=EXPORT_SYMBOL(ath9k_hw_setrxfilter);\n--\ndrivers/net/wireless/ath/ath9k/hw.c-2911- */\ndrivers/net/wireless/ath/ath9k/hw.c:2912:void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits)\ndrivers/net/wireless/ath/ath9k/hw.c-2913-{\n--\ndrivers/net/wireless/ath/ath9k/hw.c-2928-}\ndrivers/net/wireless/ath/ath9k/hw.c:2929:EXPORT_SYMBOL(ath9k_hw_enable_rxfilter);\ndrivers/net/wireless/ath/ath9k/hw.c-2930-\ndrivers/net/wireless/ath/ath9k/hw.c-2931-/*\ndrivers/net/wireless/ath/ath9k/hw.c:2932: * Counterpart of ath9k_hw_enable_rxfilter(). AR_RXCFG_ZLFDMA goes with the\ndrivers/net/wireless/ath/ath9k/hw.c-2933- * PHY error mask or the frames keep coming; callers clear all the PHY error\n--\ndrivers/net/wireless/ath/ath9k/hw.c-2935- */\ndrivers/net/wireless/ath/ath9k/hw.c:2936:void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits)\ndrivers/net/wireless/ath/ath9k/hw.c-2937-{\n--\ndrivers/net/wireless/ath/ath9k/hw.c-2951-}\ndrivers/net/wireless/ath/ath9k/hw.c:2952:EXPORT_SYMBOL(ath9k_hw_disable_rxfilter);\ndrivers/net/wireless/ath/ath9k/hw.c-2953-\n--\ndrivers/net/wireless/ath/ath9k/hw.h=1057=void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits);\ndrivers/net/wireless/ath/ath9k/hw.h:1058:void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits);\ndrivers/net/wireless/ath/ath9k/hw.h:1059:void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits);\ndrivers/net/wireless/ath/ath9k/hw.h-1060-bool ath9k_hw_phy_disable(struct ath_hw *ah);\n"
} |
| 15/2 | 2026/09/11 02:23 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 31159 output: 230 thoughts: 1221 Thoughts: **Analysis of ath9k/ath9k_htc for Fuzzing Potential** Okay, let's break this down. My goal is to determine the fuzzing potential of this code. First, I needed to understand the function calls and the relevant Kconfig options. I started by listing the required Kconfig options: `ATH9K_HW`, `ATH9K_COMMON`, `ATH9K_COMMON_SPECTRAL`, and either `ATH9K_HTC`/`ATH9K_HTC_DEBUGFS` or `ATH9K`/`ATH9K_DEBUGFS`. Then, I dove into the Kconfig dependencies. `ATH9K_COMMON_SPECTRAL` depends on either `ATH9K_DEBUGFS` or `ATH9K_HTC_DEBUGFS`, with a selection of `RELAY`. `ATH9K_HTC_DEBUGFS` requires `ATH9K_HTC` and `DEBUG_FS`, selecting `ATH9K_COMMON_DEBUG`. `ATH9K_HTC` is dependent on `USB` and `MAC80211` and selects `MAC80211_LEDS` (if `LEDS_CLASS` is true or MAC80211 is selected), `ATH9K_HW`, and `ATH9K_COMMON`. Similarly, `ATH9K_DEBUGFS` requires `ATH9K` and `DEBUG_FS`, selecting `ATH9K_COMMON_DEBUG`, and `ATH9K` depends on `MAC80211` and `HAS_DMA`, selects `ATH9K_HW`, `MAC80211_LEDS` (if `LEDS_CLASS` is true or MAC80211 is selected), and `ATH9K_COMMON`. Next, I looked at the functions that were added or modified. The key ones are: `ath9k_cmn_spectral_scan_trigger`, `ath9k_cmn_spectral_scan_config`, `ath9k_hw_enable_rxfilter`, and `ath9k_hw_disable_rxfilter`. These aren't general-purpose; they're very specific to the hardware RX filtering and spectral scanning within the ath9k framework. I confirmed the files touched were `drivers/net/wireless/ath/ath9k/common-spectral.c`, `drivers/net/wireless/ath/ath9k/hw.c`, and `drivers/net/wireless/ath/ath9k/hw.h`, which aligns with the function focus. Given this information, I re-confirmed the Kconfig options that are necessary: `ATH9K_COMMON_SPECTRAL`, `ATH9K_HW`, `ATH9K_HTC`, `ATH9K_HTC_DEBUGFS`, `ATH9K`, and `ATH9K_DEBUGFS`. I double-checked the dependencies: `ATH9K_COMMON_SPECTRAL` needs either `ATH9K_DEBUGFS` or `ATH9K_HTC_DEBUGFS`; `ATH9K_HTC` requires `USB` and `MAC80211`; and `ATH9K_HTC_DEBUGFS` needs `ATH9K_HTC` and `DEBUG_FS`. **Final Verdict**: The patch *is* worth fuzzing. I reached this conclusion because it introduces new functions for configuring hardware RX filters (`ath9k_hw_enable_rxfilter`, `ath9k_hw_disable_rxfilter`), and modifies spectral scan functions (`ath9k_cmn_spectral_scan_trigger`, `ath9k_cmn_spectral_scan_config`). These functions are reachable through debugfs spectral control nodes, scanning, and channel change operations. These are things that can be emulated using USB gadget or Raw Gadget, and since this part of the driver handles direct hardware interactions, and likely PHY register access/manipulation, I can target these functions with fuzzing. My Focus Symbols are: - `ath9k_hw_enable_rxfilter` - `ath9k_hw_disable_rxfilter` - `ath9k_cmn_spectral_scan_trigger` - `ath9k_cmn_spectral_scan_config` And I'll enable these configs: - `ATH9K_COMMON_SPECTRAL` - `ATH9K_HW` - `ATH9K_HTC` - `ATH9K_HTC_DEBUGFS` - `ATH9K` - `ATH9K_DEBUGFS` I am now confident and ready to configure the fuzzing process. |
| 16/2 | 2026/09/11 02:23 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"ATH9K_COMMON_SPECTRAL",
"ATH9K_HW",
"ATH9K_HTC",
"ATH9K_HTC_DEBUGFS",
"ATH9K",
"ATH9K_DEBUGFS"
],
"FocusSymbols": [
"ath9k_hw_enable_rxfilter",
"ath9k_hw_disable_rxfilter",
"ath9k_cmn_spectral_scan_trigger",
"ath9k_cmn_spectral_scan_config"
],
"Reasoning": "The patch modifies ath9k spectral scan configuration and trigger paths and introduces new RX filter manipulation functions (ath9k_hw_enable_rxfilter and ath9k_hw_disable_rxfilter) in the ath9k hardware layer to avoid read-modify-write register access issues. This code is reachable via userspace debugfs spectral scan controls and scanning operations on ath9k/ath9k_htc devices (emulatable via USB).",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"ATH9K_COMMON_SPECTRAL",
"ATH9K_HW",
"ATH9K_HTC",
"ATH9K_HTC_DEBUGFS",
"ATH9K",
"ATH9K_DEBUGFS"
],
"FocusSymbols": [
"ath9k_hw_enable_rxfilter",
"ath9k_hw_disable_rxfilter",
"ath9k_cmn_spectral_scan_trigger",
"ath9k_cmn_spectral_scan_config"
],
"Reasoning": "The patch modifies ath9k spectral scan configuration and trigger paths and introduces new RX filter manipulation functions (ath9k_hw_enable_rxfilter and ath9k_hw_disable_rxfilter) in the ath9k hardware layer to avoid read-modify-write register access issues. This code is reachable via userspace debugfs spectral scan controls and scanning operations on ath9k/ath9k_htc devices (emulatable via USB).",
"WorthFuzzing": true
} |
| 17/1 | 2026/09/11 02:23 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 18/2 | 2026/09/11 02:23 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch introduces helper functions ath9k_hw_enable_rxfilter() and ath9k_hw_disable_rxfilter() and updates spectral scan routines in the ath9k driver to enable and disable hardware RX filter bits without performing register readbacks. All local variables in the newly introduced and modified code are explicitly initialized, and the operations perform direct hardware register manipulation without allocating buffers, exposing structure padding, reading uninitialized stack/heap memory, or copying data to user space. Therefore, there are no uninitialized memory risks requiring a dedicated KMSAN fuzzing session.",
"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 fa7d39a0a6ee1daf8122d84f8fbe7eec7a75310d
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 11 02:22:38 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index ca01a07f6630c..841075d904f8d 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -716,7 +716,6 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
struct ath_spec_scan_priv *spec_priv)
{
struct ath_hw *ah = spec_priv->ah;
- u32 rxfilter;
if (IS_ENABLED(CONFIG_ATH9K_TX99))
return;
@@ -730,10 +729,8 @@ void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
return;
ath_ps_ops(common)->wakeup(common);
- rxfilter = ath9k_hw_getrxfilter(ah);
- ath9k_hw_setrxfilter(ah, rxfilter |
- ATH9K_RX_FILTER_PHYRADAR |
- ATH9K_RX_FILTER_PHYERR);
+ ath9k_hw_enable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |
+ ATH9K_RX_FILTER_PHYERR);
/* TODO: usually this should not be necessary, but for some reason
* (or in some mode?) the trigger must be called after the
@@ -779,6 +776,12 @@ int ath9k_cmn_spectral_scan_config(struct ath_common *common,
ath_ps_ops(common)->wakeup(common);
ath9k_hw_ops(ah)->spectral_scan_config(ah, &spec_priv->spec_config);
+
+ /* Radar detection needs the same bits. */
+ if (spectral_mode == SPECTRAL_DISABLED &&
+ !common->hw->conf.radar_enabled)
+ ath9k_hw_disable_rxfilter(ah, ATH9K_RX_FILTER_PHYRADAR |
+ ATH9K_RX_FILTER_PHYERR);
ath_ps_ops(common)->restore(common);
spec_priv->spectral_mode = spectral_mode;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e08ab73fcacb3..6f86a89675485 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2905,6 +2905,52 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
}
EXPORT_SYMBOL(ath9k_hw_setrxfilter);
+/*
+ * Set bits in the RX filter without reading it back: on USB a failed read
+ * returns all ones, and writing that back would open every filter bit.
+ */
+void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits)
+{
+ u32 phybits = 0;
+
+ if (bits & ATH9K_RX_FILTER_PHYRADAR)
+ phybits |= AR_PHY_ERR_RADAR;
+ if (bits & ATH9K_RX_FILTER_PHYERR)
+ phybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;
+
+ REG_SET_BIT(ah, AR_RX_FILTER, bits);
+
+ if (phybits) {
+ REG_SET_BIT(ah, AR_PHY_ERR, phybits);
+ /* PHY errors are reported in zero length frames. */
+ REG_SET_BIT(ah, AR_RXCFG, AR_RXCFG_ZLFDMA);
+ }
+}
+EXPORT_SYMBOL(ath9k_hw_enable_rxfilter);
+
+/*
+ * Counterpart of ath9k_hw_enable_rxfilter(). AR_RXCFG_ZLFDMA goes with the
+ * PHY error mask or the frames keep coming; callers clear all the PHY error
+ * bits together, as checking for a remaining one would need a read.
+ */
+void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits)
+{
+ u32 phybits = 0;
+
+ if (bits & ATH9K_RX_FILTER_PHYRADAR)
+ phybits |= AR_PHY_ERR_RADAR;
+ if (bits & ATH9K_RX_FILTER_PHYERR)
+ phybits |= AR_PHY_ERR_OFDM_TIMING | AR_PHY_ERR_CCK_TIMING;
+
+ REG_CLR_BIT(ah, AR_RX_FILTER, bits);
+
+ if (phybits) {
+ REG_CLR_BIT(ah, AR_PHY_ERR, phybits);
+ REG_CLR_BIT(ah, AR_RXCFG, AR_RXCFG_ZLFDMA);
+ }
+}
+EXPORT_SYMBOL(ath9k_hw_disable_rxfilter);
+
bool ath9k_hw_phy_disable(struct ath_hw *ah)
{
if (ath9k_hw_mci_is_enabled(ah))
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index b942b8303d8f8..983146208f264 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -1055,6 +1055,8 @@ void ath9k_hw_get_channel_centers(struct ath_hw *ah,
struct chan_centers *centers);
u32 ath9k_hw_getrxfilter(struct ath_hw *ah);
void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits);
+void ath9k_hw_enable_rxfilter(struct ath_hw *ah, u32 bits);
+void ath9k_hw_disable_rxfilter(struct ath_hw *ah, u32 bits);
bool ath9k_hw_phy_disable(struct ath_hw *ah);
bool ath9k_hw_disable(struct ath_hw *ah);
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test);
|
| 19/3 | 2026/09/11 02:23 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3612 output: 39 thoughts: 769 Thoughts: **Patch Analysis: Uninitialized Memory Risk Assessment** Okay, let's dive into this patch and see if we need to fire up KMSAN fuzzing. My initial scan looks pretty good, but let's be thorough. First, I see the patch focuses on the `ath9k` driver, specifically dealing with spectral scan configuration and RX filter management in the `ath9k/common-spectral.c` and `ath9k/hw.c` files. The core change appears to be a refactoring of how RX filters related to PHY radar and PHY error are enabled and disabled. They've replaced direct manipulation of the `rxfilter` variable with dedicated `ath9k_hw_enable_rxfilter` and `ath9k_hw_disable_rxfilter` functions. This might make the code cleaner, but the functionality remains the same. The new functions, `ath9k_hw_enable_rxfilter` and `ath9k_hw_disable_rxfilter`, are pretty straightforward. Both initialize a local variable `phybits` to zero, and then they operate on hardware registers using `REG_SET_BIT` and `REG_CLR_BIT`. Those are, of course, critical; they're writing to MMIO or USB registers, so any potential issues with their parameters would be catastrophic. But they are using constants to set and clear the bits, meaning the values are set. `ath9k_cmn_spectral_scan_config` looks safe; it uses existing variables that I see are already initialized. No user-space interaction. That's a huge relief, no direct `copy_to_user`, `put_user`, netlink, or ioctl calls to worry about. We aren't copying any heap or stack data. It also looks like the patch resolves an existing issue with USB, that could cause all filter bits to be set. That is a good sign! Overall, my quick assessment suggests there aren't any glaring uninitialized memory vulnerabilities here. The arguments to the hardware functions are well-defined, there's no unchecked data being copied around, and it looks like a clean refactoring. We might have to consider, just to be *completely* certain, what `REG_SET_BIT` and `REG_CLR_BIT` actually *do* in the `ath9k` context. I'll need to double check those. But, overall, it looks like a low-risk change. I think we can hold off on fuzzing for now. |
| 20/3 | 2026/09/11 02:23 | tool | grepper |
0mArgs:{
"Expression": "#define REG_SET_BIT",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/hw.h-127-\t(((REG_READ(_a, _r) \u0026 _f) \u003e\u003e _f##_S))\ndrivers/net/wireless/ath/ath9k/hw.h:128:#define REG_SET_BIT(_a, _r, _f) \\\ndrivers/net/wireless/ath/ath9k/hw.h-129-\tREG_RMW(_a, _r, (_f), 0)\n"
} |
| 21/3 | 2026/09/11 02:23 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5083 output: 38 thoughts: 10 Thoughts: Okay, here's my attempt at summarizing the thought process, tailored for an expert audience, and written in the first person: **Checking `REG_RMW`** Alright, time to dig into this. My first thought is to zero in on `REG_RMW`. I need to assess how it's being used. Specifically, I'm thinking about the implications – potential race conditions, atomicity issues, or perhaps a performance bottleneck. Are we dealing with shared resources? Memory-mapped registers? I need to quickly determine if this register is central to any critical path in the system. The specifics of the read-modify-write operation are key. What are the read, modify, and write stages? Are they completely atomic, or is there a window for interruption? If it's a hardware register, I'm already anticipating the typical challenges: bus contention, potential cache coherency problems if the write isn't immediately visible, and any hardware-specific quirks in the RMW implementation itself. I should also check if this specific implementation has any errata. Ultimately, my analysis will depend on the overall context, the surrounding code, and the expected behavior of this component. Time to put the pieces together. |
| 22/3 | 2026/09/11 02:23 | tool | grepper |
0mArgs:{
"Expression": "#define REG_RMW",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/hw.h-88-\ndrivers/net/wireless/ath/ath9k/hw.h:89:#define REG_RMW(_ah, _reg, _set, _clr) \\\ndrivers/net/wireless/ath/ath9k/hw.h-90-\t(_ah)-\u003ereg_ops.rmw((_ah), (_reg), (_set), (_clr))\n--\ndrivers/net/wireless/ath/ath9k/hw.h-109-\ndrivers/net/wireless/ath/ath9k/hw.h:110:#define REG_RMW_BUFFER_FLUSH(_ah)\t\t\t\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h-111-\tdo {\t\t\t\t\t\t\t\t\\\n--\ndrivers/net/wireless/ath/ath9k/hw.h-123-#define MS(_v, _f) (((_v) \u0026 _f) \u003e\u003e _f##_S)\ndrivers/net/wireless/ath/ath9k/hw.h:124:#define REG_RMW_FIELD(_a, _r, _f, _v) \\\ndrivers/net/wireless/ath/ath9k/hw.h-125-\tREG_RMW(_a, _r, (((_v) \u003c\u003c _f##_S) \u0026 _f), (_f))\n"
} |
| 23/3 | 2026/09/11 02:23 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5719 output: 142 thoughts: 212 Thoughts: **KMSAN Assessment: Minimal Risk in This Hardware-Focused Patch** Alright, looking over this code, it's pretty clear this doesn't necessitate KMSAN. We're talking pure hardware register manipulation within the ath9k driver. No user-space shenanigans, no memory allocations – no stack or heap involvement whatsoever. That immediately puts us in a safe zone as far as uninitialized memory goes. Specifically, the patch introduces these helper functions, `ath9k_hw_enable_rxfilter()` and `ath9k_hw_disable_rxfilter()`, designed to directly set and clear RX filter bits. Crucially, it's all done directly at the register level, without any readbacks of register states, which is smart. It also updates the spectral scan logic in `ath9k` to make use of these helpers. All the local variables, like `phybits`, are initialized explicitly to zero which gives peace of mind. The changes are exclusively about hardware register modification using macros like `REG_SET_BIT` and `REG_CLR_BIT`. The absence of user-space copies, buffer allocations, or decisions driven by potentially uninitialized data clinches it. No risks here, so we don't need to dedicate a KMSAN session to fuzzing this. Ready to move on to the `set-results` call. |
| 24/3 | 2026/09/11 02:23 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch introduces helper functions ath9k_hw_enable_rxfilter() and ath9k_hw_disable_rxfilter() and updates spectral scan routines in the ath9k driver to enable and disable hardware RX filter bits without performing register readbacks. All local variables in the newly introduced and modified code are explicitly initialized, and the operations perform direct hardware register manipulation without allocating buffers, exposing structure padding, reading uninitialized stack/heap memory, or copying data to user space. Therefore, there are no uninitialized memory risks requiring a dedicated KMSAN fuzzing session.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch introduces helper functions ath9k_hw_enable_rxfilter() and ath9k_hw_disable_rxfilter() and updates spectral scan routines in the ath9k driver to enable and disable hardware RX filter bits without performing register readbacks. All local variables in the newly introduced and modified code are explicitly initialized, and the operations perform direct hardware register manipulation without allocating buffers, exposing structure padding, reading uninitialized stack/heap memory, or copying data to user space. Therefore, there are no uninitialized memory risks requiring a dedicated KMSAN fuzzing session.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|