| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/05 01:03 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"ATH9K",
"ATH9K_HTC",
"ATH9K_DEBUGFS",
"ATH9K_HTC_DEBUGFS",
"ATH9K_COMMON_SPECTRAL",
"MAC80211",
"DEBUG_FS"
],
"FocusSymbols": [
"ath_cmn_process_fft",
"ath9k_cmn_spectral_init_debug",
"ath9k_htc_init_debug",
"ath9k_init_debug"
],
"KMSANReasoning": "The patch refactors spectral scan RX statistics accounting in the ath9k driver by passing an explicit pointer to `struct ath_rx_stats` in `ath_spec_scan_priv` instead of inappropriately casting `common-\u003epriv` to `struct ath_softc *` (which was invalid for `ath9k_htc`). \n\nThis change does not introduce or modify uninitialized memory handling, uninitialized branching, or kernel-to-user info leaks. Any memory access issues related to invalid pointer dereferencing or struct casting are caught by KASAN or standard kernel fault handlers. Therefore, dedicated KMSAN fuzzing is not required.",
"NeedsKMSAN": false,
"Reasoning": "The patch refactors the spectral scan RX statistics accounting in the ath9k/ath9k_htc wireless driver to avoid incorrect struct casting between ath9k and ath9k_htc. The modified code is reachable in virtualized environments via USB emulation (ath9k_htc) and debugfs/wireless RX frame processing.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/05 01:03 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 0d5d4db8d8a6595a95be8707985fc133de126442\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Sep 5 01:03:19 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..d8be24ebcd247 100644\n--- a/drivers/net/wireless/ath/ath9k/common-spectral.c\n+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c\n@@ -465,6 +465,20 @@ ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv)\n \t\treturn 0;\n }\n \n+static void ath_cmn_count_fft_sample(struct ath_spec_scan_priv *spec_priv,\n+\t\t\t\t int ret)\n+{\n+\tstruct ath_rx_stats *rx_stats = spec_priv-\u003erx_stats;\n+\n+\tif (!rx_stats)\n+\t\treturn;\n+\n+\tif (ret == 0)\n+\t\trx_stats-\u003erx_spectral_sample_good++;\n+\telse\n+\t\trx_stats-\u003erx_spectral_sample_err++;\n+}\n+\n /* returns 1 if this was a spectral frame, even if not handled. */\n int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,\n \t\t struct ath_rx_status *rs, u64 tsf)\n@@ -472,7 +486,6 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h\n \tu8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};\n \tstruct ath_hw *ah = spec_priv-\u003eah;\n \tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\n-\tstruct ath_softc *sc = common-\u003epriv;\n \tu8 num_bins, *vdata = (u8 *)hdr;\n \tstruct ath_radar_info *radar_info;\n \tint len = rs-\u003ers_datalen;\n@@ -624,10 +637,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h\n \t\t\t\tret = fft_handler(rs, spec_priv, sample_buf,\n \t\t\t\t\t\t tsf, freq, chan_type);\n \n-\t\t\t\tif (ret == 0)\n-\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_good);\n-\t\t\t\telse\n-\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_err);\n+\t\t\t\tath_cmn_count_fft_sample(spec_priv, ret);\n \n \t\t\t\t/* Mix the received bins to the /dev/random\n \t\t\t\t * pool\n@@ -642,10 +652,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h\n \t\t\t\tret = fft_handler(rs, spec_priv, sample_start,\n \t\t\t\t\t\t tsf, freq, chan_type);\n \n-\t\t\t\tif (ret == 0)\n-\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_good);\n-\t\t\t\telse\n-\t\t\t\t\tRX_STAT_INC(sc, rx_spectral_sample_err);\n+\t\t\t\tath_cmn_count_fft_sample(spec_priv, ret);\n \n \t\t\t\t/* Mix the received bins to the /dev/random\n \t\t\t\t * pool\n@@ -1052,8 +1059,10 @@ void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\n EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);\n \n void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\n-\t\t\t\t struct dentry *debugfs_phy)\n+\t\t\t\t struct dentry *debugfs_phy,\n+\t\t\t\t struct ath_rx_stats *rx_stats)\n {\n+\tspec_priv-\u003erx_stats = rx_stats;\n \tspec_priv-\u003erfs_chan_spec_scan = relay_open(\"spectral_scan\",\n \t\t\t\t\t debugfs_phy,\n \t\t\t\t\t 1024, 256, \u0026rfs_spec_scan_cb,\ndiff --git a/drivers/net/wireless/ath/ath9k/common-spectral.h b/drivers/net/wireless/ath/ath9k/common-spectral.h\nindex 011d8ab8b9744..0e2c7d6d34874 100644\n--- a/drivers/net/wireless/ath/ath9k/common-spectral.h\n+++ b/drivers/net/wireless/ath/ath9k/common-spectral.h\n@@ -94,12 +94,16 @@ struct ath_ht20_40_fft_packet {\n \tstruct ath_radar_info radar_info;\n } __packed;\n \n+struct ath_rx_stats;\n+\n struct ath_spec_scan_priv {\n \tstruct ath_hw *ah;\n \t/* relay(fs) channel for spectral scan */\n \tstruct rchan *rfs_chan_spec_scan;\n \tenum spectral_mode spectral_mode;\n \tstruct ath_spec_scan spec_config;\n+\t/* driver's RX statistics to account samples into, if any */\n+\tstruct ath_rx_stats *rx_stats;\n };\n \n #define SPECTRAL_HT20_40_TOTAL_DATA_LEN\t(sizeof(struct ath_ht20_40_fft_packet))\n@@ -169,7 +173,9 @@ static inline u8 spectral_bitmap_weight(u8 *bins)\n }\n \n #ifdef CONFIG_ATH9K_COMMON_SPECTRAL\n-void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);\n+void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\n+\t\t\t\t struct dentry *debugfs_phy,\n+\t\t\t\t struct ath_rx_stats *rx_stats);\n void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);\n \n void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\n@@ -181,7 +187,8 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h\n \t\t struct ath_rx_status *rs, u64 tsf);\n #else\n static inline void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\n-\t\t\t\t\t\t struct dentry *debugfs_phy)\n+\t\t\t\t\t\t struct dentry *debugfs_phy,\n+\t\t\t\t\t\t struct ath_rx_stats *rx_stats)\n {\n }\n \ndiff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c\nindex 74a0134075cf9..042a4f542a943 100644\n--- a/drivers/net/wireless/ath/ath9k/debug.c\n+++ b/drivers/net/wireless/ath/ath9k/debug.c\n@@ -1389,7 +1389,8 @@ int ath9k_init_debug(struct ath_hw *ah)\n \n \tath9k_dfs_init_debug(sc);\n \tath9k_tx99_init_debug(sc);\n-\tath9k_cmn_spectral_init_debug(\u0026sc-\u003espec_priv, sc-\u003edebug.debugfs_phy);\n+\tath9k_cmn_spectral_init_debug(\u0026sc-\u003espec_priv, sc-\u003edebug.debugfs_phy,\n+\t\t\t\t \u0026sc-\u003edebug.stats.rxstats);\n \n \tdebugfs_create_devm_seqfile(sc-\u003edev, \"dma\", sc-\u003edebug.debugfs_phy,\n \t\t\t\t read_file_dma);\ndiff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c\nindex 9437d69877cc5..9d354b1d929c8 100644\n--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c\n+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c\n@@ -487,7 +487,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)\n \tpriv-\u003edebug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,\n \t\t\t\t\t priv-\u003ehw-\u003ewiphy-\u003edebugfsdir);\n \n-\tath9k_cmn_spectral_init_debug(\u0026priv-\u003espec_priv, priv-\u003edebug.debugfs_phy);\n+\tath9k_cmn_spectral_init_debug(\u0026priv-\u003espec_priv, priv-\u003edebug.debugfs_phy,\n+\t\t\t\t \u0026priv-\u003edebug.rx_stats);\n \n \tdebugfs_create_file(\"tgt_int_stats\", 0400, priv-\u003edebug.debugfs_phy,\n \t\t\t priv, \u0026fops_tgt_int_stats);\n"
} |
| 2/1 | 2026/09/05 01:03 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": [
"ATH9K",
"ATH9K_HTC",
"ATH9K_DEBUGFS",
"ATH9K_HTC_DEBUGFS",
"ATH9K_COMMON_SPECTRAL",
"MAC80211",
"DEBUG_FS"
],
"FocusSymbols": [
"ath_cmn_process_fft",
"ath9k_cmn_spectral_init_debug",
"ath9k_htc_init_debug",
"ath9k_init_debug"
],
"Reasoning": "The patch refactors the spectral scan RX statistics accounting in the ath9k/ath9k_htc wireless driver to avoid incorrect struct casting between ath9k and ath9k_htc. The modified code is reachable in virtualized environments via USB emulation (ath9k_htc) and debugfs/wireless RX frame processing.",
"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 0d5d4db8d8a6595a95be8707985fc133de126442
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 5 01:03:19 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..d8be24ebcd247 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -465,6 +465,20 @@ ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv)
return 0;
}
+static void ath_cmn_count_fft_sample(struct ath_spec_scan_priv *spec_priv,
+ int ret)
+{
+ struct ath_rx_stats *rx_stats = spec_priv->rx_stats;
+
+ if (!rx_stats)
+ return;
+
+ if (ret == 0)
+ rx_stats->rx_spectral_sample_good++;
+ else
+ rx_stats->rx_spectral_sample_err++;
+}
+
/* returns 1 if this was a spectral frame, even if not handled. */
int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,
struct ath_rx_status *rs, u64 tsf)
@@ -472,7 +486,6 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
u8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};
struct ath_hw *ah = spec_priv->ah;
struct ath_common *common = ath9k_hw_common(spec_priv->ah);
- struct ath_softc *sc = common->priv;
u8 num_bins, *vdata = (u8 *)hdr;
struct ath_radar_info *radar_info;
int len = rs->rs_datalen;
@@ -624,10 +637,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
ret = fft_handler(rs, spec_priv, sample_buf,
tsf, freq, chan_type);
- if (ret == 0)
- RX_STAT_INC(sc, rx_spectral_sample_good);
- else
- RX_STAT_INC(sc, rx_spectral_sample_err);
+ ath_cmn_count_fft_sample(spec_priv, ret);
/* Mix the received bins to the /dev/random
* pool
@@ -642,10 +652,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
ret = fft_handler(rs, spec_priv, sample_start,
tsf, freq, chan_type);
- if (ret == 0)
- RX_STAT_INC(sc, rx_spectral_sample_good);
- else
- RX_STAT_INC(sc, rx_spectral_sample_err);
+ ath_cmn_count_fft_sample(spec_priv, ret);
/* Mix the received bins to the /dev/random
* pool
@@ -1052,8 +1059,10 @@ void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)
EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);
void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
- struct dentry *debugfs_phy)
+ struct dentry *debugfs_phy,
+ struct ath_rx_stats *rx_stats)
{
+ spec_priv->rx_stats = rx_stats;
spec_priv->rfs_chan_spec_scan = relay_open("spectral_scan",
debugfs_phy,
1024, 256, &rfs_spec_scan_cb,
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.h b/drivers/net/wireless/ath/ath9k/common-spectral.h
index 011d8ab8b9744..0e2c7d6d34874 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.h
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.h
@@ -94,12 +94,16 @@ struct ath_ht20_40_fft_packet {
struct ath_radar_info radar_info;
} __packed;
+struct ath_rx_stats;
+
struct ath_spec_scan_priv {
struct ath_hw *ah;
/* relay(fs) channel for spectral scan */
struct rchan *rfs_chan_spec_scan;
enum spectral_mode spectral_mode;
struct ath_spec_scan spec_config;
+ /* driver's RX statistics to account samples into, if any */
+ struct ath_rx_stats *rx_stats;
};
#define SPECTRAL_HT20_40_TOTAL_DATA_LEN (sizeof(struct ath_ht20_40_fft_packet))
@@ -169,7 +173,9 @@ static inline u8 spectral_bitmap_weight(u8 *bins)
}
#ifdef CONFIG_ATH9K_COMMON_SPECTRAL
-void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);
+void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
+ struct dentry *debugfs_phy,
+ struct ath_rx_stats *rx_stats);
void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);
void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
@@ -181,7 +187,8 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
struct ath_rx_status *rs, u64 tsf);
#else
static inline void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
- struct dentry *debugfs_phy)
+ struct dentry *debugfs_phy,
+ struct ath_rx_stats *rx_stats)
{
}
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 74a0134075cf9..042a4f542a943 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1389,7 +1389,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_dfs_init_debug(sc);
ath9k_tx99_init_debug(sc);
- ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
+ ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy,
+ &sc->debug.stats.rxstats);
debugfs_create_devm_seqfile(sc->dev, "dma", sc->debug.debugfs_phy,
read_file_dma);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index 9437d69877cc5..9d354b1d929c8 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -487,7 +487,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
priv->hw->wiphy->debugfsdir);
- ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
+ ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy,
+ &priv->debug.rx_stats);
debugfs_create_file("tgt_int_stats", 0400, priv->debug.debugfs_phy,
priv, &fops_tgt_int_stats);
|
| 3/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5057 output: 37 thoughts: 256 Thoughts: **Fuzzing Strategy for this Patch** Alright, let's break this down. My initial assessment is focused on determining the fuzzability of this patch and crafting an effective fuzzing strategy. We're looking at modifications to `drivers/net/wireless/ath/ath9k/common-spectral.c`, `.h`, `debug.c`, and `htc_drv_debug.c`. Immediately, I need to know the context of these drivers. Okay, so `ath9k` is PCI/AHB wireless, and `ath9k_htc` is USB wireless. That's good information. USB drivers are often prime targets, because they can be emulated. Syzkaller's USB fuzzing capabilities, particularly using Raw Gadget, dummy_hcd, or vhci, can be incredibly effective here. I need to figure out if this `common-spectral` code is even used by both. Is the same spectral functionality in both `ath9k` and `ath9k_htc` or are we only fuzzing one? Now, I'll need to dig into the codebase. I'm going to start searching for uses of `ath9k_htc`, `ath9k`, and the spectral-related functions. We'll need to know which functions are entry points and whether they're even reachable. We'll need to determine the optimal configuration for this. This search will help me narrow down what needs fuzzing. |
| 4/2 | 2026/09/05 01:03 | tool | grepper |
0mArgs:{
"Expression": "ATH9K_HTC",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/Kconfig=13=config ATH9K_BTCOEX_SUPPORT\ndrivers/net/wireless/ath/ath9k/Kconfig-14-\tbool \"Atheros bluetooth coexistence support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:15:\tdepends on (ATH9K || ATH9K_HTC)\ndrivers/net/wireless/ath/ath9k/Kconfig-16-\tdefault y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig=156=config ATH9K_PCI_NO_EEPROM\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-171-\ndrivers/net/wireless/ath/ath9k/Kconfig:172:config ATH9K_HTC\ndrivers/net/wireless/ath/ath9k/Kconfig-173-\ttristate \"Atheros HTC based wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-186-\ndrivers/net/wireless/ath/ath9k/Kconfig:187:config ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-188-\tbool \"Atheros ath9k_htc debugging\"\ndrivers/net/wireless/ath/ath9k/Kconfig:189:\tdepends on ATH9K_HTC \u0026\u0026 DEBUG_FS\ndrivers/net/wireless/ath/ath9k/Kconfig-190-\tselect ATH9K_COMMON_DEBUG\n--\ndrivers/net/wireless/ath/ath9k/Kconfig=206=config ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/Kconfig-207-\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:208:\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-209-\tselect RELAY\n--\ndrivers/net/wireless/ath/ath9k/Makefile=68=ath9k_htc-y +=\thtc_hst.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-76-\ndrivers/net/wireless/ath/ath9k/Makefile:77:ath9k_htc-$(CONFIG_ATH9K_HTC_DEBUGFS) += htc_drv_debug.o\ndrivers/net/wireless/ath/ath9k/Makefile-78-\ndrivers/net/wireless/ath/ath9k/Makefile:79:obj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o\ndrivers/net/wireless/ath/ath9k/Makefile-80-\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3390=static bool ath9k_hw_ar9300_fill_eeprom(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3400-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3401:#if defined(CONFIG_ATH9K_DEBUGFS) || defined(CONFIG_ATH9K_HTC_DEBUGFS)\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3402-static u32 ar9003_dump_modal_eeprom(char *buf, u32 len, u32 size,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=232=static inline void ath9k_skb_queue_complete(struct hif_device_usb *hif_dev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-238-\twhile ((skb = __skb_dequeue(queue)) != NULL) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:239:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/hif_usb.c-240-\t\tint ln = skb-\u003elen;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=376=static int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-399-\t/* Mgmt/Beacon frames don't use the TX buffer pool */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:400:\tif ((tx_ctl-\u003etype == ATH9K_HTC_MGMT) ||\ndrivers/net/wireless/ath/ath9k/hif_usb.c:401:\t (tx_ctl-\u003etype == ATH9K_HTC_BEACON)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-402-\t\tret = hif_usb_send_mgmt(hif_dev, skb);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-406-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:407:\tif ((tx_ctl-\u003etype == ATH9K_HTC_NORMAL) ||\ndrivers/net/wireless/ath/ath9k/hif_usb.c:408:\t (tx_ctl-\u003etype == ATH9K_HTC_AMPDU)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-409-\t\t__skb_queue_tail(\u0026hif_dev-\u003etx.tx_skb_queue, skb);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=487=static inline bool check_index(struct sk_buff *skb, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-492-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:493:\tif ((tx_ctl-\u003etype == ATH9K_HTC_AMPDU) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/hif_usb.c-494-\t (tx_ctl-\u003esta_idx == idx))\n--\ndrivers/net/wireless/ath/ath9k/htc.h=56=enum htc_opmode {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-64-\ndrivers/net/wireless/ath/ath9k/htc.h:65:#define ATH9K_HTC_AMPDU 1\ndrivers/net/wireless/ath/ath9k/htc.h:66:#define ATH9K_HTC_NORMAL 2\ndrivers/net/wireless/ath/ath9k/htc.h:67:#define ATH9K_HTC_BEACON 3\ndrivers/net/wireless/ath/ath9k/htc.h:68:#define ATH9K_HTC_MGMT 4\ndrivers/net/wireless/ath/ath9k/htc.h-69-\ndrivers/net/wireless/ath/ath9k/htc.h:70:#define ATH9K_HTC_TX_CTSONLY 0x1\ndrivers/net/wireless/ath/ath9k/htc.h:71:#define ATH9K_HTC_TX_RTSCTS 0x2\ndrivers/net/wireless/ath/ath9k/htc.h-72-\ndrivers/net/wireless/ath/ath9k/htc.h=73=struct tx_frame_hdr {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-77-\tu8 tidno;\ndrivers/net/wireless/ath/ath9k/htc.h:78:\t__be32 flags; /* ATH9K_HTC_TX_* */\ndrivers/net/wireless/ath/ath9k/htc.h-79-\tu8 key_type;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=194=struct ath9k_htc_target_rx_stats {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-199-\ndrivers/net/wireless/ath/ath9k/htc.h:200:#define ATH9K_HTC_MAX_VIF 2\ndrivers/net/wireless/ath/ath9k/htc.h:201:#define ATH9K_HTC_MAX_BCN_VIF 2\ndrivers/net/wireless/ath/ath9k/htc.h-202-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=249=struct ath9k_vif_iter_data {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-253-\ndrivers/net/wireless/ath/ath9k/htc.h:254:#define ATH9K_HTC_MAX_STA 8\ndrivers/net/wireless/ath/ath9k/htc.h:255:#define ATH9K_HTC_MAX_TID 8\ndrivers/net/wireless/ath/ath9k/htc.h-256-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=264=struct ath9k_htc_sta {\ndrivers/net/wireless/ath/ath9k/htc.h-265-\tu8 index;\ndrivers/net/wireless/ath/ath9k/htc.h:266:\tenum tid_aggr_state tid_state[ATH9K_HTC_MAX_TID];\ndrivers/net/wireless/ath/ath9k/htc.h-267-\tstruct work_struct rc_update_work;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-270-\ndrivers/net/wireless/ath/ath9k/htc.h:271:#define ATH9K_HTC_RXBUF 256\ndrivers/net/wireless/ath/ath9k/htc.h-272-#define HTC_RX_FRAME_HEADER_SIZE 40\n--\ndrivers/net/wireless/ath/ath9k/htc.h=281=struct ath9k_htc_rx {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-286-\ndrivers/net/wireless/ath/ath9k/htc.h:287:#define ATH9K_HTC_TX_CLEANUP_INTERVAL 50 /* ms */\ndrivers/net/wireless/ath/ath9k/htc.h:288:#define ATH9K_HTC_TX_TIMEOUT_INTERVAL 3000 /* ms */\ndrivers/net/wireless/ath/ath9k/htc.h:289:#define ATH9K_HTC_TX_RESERVE 10\ndrivers/net/wireless/ath/ath9k/htc.h:290:#define ATH9K_HTC_TX_TIMEOUT_COUNT 40\ndrivers/net/wireless/ath/ath9k/htc.h:291:#define ATH9K_HTC_TX_THRESHOLD (MAX_TX_BUF_NUM - ATH9K_HTC_TX_RESERVE)\ndrivers/net/wireless/ath/ath9k/htc.h-292-\ndrivers/net/wireless/ath/ath9k/htc.h:293:#define ATH9K_HTC_OP_TX_QUEUES_STOP BIT(0)\ndrivers/net/wireless/ath/ath9k/htc.h:294:#define ATH9K_HTC_OP_TX_DRAIN BIT(1)\ndrivers/net/wireless/ath/ath9k/htc.h-295-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=311=struct ath9k_htc_tx_ctl {\ndrivers/net/wireless/ath/ath9k/htc.h:312:\tu8 type; /* ATH9K_HTC_* */\ndrivers/net/wireless/ath/ath9k/htc.h-313-\tu8 epid;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=319=static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-327-\ndrivers/net/wireless/ath/ath9k/htc.h:328:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-329-#define __STAT_SAFE(hif_dev, expr)\tdo { ((hif_dev)-\u003ehtc_handle-\u003edrv_priv ? (expr) : 0); } while (0)\n--\ndrivers/net/wireless/ath/ath9k/htc.h=388=static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc.h-392-\ndrivers/net/wireless/ath/ath9k/htc.h:393:#endif /* CONFIG_ATH9K_HTC_DEBUGFS */\ndrivers/net/wireless/ath/ath9k/htc.h-394-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=409=struct htc_beacon {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-415-\ndrivers/net/wireless/ath/ath9k/htc.h:416:\tstruct ieee80211_vif *bslot[ATH9K_HTC_MAX_BCN_VIF];\ndrivers/net/wireless/ath/ath9k/htc.h-417-\tu32 bmisscnt;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=456=struct ath9k_htc_priv {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-478-\tu8 sta_slot;\ndrivers/net/wireless/ath/ath9k/htc.h:479:\tu8 vif_sta_pos[ATH9K_HTC_MAX_VIF];\ndrivers/net/wireless/ath/ath9k/htc.h-480-\tu8 num_ibss_vif;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-535-\tstruct delayed_work duty_cycle_work;\ndrivers/net/wireless/ath/ath9k/htc.h:536:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-537-\tstruct ath9k_debug debug;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=641=int ath9k_htc_resume(struct htc_target *htc_handle);\ndrivers/net/wireless/ath/ath9k/htc.h-642-#endif\ndrivers/net/wireless/ath/ath9k/htc.h:643:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-644-int ath9k_htc_init_debug(struct ath_hw *ah);\n--\ndrivers/net/wireless/ath/ath9k/htc.h=648=static inline void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-650-}\ndrivers/net/wireless/ath/ath9k/htc.h:651:#endif /* CONFIG_ATH9K_HTC_DEBUGFS */\ndrivers/net/wireless/ath/ath9k/htc.h-652-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=111=static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-116-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:117:\tath9k_cmn_beacon_config_ap(ah, conf, ATH9K_HTC_MAX_BCN_VIF);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-118-\tath9k_htc_beacon_init(priv, conf, false);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=191=static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-242-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:243:\ttx_ctl-\u003etype = ATH9K_HTC_BEACON;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-244-\ttx_ctl-\u003eepid = priv-\u003ebeacon_ep;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=264=static int ath9k_htc_choose_bslot(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-276-\ttsftu = TSF_TO_TU(tsf \u003e\u003e 32, tsf);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:277:\tslot = ((tsftu % intval) * ATH9K_HTC_MAX_BCN_VIF) / intval;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:278:\tslot = ATH9K_HTC_MAX_BCN_VIF - slot - 1;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-279-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=325=void ath9k_htc_assign_bslot(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-332-\tspin_lock_bh(\u0026priv-\u003ebeacon_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:333:\tfor (i = 0; i \u003c ATH9K_HTC_MAX_BCN_VIF; i++) {\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-334-\t\tif (priv-\u003ebeacon.bslot[i] == NULL) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=365=void ath9k_htc_set_tsfadjust(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-380-\t */\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:381:\ttsfadjust = cur_conf-\u003ebeacon_interval * avp-\u003ebslot / ATH9K_HTC_MAX_BCN_VIF;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-382-\tavp-\u003etsfadjust = cpu_to_le64(TU_TO_USEC(tsfadjust));\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=398=static const char ath9k_htc_gstrings_stats[][ETH_GSTRING_LEN] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-418-};\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:419:#define ATH9K_HTC_SSTATS_LEN ARRAY_SIZE(ath9k_htc_gstrings_stats)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-420-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=430=int ath9k_htc_get_et_sset_count(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-433-\tif (sset == ETH_SS_STATS)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:434:\t\treturn ATH9K_HTC_SSTATS_LEN;\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-435-\treturn 0;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=448=void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-473-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:474:\tWARN_ON(i != ATH9K_HTC_SSTATS_LEN);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-475-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=606=static int ath9k_init_priv(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-673-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:674:\tfor (i = 0; i \u003c ATH9K_HTC_MAX_BCN_VIF; i++)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-675-\t\tpriv-\u003ebeacon.bslot[i] = NULL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=184=void ath9k_htc_reset(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-233-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:234:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-235-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=240=static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-311-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:312:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-313-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=350=static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-357-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:358:\tif ((priv-\u003envifs \u003e= ATH9K_HTC_MAX_VIF) ||\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:359:\t (priv-\u003enstations \u003e= ATH9K_HTC_MAX_STA)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-360-\t\tret = -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-364-\tsta_idx = ffz(priv-\u003esta_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:365:\tif ((sta_idx \u003c 0) || (sta_idx \u003e ATH9K_HTC_MAX_STA)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-366-\t\tret = -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=466=static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-477-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:478:\tif (priv-\u003enstations \u003e= ATH9K_HTC_MAX_STA)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-479-\t\treturn -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-481-\tsta_idx = ffz(priv-\u003esta_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:482:\tif ((sta_idx \u003c 0) || (sta_idx \u003e ATH9K_HTC_MAX_STA))\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-483-\t\treturn -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=702=static int ath9k_htc_tx_aggr_oper(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-713-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:714:\tif (tid \u003e= ATH9K_HTC_MAX_TID)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-715-\t\treturn -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=907=static int ath9k_htc_start(struct ieee80211_hw *hw)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-960-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:961:\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-962-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-966-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:967:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-968-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1658=static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1688-\tcase IEEE80211_AMPDU_TX_OPERATIONAL:\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1689:\t\tif (tid \u003e= ATH9K_HTC_MAX_TID) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1690-\t\t\tret = -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1874=struct ieee80211_ops ath9k_htc_ops = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1906-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1907:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1908-\t.get_et_sset_count = ath9k_htc_get_et_sset_count,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=23=static const int subtype_txq_to_hwq[] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-29-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:30:#define ATH9K_HTC_INIT_TXQ(subtype) do {\t\t\t\\\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-31-\t\tqi.tqi_subtype = subtype_txq_to_hwq[subtype];\t\\\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=56=void ath9k_htc_check_stop_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-59-\tpriv-\u003etx.queued_cnt++;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:60:\tif ((priv-\u003etx.queued_cnt \u003e= ATH9K_HTC_TX_THRESHOLD) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:61:\t !(priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_QUEUES_STOP)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:62:\t\tpriv-\u003etx.flags |= ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-63-\t\tieee80211_stop_queues(priv-\u003ehw);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=68=void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-70-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:71:\tif ((priv-\u003etx.queued_cnt \u003c ATH9K_HTC_TX_THRESHOLD) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:72:\t (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_QUEUES_STOP)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:73:\t\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-74-\t\tieee80211_wake_queues(priv-\u003ehw);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=214=static void ath9k_htc_tx_mgmt(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-240-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:241:\ttx_ctl-\u003etype = ATH9K_HTC_MGMT;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-242-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=260=static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-292-\tif (tx_info-\u003eflags \u0026 IEEE80211_TX_CTL_AMPDU) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:293:\t\ttx_ctl-\u003etype = ATH9K_HTC_AMPDU;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:294:\t\ttx_hdr.data_type = ATH9K_HTC_AMPDU;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-295-\t} else {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:296:\t\ttx_ctl-\u003etype = ATH9K_HTC_NORMAL;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:297:\t\ttx_hdr.data_type = ATH9K_HTC_NORMAL;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-298-\t}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-312-\t\tif (skb-\u003elen \u003e priv-\u003ehw-\u003ewiphy-\u003erts_threshold)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:313:\t\t\tflags |= ATH9K_HTC_TX_RTSCTS;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-314-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-315-\t/* CTS-to-self */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:316:\tif (!(flags \u0026 ATH9K_HTC_TX_RTSCTS) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-317-\t (vif \u0026\u0026 vif-\u003ebss_conf.use_cts_prot))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:318:\t\tflags |= ATH9K_HTC_TX_CTSONLY;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-319-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=392=static inline bool __ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-397-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:398:\tif ((tid \u003c ATH9K_HTC_MAX_TID) \u0026\u0026 (ista-\u003etid_state[tid] == AGGR_STOP))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-399-\t\tret = true;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=445=static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-478-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:479:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_ACK) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-480-\t\ttx_info-\u003eflags |= IEEE80211_TX_STAT_ACK;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-484-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:485:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_FILT)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-486-\t\ttx_info-\u003eflags |= IEEE80211_TX_STAT_TX_FILTERED;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-487-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:488:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_RTC_CTS)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-489-\t\trate-\u003eflags |= IEEE80211_TX_RC_USE_RTS_CTS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-491-\trate-\u003ecount = 1;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:492:\trate-\u003eidx = MS(txs-\u003ets_rate, ATH9K_HTC_TXSTAT_RATE);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-493-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:494:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_MCS) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-495-\t\trate-\u003eflags |= IEEE80211_TX_RC_MCS;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-496-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:497:\t\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_CW40)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-498-\t\t\trate-\u003eflags |= IEEE80211_TX_RC_40_MHZ_WIDTH;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:499:\t\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_SGI)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-500-\t\t\trate-\u003eflags |= IEEE80211_TX_RC_SHORT_GI;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=539=void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-543-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:544:\tpriv-\u003etx.flags |= ATH9K_HTC_OP_TX_DRAIN;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-545-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-573-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:574:\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_DRAIN;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-575-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=578=void ath9k_tx_failed_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-582-\tspin_lock(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:583:\tif (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_DRAIN) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-584-\t\tspin_unlock(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=618=static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-624-\tunsigned long flags;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:625:\tu8 epid = MS(txs-\u003ets_rate, ATH9K_HTC_TXSTAT_EPID);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-626-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=716=static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-724-\t\t tx_ctl-\u003etimestamp +\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:725:\t\t msecs_to_jiffies(ATH9K_HTC_TX_TIMEOUT_INTERVAL))) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-726-\t\tath_dbg(common, XMIT, \"Dropping a packet due to TX timeout\\n\");\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=761=void ath9k_htc_tx_cleanup_timer(struct timer_list *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-776-\t\t\t\tevent-\u003etxs.cookie,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:777:\t\t\t\tMS(event-\u003etxs.ts_rate, ATH9K_HTC_TXSTAT_EPID));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-778-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-784-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:785:\t\tif (++event-\u003ecount \u003e= ATH9K_HTC_TX_TIMEOUT_COUNT) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-786-\t\t\tlist_del(\u0026event-\u003elist);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-805-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:806:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-807-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=827=bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-834-\tmemset(\u0026qi, 0, sizeof(qi));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:835:\tATH9K_HTC_INIT_TXQ(subtype);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-836-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=852=int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-856-\tmemset(\u0026qi, 0, sizeof(qi));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:857:\tATH9K_HTC_INIT_TXQ(0);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-858-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=1187=int ath9k_rx_init(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1193-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1194:\tfor (i = 0; i \u003c ATH9K_HTC_RXBUF; i++) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1195-\t\tstruct ath9k_htc_rxbuf *rxbuf =\n--\ndrivers/net/wireless/ath/ath9k/wmi.c=138=void ath9k_wmi_event_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-178-\t\t\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/wmi.c:179:\t\t\tif (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_DRAIN) {\ndrivers/net/wireless/ath/ath9k/wmi.c-180-\t\t\t\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=39=struct wmi_event_swba {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-50-\ndrivers/net/wireless/ath/ath9k/wmi.h:51:#define ATH9K_HTC_TXSTAT_ACK BIT(0)\ndrivers/net/wireless/ath/ath9k/wmi.h:52:#define ATH9K_HTC_TXSTAT_FILT BIT(1)\ndrivers/net/wireless/ath/ath9k/wmi.h:53:#define ATH9K_HTC_TXSTAT_RTC_CTS BIT(2)\ndrivers/net/wireless/ath/ath9k/wmi.h:54:#define ATH9K_HTC_TXSTAT_MCS BIT(3)\ndrivers/net/wireless/ath/ath9k/wmi.h:55:#define ATH9K_HTC_TXSTAT_CW40 BIT(4)\ndrivers/net/wireless/ath/ath9k/wmi.h:56:#define ATH9K_HTC_TXSTAT_SGI BIT(5)\ndrivers/net/wireless/ath/ath9k/wmi.h-57-\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-63- */\ndrivers/net/wireless/ath/ath9k/wmi.h:64:#define ATH9K_HTC_TXSTAT_RATE 0x0f\ndrivers/net/wireless/ath/ath9k/wmi.h:65:#define ATH9K_HTC_TXSTAT_RATE_S 0\ndrivers/net/wireless/ath/ath9k/wmi.h-66-\ndrivers/net/wireless/ath/ath9k/wmi.h:67:#define ATH9K_HTC_TXSTAT_EPID 0xf0\ndrivers/net/wireless/ath/ath9k/wmi.h:68:#define ATH9K_HTC_TXSTAT_EPID_S 4\ndrivers/net/wireless/ath/ath9k/wmi.h-69-\n"
} |
| 5/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 18118 output: 44 thoughts: 89 Thoughts: Here's my thought process, as I analyze this: **Analyzing ath9k_htc and Related Functions** Okay, so `ath9k_htc` is the USB Wi-Fi driver, that's the starting point. Now, I need to understand how `ath9k_cmn_spectral_init_debug` and, more importantly, `ath_cmn_process_fft` are leveraged in both the standard `ath9k` driver and the HTC variant. The HTC version suggests a tethered or hosted device, so there's likely some architectural difference to understand in the FFT processing. The spectral initialization debugging is interesting too, I'll need to see how they're handling debugging the initialization of spectral data. My immediate plan is to use `grep` to quickly cross-reference the `ath_cmn_process_fft` function and the use of the `spec_priv` structure. This should help to quickly highlight the key areas of interaction and data flow. This will likely give me a good overview of how the FFT functionality is handled at a low level in the driver, and its associated data. This will provide a quicker map of where the spectral data and processing are being handled in relation to the main driver and the HTC version. |
| 6/2 | 2026/09/05 01:03 | tool | grepper |
0mArgs:{
"Expression": "ath_cmn_process_fft|spec_priv",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/ath9k.h=983=struct ath_softc {\n--\ndrivers/net/wireless/ath/ath9k/ath9k.h-1063-\ndrivers/net/wireless/ath/ath9k/ath9k.h:1064:\tstruct ath_spec_scan_priv spec_priv;\ndrivers/net/wireless/ath/ath9k/ath9k.h-1065-\n--\ndrivers/net/wireless/ath/ath9k/channel.c=23=static int ath_set_channel(struct ath_softc *sc)\n--\ndrivers/net/wireless/ath/ath9k/channel.c-95-\t\tif (test_bit(ATH_OP_SCANNING, \u0026common-\u003eop_flags) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/channel.c:96:\t\t\tsc-\u003espec_priv.spectral_mode == SPECTRAL_CHANSCAN)\ndrivers/net/wireless/ath/ath9k/channel.c:97:\t\t\tath9k_cmn_spectral_scan_trigger(common, \u0026sc-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/channel.c-98-\t}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=22=static s8 fix_rssi_inv_only(u8 rssi_val)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-28-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:29:static void ath_debug_send_fft_sample(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-30-\t\t\t\t struct fft_sample_tlv *fft_sample_tlv)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-32-\tint length;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:33:\tif (!spec_priv-\u003erfs_chan_spec_scan)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-34-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-37-\t\t sizeof(*fft_sample_tlv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:38:\trelay_write(spec_priv-\u003erfs_chan_spec_scan, fft_sample_tlv, length);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-39-}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=127=typedef int (ath_cmn_fft_sample_handler) (struct ath_rx_status *rs,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:128:\t\t\tstruct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-129-\t\t\tu8 *sample_buf, u64 tsf, u16 freq, int chan_type);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=132=ath_cmn_process_ht20_fft(struct ath_rx_status *rs,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:133:\t\t\tstruct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-134-\t\t\tu8 *sample_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-137-\tstruct fft_sample_ht20 fft_sample_20;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:138:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:139:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-140-\tstruct ath_ht20_mag_info *mag_info;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-229-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:230:\tath_debug_send_fft_sample(spec_priv, tlv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-231-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=236=ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:237:\t\t\tstruct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-238-\t\t\tu8 *sample_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-241-\tstruct fft_sample_ht20_40 fft_sample_40;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:242:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:243:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-244-\tstruct ath9k_hw_cal_data *caldata = ah-\u003ecaldata;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-406-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:407:\tath_debug_send_fft_sample(spec_priv, tlv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-408-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=448=static int\ndrivers/net/wireless/ath/ath9k/common-spectral.c:449:ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-450-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-453-\tstruct rchan_buf *buf;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:454:\tstruct rchan *rc = spec_priv-\u003erfs_chan_spec_scan;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-455-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-467-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:468:static void ath_cmn_count_fft_sample(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-469-\t\t\t\t int ret)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-470-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:471:\tstruct ath_rx_stats *rx_stats = spec_priv-\u003erx_stats;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-472-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-482-/* returns 1 if this was a spectral frame, even if not handled. */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:483:int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-484-\t\t struct ath_rx_status *rs, u64 tsf)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-486-\tu8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};\ndrivers/net/wireless/ath/ath9k/common-spectral.c:487:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:488:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-489-\tu8 num_bins, *vdata = (u8 *)hdr;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-517-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:518:\tif (!spec_priv-\u003erfs_chan_spec_scan)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-519-\t\treturn 1;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-523-\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:524:\tret = ath_cmn_is_fft_buf_full(spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-525-\tif (ret == 1) {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-636-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:637:\t\t\t\tret = fft_handler(rs, spec_priv, sample_buf,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-638-\t\t\t\t\t\t tsf, freq, chan_type);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-639-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:640:\t\t\t\tath_cmn_count_fft_sample(spec_priv, ret);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-641-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-651-\t\t\tif (sample_bytes == sample_len) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:652:\t\t\t\tret = fft_handler(rs, spec_priv, sample_start,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-653-\t\t\t\t\t\t tsf, freq, chan_type);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-654-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:655:\t\t\t\tath_cmn_count_fft_sample(spec_priv, ret);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-656-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-690-}\ndrivers/net/wireless/ath/ath9k/common-spectral.c:691:EXPORT_SYMBOL(ath_cmn_process_fft);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-692-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=697=static ssize_t read_file_spec_scan_ctl(struct file *file, char __user *user_buf,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-699-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:700:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-701-\tchar *mode = \"\";\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-703-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:704:\tswitch (spec_priv-\u003espectral_mode) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c-705-\tcase SPECTRAL_DISABLED:\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=722=void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:723:\t\t\t\t struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-724-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:725:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-726-\tu32 rxfilter;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-735-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:736:\tif (!spec_priv-\u003espec_config.enabled)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-737-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-749-\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:750:\tath9k_cmn_spectral_scan_config(common, spec_priv, spec_priv-\u003espectral_mode);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-751-\tath9k_hw_ops(ah)-\u003espectral_scan_trigger(ah);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=756=int ath9k_cmn_spectral_scan_config(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:757:\t\t\t struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-758-\t\t\t enum spectral_mode spectral_mode)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-759-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:760:\tstruct ath_hw *ah = spec_priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-761-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-768-\tcase SPECTRAL_DISABLED:\ndrivers/net/wireless/ath/ath9k/common-spectral.c:769:\t\tspec_priv-\u003espec_config.enabled = 0;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-770-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-774-\t\t */\ndrivers/net/wireless/ath/ath9k/common-spectral.c:775:\t\tspec_priv-\u003espec_config.endless = 1;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:776:\t\tspec_priv-\u003espec_config.enabled = 1;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-777-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-779-\tcase SPECTRAL_MANUAL:\ndrivers/net/wireless/ath/ath9k/common-spectral.c:780:\t\tspec_priv-\u003espec_config.endless = 0;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:781:\t\tspec_priv-\u003espec_config.enabled = 1;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-782-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-787-\tath_ps_ops(common)-\u003ewakeup(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:788:\tath9k_hw_ops(ah)-\u003espectral_scan_config(ah, \u0026spec_priv-\u003espec_config);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-789-\tath_ps_ops(common)-\u003erestore(common);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-790-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:791:\tspec_priv-\u003espectral_mode = spectral_mode;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-792-\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=797=static ssize_t write_file_spec_scan_ctl(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-800-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:801:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:802:\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-803-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-815-\tif (strncmp(\"trigger\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:816:\t\tath9k_cmn_spectral_scan_trigger(common, spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-817-\t} else if (strncmp(\"background\", buf, 10) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:818:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_BACKGROUND);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-819-\t\tath_dbg(common, CONFIG, \"spectral scan: background mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-820-\t} else if (strncmp(\"chanscan\", buf, 8) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:821:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_CHANSCAN);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-822-\t\tath_dbg(common, CONFIG, \"spectral scan: channel scan mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-823-\t} else if (strncmp(\"manual\", buf, 6) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:824:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_MANUAL);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-825-\t\tath_dbg(common, CONFIG, \"spectral scan: manual mode enabled\\n\");\ndrivers/net/wireless/ath/ath9k/common-spectral.c-826-\t} else if (strncmp(\"disable\", buf, 7) == 0) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:827:\t\tath9k_cmn_spectral_scan_config(common, spec_priv, SPECTRAL_DISABLED);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-828-\t\tath_dbg(common, CONFIG, \"spectral scan: disabled\\n\");\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=848=static ssize_t read_file_spectral_short_repeat(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-851-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:852:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-853-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-855-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:856:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.short_repeat);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-857-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=860=static ssize_t write_file_spectral_short_repeat(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-863-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:864:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-865-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-874-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:875:\tspec_priv-\u003espec_config.short_repeat = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-876-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=891=static ssize_t read_file_spectral_count(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-894-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:895:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-896-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-898-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:899:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.count);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-900-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=903=static ssize_t write_file_spectral_count(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-906-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:907:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-908-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-916-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:917:\tspec_priv-\u003espec_config.count = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-918-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=933=static ssize_t read_file_spectral_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-936-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:937:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-938-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-940-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:941:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.period);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-942-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=945=static ssize_t write_file_spectral_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-948-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:949:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-950-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-959-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:960:\tspec_priv-\u003espec_config.period = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-961-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=976=static ssize_t read_file_spectral_fft_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-979-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:980:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-981-\tchar buf[32];\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-983-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:984:\tlen = sprintf(buf, \"%d\\n\", spec_priv-\u003espec_config.fft_period);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-985-\treturn simple_read_from_buffer(user_buf, count, ppos, buf, len);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=988=static ssize_t write_file_spectral_fft_period(struct file *file,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-991-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:992:\tstruct ath_spec_scan_priv *spec_priv = file-\u003eprivate_data;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-993-\tunsigned long val;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1002-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1003:\tspec_priv-\u003espec_config.fft_period = val;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1004-\treturn count;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=1043=static const struct rchan_callbacks rfs_spec_scan_cb = {\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1051-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1052:void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1053-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1054:\tif (spec_priv-\u003erfs_chan_spec_scan) {\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1055:\t\trelay_close(spec_priv-\u003erfs_chan_spec_scan);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1056:\t\tspec_priv-\u003erfs_chan_spec_scan = NULL;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1057-\t}\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c=1059=EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1060-\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1061:void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1062-\t\t\t\t struct dentry *debugfs_phy,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1064-{\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1065:\tspec_priv-\u003erx_stats = rx_stats;\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1066:\tspec_priv-\u003erfs_chan_spec_scan = relay_open(\"spectral_scan\",\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1067-\t\t\t\t\t debugfs_phy,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1069-\t\t\t\t\t NULL);\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1070:\tif (!spec_priv-\u003erfs_chan_spec_scan)\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1071-\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1074-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1075:\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1076-\t\t\t \u0026fops_spec_scan_ctl);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1078-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1079:\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1080-\t\t\t \u0026fops_spectral_short_repeat);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1082-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1083:\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1084-\t\t\t \u0026fops_spectral_count);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1086-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1087:\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1088-\t\t\t \u0026fops_spectral_period);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1090-\t\t\t 0600,\ndrivers/net/wireless/ath/ath9k/common-spectral.c:1091:\t\t\t debugfs_phy, spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.c-1092-\t\t\t \u0026fops_spectral_fft_period);\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h=170=static inline u8 spectral_bitmap_weight(u8 *bins)\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-175-#ifdef CONFIG_ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/common-spectral.h:176:void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-177-\t\t\t\t struct dentry *debugfs_phy,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-178-\t\t\t\t struct ath_rx_stats *rx_stats);\ndrivers/net/wireless/ath/ath9k/common-spectral.h:179:void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-180-\ndrivers/net/wireless/ath/ath9k/common-spectral.h=181=void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.h:182:\t\t\t\t struct ath_spec_scan_priv *spec_priv);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-183-int ath9k_cmn_spectral_scan_config(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.h:184:\t\t\t struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-185-\t\t\t enum spectral_mode spectral_mode);\ndrivers/net/wireless/ath/ath9k/common-spectral.h:186:int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-187-\t\t struct ath_rx_status *rs, u64 tsf);\ndrivers/net/wireless/ath/ath9k/common-spectral.h-188-#else\ndrivers/net/wireless/ath/ath9k/common-spectral.h:189:static inline void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-190-\t\t\t\t\t\t struct dentry *debugfs_phy,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-194-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:195:static inline void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-196-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h=199=static inline void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,\ndrivers/net/wireless/ath/ath9k/common-spectral.h:200:\t\t\t\t\t\t struct ath_spec_scan_priv *spec_priv)\ndrivers/net/wireless/ath/ath9k/common-spectral.h-201-{\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.h-203-\ndrivers/net/wireless/ath/ath9k/common-spectral.h:204:static inline int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv,\ndrivers/net/wireless/ath/ath9k/common-spectral.h-205-\t\t\t\t struct ieee80211_hdr *hdr,\n--\ndrivers/net/wireless/ath/ath9k/debug.c=1372=void ath9k_deinit_debug(struct ath_softc *sc)\ndrivers/net/wireless/ath/ath9k/debug.c-1373-{\ndrivers/net/wireless/ath/ath9k/debug.c:1374:\tath9k_cmn_spectral_deinit_debug(\u0026sc-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/debug.c-1375-}\n--\ndrivers/net/wireless/ath/ath9k/debug.c=1377=int ath9k_init_debug(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/debug.c-1391-\tath9k_tx99_init_debug(sc);\ndrivers/net/wireless/ath/ath9k/debug.c:1392:\tath9k_cmn_spectral_init_debug(\u0026sc-\u003espec_priv, sc-\u003edebug.debugfs_phy,\ndrivers/net/wireless/ath/ath9k/debug.c-1393-\t\t\t\t \u0026sc-\u003edebug.stats.rxstats);\n--\ndrivers/net/wireless/ath/ath9k/htc.h=456=struct ath9k_htc_priv {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-496-\tstruct ath9k_hw_cal_data caldata;\ndrivers/net/wireless/ath/ath9k/htc.h:497:\tstruct ath_spec_scan_priv spec_priv;\ndrivers/net/wireless/ath/ath9k/htc.h-498-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=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-\t\t\t\t \u0026priv-\u003edebug.rx_stats);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=588=static void ath9k_init_misc(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-596-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:597:\tpriv-\u003espec_priv.ah = priv-\u003eah;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:598:\tpriv-\u003espec_priv.spec_config.enabled = 0;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:599:\tpriv-\u003espec_priv.spec_config.short_repeat = true;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:600:\tpriv-\u003espec_priv.spec_config.count = 8;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:601:\tpriv-\u003espec_priv.spec_config.endless = false;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:602:\tpriv-\u003espec_priv.spec_config.period = 0x12;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:603:\tpriv-\u003espec_priv.spec_config.fft_period = 0x02;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-604-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=240=static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-315-\tif (test_bit(ATH_OP_SCANNING, \u0026common-\u003eop_flags) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:316:\t\t priv-\u003espec_priv.spectral_mode == SPECTRAL_CHANSCAN)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:317:\t\tath9k_cmn_spectral_scan_trigger(common, \u0026priv-\u003espec_priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-318-err:\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=972=static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1047-\t\t/* TODO: Not using DFS processing now. */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1048:\t\tif (ath_cmn_process_fft(\u0026priv-\u003espec_priv, hdr,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1049-\t\t\t\t \u0026rx_stats, rx_status-\u003emactime)) {\n--\ndrivers/net/wireless/ath/ath9k/init.c=420=static void ath9k_init_misc(struct ath_softc *sc)\n--\ndrivers/net/wireless/ath/ath9k/init.c-436-\ndrivers/net/wireless/ath/ath9k/init.c:437:\tsc-\u003espec_priv.ah = sc-\u003esc_ah;\ndrivers/net/wireless/ath/ath9k/init.c:438:\tsc-\u003espec_priv.spec_config.enabled = 0;\ndrivers/net/wireless/ath/ath9k/init.c:439:\tsc-\u003espec_priv.spec_config.short_repeat = true;\ndrivers/net/wireless/ath/ath9k/init.c:440:\tsc-\u003espec_priv.spec_config.count = 8;\ndrivers/net/wireless/ath/ath9k/init.c:441:\tsc-\u003espec_priv.spec_config.endless = false;\ndrivers/net/wireless/ath/ath9k/init.c:442:\tsc-\u003espec_priv.spec_config.period = 0xFF;\ndrivers/net/wireless/ath/ath9k/init.c:443:\tsc-\u003espec_priv.spec_config.fft_period = 0xF;\ndrivers/net/wireless/ath/ath9k/init.c-444-}\n--\ndrivers/net/wireless/ath/ath9k/recv.c=806=static int ath9k_rx_skb_preprocess(struct ath_softc *sc,\n--\ndrivers/net/wireless/ath/ath9k/recv.c-882-\t\t\t\t\t\t rx_status-\u003emactime);\ndrivers/net/wireless/ath/ath9k/recv.c:883:\t\t} else if (sc-\u003espec_priv.spectral_mode != SPECTRAL_DISABLED \u0026\u0026\ndrivers/net/wireless/ath/ath9k/recv.c:884:\t\t\t ath_cmn_process_fft(\u0026sc-\u003espec_priv, hdr, rx_stats,\ndrivers/net/wireless/ath/ath9k/recv.c-885-\t\t\t\t\t rx_status-\u003emactime)) {\n"
} |
| 7/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 29843 output: 42 thoughts: 620 Thoughts: **Analyzing a Critical Bug in the ath9k_htc Wireless Driver** Okay, let's break this down. I'm looking at `ath9k_htc`, which is a USB-based wireless driver that uses HTC. I need to understand this patch thoroughly. Initially, in the `ath_cmn_process_fft` function, before this patch, there was a major issue. Inside that function, the code was assuming `common->priv` was a `struct ath_softc`, which is the structure used in the original `ath9k` PCI/AHB driver. But, and this is the crux of it, `ath9k_htc` uses a different private data structure, something like `struct ath9k_htc_priv *`. This means that when `ath9k_htc` called `ath_cmn_process_fft`, it was effectively casting a `ath9k_htc_priv *` to a `ath_softc *`. This is a serious problem. Inside `ath9k`, `RX_STAT_INC` accesses `sc->debug.stats.rxstats.rx_spectral_sample_good` etc. But `struct ath9k_htc_priv` has a completely different memory layout! So, previously, calling `ath_cmn_process_fft` in the `ath9k_htc` driver was either corrupting memory or accessing entirely the wrong memory offsets. This could lead to a variety of issues, from subtle data corruption to outright crashes, depending on what data was being overwritten or read. This patch addresses this by directly passing the `rx_stats` pointer in `ath9k_cmn_spectral_init_debug`, storing it in `spec_priv->rx_stats`, and then incrementing the `rx_stats->rx_spectral_sample_good` and `rx_stats->rx_spectral_sample_err` counters correctly through `ath_cmn_count_fft_sample()`. A direct fix, avoiding the incorrect cast. Now, let's think about reachability. I need to determine how easily this bug could be triggered using tools like QEMU or Syzkaller. `ath9k_htc` is, after all, a USB device driver. I see the USB ID table right there in `drivers/net/wireless/ath/ath9k/hif_usb.c`. Syzkaller should be able to reach this driver via either `syz_usb_connect` or direct USB emulation, potentially exposing this memory corruption bug. Also, I'll need to check the debugfs interface that's present in ath9k for spectral scan. Debugfs file operations like `write_file_spec_scan_ctl`, `spectral_scan`, and even processing RX frames using `ath9k_rx_prepare` could provide another entry point. Finally, I need to check the Kconfig options, specifically those related to ATH9K_HTC, ATH9K_COMMON_SPECTRAL and ATH9K_HTC_DEBUGFS, over in `drivers/net/wireless/ath/ath9k/Kconfig`. I need to understand how the debug features are enabled, and therefore how exposed this bug is in different kernel configurations. |
| 8/2 | 2026/09/05 01:03 | 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"
} |
| 9/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 31880 output: 42 thoughts: 28 Thoughts: Here's my take on those thoughts: **Investigating the `ATH9K_DEBUGFS` Configuration** Okay, so I'm thinking, where should I start looking to understand or modify the debug options for ath9k? My initial thought is to go straight to the configuration files. Specifically, I need to check the `Kconfig` file within the `drivers/net/wireless/ath/ath9k/` directory. That's the logical place to see if `ATH9K_DEBUGFS` is defined, what it does, and how it’s configured. I'm assuming that's where I can toggle it on or off or see other dependencies, options, or help text related to the debug filesystem interface for that particular ath9k driver. It's the standard place to define these kinds of features within a kernel module, so it makes sense to start there and see what's what. Let's dig in and see what the build system reveals. |
| 10/2 | 2026/09/05 01:03 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/Kconfig",
"FirstLine": 130,
"LineCount": 40
}Results: {
"Contents": " 130:\t\t Currently, AR9462 is supported.\n 131:\t\n 132:\tconfig ATH9K_RFKILL\n 133:\t\tbool \"Atheros ath9k rfkill support\" if EXPERT\n 134:\t\tdepends on ATH9K\n 135:\t\tdepends on RFKILL=y || RFKILL=ATH9K\n 136:\t\tdefault y\n 137:\t\thelp\n 138:\t\t Say Y to have ath9k poll the RF-Kill GPIO every couple of\n 139:\t\t seconds. Turn off to save power, but enable it if you have\n 140:\t\t a platform that can toggle the RF-Kill GPIO.\n 141:\t\n 142:\tconfig ATH9K_CHANNEL_CONTEXT\n 143:\t\tbool \"Channel Context support\"\n 144:\t\tdepends on ATH9K\n 145:\t\tdefault n\n 146:\t\thelp\n 147:\t\t This option enables channel context support in ath9k, which is needed\n 148:\t\t for multi-channel concurrency. Enable this if P2P PowerSave support\n 149:\t\t is required.\n 150:\t\n 151:\tconfig ATH9K_PCOEM\n 152:\t\tbool \"Atheros ath9k support for PC OEM cards\" if EXPERT\n 153:\t\tdepends on ATH9K\n 154:\t\tdefault y\n 155:\t\n 156:\tconfig ATH9K_PCI_NO_EEPROM\n 157:\t\ttristate \"Atheros ath9k pci loader for EEPROM-less chips\"\n 158:\t\tdepends on ATH9K_PCI\n 159:\t\tdefault n\n 160:\t\thelp\n 161:\t\t This separate driver provides a loader in order to support the\n 162:\t\t AR500X to AR92XX-generation of ath9k PCI(e) WiFi chips, which have\n 163:\t\t their initialization data (which contains the real PCI Device ID\n 164:\t\t that ath9k will need) stored together with the calibration data out\n 165:\t\t of reach for the ath9k chip.\n 166:\t\n 167:\t\t These devices are usually various network appliances, routers or\n 168:\t\t access Points and such.\n 169:\t\n"
} |
| 11/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 32768 output: 38 thoughts: 13 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Tracing Down ATH9K_DEBUGFS** Okay, so I need to figure out where `ATH9K_DEBUGFS` is defined. This is likely a preprocessor macro, given the all-caps naming convention, and probably related to debug functionalities within the ath9k wireless driver. My first instinct is to use my preferred tools for this – `grep`, `find`, or maybe even a more sophisticated IDE-integrated search if I have the project loaded. I'm going to start with the obvious: the kernel source tree. I'll need to remember where that's mounted, probably `/usr/src/linux` or something similar, depending on my system setup. Then it's a matter of crafting the right search query. I'll start with something simple like `grep -r "ATH9K_DEBUGFS" /usr/src/linux` and see what that turns up. If that's too broad, I'll refine it with some context clues. Maybe adding `include/` or searching specifically within the ath9k driver directory structure if I know where that is within the kernel tree. I also need to consider that it might be defined within a header file, so I need to make sure I'm searching header files as well. This should be a straightforward hunt, and I'll likely find the definition pretty quickly. Let's get to it! |
| 12/2 | 2026/09/05 01:03 | tool | grepper |
0mArgs:{
"Expression": "config ATH9K_DEBUGFS",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/Kconfig=48=config ATH9K_AHB\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"
} |
| 13/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 33237 output: 41 thoughts: 18 Thoughts: Here's my summary, as though I'm thinking through this process: **Diving into the ATH9K Debug Config** Okay, time to get this sorted. My immediate thought is, let's zero in on the `config ATH9K_DEBUGFS`. I remember it being in that general area of the config file – around line 58 should be a good starting point. I need to understand what's enabled/disabled and if that's impacting the behavior I'm seeing. This usually indicates whether the debugging infrastructure for the ath9k driver is enabled. Let's see if this debug configuration setting is set correctly. |
| 14/2 | 2026/09/05 01:03 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/Kconfig",
"FirstLine": 55,
"LineCount": 25
}Results: {
"Contents": " 55:\t\t Say Y, if you have a SoC with a compatible built-in\n 56:\t\t wireless MAC. Say N if unsure.\n 57:\t\n 58:\tconfig ATH9K_DEBUGFS\n 59:\t\tbool \"Atheros ath9k debugging\"\n 60:\t\tdepends on ATH9K \u0026\u0026 DEBUG_FS \u0026\u0026 MAC80211_DEBUGFS\n 61:\t\tselect ATH9K_COMMON_DEBUG\n 62:\t\thelp\n 63:\t\t Say Y, if you need access to ath9k's statistics for\n 64:\t\t interrupts, rate control, etc.\n 65:\t\n 66:\t\t Also required for changing debug message flags at run time and for\n 67:\t\t TX99.\n 68:\t\n 69:\tconfig ATH9K_STATION_STATISTICS\n 70:\t\tbool \"Detailed station statistics\"\n 71:\t\tdepends on ATH9K \u0026\u0026 ATH9K_DEBUGFS \u0026\u0026 DEBUG_FS\n 72:\t\tdefault n\n 73:\t\thelp\n 74:\t\t This option enables detailed statistics for association stations.\n 75:\t\n 76:\tconfig ATH9K_TX99\n 77:\t\tbool \"Atheros ath9k TX99 testing support\"\n 78:\t\tdepends on ATH9K_DEBUGFS \u0026\u0026 CFG80211_CERTIFICATION_ONUS\n 79:\t\tdefault n\n"
} |
| 15/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 33793 output: 41 thoughts: 90 Thoughts: **Investigating USB Gadget Probing for `ath9k_htc` Driver** Okay, so I'm thinking about how we can test the `ath9k_htc` driver, specifically its interaction with USB. It's a USB-based wireless driver, using that HTC (Host Target Communication) protocol, which is important to remember. The immediate question is whether we can effectively probe this driver using a USB gadget setup, maybe leveraging something like `raw_gadget` within Syzkaller. To get a handle on the specifics of the USB device IDs that this driver expects, I should dive into the code. My plan is to start by examining `drivers/net/wireless/ath/ath9k/hif_usb.c`. That should give me the crucial information I need about the expected USB device identifiers that `ath9k_htc` is looking for during its probe process. This should inform how we go about setting up the gadget to trigger the driver. |
| 16/2 | 2026/09/05 01:03 | tool | grepper |
0mArgs:{
"Expression": "MODULE_DEVICE_TABLE|USB_DEVICE",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/ahb.c=132=static struct platform_driver ath_ahb_driver = {\n--\ndrivers/net/wireless/ath/ath9k/ahb.c-140-\ndrivers/net/wireless/ath/ath9k/ahb.c:141:MODULE_DEVICE_TABLE(of, ath9k_of_match_table);\ndrivers/net/wireless/ath/ath9k/ahb.c-142-\n--\ndrivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c=225=static const struct pci_device_id owl_pci_table[] = {\n--\ndrivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c-229-};\ndrivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c:230:MODULE_DEVICE_TABLE(pci, owl_pci_table);\ndrivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c-231-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=23=static const struct usb_device_id ath9k_hif_usb_ids[] = {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:24:\t{ USB_DEVICE(0x0cf3, 0x9271) }, /* Atheros */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:25:\t{ USB_DEVICE(0x0cf3, 0x1006) }, /* Atheros */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:26:\t{ USB_DEVICE(0x0846, 0x9030) }, /* Netgear N150 */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:27:\t{ USB_DEVICE(0x07b8, 0x9271) }, /* Altai WA1011N-GU */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:28:\t{ USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:29:\t{ USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:30:\t{ USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:31:\t{ USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:32:\t{ USB_DEVICE(0x13D3, 0x3348) }, /* Azurewave */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:33:\t{ USB_DEVICE(0x13D3, 0x3349) }, /* Azurewave */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:34:\t{ USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:35:\t{ USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:36:\t{ USB_DEVICE(0x040D, 0x3801) }, /* VIA */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:37:\t{ USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:38:\t{ USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:39:\t{ USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:40:\t{ USB_DEVICE(0x0471, 0x209e) }, /* Philips (or NXP) PTA01 */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:41:\t{ USB_DEVICE(0x1eda, 0x2315) }, /* AirTies */\ndrivers/net/wireless/ath/ath9k/hif_usb.c-42-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:43:\t{ USB_DEVICE(0x0cf3, 0x7015),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-44-\t .driver_info = AR9287_USB }, /* Atheros */\ndrivers/net/wireless/ath/ath9k/hif_usb.c-45-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:46:\t{ USB_DEVICE(0x0cf3, 0x7010),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-47-\t .driver_info = AR9280_USB }, /* Atheros */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:48:\t{ USB_DEVICE(0x0846, 0x9018),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-49-\t .driver_info = AR9280_USB }, /* Netgear WNDA3200 */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:50:\t{ USB_DEVICE(0x083A, 0xA704),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-51-\t .driver_info = AR9280_USB }, /* SMC Networks */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:52:\t{ USB_DEVICE(0x0411, 0x017f),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-53-\t .driver_info = AR9280_USB }, /* Sony UWA-BR100 */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:54:\t{ USB_DEVICE(0x0411, 0x0197),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-55-\t .driver_info = AR9280_USB }, /* Buffalo WLI-UV-AG300P */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:56:\t{ USB_DEVICE(0x04da, 0x3904),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-57-\t .driver_info = AR9280_USB },\ndrivers/net/wireless/ath/ath9k/hif_usb.c:58:\t{ USB_DEVICE(0x0930, 0x0a08),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-59-\t .driver_info = AR9280_USB }, /* Toshiba WLM-20U2 and GN-1080 */\ndrivers/net/wireless/ath/ath9k/hif_usb.c-60-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:61:\t{ USB_DEVICE(0x0cf3, 0x20ff),\ndrivers/net/wireless/ath/ath9k/hif_usb.c-62-\t .driver_info = STORAGE_DEVICE },\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-66-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:67:MODULE_DEVICE_TABLE(usb, ath9k_hif_usb_ids);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-68-\n--\ndrivers/net/wireless/ath/ath9k/pci.c=1062=static SIMPLE_DEV_PM_OPS(ath9k_pm_ops, ath_pci_suspend, ath_pci_resume);\n--\ndrivers/net/wireless/ath/ath9k/pci.c-1072-\ndrivers/net/wireless/ath/ath9k/pci.c:1073:MODULE_DEVICE_TABLE(pci, ath_pci_id_table);\ndrivers/net/wireless/ath/ath9k/pci.c-1074-\n"
} |
| 17/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 36488 output: 45 thoughts: 77 Thoughts: **Diving into ath9k_htc USB Fuzzing Potential** Okay, so `ath9k_htc` – that's the USB WiFi driver, right? Interesting... USB fuzzing, huh? This could be a good starting point. Let's see what we can dig up. First, I need to get a handle on recent changes and crucial symbols within this driver. Knowing where to look is half the battle. Alright, let's get into the code. I'll focus on `drivers/net/wireless/ath/ath9k/common-spectral.c`. Specifically, I'll be reviewing lines 460-660 and then 1050-1080. That should give me a good view of any relevant spectral analysis functionality that is in the driver. I need to understand if anything there looks like a potential target. |
| 18/2 | 2026/09/05 01:03 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/common-spectral.c",
"FirstLine": 460,
"LineCount": 50
}Results: {
"Contents": " 460:\t\t}\n 461:\t\n 462:\t\tif (ret)\n 463:\t\t\treturn 1;\n 464:\t\telse\n 465:\t\t\treturn 0;\n 466:\t}\n 467:\t\n 468:\tstatic void ath_cmn_count_fft_sample(struct ath_spec_scan_priv *spec_priv,\n 469:\t\t\t\t\t int ret)\n 470:\t{\n 471:\t\tstruct ath_rx_stats *rx_stats = spec_priv-\u003erx_stats;\n 472:\t\n 473:\t\tif (!rx_stats)\n 474:\t\t\treturn;\n 475:\t\n 476:\t\tif (ret == 0)\n 477:\t\t\trx_stats-\u003erx_spectral_sample_good++;\n 478:\t\telse\n 479:\t\t\trx_stats-\u003erx_spectral_sample_err++;\n 480:\t}\n 481:\t\n 482:\t/* returns 1 if this was a spectral frame, even if not handled. */\n 483:\tint ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,\n 484:\t\t\t struct ath_rx_status *rs, u64 tsf)\n 485:\t{\n 486:\t\tu8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};\n 487:\t\tstruct ath_hw *ah = spec_priv-\u003eah;\n 488:\t\tstruct ath_common *common = ath9k_hw_common(spec_priv-\u003eah);\n 489:\t\tu8 num_bins, *vdata = (u8 *)hdr;\n 490:\t\tstruct ath_radar_info *radar_info;\n 491:\t\tint len = rs-\u003ers_datalen;\n 492:\t\tint i;\n 493:\t\tint got_slen = 0;\n 494:\t\tu8 *sample_start;\n 495:\t\tint sample_bytes = 0;\n 496:\t\tint ret = 0;\n 497:\t\tu16 fft_len, sample_len, freq = ah-\u003ecurchan-\u003echan-\u003ecenter_freq;\n 498:\t\tenum nl80211_channel_type chan_type;\n 499:\t\tath_cmn_fft_idx_validator *fft_idx_validator;\n 500:\t\tath_cmn_fft_sample_handler *fft_handler;\n 501:\t\n 502:\t\t/* AR9280 and before report via ATH9K_PHYERR_RADAR, AR93xx and newer\n 503:\t\t * via ATH9K_PHYERR_SPECTRAL. Haven't seen ATH9K_PHYERR_FALSE_RADAR_EXT\n 504:\t\t * yet, but this is supposed to be possible as well.\n 505:\t\t */\n 506:\t\tif (rs-\u003ers_phyerr != ATH9K_PHYERR_RADAR \u0026\u0026\n 507:\t\t rs-\u003ers_phyerr != ATH9K_PHYERR_FALSE_RADAR_EXT \u0026\u0026\n 508:\t\t rs-\u003ers_phyerr != ATH9K_PHYERR_SPECTRAL)\n 509:\t\t\treturn 0;\n"
} |
| 19/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 37665 output: 45 thoughts: 20 Thoughts: Here's a summary of my thought process: **Diving into `common-spectral.c`** Okay, time to get my hands dirty. I need to pinpoint where this issue might be occurring within the spectral analysis code. My instinct tells me the problem is likely within the core signal processing routines, so I'm going to start by examining lines 620-660 of `common-spectral.c`. This section likely contains a critical segment for either the FFT calculation, windowing functions, or perhaps the power spectrum computation, all of which are essential in any spectral analysis process. I'll need to carefully dissect the logic in that section, paying close attention to data flow and any potential edge cases that could introduce errors. The goal is to rapidly determine if any of the assumptions of the algorithm are violated at that location, especially relative to the incoming signal, and the current configuration. I have to apply my understanding of spectral analysis principles, and focus on details here: variable types, loop conditions, and any potential off-by-one errors. |
| 20/2 | 2026/09/05 01:03 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/common-spectral.c",
"FirstLine": 620,
"LineCount": 40
}Results: {
"Contents": " 620:\t\t\t\t\tcontinue;\n 621:\t\n 622:\t\t\t\tgot_slen = 1;\n 623:\t\t\t}\n 624:\t\n 625:\t\t\tif (got_slen) {\n 626:\t\t\t\tath_dbg(common, SPECTRAL_SCAN, \"FFT frame len: %i\\n\",\n 627:\t\t\t\t\tsample_bytes);\n 628:\t\n 629:\t\t\t\t/* Only try to fix a frame if it's the only one\n 630:\t\t\t\t * on the report, else just skip it.\n 631:\t\t\t\t */\n 632:\t\t\t\tif (sample_bytes != sample_len \u0026\u0026 len \u003c= fft_len + 2) {\n 633:\t\t\t\t\tath_cmn_copy_fft_frame(sample_start,\n 634:\t\t\t\t\t\t\t sample_buf, sample_len,\n 635:\t\t\t\t\t\t\t sample_bytes);\n 636:\t\n 637:\t\t\t\t\tret = fft_handler(rs, spec_priv, sample_buf,\n 638:\t\t\t\t\t\t\t tsf, freq, chan_type);\n 639:\t\n 640:\t\t\t\t\tath_cmn_count_fft_sample(spec_priv, ret);\n 641:\t\n 642:\t\t\t\t\t/* Mix the received bins to the /dev/random\n 643:\t\t\t\t\t * pool\n 644:\t\t\t\t\t */\n 645:\t\t\t\t\tadd_device_randomness(sample_buf, num_bins);\n 646:\t\n 647:\t\t\t\t\tmemset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN);\n 648:\t\t\t\t}\n 649:\t\n 650:\t\t\t\t/* Process a normal frame */\n 651:\t\t\t\tif (sample_bytes == sample_len) {\n 652:\t\t\t\t\tret = fft_handler(rs, spec_priv, sample_start,\n 653:\t\t\t\t\t\t\t tsf, freq, chan_type);\n 654:\t\n 655:\t\t\t\t\tath_cmn_count_fft_sample(spec_priv, ret);\n 656:\t\n 657:\t\t\t\t\t/* Mix the received bins to the /dev/random\n 658:\t\t\t\t\t * pool\n 659:\t\t\t\t\t */\n"
} |
| 21/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 38527 output: 46 thoughts: 22 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into `common-spectral.c`** Okay, time to get my hands dirty. Let's see... the initial analysis suggests a potential issue in the spectral processing, so I'm going to jump straight into `common-spectral.c`. Specifically, I want to zero in on lines 1050 through 1080. This region usually handles a critical transform or filtering step. I have a hunch that's where things are falling apart, so let's start there and see what we can find. It's a targeted approach; hopefully this will provide some insights. |
| 22/2 | 2026/09/05 01:03 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/common-spectral.c",
"FirstLine": 1050,
"LineCount": 35
}Results: {
"Contents": "1050:\t/*********************/\n1051:\t\n1052:\tvoid ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)\n1053:\t{\n1054:\t\tif (spec_priv-\u003erfs_chan_spec_scan) {\n1055:\t\t\trelay_close(spec_priv-\u003erfs_chan_spec_scan);\n1056:\t\t\tspec_priv-\u003erfs_chan_spec_scan = NULL;\n1057:\t\t}\n1058:\t}\n1059:\tEXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);\n1060:\t\n1061:\tvoid ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,\n1062:\t\t\t\t\t struct dentry *debugfs_phy,\n1063:\t\t\t\t\t struct ath_rx_stats *rx_stats)\n1064:\t{\n1065:\t\tspec_priv-\u003erx_stats = rx_stats;\n1066:\t\tspec_priv-\u003erfs_chan_spec_scan = relay_open(\"spectral_scan\",\n1067:\t\t\t\t\t\t debugfs_phy,\n1068:\t\t\t\t\t\t 1024, 256, \u0026rfs_spec_scan_cb,\n1069:\t\t\t\t\t\t NULL);\n1070:\t\tif (!spec_priv-\u003erfs_chan_spec_scan)\n1071:\t\t\treturn;\n1072:\t\n1073:\t\tdebugfs_create_file(\"spectral_scan_ctl\",\n1074:\t\t\t\t 0600,\n1075:\t\t\t\t debugfs_phy, spec_priv,\n1076:\t\t\t\t \u0026fops_spec_scan_ctl);\n1077:\t\tdebugfs_create_file(\"spectral_short_repeat\",\n1078:\t\t\t\t 0600,\n1079:\t\t\t\t debugfs_phy, spec_priv,\n1080:\t\t\t\t \u0026fops_spectral_short_repeat);\n1081:\t\tdebugfs_create_file(\"spectral_count\",\n1082:\t\t\t\t 0600,\n1083:\t\t\t\t debugfs_phy, spec_priv,\n1084:\t\t\t\t \u0026fops_spectral_count);\n"
} |
| 23/2 | 2026/09/05 01:03 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 39345 output: 206 thoughts: 902 Thoughts: **Analysis of ath9k Spectral Scan Configuration and Fuzzing Potential** Okay, let's break this down. First, I need to understand the configuration dependencies for this spectral scan functionality. It looks like `ATH9K_COMMON_SPECTRAL` is the core, but it depends on either `ATH9K_DEBUGFS` or `ATH9K_HTC_DEBUGFS`. Diving deeper, `ATH9K_HTC_DEBUGFS` needs `ATH9K_HTC` and `DEBUG_FS`, and that, in turn, requires `USB` and `MAC80211`. Meanwhile, `ATH9K_DEBUGFS` wants `ATH9K`, `DEBUG_FS`, and `MAC80211_DEBUGFS`. Of course, `ATH9K` itself depends on `MAC80211`. Now, I'll review all the configs involved: `ATH9K`, `ATH9K_HTC`, `ATH9K_DEBUGFS`, `ATH9K_HTC_DEBUGFS`, `ATH9K_COMMON_SPECTRAL`, `MAC80211`, `USB`, and `DEBUG_FS`. Next, I need to identify the key functions or "focus symbols" that are being touched. I see: 1. `ath_cmn_process_fft`: This is the main FFT processing function modified in `common-spectral.c`. 2. `ath_cmn_count_fft_sample`: It's `static`, but I'll make sure to check its non-static entry points just in case. 3. `ath9k_cmn_spectral_init_debug`: Prototype and implementation changed in `common-spectral.c`. 4. `ath9k_init_debug` in `debug.c`. 5. `ath9k_htc_init_debug` in `htc_drv_debug.c`. I'll check for any other symbols or callers. Looking specifically at `common-spectral.c`, I see that `ath_cmn_process_fft` is called by `ath9k_rx_skb_preprocess` (ath9k rx path) and `ath9k_rx_prepare` (ath9k\_htc rx path). Good, I'll confirm that these are present in the codebase. Yes, they are. Now, let's assess the fuzzing potential. It seems we have a good setup here: reachable via USB gadget (for `ath9k_htc` emulation) and debugfs, combined with netdev and nl80211 rx packet processing. Also, there's a modification of executable code logic within the wireless driver subsystem (`drivers/net/wireless/ath/ath9k/`). There's also some work in RX stats handling for spectral scan frames to avoid potential type mismatches between ath9k and ath9k\_htc. It's a "yes" for worth fuzzing. My list of FocusSymbols should be: `ath_cmn_process_fft`, `ath9k_cmn_spectral_init_debug`, `ath9k_htc_init_debug`, and `ath9k_init_debug`. Now, let's check that `ath_cmn_count_fft_sample` function. It's marked `static void ath_cmn_count_fft_sample`. On amd64, it could be inlined into `ath_cmn_process_fft`. So the non-static feature-specific entry points are : `ath_cmn_process_fft`, `ath9k_cmn_spectral_init_debug`, `ath9k_htc_init_debug`, and `ath9k_init_debug`. I'll verify the EnableConfigs now: `ATH9K_COMMON_SPECTRAL`, `ATH9K_HTC_DEBUGFS`, `ATH9K_DEBUGFS`, `ATH9K_HTC`, and `ATH9K`. I'll double-check everything one last time. Is `ATH9K_COMMON_SPECTRAL` a boolean? Yes. Does it select `RELAY`? Yes. Are there any other required configs? No. `ATH9K`, `ATH9K_HTC`, `ATH9K_DEBUGFS`, `ATH9K_HTC_DEBUGFS`, `ATH9K_COMMON_SPECTRAL`, `MAC80211`, and `DEBUG_FS`. Time to call `set-results`. I'm ready to move forward. |
| 24/2 | 2026/09/05 01:03 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"ATH9K",
"ATH9K_HTC",
"ATH9K_DEBUGFS",
"ATH9K_HTC_DEBUGFS",
"ATH9K_COMMON_SPECTRAL",
"MAC80211",
"DEBUG_FS"
],
"FocusSymbols": [
"ath_cmn_process_fft",
"ath9k_cmn_spectral_init_debug",
"ath9k_htc_init_debug",
"ath9k_init_debug"
],
"Reasoning": "The patch refactors the spectral scan RX statistics accounting in the ath9k/ath9k_htc wireless driver to avoid incorrect struct casting between ath9k and ath9k_htc. The modified code is reachable in virtualized environments via USB emulation (ath9k_htc) and debugfs/wireless RX frame processing.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"ATH9K",
"ATH9K_HTC",
"ATH9K_DEBUGFS",
"ATH9K_HTC_DEBUGFS",
"ATH9K_COMMON_SPECTRAL",
"MAC80211",
"DEBUG_FS"
],
"FocusSymbols": [
"ath_cmn_process_fft",
"ath9k_cmn_spectral_init_debug",
"ath9k_htc_init_debug",
"ath9k_init_debug"
],
"Reasoning": "The patch refactors the spectral scan RX statistics accounting in the ath9k/ath9k_htc wireless driver to avoid incorrect struct casting between ath9k and ath9k_htc. The modified code is reachable in virtualized environments via USB emulation (ath9k_htc) and debugfs/wireless RX frame processing.",
"WorthFuzzing": true
} |
| 25/1 | 2026/09/05 01:03 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 26/2 | 2026/09/05 01:03 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch refactors spectral scan RX statistics accounting in the ath9k driver by passing an explicit pointer to `struct ath_rx_stats` in `ath_spec_scan_priv` instead of inappropriately casting `common-\u003epriv` to `struct ath_softc *` (which was invalid for `ath9k_htc`). \n\nThis change does not introduce or modify uninitialized memory handling, uninitialized branching, or kernel-to-user info leaks. Any memory access issues related to invalid pointer dereferencing or struct casting are caught by KASAN or standard kernel fault handlers. Therefore, dedicated KMSAN fuzzing is not required.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 0d5d4db8d8a6595a95be8707985fc133de126442
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 5 01:03:19 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..d8be24ebcd247 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -465,6 +465,20 @@ ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv)
return 0;
}
+static void ath_cmn_count_fft_sample(struct ath_spec_scan_priv *spec_priv,
+ int ret)
+{
+ struct ath_rx_stats *rx_stats = spec_priv->rx_stats;
+
+ if (!rx_stats)
+ return;
+
+ if (ret == 0)
+ rx_stats->rx_spectral_sample_good++;
+ else
+ rx_stats->rx_spectral_sample_err++;
+}
+
/* returns 1 if this was a spectral frame, even if not handled. */
int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_hdr *hdr,
struct ath_rx_status *rs, u64 tsf)
@@ -472,7 +486,6 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
u8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};
struct ath_hw *ah = spec_priv->ah;
struct ath_common *common = ath9k_hw_common(spec_priv->ah);
- struct ath_softc *sc = common->priv;
u8 num_bins, *vdata = (u8 *)hdr;
struct ath_radar_info *radar_info;
int len = rs->rs_datalen;
@@ -624,10 +637,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
ret = fft_handler(rs, spec_priv, sample_buf,
tsf, freq, chan_type);
- if (ret == 0)
- RX_STAT_INC(sc, rx_spectral_sample_good);
- else
- RX_STAT_INC(sc, rx_spectral_sample_err);
+ ath_cmn_count_fft_sample(spec_priv, ret);
/* Mix the received bins to the /dev/random
* pool
@@ -642,10 +652,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
ret = fft_handler(rs, spec_priv, sample_start,
tsf, freq, chan_type);
- if (ret == 0)
- RX_STAT_INC(sc, rx_spectral_sample_good);
- else
- RX_STAT_INC(sc, rx_spectral_sample_err);
+ ath_cmn_count_fft_sample(spec_priv, ret);
/* Mix the received bins to the /dev/random
* pool
@@ -1052,8 +1059,10 @@ void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv)
EXPORT_SYMBOL(ath9k_cmn_spectral_deinit_debug);
void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
- struct dentry *debugfs_phy)
+ struct dentry *debugfs_phy,
+ struct ath_rx_stats *rx_stats)
{
+ spec_priv->rx_stats = rx_stats;
spec_priv->rfs_chan_spec_scan = relay_open("spectral_scan",
debugfs_phy,
1024, 256, &rfs_spec_scan_cb,
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.h b/drivers/net/wireless/ath/ath9k/common-spectral.h
index 011d8ab8b9744..0e2c7d6d34874 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.h
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.h
@@ -94,12 +94,16 @@ struct ath_ht20_40_fft_packet {
struct ath_radar_info radar_info;
} __packed;
+struct ath_rx_stats;
+
struct ath_spec_scan_priv {
struct ath_hw *ah;
/* relay(fs) channel for spectral scan */
struct rchan *rfs_chan_spec_scan;
enum spectral_mode spectral_mode;
struct ath_spec_scan spec_config;
+ /* driver's RX statistics to account samples into, if any */
+ struct ath_rx_stats *rx_stats;
};
#define SPECTRAL_HT20_40_TOTAL_DATA_LEN (sizeof(struct ath_ht20_40_fft_packet))
@@ -169,7 +173,9 @@ static inline u8 spectral_bitmap_weight(u8 *bins)
}
#ifdef CONFIG_ATH9K_COMMON_SPECTRAL
-void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);
+void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
+ struct dentry *debugfs_phy,
+ struct ath_rx_stats *rx_stats);
void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);
void ath9k_cmn_spectral_scan_trigger(struct ath_common *common,
@@ -181,7 +187,8 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
struct ath_rx_status *rs, u64 tsf);
#else
static inline void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv,
- struct dentry *debugfs_phy)
+ struct dentry *debugfs_phy,
+ struct ath_rx_stats *rx_stats)
{
}
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 74a0134075cf9..042a4f542a943 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1389,7 +1389,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_dfs_init_debug(sc);
ath9k_tx99_init_debug(sc);
- ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
+ ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy,
+ &sc->debug.stats.rxstats);
debugfs_create_devm_seqfile(sc->dev, "dma", sc->debug.debugfs_phy,
read_file_dma);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index 9437d69877cc5..9d354b1d929c8 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -487,7 +487,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
priv->hw->wiphy->debugfsdir);
- ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
+ ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy,
+ &priv->debug.rx_stats);
debugfs_create_file("tgt_int_stats", 0400, priv->debug.debugfs_phy,
priv, &fops_tgt_int_stats);
|
| 27/3 | 2026/09/05 01:03 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4269 output: 36 thoughts: 710 Thoughts: **Analyzing the Patch for KMSAN Fuzzing Needs** Okay, let's take a look at this patch and decide if it warrants a dedicated KMSAN fuzzing session. The diff is pretty straightforward: it's within the `drivers/net/wireless/ath/ath9k` directory. Specifically, changes in `common-spectral.c`, `common-spectral.h`, `debug.c`, and `htc_drv_debug.c`. It looks like the core of the change revolves around a type safety issue. They've introduced a helper function, `ath_cmn_count_fft_sample`, to replace direct counter increments within the `ath_rx_stats` structure. The old code was assuming that `common->priv` within `ath9k_htc` was a `struct ath_softc *`, but it could be something else, leading to type confusion and potential memory corruption when accessing the stats. The fix involves passing the `ath_rx_stats` pointer directly, ensuring the correct structure is used. So, the original code had pointer confusion and was not correctly dereferencing stats. Now, the important part: KMSAN. I need to figure out if this patch introduces any new vulnerabilities that KMSAN would be good at finding. Let's see... First, are there uninitialized memory reads, potential info leaks to user space, or uninitialized buffer usages involved? No. The patch only increments counter statistics in an existing `ath_rx_stats` struct. No new structures are introduced that are sent to user space. Next, conditional logic dependent on uninitialized variables? Nope. It does a check for `rx_stats` and the return value of `ret`, but the `rx_stats` pointer is initialized. How about complex data structures with uninitialized fields? Again, no. It looks like `ath_rx_stats` is the same struct as before. Does the patch change bounds checks or lengths in a way that might expose uninitialized memory? No changes here either. So, what kind of bug was fixed? The patch addresses a driver pointer / type confusion or NULL dereference. The previous assumption about the `common->priv` type caused issues. This sounds like the type of bug that could manifest as KASAN / GPF / general detector issues – definitely memory safety concerns, but more in the realm of pointer errors than uninitialized reads. It's essentially fixing a bug where we were dereferencing an invalid pointer or dereferencing a pointer to an incorrect data structure. Okay, let's just do a quick `grepper` search within the repo to be absolutely certain I haven't missed anything. I'm going to search for instances of the structs and functions involved to be completely sure. Just to be on the safe side. |
| 28/3 | 2026/09/05 01:04 | tool | grepper |
0mArgs:{
"Expression": "rx_spectral_sample",
"PathPrefix": "drivers/net/wireless/ath/ath9k"
}Results: {
"Output": "drivers/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-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-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-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=468=static void ath_cmn_count_fft_sample(struct ath_spec_scan_priv *spec_priv,\n--\ndrivers/net/wireless/ath/ath9k/common-spectral.c-476-\tif (ret == 0)\ndrivers/net/wireless/ath/ath9k/common-spectral.c:477:\t\trx_stats-\u003erx_spectral_sample_good++;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-478-\telse\ndrivers/net/wireless/ath/ath9k/common-spectral.c:479:\t\trx_stats-\u003erx_spectral_sample_err++;\ndrivers/net/wireless/ath/ath9k/common-spectral.c-480-}\n"
} |
| 29/3 | 2026/09/05 01:04 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 6302 output: 160 thoughts: 123 Thoughts: **Analyzing the Refactoring and Memory Safety** Okay, so I've been reviewing this patch. Seems pretty clean-cut. The core of it involves how `ath_spec_scan_priv` interacts with the RX statistics. The refactor just makes the access cleaner and more direct, letting both `ath9k` and `ath9k_htc` provide their `struct ath_rx_stats *` pointer upfront during spectral debug initialization. This eliminates the need for that `common->priv` cast, which is always something to watch out for. I've gone through it with a fine-tooth comb, and I'm not seeing any red flags regarding uninitialized memory. No indications of uninitialized memory usage, allocating uninitialized memory, leaks to user space, or branches based on uninitialized memory. Given that thorough inspection, the `NeedsKMSAN` flag is definitively false in this case. Alright, with all that out of the way, I'm comfortable calling `set-results`. It's a solid, safe refactoring. |
| 30/3 | 2026/09/05 01:04 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch refactors spectral scan RX statistics accounting in the ath9k driver by passing an explicit pointer to `struct ath_rx_stats` in `ath_spec_scan_priv` instead of inappropriately casting `common-\u003epriv` to `struct ath_softc *` (which was invalid for `ath9k_htc`). \n\nThis change does not introduce or modify uninitialized memory handling, uninitialized branching, or kernel-to-user info leaks. Any memory access issues related to invalid pointer dereferencing or struct casting are caught by KASAN or standard kernel fault handlers. Therefore, dedicated KMSAN fuzzing is not required.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch refactors spectral scan RX statistics accounting in the ath9k driver by passing an explicit pointer to `struct ath_rx_stats` in `ath_spec_scan_priv` instead of inappropriately casting `common-\u003epriv` to `struct ath_softc *` (which was invalid for `ath9k_htc`). \n\nThis change does not introduce or modify uninitialized memory handling, uninitialized branching, or kernel-to-user info leaks. Any memory access issues related to invalid pointer dereferencing or struct casting are caught by KASAN or standard kernel fault handlers. Therefore, dedicated KMSAN fuzzing is not required.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|