AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/28 17:49 flow patch-triage
7m Args:
null

Results:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "USB",
    "MAC80211",
    "WLAN",
    "WLAN_VENDOR_ATH"
  ],
  "FocusSymbols": [
    "ath9k_reg_rmw_buffer",
    "ath9k_htc_probe_device",
    "ath9k_htc_hw_init"
  ],
  "KMSANReasoning": "The patch corrects a sizeof calculation bug in ath9k_reg_rmw_buffer() where sizeof(struct register_write) (8 bytes) was mistakenly used instead of sizeof(struct register_rmw) (12 bytes) when passing the buffer length for WMI_REG_RMW_CMDID to ath9k_wmi_cmd(). \n\nAll elements of the multi_rmw array up to multi_rmw_idx (which is MAX_RMW_CMD_NUMBER = 15 when flushing) are explicitly populated with reg, set, and clr values, and struct register_rmw is a packed structure with no padding holes. The data is copied into an skb and sent to the device firmware, not copied to user space or used in uninitialized conditionals. \n\nThere is no risk of uninitialized memory reads or information leaks. Standard KASAN builds are sufficient to monitor bounds and memory safety for this driver path, and a dedicated KMSAN session is not required.",
  "NeedsKMSAN": false,
  "Reasoning": "The patch fixes a bug in the ath9k_htc USB WiFi driver where the buffer size in ath9k_reg_rmw_buffer() was computed using sizeof(struct register_write) instead of sizeof(struct register_rmw). This resulted in sending truncated payloads to the firmware during batch register RMW operations. The code is reachable and fuzzable via USB emulation.",
  "WorthFuzzing": true
}

1/1 2026/08/28 17:49 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 991259fc965b9e37c2fbd5ed380700a886902c21\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Fri Aug 28 17:49:56 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c\nindex 6de78ae857268..0b49d2cc99f0b 100644\n--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c\n+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c\n@@ -405,7 +405,7 @@ static void ath9k_reg_rmw_buffer(void *hw_priv,\n \tif (priv-\u003ewmi-\u003emulti_rmw_idx == MAX_RMW_CMD_NUMBER) {\n \t\tr = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_RMW_CMDID,\n \t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\n-\t\t\t  sizeof(struct register_write) * priv-\u003ewmi-\u003emulti_rmw_idx,\n+\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\n \t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n \t\t\t  100);\n \t\tif (unlikely(r)) {\n"
}

2/1 2026/08/28 17:49 agent patch-evaluator
4m Model:
core

Args:
null

Results:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "USB",
    "MAC80211",
    "WLAN",
    "WLAN_VENDOR_ATH"
  ],
  "FocusSymbols": [
    "ath9k_reg_rmw_buffer",
    "ath9k_htc_probe_device",
    "ath9k_htc_hw_init"
  ],
  "Reasoning": "The patch fixes a bug in the ath9k_htc USB WiFi driver where the buffer size in ath9k_reg_rmw_buffer() was computed using sizeof(struct register_write) instead of sizeof(struct register_rmw). This resulted in sending truncated payloads to the firmware during batch register RMW operations. The code is reachable and fuzzable via USB emulation.",
  "WorthFuzzing": true
}

Instruction:
You are an expert Linux kernel maintainer.
Your job is to review a provided patch series and determine
if it makes functional changes to the kernel that should be fuzzed.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively
use your code access tools to examine the actual source code and confirm any assumptions.

Return WorthFuzzing=false if the patch only contains:
- Modifications to Documentation/, Kconfig files, or code comments.
- Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints.
- Changes to numeric constants or macros that do not functionally alter execution flow.
- Code paths that are impossible to reach in virtualized environments like GCE or QEMU,
  even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim).
- Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed,
  ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU.
- Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove)
  that are executed only during PCI hot-unplug or sysfs driver unbind operations.

If it modifies reachable core kernel logic, drivers, or architectures, use your code search
tools to verify the code can be executed, then return WorthFuzzing=true.

When returning WorthFuzzing=true, you MUST ALSO:
1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols.
   Avoid listing generic hot-path functions to prevent skewed test distributions.
   Prefer non-static, non-inlined API entrypoint functions over internal static helper functions
   (which are inlined by the compiler and do not have distinct symbol addresses).
2. Identify any specific CONFIG_ options required to properly test this new/modified feature.
   Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions.
   Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs
   needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs
   output array, and DO NOT add a '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:
For your convenience, here is the diff of the changes:
commit 991259fc965b9e37c2fbd5ed380700a886902c21
Author: syz-cluster <triage@syzkaller.com>
Date:   Fri Aug 28 17:49:56 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 6de78ae857268..0b49d2cc99f0b 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -405,7 +405,7 @@ static void ath9k_reg_rmw_buffer(void *hw_priv,
 	if (priv->wmi->multi_rmw_idx == MAX_RMW_CMD_NUMBER) {
 		r = ath9k_wmi_cmd(priv->wmi, WMI_REG_RMW_CMDID,
 			  (u8 *) &priv->wmi->multi_rmw,
-			  sizeof(struct register_write) * priv->wmi->multi_rmw_idx,
+			  sizeof(struct register_rmw) * priv->wmi->multi_rmw_idx,
 			  (u8 *) &rsp_status, sizeof(rsp_status),
 			  100);
 		if (unlikely(r)) {

3/2 2026/08/28 17:49 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 2198
							output: 38
							thoughts: 414
						

Thoughts:
**Analyzing a Patch: A Quick Deep Dive**

Okay, let's break down this patch. My immediate thought is to understand the context. The diff points to `drivers/net/wireless/ath/ath9k/htc_drv_init.c`, so we're dealing with an Atheros (ath9k) wireless driver, specifically the HTC (Host-Target Communication) part of it. I need to understand this driver to understand the patch.

Looking at the code change, it appears to be a modification within `ath9k_reg_rmw_buffer`. The key change is the substitution of `sizeof(struct register_write)` with `sizeof(struct register_rmw)`. This likely indicates a change in the data structure used for "Read-Modify-Write" operations on hardware registers. A structural change here suggests that the underlying `register_rmw` struct is being used instead of `register_write`, which probably means something has been added to it - likely some additional fields to read.

I need to confirm what `register_rmw` and `register_write` are, and how that changes things. We also need to check the definition of the structure itself, and the context, to see what this means in terms of the bigger picture of the driver.

From a vulnerability perspective, I should also ask if the `ath9k_htc` driver is something that's accessible in my fuzzing setup. Is this driver reachable through QEMU or USB fuzzing? Can I trigger this functionality reliably? I'll probably check with `grepper` or `read-file` to see what is possible.



4/2 2026/08/28 17:50 tool grepper
0m Args:
{
  "Expression": "ath9k_htc",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 2453 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/ath/ath9k/Kconfig=13=config ATH9K_BTCOEX_SUPPORT\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-17-\thelp\ndrivers/net/wireless/ath/ath9k/Kconfig:18:\t  Say Y, if you want to use the ath9k/ath9k_htc radios together with\ndrivers/net/wireless/ath/ath9k/Kconfig-19-\t  Bluetooth modules in the same system.\n--\ndrivers/net/wireless/ath/ath9k/Kconfig=172=config ATH9K_HTC\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-182-\t  For more information:\ndrivers/net/wireless/ath/ath9k/Kconfig:183:\t  https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc\ndrivers/net/wireless/ath/ath9k/Kconfig-184-\ndrivers/net/wireless/ath/ath9k/Kconfig:185:\t  The built module will be ath9k_htc.\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\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-191-\thelp\ndrivers/net/wireless/ath/ath9k/Kconfig:192:\t  Say Y, if you need access to ath9k_htc's statistics.\ndrivers/net/wireless/ath/ath9k/Kconfig-193-\t  As well as access to the FFT/spectral data.\n--\ndrivers/net/wireless/ath/ath9k/Kconfig=206=config ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/Kconfig:207:\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\ndrivers/net/wireless/ath/ath9k/Kconfig-208-\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\n--\ndrivers/net/wireless/ath/ath9k/Makefile=66=ath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o\ndrivers/net/wireless/ath/ath9k/Makefile-67-\ndrivers/net/wireless/ath/ath9k/Makefile:68:ath9k_htc-y +=\thtc_hst.o \\\ndrivers/net/wireless/ath/ath9k/Makefile-69-\t\thif_usb.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/common.c-17-/*\ndrivers/net/wireless/ath/ath9k/common.c:18: * Module for common driver code between ath9k and ath9k_htc\ndrivers/net/wireless/ath/ath9k/common.c-19- */\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=71=static void hif_usb_regout_cb(struct urb *urb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-87-\tif (cmd) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:88:\t\tath9k_htc_txcompletion_cb(cmd-\u003ehif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-89-\t\t\t\t\t  cmd-\u003eskb, true);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=135=static void hif_usb_mgmt_cb(struct urb *urb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-175-\tskb_pull(cmd-\u003eskb, 4);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:176:\tath9k_htc_txcompletion_cb(cmd-\u003ehif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-177-\t\t\t\t  cmd-\u003eskb, txok);\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-241-#endif\ndrivers/net/wireless/ath/ath9k/hif_usb.c:242:\t\tath9k_htc_txcompletion_cb(hif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-243-\t\t\t\t\t  skb, txok);\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)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-377-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:378:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-379-\tunsigned long flags;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=465=static int hif_usb_send(void *hif_handle, u8 pipe_id, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-478-\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:479:\t\t\t\"ath9k_htc: Invalid TX pipe: %d\\n\", pipe_id);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-480-\t\tret = -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=487=static inline bool check_index(struct sk_buff *skb, u8 idx)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-488-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:489:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-490-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=500=static void hif_usb_sta_drain(void *hif_handle, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-510-\t\t\t__skb_unlink(skb, \u0026hif_dev-\u003etx.tx_skb_queue);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:511:\t\t\tath9k_htc_txcompletion_cb(hif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-512-\t\t\t\t\t\t  skb, false);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-520-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:521:static struct ath9k_htc_hif hif_usb = {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-522-\t.transport = ATH9K_HIF_USB,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=552=static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-613-\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:614:\t\t\t\t\"ath9k_htc: invalid pkt_len (%x)\\n\", pkt_len);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-615-\t\t\tRX_STAT_INC(hif_dev, skb_dropped);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-630-\t\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:631:\t\t\t\t\t\"ath9k_htc: RX memory allocation error\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-632-\t\t\t\tspin_unlock(\u0026hif_dev-\u003erx_lock);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-652-\t\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:653:\t\t\t\t\t\"ath9k_htc: over RX MAX_PKT_NUM\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-654-\t\t\t\tgoto err;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-658-\t\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:659:\t\t\t\t\t\"ath9k_htc: RX memory allocation error\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-660-\t\t\t\tgoto err;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-673-\t\tRX_STAT_ADD(hif_dev, skb_completed_bytes, skb_pool[i]-\u003elen);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:674:\t\tath9k_htc_rx_msg(hif_dev-\u003ehtc_handle, skb_pool[i],\ndrivers/net/wireless/ath/ath9k/hif_usb.c-675-\t\t\t\t skb_pool[i]-\u003elen, USB_WLAN_RX_PIPE);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=733=static void ath9k_hif_usb_reg_in_cb(struct urb *urb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-767-\t\t */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:768:\t\tath9k_htc_rx_msg(hif_dev-\u003ehtc_handle, skb,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-769-\t\t\t\t skb-\u003elen, USB_REG_IN_PIPE);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-773-\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:774:\t\t\t\t\"ath9k_htc: REG_IN memory allocation failure\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-775-\t\t\tgoto free_rx_buf;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1058=static int ath9k_hif_usb_download_fw(struct hif_device_usb *hif_dev)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1104-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1105:\tdev_info(\u0026hif_dev-\u003eudev-\u003edev, \"ath9k_htc: Transferred FW: %s, size: %ld\\n\",\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1106-\t\t hif_dev-\u003efw_name, (unsigned long) hif_dev-\u003efw_size);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1111=static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1117-\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1118:\t\t\t\"ath9k_htc: Firmware - %s download failed\\n\",\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1119-\t\t\thif_dev-\u003efw_name);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1126-\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1127:\t\t\t\"ath9k_htc: Unable to allocate URBs\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1128-\t\treturn ret;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1162=static int ath9k_hif_request_firmware(struct hif_device_usb *hif_dev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1206-\t\t/* expected fw locations:\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1207:\t\t * - ath9k_htc/htc_9271-1.dev.0.fw (development version)\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1208:\t\t * - ath9k_htc/htc_9271-1.4.0.fw   (stable version)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1209-\t\t */\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1219-\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1220:\t\t\t\"ath9k_htc: Async request for firmware %s failed\\n\",\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1221-\t\t\thif_dev-\u003efw_name);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1226=static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1236-\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1237:\t\t\t\"ath9k_htc: Failed to get firmware %s\\n\",\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1238-\t\t\thif_dev-\u003efw_name);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1241-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1242:\thif_dev-\u003ehtc_handle = ath9k_htc_hw_alloc(hif_dev, \u0026hif_usb,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1243-\t\t\t\t\t\t \u0026hif_dev-\u003eudev-\u003edev);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1255-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1256:\tret = ath9k_htc_hw_init(hif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1257-\t\t\t\t\u0026hif_dev-\u003einterface-\u003edev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1274-err_dev_init:\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1275:\tath9k_htc_hw_free(hif_dev-\u003ehtc_handle);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1276-err_dev_alloc:\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1285=static int send_eject_command(struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1307-\t\tdev_err(\u0026udev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1308:\t\t\t\"ath9k_htc: Could not find bulk out endpoint\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1309-\t\treturn -ENODEV;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1340=static int ath9k_hif_usb_probe(struct usb_interface *interface,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1356-\t\tdev_err(\u0026udev-\u003edev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1357:\t\t\t\"ath9k_htc: Device endpoint numbers are not the expected ones\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1358-\t\treturn -ENODEV;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1393=static void ath9k_hif_usb_reboot(struct usb_device *udev)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1405-\tif (ret)\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1406:\t\tdev_err(\u0026udev-\u003edev, \"ath9k_htc: USB reboot failed\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1407-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1411=static void ath9k_hif_usb_disconnect(struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1422-\tif (hif_dev-\u003eflags \u0026 HIF_USB_READY) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1423:\t\tath9k_htc_hw_deinit(hif_dev-\u003ehtc_handle, unplugged);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1424:\t\tath9k_htc_hw_free(hif_dev-\u003ehtc_handle);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1425-\t}\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1434-\tkfree(hif_dev);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1435:\tdev_info(\u0026udev-\u003edev, \"ath9k_htc: USB layer deinitialized\\n\");\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1436-}\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1439=static int ath9k_hif_usb_suspend(struct usb_interface *interface,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1448-\tif (!(hif_dev-\u003eflags \u0026 HIF_USB_START))\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1449:\t\tath9k_htc_suspend(hif_dev-\u003ehtc_handle);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1450-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1459=static int ath9k_hif_usb_resume(struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1489-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1490:\tret = ath9k_htc_resume(htc_handle);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1491-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.h-29-#define FIRMWARE_MINOR_IDX_MIN  3\ndrivers/net/wireless/ath/ath9k/hif_usb.h:30:#define HTC_FW_PATH\t\"ath9k_htc\"\ndrivers/net/wireless/ath/ath9k/hif_usb.h-31-\n--\ndrivers/net/wireless/ath/ath9k/htc.h-44-\ndrivers/net/wireless/ath/ath9k/htc.h:45:extern struct ieee80211_ops ath9k_htc_ops;\ndrivers/net/wireless/ath/ath9k/htc.h-46-extern int htc_modparam_nohwcrypt;\ndrivers/net/wireless/ath/ath9k/htc.h-47-#ifdef CONFIG_MAC80211_LEDS\ndrivers/net/wireless/ath/ath9k/htc.h:48:extern int ath9k_htc_led_blink;\ndrivers/net/wireless/ath/ath9k/htc.h-49-#endif\n--\ndrivers/net/wireless/ath/ath9k/htc.h=96=struct tx_beacon_header {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-104-\ndrivers/net/wireless/ath/ath9k/htc.h:105:struct ath9k_htc_cap_target {\ndrivers/net/wireless/ath/ath9k/htc.h-106-\t__be32 ampdu_limit;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-112-\ndrivers/net/wireless/ath/ath9k/htc.h:113:struct ath9k_htc_target_vif {\ndrivers/net/wireless/ath/ath9k/htc.h-114-\tu8 index;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-121-\ndrivers/net/wireless/ath/ath9k/htc.h:122:struct ath9k_htc_target_sta {\ndrivers/net/wireless/ath/ath9k/htc.h-123-\tu8 macaddr[ETH_ALEN];\n--\ndrivers/net/wireless/ath/ath9k/htc.h-133-\ndrivers/net/wireless/ath/ath9k/htc.h:134:struct ath9k_htc_target_aggr {\ndrivers/net/wireless/ath/ath9k/htc.h-135-\tu8 sta_index;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-148-\ndrivers/net/wireless/ath/ath9k/htc.h:149:struct ath9k_htc_rateset {\ndrivers/net/wireless/ath/ath9k/htc.h-150-\tu8 rs_nrates;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-153-\ndrivers/net/wireless/ath/ath9k/htc.h:154:struct ath9k_htc_rate {\ndrivers/net/wireless/ath/ath9k/htc.h:155:\tstruct ath9k_htc_rateset legacy_rates;\ndrivers/net/wireless/ath/ath9k/htc.h:156:\tstruct ath9k_htc_rateset ht_rates;\ndrivers/net/wireless/ath/ath9k/htc.h-157-} __packed;\ndrivers/net/wireless/ath/ath9k/htc.h-158-\ndrivers/net/wireless/ath/ath9k/htc.h:159:struct ath9k_htc_target_rate {\ndrivers/net/wireless/ath/ath9k/htc.h-160-\tu8 sta_index;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-162-\t__be32 capflags;\ndrivers/net/wireless/ath/ath9k/htc.h:163:\tstruct ath9k_htc_rate rates;\ndrivers/net/wireless/ath/ath9k/htc.h-164-};\ndrivers/net/wireless/ath/ath9k/htc.h-165-\ndrivers/net/wireless/ath/ath9k/htc.h:166:struct ath9k_htc_target_rate_mask {\ndrivers/net/wireless/ath/ath9k/htc.h-167-\tu8 vif_index;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-172-\ndrivers/net/wireless/ath/ath9k/htc.h:173:struct ath9k_htc_target_int_stats {\ndrivers/net/wireless/ath/ath9k/htc.h-174-\t__be32 rx;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-181-\ndrivers/net/wireless/ath/ath9k/htc.h:182:struct ath9k_htc_target_tx_stats {\ndrivers/net/wireless/ath/ath9k/htc.h-183-\t__be32 xretries;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-193-\ndrivers/net/wireless/ath/ath9k/htc.h:194:struct ath9k_htc_target_rx_stats {\ndrivers/net/wireless/ath/ath9k/htc.h-195-\t__be32 nobuf;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-240-\ndrivers/net/wireless/ath/ath9k/htc.h:241:struct ath9k_htc_vif {\ndrivers/net/wireless/ath/ath9k/htc.h-242-\tu8 index;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=257=enum tid_aggr_state {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-263-\ndrivers/net/wireless/ath/ath9k/htc.h:264:struct ath9k_htc_sta {\ndrivers/net/wireless/ath/ath9k/htc.h-265-\tu8 index;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-267-\tstruct work_struct rc_update_work;\ndrivers/net/wireless/ath/ath9k/htc.h:268:\tstruct ath9k_htc_priv *htc_priv;\ndrivers/net/wireless/ath/ath9k/htc.h-269-};\n--\ndrivers/net/wireless/ath/ath9k/htc.h-273-\ndrivers/net/wireless/ath/ath9k/htc.h:274:struct ath9k_htc_rxbuf {\ndrivers/net/wireless/ath/ath9k/htc.h-275-\tbool in_process;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-280-\ndrivers/net/wireless/ath/ath9k/htc.h:281:struct ath9k_htc_rx {\ndrivers/net/wireless/ath/ath9k/htc.h-282-\tstruct list_head rxbuf;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-295-\ndrivers/net/wireless/ath/ath9k/htc.h:296:struct ath9k_htc_tx {\ndrivers/net/wireless/ath/ath9k/htc.h-297-\tu8 flags;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-310-\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_* */\n--\ndrivers/net/wireless/ath/ath9k/htc.h-318-\ndrivers/net/wireless/ath/ath9k/htc.h:319:static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)\ndrivers/net/wireless/ath/ath9k/htc.h-320-{\n--\ndrivers/net/wireless/ath/ath9k/htc.h-322-\ndrivers/net/wireless/ath/ath9k/htc.h:323:\tBUILD_BUG_ON(sizeof(struct ath9k_htc_tx_ctl) \u003e\ndrivers/net/wireless/ath/ath9k/htc.h-324-\t\t     IEEE80211_TX_INFO_DRIVER_DATA_SIZE);\ndrivers/net/wireless/ath/ath9k/htc.h:325:\treturn (struct ath9k_htc_tx_ctl *) \u0026tx_info-\u003edriver_data;\ndrivers/net/wireless/ath/ath9k/htc.h-326-}\n--\ndrivers/net/wireless/ath/ath9k/htc.h-341-\ndrivers/net/wireless/ath/ath9k/htc.h:342:void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-343-\t\t\t   struct ath_rx_status *rs);\n--\ndrivers/net/wireless/ath/ath9k/htc.h=363=struct ath9k_debug {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-369-\ndrivers/net/wireless/ath/ath9k/htc.h:370:void ath9k_htc_get_et_strings(struct ieee80211_hw *hw,\ndrivers/net/wireless/ath/ath9k/htc.h-371-\t\t\t      struct ieee80211_vif *vif,\ndrivers/net/wireless/ath/ath9k/htc.h-372-\t\t\t      u32 sset, u8 *data);\ndrivers/net/wireless/ath/ath9k/htc.h:373:int ath9k_htc_get_et_sset_count(struct ieee80211_hw *hw,\ndrivers/net/wireless/ath/ath9k/htc.h-374-\t\t\t\tstruct ieee80211_vif *vif, int sset);\ndrivers/net/wireless/ath/ath9k/htc.h:375:void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,\ndrivers/net/wireless/ath/ath9k/htc.h-376-\t\t\t    struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/ath/ath9k/htc.h-387-\ndrivers/net/wireless/ath/ath9k/htc.h:388:static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-389-\t\t\t\t\t struct ath_rx_status *rs)\n--\ndrivers/net/wireless/ath/ath9k/htc.h=423=struct ath_btcoex {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-432-#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT\ndrivers/net/wireless/ath/ath9k/htc.h:433:void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product);\ndrivers/net/wireless/ath/ath9k/htc.h:434:void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:435:void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-436-#else\ndrivers/net/wireless/ath/ath9k/htc.h:437:static inline void ath9k_htc_init_btcoex(struct ath9k_htc_priv *priv, char *product)\ndrivers/net/wireless/ath/ath9k/htc.h-438-{\ndrivers/net/wireless/ath/ath9k/htc.h-439-}\ndrivers/net/wireless/ath/ath9k/htc.h:440:static inline void ath9k_htc_start_btcoex(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc.h-441-{\ndrivers/net/wireless/ath/ath9k/htc.h-442-}\ndrivers/net/wireless/ath/ath9k/htc.h:443:static inline void ath9k_htc_stop_btcoex(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc.h-444-{\n--\ndrivers/net/wireless/ath/ath9k/htc.h=452=enum htc_op_flags {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-455-\ndrivers/net/wireless/ath/ath9k/htc.h:456:struct ath9k_htc_priv {\ndrivers/net/wireless/ath/ath9k/htc.h-457-\tstruct device *dev;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-502-\ndrivers/net/wireless/ath/ath9k/htc.h:503:\tstruct ath9k_htc_rx rx;\ndrivers/net/wireless/ath/ath9k/htc.h:504:\tstruct ath9k_htc_tx tx;\ndrivers/net/wireless/ath/ath9k/htc.h-505-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=543=static inline void ath_read_cachesize(struct ath_common *common, int *csz)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-547-\ndrivers/net/wireless/ath/ath9k/htc.h:548:void ath9k_htc_reset(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-549-\ndrivers/net/wireless/ath/ath9k/htc.h:550:void ath9k_htc_assign_bslot(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-551-\t\t\t    struct ieee80211_vif *vif);\ndrivers/net/wireless/ath/ath9k/htc.h:552:void ath9k_htc_remove_bslot(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-553-\t\t\t    struct ieee80211_vif *vif);\ndrivers/net/wireless/ath/ath9k/htc.h:554:void ath9k_htc_set_tsfadjust(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-555-\t\t\t     struct ieee80211_vif *vif);\ndrivers/net/wireless/ath/ath9k/htc.h:556:void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:557:void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-558-\t\t\t     struct ieee80211_vif *vif);\ndrivers/net/wireless/ath/ath9k/htc.h:559:void ath9k_htc_beacon_reconfig(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:560:void ath9k_htc_swba(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-561-\t\t    struct wmi_event_swba *swba);\ndrivers/net/wireless/ath/ath9k/htc.h-562-\ndrivers/net/wireless/ath/ath9k/htc.h:563:void ath9k_htc_rxep(void *priv, struct sk_buff *skb,\ndrivers/net/wireless/ath/ath9k/htc.h-564-\t\t    enum htc_endpoint_id ep_id);\ndrivers/net/wireless/ath/ath9k/htc.h:565:void ath9k_htc_txep(void *priv, struct sk_buff *skb, enum htc_endpoint_id ep_id,\ndrivers/net/wireless/ath/ath9k/htc.h-566-\t\t    bool txok);\ndrivers/net/wireless/ath/ath9k/htc.h:567:void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb,\ndrivers/net/wireless/ath/ath9k/htc.h-568-\t\t\tenum htc_endpoint_id ep_id, bool txok);\ndrivers/net/wireless/ath/ath9k/htc.h-569-\ndrivers/net/wireless/ath/ath9k/htc.h:570:int ath9k_htc_update_cap_target(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-571-\t\t\t\tu8 enable_coex);\ndrivers/net/wireless/ath/ath9k/htc.h:572:void ath9k_htc_ani_work(struct work_struct *work);\ndrivers/net/wireless/ath/ath9k/htc.h:573:void ath9k_htc_start_ani(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:574:void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-575-\ndrivers/net/wireless/ath/ath9k/htc.h:576:int ath9k_tx_init(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:577:int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-578-\t\t       struct ieee80211_sta *sta,\ndrivers/net/wireless/ath/ath9k/htc.h-579-\t\t       struct sk_buff *skb, u8 slot, bool is_cab);\ndrivers/net/wireless/ath/ath9k/htc.h:580:void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:581:bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);\ndrivers/net/wireless/ath/ath9k/htc.h:582:int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-583-int get_hw_qnum(u16 queue, int *hwq_map);\ndrivers/net/wireless/ath/ath9k/htc.h:584:int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum,\ndrivers/net/wireless/ath/ath9k/htc.h-585-\t\t       struct ath9k_tx_queue_info *qinfo);\ndrivers/net/wireless/ath/ath9k/htc.h:586:void ath9k_htc_check_stop_queues(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:587:void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:588:int ath9k_htc_tx_get_slot(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:589:void ath9k_htc_tx_clear_slot(struct ath9k_htc_priv *priv, int slot);\ndrivers/net/wireless/ath/ath9k/htc.h:590:void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:591:void ath9k_htc_txstatus(struct ath9k_htc_priv *priv, void *wmi_event);\ndrivers/net/wireless/ath/ath9k/htc.h-592-void ath9k_tx_failed_tasklet(struct tasklet_struct *t);\ndrivers/net/wireless/ath/ath9k/htc.h:593:void ath9k_htc_tx_cleanup_timer(struct timer_list *t);\ndrivers/net/wireless/ath/ath9k/htc.h:594:bool ath9k_htc_csa_is_finished(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-595-\ndrivers/net/wireless/ath/ath9k/htc.h:596:int ath9k_rx_init(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:597:void ath9k_rx_cleanup(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:598:void ath9k_host_rx_init(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-599-void ath9k_rx_tasklet(struct tasklet_struct *t);\ndrivers/net/wireless/ath/ath9k/htc.h:600:u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-601-\ndrivers/net/wireless/ath/ath9k/htc.h:602:void ath9k_htc_ps_wakeup(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:603:void ath9k_htc_ps_restore(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-604-void ath9k_ps_work(struct work_struct *work);\ndrivers/net/wireless/ath/ath9k/htc.h:605:bool ath9k_htc_setpower(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc.h-606-\t\t\tenum ath9k_power_mode mode);\ndrivers/net/wireless/ath/ath9k/htc.h-607-\ndrivers/net/wireless/ath/ath9k/htc.h:608:void ath9k_start_rfkill_poll(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:609:void ath9k_htc_rfkill_poll_state(struct ieee80211_hw *hw);\ndrivers/net/wireless/ath/ath9k/htc.h-610-\ndrivers/net/wireless/ath/ath9k/htc.h:611:struct base_eep_header *ath9k_htc_get_eeprom_base(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-612-\ndrivers/net/wireless/ath/ath9k/htc.h-613-#ifdef CONFIG_MAC80211_LEDS\ndrivers/net/wireless/ath/ath9k/htc.h:614:void ath9k_configure_leds(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:615:void ath9k_init_leds(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h:616:void ath9k_deinit_leds(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-617-void ath9k_led_work(struct work_struct *work);\ndrivers/net/wireless/ath/ath9k/htc.h-618-#else\ndrivers/net/wireless/ath/ath9k/htc.h:619:static inline void ath9k_configure_leds(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc.h-620-{\n--\ndrivers/net/wireless/ath/ath9k/htc.h-622-\ndrivers/net/wireless/ath/ath9k/htc.h:623:static inline void ath9k_init_leds(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc.h-624-{\n--\ndrivers/net/wireless/ath/ath9k/htc.h-626-\ndrivers/net/wireless/ath/ath9k/htc.h:627:static inline void ath9k_deinit_leds(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc.h-628-{\n--\ndrivers/net/wireless/ath/ath9k/htc.h=631=static inline void ath9k_led_work(struct work_struct *work)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-635-\ndrivers/net/wireless/ath/ath9k/htc.h:636:int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,\ndrivers/net/wireless/ath/ath9k/htc.h-637-\t\t\t   u16 devid, char *product, u32 drv_info);\ndrivers/net/wireless/ath/ath9k/htc.h:638:void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug);\ndrivers/net/wireless/ath/ath9k/htc.h-639-#ifdef CONFIG_PM\ndrivers/net/wireless/ath/ath9k/htc.h:640:void ath9k_htc_suspend(struct htc_target *htc_handle);\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);\ndrivers/net/wireless/ath/ath9k/htc.h:645:void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv);\ndrivers/net/wireless/ath/ath9k/htc.h-646-#else\ndrivers/net/wireless/ath/ath9k/htc.h:647:static inline int ath9k_htc_init_debug(struct ath_hw *ah) { return 0; };\ndrivers/net/wireless/ath/ath9k/htc.h:648:static inline void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc.h-649-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-20-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:21:void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-22-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-67- */\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:68:static void ath9k_htc_beacon_init(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-69-\t\t\t\t  struct ath_beacon_config *conf,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-84-\t\tath9k_hw_reset_tsf(ah);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:85:\tath9k_htc_beaconq_config(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-86-\tath9k_hw_beaconinit(ah, conf-\u003enexttbtt, conf-\u003eintval);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-91-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:92:static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-93-\t\t\t\t\tstruct ath_beacon_config *bss_conf)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-110-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:111:static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-112-\t\t\t\t       struct ath_beacon_config *conf)\n--\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);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-119-}\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-120-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:121:static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-122-\t\t\t\t\t  struct ath_beacon_config *conf)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-127-\tath9k_cmn_beacon_config_adhoc(ah, conf);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:128:\tath9k_htc_beacon_init(priv, conf, conf-\u003eibss_creator);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-129-}\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-130-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:131:void ath9k_htc_beaconep(void *drv_priv, struct sk_buff *skb,\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-132-\t\t\tenum htc_endpoint_id ep_id, bool txok)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-136-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:137:static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-138-\t\t\t\t    int slot)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-165-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:166:\t\ttx_slot = ath9k_htc_tx_get_slot(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-167-\t\tif (tx_slot \u003c 0) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-172-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:173:\t\tret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-174-\t\tif (ret != 0) {\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:175:\t\t\tath9k_htc_tx_clear_slot(priv, tx_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-176-\t\t\tdev_kfree_skb_any(skb);\n--\n\n"
}

5/2 2026/08/28 17:50 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 17551
							output: 48
							thoughts: 27
						

Thoughts:
Here's a summary of my thought process, as requested:

**Diving into `htc_drv_init.c`**

Okay, time to get my hands dirty. I need to understand what's happening with the HTC driver initialization. My first step is to zero in on `htc_drv_init.c`, specifically around line 405. I'm going to use my `read-file` tool to quickly pull up that section of the code. This gives me a good starting point to analyze the surrounding logic and identify the context of the initialization process in that specific area. I'm expecting this will likely hold critical function calls related to device setup, resource allocation, or potentially early interrupt configuration - a pretty standard initialization sequence. Let's see what's there...



6/2 2026/08/28 17:50 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/htc_drv_init.c",
  "FirstLine": 380,
  "LineCount": 80
}

Results:
{
  "Contents": " 380:\t\tmutex_unlock(\u0026priv-\u003ewmi-\u003emulti_write_mutex);\n 381:\t}\n 382:\t\n 383:\tstatic void ath9k_reg_rmw_buffer(void *hw_priv,\n 384:\t\t\t\t\t u32 reg_offset, u32 set, u32 clr)\n 385:\t{\n 386:\t\tstruct ath_hw *ah = hw_priv;\n 387:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 388:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 389:\t\tu32 rsp_status;\n 390:\t\tint r;\n 391:\t\n 392:\t\tmutex_lock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 393:\t\n 394:\t\t/* Store the register/value */\n 395:\t\tpriv-\u003ewmi-\u003emulti_rmw[priv-\u003ewmi-\u003emulti_rmw_idx].reg =\n 396:\t\t\tcpu_to_be32(reg_offset);\n 397:\t\tpriv-\u003ewmi-\u003emulti_rmw[priv-\u003ewmi-\u003emulti_rmw_idx].set =\n 398:\t\t\tcpu_to_be32(set);\n 399:\t\tpriv-\u003ewmi-\u003emulti_rmw[priv-\u003ewmi-\u003emulti_rmw_idx].clr =\n 400:\t\t\tcpu_to_be32(clr);\n 401:\t\n 402:\t\tpriv-\u003ewmi-\u003emulti_rmw_idx++;\n 403:\t\n 404:\t\t/* If the buffer is full, send it out. */\n 405:\t\tif (priv-\u003ewmi-\u003emulti_rmw_idx == MAX_RMW_CMD_NUMBER) {\n 406:\t\t\tr = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_RMW_CMDID,\n 407:\t\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\n 408:\t\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\n 409:\t\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n 410:\t\t\t\t  100);\n 411:\t\t\tif (unlikely(r)) {\n 412:\t\t\t\tath_dbg(common, WMI,\n 413:\t\t\t\t\t\"REGISTER RMW FAILED, multi len: %d\\n\",\n 414:\t\t\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx);\n 415:\t\t\t}\n 416:\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx = 0;\n 417:\t\t}\n 418:\t\n 419:\t\tmutex_unlock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 420:\t}\n 421:\t\n 422:\tstatic void ath9k_reg_rmw_flush(void *hw_priv)\n 423:\t{\n 424:\t\tstruct ath_hw *ah = hw_priv;\n 425:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 426:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 427:\t\tu32 rsp_status;\n 428:\t\tint r;\n 429:\t\n 430:\t\tif (test_bit(HTC_FWFLAG_NO_RMW, \u0026priv-\u003efw_flags))\n 431:\t\t\treturn;\n 432:\t\n 433:\t\tatomic_dec(\u0026priv-\u003ewmi-\u003em_rmw_cnt);\n 434:\t\n 435:\t\tmutex_lock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 436:\t\n 437:\t\tif (priv-\u003ewmi-\u003emulti_rmw_idx) {\n 438:\t\t\tr = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_RMW_CMDID,\n 439:\t\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\n 440:\t\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\n 441:\t\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n 442:\t\t\t\t  100);\n 443:\t\t\tif (unlikely(r)) {\n 444:\t\t\t\tath_dbg(common, WMI,\n 445:\t\t\t\t\t\"REGISTER RMW FAILED, multi len: %d\\n\",\n 446:\t\t\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx);\n 447:\t\t\t}\n 448:\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx = 0;\n 449:\t\t}\n 450:\t\n 451:\t\tmutex_unlock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 452:\t}\n 453:\t\n 454:\tstatic void ath9k_enable_rmw_buffer(void *hw_priv)\n 455:\t{\n 456:\t\tstruct ath_hw *ah = hw_priv;\n 457:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 458:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 459:\t\n"
}

7/2 2026/08/28 17:50 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 19188
							output: 39
							thoughts: 322
						

Thoughts:
**Analyzing a Potential Bug in the ath9k_htc Driver**

Okay, so let's break this down. It seems there's been a critical change in the `ath9k_reg_rmw_buffer` allocation. Initially, the buffer size calculation used the size of `struct register_write` multiplied by `priv->wmi->multi_rmw_idx`. That has now been changed to the size of `struct register_rmw`, multiplied by the same index. I immediately see a red flag, because line 440 now uses the new structure size, but it was *previously* using the old structure size in line 408.

The sizes of these structs are different. `struct register_write` is likely smaller than `struct register_rmw`, since one holds `reg` and `val`, while the other holds `reg`, `set`, and `clr` which gives us 8 bytes versus 12 bytes. My intuition is that this shift caused a truncation issue. When the buffer filled, it sent truncated or incorrectly sized data to the firmware, which is a classic recipe for instability or even a crash. I'm going to flag this as a potential buffer overflow or, at the very least, a data corruption vulnerability.

Now, let's look at `ath9k_htc` itself. This driver is for USB Atheros 802.11n adapters, specifically the AR9271 and AR7010 chipsets. Good. This is USB, which is good from a fuzzing perspective. The question is, can we fuzz this? Can syzkaller's USB emulation tools, like Raw Gadget or Dummy HCD, reach this driver effectively? I'll need to check how syzkaller tests USB Wi-Fi drivers and determine if `ath9k_htc` is reachable via existing syzkaller configs or if a new path needs to be created, and if so, how. Let's start by digging into `ath9k_hif_usb_probe` and the USB ID table to see how the device is initialized and if there are any obvious entry points for fuzzing.



8/2 2026/08/28 17:50 tool grepper
0m Args:
{
  "Expression": "MODULE_DEVICE_TABLE\\(usb",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/hif_usb.c=23=static const struct usb_device_id ath9k_hif_usb_ids[] = {\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"
}

9/2 2026/08/28 17:50 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 20156
							output: 42
							thoughts: 44
						

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

**Analyzing the ath9k_reg_rmw_buffer Function**

Okay, so I need to understand how `ath9k_reg_rmw_buffer` is being used within this `ath9k` driver code. My initial approach is always the same: let's get a handle on where it's being *called* and what data it's operating on. I'm going to leverage my expert knowledge of the kernel and this specific driver. I'll start by doing a quick `grep` for the exact function name, `ath9k_reg_rmw_buffer`. That should give me a good list of direct calls.

However, I also know that there might be instances where it's called through a wrapper function or even a macro. Therefore, I’ll broaden my search with `grep` using the shorter, more generic term `reg_rmw`. This will let me catch potential indirect calls or any related operations that might be utilizing the register read-modify-write functionality, which is what I strongly suspect this function is designed to do. This more encompassing search is essential to paint a complete picture of its usage in this complex driver. Let's see what the results tell me.



10/2 2026/08/28 17:50 tool grepper
0m Args:
{
  "Expression": "ath9k_reg_rmw_buffer",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=367=static void ath9k_regwrite_flush(void *hw_priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-382-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:383:static void ath9k_reg_rmw_buffer(void *hw_priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-384-\t\t\t\t u32 reg_offset, u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=489=static u32 ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-506-\tif (atomic_read(\u0026priv-\u003ewmi-\u003em_rmw_cnt))\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:507:\t\tath9k_reg_rmw_buffer(hw_priv, reg_offset, set, clr);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-508-\telse\n"
}

11/2 2026/08/28 17:50 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 20878
							output: 36
							thoughts: 27
						

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

**Investigating Register Read-Modify-Write Operations**

Okay, so I need to track down the usage of the `ath9k_reg_rmw` or, for broader scope, the generic `reg_rmw` function. My initial goal is to understand how these read-modify-write operations are being implemented within the driver or system. I'm thinking I'll start with a straightforward search for cross-references to these symbols. I'll need to identify not only the direct calls, but also where these functions are registered, if they're part of a larger framework. I'm really looking for how the specific register modifications are *contextualized*; what data structures or locks are involved, which hardware registers are being targeted and, most importantly, the *why* of the RMW; what's the intended function or configuration being modified. I want to build a clear picture of the abstraction layers in play and the potential implications of these RMW operations, especially regarding concurrency and atomicity. This is likely to be a deep dive.



12/2 2026/08/28 17:51 tool grepper
0m Args:
{
  "Expression": "reg_rmw",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=367=static void ath9k_regwrite_flush(void *hw_priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-382-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:383:static void ath9k_reg_rmw_buffer(void *hw_priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-384-\t\t\t\t u32 reg_offset, u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-421-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:422:static void ath9k_reg_rmw_flush(void *hw_priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-423-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=454=static void ath9k_enable_rmw_buffer(void *hw_priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-465-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:466:static void ath9k_reg_rmw_single(void *hw_priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-467-\t\t\t\t u32 reg_offset, u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-488-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:489:static u32 ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-490-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-506-\tif (atomic_read(\u0026priv-\u003ewmi-\u003em_rmw_cnt))\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:507:\t\tath9k_reg_rmw_buffer(hw_priv, reg_offset, set, clr);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-508-\telse\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:509:\t\tath9k_reg_rmw_single(hw_priv, reg_offset, set, clr);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-510-\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-628-\tah-\u003ereg_ops.enable_rmw_buffer = ath9k_enable_rmw_buffer;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:629:\tah-\u003ereg_ops.rmw_flush = ath9k_reg_rmw_flush;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:630:\tah-\u003ereg_ops.rmw = ath9k_reg_rmw;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-631-\tpriv-\u003eah = ah;\n--\ndrivers/net/wireless/ath/ath9k/init.c=204=static void ath9k_multi_ioread32(void *hw_priv, u32 *addr,\n--\ndrivers/net/wireless/ath/ath9k/init.c-213-\ndrivers/net/wireless/ath/ath9k/init.c:214:static unsigned int __ath9k_reg_rmw(struct ath_softc *sc, u32 reg_offset,\ndrivers/net/wireless/ath/ath9k/init.c-215-\t\t\t\t    u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/init.c-226-\ndrivers/net/wireless/ath/ath9k/init.c:227:static unsigned int ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr)\ndrivers/net/wireless/ath/ath9k/init.c-228-{\n--\ndrivers/net/wireless/ath/ath9k/init.c-236-\t\tspin_lock_irqsave(\u0026sc-\u003esc_serial_rw, flags);\ndrivers/net/wireless/ath/ath9k/init.c:237:\t\tval = __ath9k_reg_rmw(sc, reg_offset, set, clr);\ndrivers/net/wireless/ath/ath9k/init.c-238-\t\tspin_unlock_irqrestore(\u0026sc-\u003esc_serial_rw, flags);\ndrivers/net/wireless/ath/ath9k/init.c-239-\t} else\ndrivers/net/wireless/ath/ath9k/init.c:240:\t\tval = __ath9k_reg_rmw(sc, reg_offset, set, clr);\ndrivers/net/wireless/ath/ath9k/init.c-241-\n--\ndrivers/net/wireless/ath/ath9k/init.c=656=static int ath9k_init_softc(u16 devid, struct ath_softc *sc,\n--\ndrivers/net/wireless/ath/ath9k/init.c-676-\tah-\u003ereg_ops.write = ath9k_iowrite32;\ndrivers/net/wireless/ath/ath9k/init.c:677:\tah-\u003ereg_ops.rmw = ath9k_reg_rmw;\ndrivers/net/wireless/ath/ath9k/init.c-678-\tpCap = \u0026ah-\u003ecaps;\n"
}

13/2 2026/08/28 17:51 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 22797
							output: 38
							thoughts: 13
						

Thoughts:
Here's a summary of my immediate thought process, from the perspective of someone familiar with the subject:

**Examining the Kconfig for ATH9K_HTC**

Okay, so I need to quickly determine the status of `ATH9K_HTC` within the kernel configuration. I need to understand whether it's enabled, disabled, or built as a module, and any dependencies it might have. This Kconfig check is the first step in debugging or understanding the device driver's configuration, or perhaps verifying a build configuration. Perhaps I'm trying to add support for it, troubleshoot a build, or confirm it's actually included in a particular image. Time to delve into the Kconfig files.



14/2 2026/08/28 17:51 tool grepper
0m Args:
{
  "Expression": "config ATH9K_HTC",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

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

15/2 2026/08/28 17:51 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 23204
							output: 42
							thoughts: 27
						

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

**Diving into the Atheros Configuration**

Okay, so I need to understand something about the Atheros ath9k driver configuration. Let's start by digging into `drivers/net/wireless/ath/ath9k/Kconfig`, specifically around line 170. I'm going to look for something specific, likely a feature or a configuration option that's relevant to the current problem I'm trying to solve. I probably have a good idea of what I'm looking for - a specific flag, maybe a dependent option, or a particular condition related to hardware support or feature enablement. Time to see what's in that section and quickly assess the surrounding context. Let's see if this sheds any light on it.



16/2 2026/08/28 17:51 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/Kconfig",
  "FirstLine": 165,
  "LineCount": 40
}

Results:
{
  "Contents": " 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 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"
}

17/2 2026/08/28 17:51 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 24064
							output: 45
							thoughts: 42
						

Thoughts:
Okay, let's see. I need to understand this network configuration. Where would the relevant settings be defined? My initial thought is to examine the Kconfig files, starting with the most specific, then moving outwards. First, let's look at `drivers/net/wireless/ath/Kconfig` – that's likely the best place to begin, since it focuses on Atheros wireless drivers. If that doesn't hold the answer, then I'll broaden the scope and check `drivers/net/wireless/Kconfig`. And if even that proves too narrow, I'll go all the way up to `drivers/net/Kconfig` to see the most general network configurations. That should give me a solid overview.



18/2 2026/08/28 17:51 tool grepper
0m Args:
{
  "Expression": "source \"drivers/net/wireless/ath/ath9k/Kconfig\"",
  "PathPrefix": "drivers/net/wireless/ath/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/Kconfig=57=source \"drivers/net/wireless/ath/ath5k/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:58:source \"drivers/net/wireless/ath/ath9k/Kconfig\"\ndrivers/net/wireless/ath/Kconfig-59-source \"drivers/net/wireless/ath/carl9170/Kconfig\"\n"
}

19/2 2026/08/28 17:51 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 24415
							output: 36
							thoughts: 22
						

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

**Examining the Atheros Wireless Configuration**

Alright, let's dive in. I need to get a better understanding of the Atheros wireless configuration options. Specifically, I'm going to navigate directly to the `drivers/net/wireless/ath/Kconfig` file, and take a look around line 50. I know that's usually where the meat of the configuration starts, or at least a section of interest is defined. I'm expecting to find some crucial options concerning Atheros' wireless drivers. I have to see what they have in there regarding hardware support and feature enablements. I'm going to focus my attention on understanding how the system is configured.



20/2 2026/08/28 17:51 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/Kconfig",
  "FirstLine": 1,
  "LineCount": 60
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: ISC\n   2:\tconfig ATH_COMMON\n   3:\t\ttristate\n   4:\t\n   5:\tconfig WLAN_VENDOR_ATH\n   6:\t\tbool \"Atheros/Qualcomm devices\"\n   7:\t\tdefault y\n   8:\t\thelp\n   9:\t\t  If you have a wireless card belonging to this class, say Y.\n  10:\t\n  11:\t\t  Note that the answer to this question doesn't directly affect the\n  12:\t\t  kernel: saying N will just cause the configurator to skip all the\n  13:\t\t  questions about these cards. If you say Y, you will be asked for\n  14:\t\t  your specific card in the following questions.\n  15:\t\n  16:\t\t  For more information and documentation on this module you can visit:\n  17:\t\n  18:\t\t  https://wireless.wiki.kernel.org/en/users/Drivers/ath\n  19:\t\n  20:\t\t  For information on all Atheros wireless drivers visit:\n  21:\t\n  22:\t\t  https://wireless.wiki.kernel.org/en/users/Drivers/Atheros\n  23:\t\n  24:\tif WLAN_VENDOR_ATH\n  25:\t\n  26:\tconfig ATH_DEBUG\n  27:\t\tbool \"Atheros wireless debugging\"\n  28:\t\thelp\n  29:\t\t  Say Y, if you want to debug atheros wireless drivers.\n  30:\t\t  Right now only ath9k makes use of this.\n  31:\t\n  32:\tconfig ATH_TRACEPOINTS\n  33:\t\tbool \"Atheros wireless tracing\"\n  34:\t\tdepends on ATH_DEBUG\n  35:\t\tdepends on EVENT_TRACING\n  36:\t\thelp\n  37:\t\t  This option enables tracepoints for atheros wireless drivers.\n  38:\t\t  Currently, ath9k makes use of this facility.\n  39:\t\n  40:\tconfig ATH_REG_DYNAMIC_USER_REG_HINTS\n  41:\t\tbool \"Atheros dynamic user regulatory hints\"\n  42:\t\tdepends on CFG80211_CERTIFICATION_ONUS\n  43:\t\tdefault n\n  44:\t\thelp\n  45:\t\t  Say N. This should only be enabled in countries where\n  46:\t\t  this feature is explicitly allowed and only on cards that\n  47:\t\t  specifically have been tested for this.\n  48:\t\n  49:\tconfig ATH_REG_DYNAMIC_USER_CERT_TESTING\n  50:\t\tbool \"Atheros dynamic user regulatory testing\"\n  51:\t\tdepends on ATH_REG_DYNAMIC_USER_REG_HINTS \u0026\u0026 CFG80211_CERTIFICATION_ONUS\n  52:\t\tdefault n\n  53:\t\thelp\n  54:\t\t  Say N. This should only be enabled on systems\n  55:\t\t  undergoing certification testing.\n  56:\t\n  57:\tsource \"drivers/net/wireless/ath/ath5k/Kconfig\"\n  58:\tsource \"drivers/net/wireless/ath/ath9k/Kconfig\"\n  59:\tsource \"drivers/net/wireless/ath/carl9170/Kconfig\"\n  60:\tsource \"drivers/net/wireless/ath/ath6kl/Kconfig\"\n"
}

21/2 2026/08/28 17:51 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 25465
							output: 32
							thoughts: 14
						

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

**Kconfig Dive Begins**

Alright, time to get to work. Let's start digging into the Wi-Fi driver configuration. My instinct says the central configuration options will be located within the `drivers/net/wireless/Kconfig` file. That's the typical location for core Wi-Fi driver feature flags and dependencies. It’s the starting point for understanding how the kernel's wireless subsystem is built and configured. I'll need to understand the structure within this file. I expect to find dependencies on various hardware platforms, PHY types, regulatory domains, and probably some protocol-specific settings there. Time to see what we can find.



22/2 2026/08/28 17:51 tool grepper
0m Args:
{
  "Expression": "WLAN_VENDOR_ATH",
  "PathPrefix": "drivers/net/wireless/"
}

Results:
{
  "Output": "drivers/net/wireless/Makefile=6=obj-$(CONFIG_WLAN_VENDOR_ADMTEK) += admtek/\ndrivers/net/wireless/Makefile:7:obj-$(CONFIG_WLAN_VENDOR_ATH) += ath/\ndrivers/net/wireless/Makefile-8-obj-$(CONFIG_WLAN_VENDOR_ATMEL) += atmel/\n--\ndrivers/net/wireless/ath/Kconfig=2=config ATH_COMMON\n--\ndrivers/net/wireless/ath/Kconfig-4-\ndrivers/net/wireless/ath/Kconfig:5:config WLAN_VENDOR_ATH\ndrivers/net/wireless/ath/Kconfig-6-\tbool \"Atheros/Qualcomm devices\"\n--\ndrivers/net/wireless/ath/Kconfig-23-\ndrivers/net/wireless/ath/Kconfig:24:if WLAN_VENDOR_ATH\ndrivers/net/wireless/ath/Kconfig-25-\n"
}

23/2 2026/08/28 17:51 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 25890
							output: 28
							thoughts: 17
						

Thoughts:
Here's my take on those thoughts:

**Navigating the Wireless Network Landscape**

Okay, so I need to zero in on the WLAN configuration within this kernel context. My initial instinct is to jump straight into `drivers/net/wireless/Kconfig`. That's where I'd expect to find the central configuration options for wireless network devices. It’s the usual starting point for digging into the relevant Kconfig options. It's the logical place to start looking. I'm hoping I can glean some high level configurations and dependencies there.



24/2 2026/08/28 17:52 tool grepper
0m Args:
{
  "Expression": "WLAN",
  "PathPrefix": "drivers/net/wireless/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 17830 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/Kconfig-5-\ndrivers/net/wireless/Kconfig:6:menuconfig WLAN\ndrivers/net/wireless/Kconfig-7-\tbool \"Wireless LAN\"\n--\ndrivers/net/wireless/Kconfig-18-\ndrivers/net/wireless/Kconfig:19:if WLAN\ndrivers/net/wireless/Kconfig-20-\n--\ndrivers/net/wireless/Kconfig=42=source \"drivers/net/wireless/virtual/Kconfig\"\ndrivers/net/wireless/Kconfig-43-\ndrivers/net/wireless/Kconfig:44:endif # WLAN\n--\ndrivers/net/wireless/Makefile-5-\ndrivers/net/wireless/Makefile:6:obj-$(CONFIG_WLAN_VENDOR_ADMTEK) += admtek/\ndrivers/net/wireless/Makefile:7:obj-$(CONFIG_WLAN_VENDOR_ATH) += ath/\ndrivers/net/wireless/Makefile:8:obj-$(CONFIG_WLAN_VENDOR_ATMEL) += atmel/\ndrivers/net/wireless/Makefile:9:obj-$(CONFIG_WLAN_VENDOR_BROADCOM) += broadcom/\ndrivers/net/wireless/Makefile:10:obj-$(CONFIG_WLAN_VENDOR_INTEL) += intel/\ndrivers/net/wireless/Makefile:11:obj-$(CONFIG_WLAN_VENDOR_INTERSIL) += intersil/\ndrivers/net/wireless/Makefile:12:obj-$(CONFIG_WLAN_VENDOR_MARVELL) += marvell/\ndrivers/net/wireless/Makefile:13:obj-$(CONFIG_WLAN_VENDOR_MEDIATEK) += mediatek/\ndrivers/net/wireless/Makefile:14:obj-$(CONFIG_WLAN_VENDOR_MICROCHIP) += microchip/\ndrivers/net/wireless/Makefile:15:obj-$(CONFIG_WLAN_VENDOR_MORSEMICRO) += morsemicro/\ndrivers/net/wireless/Makefile:16:obj-$(CONFIG_WLAN_VENDOR_NXP) += nxp/\ndrivers/net/wireless/Makefile:17:obj-$(CONFIG_WLAN_VENDOR_PURELIFI) += purelifi/\ndrivers/net/wireless/Makefile:18:obj-$(CONFIG_WLAN_VENDOR_QUANTENNA) += quantenna/\ndrivers/net/wireless/Makefile:19:obj-$(CONFIG_WLAN_VENDOR_RALINK) += ralink/\ndrivers/net/wireless/Makefile:20:obj-$(CONFIG_WLAN_VENDOR_REALTEK) += realtek/\ndrivers/net/wireless/Makefile:21:obj-$(CONFIG_WLAN_VENDOR_RSI) += rsi/\ndrivers/net/wireless/Makefile:22:obj-$(CONFIG_WLAN_VENDOR_SILABS) += silabs/\ndrivers/net/wireless/Makefile:23:obj-$(CONFIG_WLAN_VENDOR_ST) += st/\ndrivers/net/wireless/Makefile:24:obj-$(CONFIG_WLAN_VENDOR_TI) += ti/\ndrivers/net/wireless/Makefile:25:obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/\ndrivers/net/wireless/Makefile-26-\ndrivers/net/wireless/Makefile:27:obj-$(CONFIG_WLAN) += virtual/\n--\ndrivers/net/wireless/admtek/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/wireless/admtek/Kconfig:2:config WLAN_VENDOR_ADMTEK\ndrivers/net/wireless/admtek/Kconfig-3-\tbool \"ADMtek devices\"\n--\ndrivers/net/wireless/admtek/Kconfig-12-\ndrivers/net/wireless/admtek/Kconfig:13:if WLAN_VENDOR_ADMTEK\ndrivers/net/wireless/admtek/Kconfig-14-\ndrivers/net/wireless/admtek/Kconfig=15=config ADM8211\n--\ndrivers/net/wireless/admtek/Kconfig-41-\ndrivers/net/wireless/admtek/Kconfig:42:endif # WLAN_VENDOR_ADMTEK\n--\ndrivers/net/wireless/admtek/adm8211.c=1568=static void adm8211_calc_durations(int *dur, int *plcp, size_t payload_len, int len,\n--\ndrivers/net/wireless/admtek/adm8211.c-1590-\tif (plcp_signal \u003c= PLCP_SIGNAL_2M)\ndrivers/net/wireless/admtek/adm8211.c:1591:\t\t/* 1-2Mbps WLAN: send ACK/CTS at 1Mbps */\ndrivers/net/wireless/admtek/adm8211.c-1592-\t\t*dur += 3 * (IEEE80211_DUR_DS_SIFS +\n--\ndrivers/net/wireless/admtek/adm8211.c-1596-\telse\ndrivers/net/wireless/admtek/adm8211.c:1597:\t\t/* 5-11Mbps WLAN: send ACK/CTS at 2Mbps */\ndrivers/net/wireless/admtek/adm8211.c-1598-\t\t*dur += 3 * (IEEE80211_DUR_DS_SIFS +\n--\ndrivers/net/wireless/ath/Kconfig=2=config ATH_COMMON\n--\ndrivers/net/wireless/ath/Kconfig-4-\ndrivers/net/wireless/ath/Kconfig:5:config WLAN_VENDOR_ATH\ndrivers/net/wireless/ath/Kconfig-6-\tbool \"Atheros/Qualcomm devices\"\n--\ndrivers/net/wireless/ath/Kconfig-23-\ndrivers/net/wireless/ath/Kconfig:24:if WLAN_VENDOR_ATH\ndrivers/net/wireless/ath/Kconfig-25-\n--\ndrivers/net/wireless/ath/ar5523/ar5523.c=1156=static int ar5523_get_wlan_mode(struct ar5523 *ar,\n--\ndrivers/net/wireless/ath/ar5523/ar5523.c-1167-\t\tar5523_info(ar, \"STA not found!\\n\");\ndrivers/net/wireless/ath/ar5523/ar5523.c:1168:\t\treturn WLAN_MODE_11b;\ndrivers/net/wireless/ath/ar5523/ar5523.c-1169-\t}\n--\ndrivers/net/wireless/ath/ar5523/ar5523.c-1183-\t\t\tcase 540:\ndrivers/net/wireless/ath/ar5523/ar5523.c:1184:\t\t\t\treturn WLAN_MODE_11g;\ndrivers/net/wireless/ath/ar5523/ar5523.c-1185-\t\t\t}\n--\ndrivers/net/wireless/ath/ar5523/ar5523.c-1188-\t}\ndrivers/net/wireless/ath/ar5523/ar5523.c:1189:\treturn WLAN_MODE_11b;\ndrivers/net/wireless/ath/ar5523/ar5523.c-1190-}\n--\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h=226=enum {\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:227:\tWLAN_MODE_NONE = 0,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:228:\tWLAN_MODE_11b,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:229:\tWLAN_MODE_11a,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:230:\tWLAN_MODE_11g,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:231:\tWLAN_MODE_11a_TURBO,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:232:\tWLAN_MODE_11g_TURBO,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:233:\tWLAN_MODE_11a_TURBO_PRIME,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:234:\tWLAN_MODE_11g_TURBO_PRIME,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:235:\tWLAN_MODE_11a_XR,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:236:\tWLAN_MODE_11g_XR,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h-237-};\n--\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h=398=enum {\n--\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h-401-\tST_SERVICE_TYPE,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h:402:\tST_WLAN_MODE,\ndrivers/net/wireless/ath/ar5523/ar5523_hw.h-403-\tST_FREQ,\n--\ndrivers/net/wireless/ath/ath.h=215=void ath_printk(const char *level, const struct ath_common *common,\n--\ndrivers/net/wireless/ath/ath.h-251- * @ATH_DBG_MCI: Message Coexistence Interface, a private protocol\ndrivers/net/wireless/ath/ath.h:252: *\tused exclusively for WLAN-BT coexistence starting from\ndrivers/net/wireless/ath/ath.h-253- *\tAR9462.\n--\ndrivers/net/wireless/ath/ath10k/ahb.c=306=static void ath10k_ahb_halt_chip(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/ahb.c-321-\ndrivers/net/wireless/ath/ath10k/ahb.c:322:\tcore_id = ath10k_ahb_read32(ar, ATH10K_AHB_WLAN_CORE_ID_REG);\ndrivers/net/wireless/ath/ath10k/ahb.c-323-\n--\ndrivers/net/wireless/ath/ath10k/ahb.h=12=struct ath10k_ahb {\n--\ndrivers/net/wireless/ath/ath10k/ahb.h-42-\ndrivers/net/wireless/ath/ath10k/ahb.h:43:#define ATH10K_AHB_WLAN_CORE_ID_REG          0x82030\ndrivers/net/wireless/ath/ath10k/ahb.h-44-\n--\ndrivers/net/wireless/ath/ath10k/core.c=752=static const char *const ath10k_core_fw_feature_str[] = {\n--\ndrivers/net/wireless/ath/ath10k/core.c-758-\t[ATH10K_FW_FEATURE_MULTI_VIF_PS_SUPPORT] = \"multi-vif-ps\",\ndrivers/net/wireless/ath/ath10k/core.c:759:\t[ATH10K_FW_FEATURE_WOWLAN_SUPPORT] = \"wowlan\",\ndrivers/net/wireless/ath/ath10k/core.c-760-\t[ATH10K_FW_FEATURE_IGNORE_OTP_RESULT] = \"ignore-otp\",\n--\ndrivers/net/wireless/ath/ath10k/core.h=742=enum ath10k_fw_features {\n--\ndrivers/net/wireless/ath/ath10k/core.h-766-\ndrivers/net/wireless/ath/ath10k/core.h:767:\t/* Some firmware revisions have an incomplete WoWLAN implementation\ndrivers/net/wireless/ath/ath10k/core.h-768-\t * despite WMI service bit being advertised. This feature flag is used\ndrivers/net/wireless/ath/ath10k/core.h:769:\t * to distinguish whether WoWLAN is really supported or not.\ndrivers/net/wireless/ath/ath10k/core.h-770-\t */\ndrivers/net/wireless/ath/ath10k/core.h:771:\tATH10K_FW_FEATURE_WOWLAN_SUPPORT = 6,\ndrivers/net/wireless/ath/ath10k/core.h-772-\n--\ndrivers/net/wireless/ath/ath10k/coredump.c=802=static const struct ath10k_mem_region qca6174_hw10_mem_regions[] = {\n--\ndrivers/net/wireless/ath/ath10k/coredump.c-818-\ndrivers/net/wireless/ath/ath10k/coredump.c:819:\t\t/* WLAN_MBOX_BASE_ADDRESS - RTC_SOC_BASE_ADDRESS */\ndrivers/net/wireless/ath/ath10k/coredump.c-820-\t\t.len = 0x800 - 0x0,\n--\ndrivers/net/wireless/ath/ath10k/htt_tx.c=1180=int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)\n--\ndrivers/net/wireless/ath/ath10k/htt_tx.c-1210-\t\t} else {\ndrivers/net/wireless/ath/ath10k/htt_tx.c:1211:\t\t\tif (skb_cb-\u003eucast_cipher == WLAN_CIPHER_SUITE_GCMP ||\ndrivers/net/wireless/ath/ath10k/htt_tx.c:1212:\t\t\t    skb_cb-\u003eucast_cipher == WLAN_CIPHER_SUITE_GCMP_256)\ndrivers/net/wireless/ath/ath10k/htt_tx.c-1213-\t\t\t\tskb_put(msdu, IEEE80211_GCMP_MIC_LEN);\n--\ndrivers/net/wireless/ath/ath10k/hw.c=592=static void ath10k_hw_qca988x_set_coverage_class(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/hw.c-620-\t */\ndrivers/net/wireless/ath/ath10k/hw.c:621:\tslottime_reg = ath10k_hif_read32(ar, WLAN_MAC_BASE_ADDRESS +\ndrivers/net/wireless/ath/ath10k/hw.c-622-\t\t\t\t\t     WAVE1_PCU_GBL_IFS_SLOT);\ndrivers/net/wireless/ath/ath10k/hw.c:623:\ttimeout_reg = ath10k_hif_read32(ar, WLAN_MAC_BASE_ADDRESS +\ndrivers/net/wireless/ath/ath10k/hw.c-624-\t\t\t\t\t    WAVE1_PCU_ACK_CTS_TIMEOUT);\ndrivers/net/wireless/ath/ath10k/hw.c:625:\tphyclk_reg = ath10k_hif_read32(ar, WLAN_MAC_BASE_ADDRESS +\ndrivers/net/wireless/ath/ath10k/hw.c-626-\t\t\t\t\t   WAVE1_PHYCLK);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-694-\tath10k_hif_write32(ar,\ndrivers/net/wireless/ath/ath10k/hw.c:695:\t\t\t   WLAN_MAC_BASE_ADDRESS + WAVE1_PCU_GBL_IFS_SLOT,\ndrivers/net/wireless/ath/ath10k/hw.c-696-\t\t\t   slottime_reg);\ndrivers/net/wireless/ath/ath10k/hw.c-697-\tath10k_hif_write32(ar,\ndrivers/net/wireless/ath/ath10k/hw.c:698:\t\t\t   WLAN_MAC_BASE_ADDRESS + WAVE1_PCU_ACK_CTS_TIMEOUT,\ndrivers/net/wireless/ath/ath10k/hw.c-699-\t\t\t   timeout_reg);\n--\ndrivers/net/wireless/ath/ath10k/hw.c=742=static int ath10k_hw_qca6174_enable_pll_clock(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/hw.c-786-\t/* Set the correct settle time value to pll_settle register */\ndrivers/net/wireless/ath/ath10k/hw.c:787:\taddr = (RTC_WMAC_BASE_ADDRESS | WLAN_PLL_SETTLE_OFFSET);\ndrivers/net/wireless/ath/ath10k/hw.c-788-\tret = ath10k_bmi_read_soc_reg(ar, addr, \u0026reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-791-\ndrivers/net/wireless/ath/ath10k/hw.c:792:\treg_val \u0026= ~WLAN_PLL_SETTLE_TIME_MASK;\ndrivers/net/wireless/ath/ath10k/hw.c:793:\treg_val |= SM(hw_clk-\u003esettle_time, WLAN_PLL_SETTLE_TIME);\ndrivers/net/wireless/ath/ath10k/hw.c-794-\tret = ath10k_bmi_write_soc_reg(ar, addr, reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-817-\t/* Configure the pll_control register */\ndrivers/net/wireless/ath/ath10k/hw.c:818:\taddr = (RTC_WMAC_BASE_ADDRESS | WLAN_PLL_CONTROL_OFFSET);\ndrivers/net/wireless/ath/ath10k/hw.c-819-\tret = ath10k_bmi_read_soc_reg(ar, addr, \u0026reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-822-\ndrivers/net/wireless/ath/ath10k/hw.c:823:\treg_val |= (SM(hw_clk-\u003erefdiv, WLAN_PLL_CONTROL_REFDIV) |\ndrivers/net/wireless/ath/ath10k/hw.c:824:\t\t    SM(hw_clk-\u003ediv, WLAN_PLL_CONTROL_DIV) |\ndrivers/net/wireless/ath/ath10k/hw.c:825:\t\t    SM(1, WLAN_PLL_CONTROL_NOPWD));\ndrivers/net/wireless/ath/ath10k/hw.c-826-\tret = ath10k_bmi_write_soc_reg(ar, addr, reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-849-\t/* Unset the pll_bypass in pll_control register */\ndrivers/net/wireless/ath/ath10k/hw.c:850:\taddr = (RTC_WMAC_BASE_ADDRESS | WLAN_PLL_CONTROL_OFFSET);\ndrivers/net/wireless/ath/ath10k/hw.c-851-\tret = ath10k_bmi_read_soc_reg(ar, addr, \u0026reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-854-\ndrivers/net/wireless/ath/ath10k/hw.c:855:\treg_val \u0026= ~WLAN_PLL_CONTROL_BYPASS_MASK;\ndrivers/net/wireless/ath/ath10k/hw.c:856:\treg_val |= SM(0, WLAN_PLL_CONTROL_BYPASS);\ndrivers/net/wireless/ath/ath10k/hw.c-857-\tret = ath10k_bmi_write_soc_reg(ar, addr, reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-892-\t/* unset the nopwd from pll_control register */\ndrivers/net/wireless/ath/ath10k/hw.c:893:\taddr = (RTC_WMAC_BASE_ADDRESS | WLAN_PLL_CONTROL_OFFSET);\ndrivers/net/wireless/ath/ath10k/hw.c-894-\tret = ath10k_bmi_read_soc_reg(ar, addr, \u0026reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.c-897-\ndrivers/net/wireless/ath/ath10k/hw.c:898:\treg_val \u0026= ~WLAN_PLL_CONTROL_NOPWD_MASK;\ndrivers/net/wireless/ath/ath10k/hw.c-899-\tret = ath10k_bmi_write_soc_reg(ar, addr, reg_val);\n--\ndrivers/net/wireless/ath/ath10k/hw.h=673=ath10k_is_rssi_enable(struct ath10k_hw_params *hw,\n--\ndrivers/net/wireless/ath/ath10k/hw.h-777-\ndrivers/net/wireless/ath/ath10k/hw.h:778:#define NUM_TARGET_CE_CONFIG_WLAN ar-\u003ehw_values-\u003enum_target_ce_config_wlan\ndrivers/net/wireless/ath/ath10k/hw.h-779-\n--\ndrivers/net/wireless/ath/ath10k/hw.h-876-#define SOC_CORE_BASE_ADDRESS\t\t\tar-\u003eregs-\u003esoc_core_base_address\ndrivers/net/wireless/ath/ath10k/hw.h:877:#define WLAN_UART_BASE_ADDRESS\t\t\t0x0000c000\ndrivers/net/wireless/ath/ath10k/hw.h:878:#define WLAN_SI_BASE_ADDRESS\t\t\t0x00010000\ndrivers/net/wireless/ath/ath10k/hw.h:879:#define WLAN_GPIO_BASE_ADDRESS\t\t\t0x00014000\ndrivers/net/wireless/ath/ath10k/hw.h:880:#define WLAN_ANALOG_INTF_BASE_ADDRESS\t\t0x0001c000\ndrivers/net/wireless/ath/ath10k/hw.h:881:#define WLAN_MAC_BASE_ADDRESS\t\t\tar-\u003eregs-\u003ewlan_mac_base_address\ndrivers/net/wireless/ath/ath10k/hw.h-882-#define EFUSE_BASE_ADDRESS\t\t\t0x00030000\ndrivers/net/wireless/ath/ath10k/hw.h-883-#define FPGA_REG_BASE_ADDRESS\t\t\t0x00039000\ndrivers/net/wireless/ath/ath10k/hw.h:884:#define WLAN_UART2_BASE_ADDRESS\t\t\t0x00054c00\ndrivers/net/wireless/ath/ath10k/hw.h-885-#define CE_WRAPPER_BASE_ADDRESS\t\t\tar-\u003eregs-\u003ece_wrapper_base_address\n--\ndrivers/net/wireless/ath/ath10k/hw.h-894-#define DBI_BASE_ADDRESS\t\t\t0x00060000\ndrivers/net/wireless/ath/ath10k/hw.h:895:#define WLAN_ANALOG_INTF_PCIE_BASE_ADDRESS\t0x0006c000\ndrivers/net/wireless/ath/ath10k/hw.h-896-#define PCIE_LOCAL_BASE_ADDRESS\t\tar-\u003eregs-\u003epcie_local_base_address\n--\ndrivers/net/wireless/ath/ath10k/hw.h-918-\ndrivers/net/wireless/ath/ath10k/hw.h:919:#define WLAN_RESET_CONTROL_COLD_RST_MASK\t0x00000008\ndrivers/net/wireless/ath/ath10k/hw.h:920:#define WLAN_RESET_CONTROL_WARM_RST_MASK\t0x00000004\ndrivers/net/wireless/ath/ath10k/hw.h:921:#define WLAN_SYSTEM_SLEEP_DISABLE_LSB\t\t0\ndrivers/net/wireless/ath/ath10k/hw.h:922:#define WLAN_SYSTEM_SLEEP_DISABLE_MASK\t\t0x00000001\ndrivers/net/wireless/ath/ath10k/hw.h-923-\ndrivers/net/wireless/ath/ath10k/hw.h:924:#define WLAN_GPIO_PIN0_ADDRESS\t\t\t0x00000028\ndrivers/net/wireless/ath/ath10k/hw.h:925:#define WLAN_GPIO_PIN0_CONFIG_LSB\t\t11\ndrivers/net/wireless/ath/ath10k/hw.h:926:#define WLAN_GPIO_PIN0_CONFIG_MASK\t\t0x00007800\ndrivers/net/wireless/ath/ath10k/hw.h:927:#define WLAN_GPIO_PIN0_PAD_PULL_LSB\t\t5\ndrivers/net/wireless/ath/ath10k/hw.h:928:#define WLAN_GPIO_PIN0_PAD_PULL_MASK\t\t0x00000060\ndrivers/net/wireless/ath/ath10k/hw.h:929:#define WLAN_GPIO_PIN1_ADDRESS\t\t\t0x0000002c\ndrivers/net/wireless/ath/ath10k/hw.h:930:#define WLAN_GPIO_PIN1_CONFIG_MASK\t\t0x00007800\ndrivers/net/wireless/ath/ath10k/hw.h:931:#define WLAN_GPIO_PIN10_ADDRESS\t\t\t0x00000050\ndrivers/net/wireless/ath/ath10k/hw.h:932:#define WLAN_GPIO_PIN11_ADDRESS\t\t\t0x00000054\ndrivers/net/wireless/ath/ath10k/hw.h:933:#define WLAN_GPIO_PIN12_ADDRESS\t\t\t0x00000058\ndrivers/net/wireless/ath/ath10k/hw.h:934:#define WLAN_GPIO_PIN13_ADDRESS\t\t\t0x0000005c\ndrivers/net/wireless/ath/ath10k/hw.h-935-\n--\ndrivers/net/wireless/ath/ath10k/hw.h-1000-#define SYSTEM_SLEEP_OFFSET\t\t\tSOC_SYSTEM_SLEEP_OFFSET\ndrivers/net/wireless/ath/ath10k/hw.h:1001:#define WLAN_SYSTEM_SLEEP_OFFSET\t\tSOC_SYSTEM_SLEEP_OFFSET\ndrivers/net/wireless/ath/ath10k/hw.h:1002:#define WLAN_RESET_CONTROL_OFFSET\t\tSOC_RESET_CONTROL_OFFSET\ndrivers/net/wireless/ath/ath10k/hw.h-1003-#define CLOCK_CONTROL_OFFSET\t\t\tSOC_CLOCK_CONTROL_OFFSET\n--\ndrivers/net/wireless/ath/ath10k/hw.h-1006-#define RESET_CONTROL_SI0_RST_MASK\t\tSOC_RESET_CONTROL_SI0_RST_MASK\ndrivers/net/wireless/ath/ath10k/hw.h:1007:#define GPIO_BASE_ADDRESS\t\t\tWLAN_GPIO_BASE_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h:1008:#define GPIO_PIN0_OFFSET\t\t\tWLAN_GPIO_PIN0_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h:1009:#define GPIO_PIN1_OFFSET\t\t\tWLAN_GPIO_PIN1_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h:1010:#define GPIO_PIN0_CONFIG_LSB\t\t\tWLAN_GPIO_PIN0_CONFIG_LSB\ndrivers/net/wireless/ath/ath10k/hw.h:1011:#define GPIO_PIN0_CONFIG_MASK\t\t\tWLAN_GPIO_PIN0_CONFIG_MASK\ndrivers/net/wireless/ath/ath10k/hw.h:1012:#define GPIO_PIN0_PAD_PULL_LSB\t\t\tWLAN_GPIO_PIN0_PAD_PULL_LSB\ndrivers/net/wireless/ath/ath10k/hw.h:1013:#define GPIO_PIN0_PAD_PULL_MASK\t\t\tWLAN_GPIO_PIN0_PAD_PULL_MASK\ndrivers/net/wireless/ath/ath10k/hw.h:1014:#define GPIO_PIN1_CONFIG_MASK\t\t\tWLAN_GPIO_PIN1_CONFIG_MASK\ndrivers/net/wireless/ath/ath10k/hw.h:1015:#define SI_BASE_ADDRESS\t\t\t\tWLAN_SI_BASE_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h-1016-#define SCRATCH_BASE_ADDRESS\t\t\tSOC_CORE_BASE_ADDRESS\n--\ndrivers/net/wireless/ath/ath10k/hw.h-1019-#define LPO_CAL_OFFSET\t\t\t\tSOC_LPO_CAL_OFFSET\ndrivers/net/wireless/ath/ath10k/hw.h:1020:#define GPIO_PIN10_OFFSET\t\t\tWLAN_GPIO_PIN10_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h:1021:#define GPIO_PIN11_OFFSET\t\t\tWLAN_GPIO_PIN11_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h:1022:#define GPIO_PIN12_OFFSET\t\t\tWLAN_GPIO_PIN12_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h:1023:#define GPIO_PIN13_OFFSET\t\t\tWLAN_GPIO_PIN13_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h-1024-#define CPU_CLOCK_STANDARD_LSB\t\t\tSOC_CPU_CLOCK_STANDARD_LSB\n--\ndrivers/net/wireless/ath/ath10k/hw.h-1027-#define LPO_CAL_ENABLE_MASK\t\t\tSOC_LPO_CAL_ENABLE_MASK\ndrivers/net/wireless/ath/ath10k/hw.h:1028:#define ANALOG_INTF_BASE_ADDRESS\t\tWLAN_ANALOG_INTF_BASE_ADDRESS\ndrivers/net/wireless/ath/ath10k/hw.h-1029-#define MBOX_BASE_ADDRESS\t\t\tMISSING\n--\ndrivers/net/wireless/ath/ath10k/hw.h-1174-\ndrivers/net/wireless/ath/ath10k/hw.h:1175:#define WLAN_PLL_SETTLE_OFFSET\t\t\t0x0018\ndrivers/net/wireless/ath/ath10k/hw.h:1176:#define WLAN_PLL_SETTLE_TIME_LSB\t\t0\ndrivers/net/wireless/ath/ath10k/hw.h:1177:#define WLAN_PLL_SETTLE_TIME_MASK\t\t0x000007ff\ndrivers/net/wireless/ath/ath10k/hw.h-1178-\ndrivers/net/wireless/ath/ath10k/hw.h:1179:#define WLAN_PLL_CONTROL_OFFSET\t\t\t0x0014\ndrivers/net/wireless/ath/ath10k/hw.h:1180:#define WLAN_PLL_CONTROL_DIV_LSB\t\t0\ndrivers/net/wireless/ath/ath10k/hw.h:1181:#define WLAN_PLL_CONTROL_DIV_MASK\t\t0x000003ff\ndrivers/net/wireless/ath/ath10k/hw.h:1182:#define WLAN_PLL_CONTROL_REFDIV_LSB\t\t10\ndrivers/net/wireless/ath/ath10k/hw.h:1183:#define WLAN_PLL_CONTROL_REFDIV_MASK\t\t0x00003c00\ndrivers/net/wireless/ath/ath10k/hw.h:1184:#define WLAN_PLL_CONTROL_BYPASS_LSB\t\t16\ndrivers/net/wireless/ath/ath10k/hw.h:1185:#define WLAN_PLL_CONTROL_BYPASS_MASK\t\t0x00010000\ndrivers/net/wireless/ath/ath10k/hw.h:1186:#define WLAN_PLL_CONTROL_NOPWD_LSB\t\t18\ndrivers/net/wireless/ath/ath10k/hw.h:1187:#define WLAN_PLL_CONTROL_NOPWD_MASK\t\t0x00040000\ndrivers/net/wireless/ath/ath10k/hw.h-1188-\n--\ndrivers/net/wireless/ath/ath10k/mac.c=239=static int ath10k_send_key(struct ath10k_vif *arvif,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-256-\tswitch (key-\u003ecipher) {\ndrivers/net/wireless/ath/ath10k/mac.c:257:\tcase WLAN_CIPHER_SUITE_CCMP:\ndrivers/net/wireless/ath/ath10k/mac.c-258-\t\targ.key_cipher = ar-\u003ewmi_key_cipher[WMI_CIPHER_AES_CCM];\n--\ndrivers/net/wireless/ath/ath10k/mac.c-260-\t\tbreak;\ndrivers/net/wireless/ath/ath10k/mac.c:261:\tcase WLAN_CIPHER_SUITE_TKIP:\ndrivers/net/wireless/ath/ath10k/mac.c-262-\t\targ.key_cipher = ar-\u003ewmi_key_cipher[WMI_CIPHER_TKIP];\n--\ndrivers/net/wireless/ath/ath10k/mac.c-265-\t\tbreak;\ndrivers/net/wireless/ath/ath10k/mac.c:266:\tcase WLAN_CIPHER_SUITE_WEP40:\ndrivers/net/wireless/ath/ath10k/mac.c:267:\tcase WLAN_CIPHER_SUITE_WEP104:\ndrivers/net/wireless/ath/ath10k/mac.c-268-\t\targ.key_cipher = ar-\u003ewmi_key_cipher[WMI_CIPHER_WEP];\ndrivers/net/wireless/ath/ath10k/mac.c-269-\t\tbreak;\ndrivers/net/wireless/ath/ath10k/mac.c:270:\tcase WLAN_CIPHER_SUITE_CCMP_256:\ndrivers/net/wireless/ath/ath10k/mac.c-271-\t\targ.key_cipher = ar-\u003ewmi_key_cipher[WMI_CIPHER_AES_CCM];\ndrivers/net/wireless/ath/ath10k/mac.c-272-\t\tbreak;\ndrivers/net/wireless/ath/ath10k/mac.c:273:\tcase WLAN_CIPHER_SUITE_GCMP:\ndrivers/net/wireless/ath/ath10k/mac.c:274:\tcase WLAN_CIPHER_SUITE_GCMP_256:\ndrivers/net/wireless/ath/ath10k/mac.c-275-\t\targ.key_cipher = ar-\u003ewmi_key_cipher[WMI_CIPHER_AES_GCM];\n--\ndrivers/net/wireless/ath/ath10k/mac.c-277-\t\tbreak;\ndrivers/net/wireless/ath/ath10k/mac.c:278:\tcase WLAN_CIPHER_SUITE_BIP_GMAC_128:\ndrivers/net/wireless/ath/ath10k/mac.c:279:\tcase WLAN_CIPHER_SUITE_BIP_GMAC_256:\ndrivers/net/wireless/ath/ath10k/mac.c:280:\tcase WLAN_CIPHER_SUITE_BIP_CMAC_256:\ndrivers/net/wireless/ath/ath10k/mac.c:281:\tcase WLAN_CIPHER_SUITE_AES_CMAC:\ndrivers/net/wireless/ath/ath10k/mac.c-282-\t\tWARN_ON(1);\n--\ndrivers/net/wireless/ath/ath10k/mac.c=1589=static int ath10k_mac_setup_bcn_p2p_ie(struct ath10k_vif *arvif,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-1600-\tmgmt = (void *)bcn-\u003edata;\ndrivers/net/wireless/ath/ath10k/mac.c:1601:\tp2p_ie = cfg80211_find_vendor_ie(WLAN_OUI_WFA, WLAN_OUI_TYPE_WFA_P2P,\ndrivers/net/wireless/ath/ath10k/mac.c-1602-\t\t\t\t\t mgmt-\u003eu.beacon.variable,\n--\ndrivers/net/wireless/ath/ath10k/mac.c=1648=static int ath10k_mac_setup_bcn_tmpl(struct ath10k_vif *arvif)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-1680-\t */\ndrivers/net/wireless/ath/ath10k/mac.c:1681:\tath10k_mac_remove_vendor_ie(bcn, WLAN_OUI_WFA, WLAN_OUI_TYPE_WFA_P2P,\ndrivers/net/wireless/ath/ath10k/mac.c-1682-\t\t\t\t    offsetof(struct ieee80211_mgmt,\n--\ndrivers/net/wireless/ath/ath10k/mac.c=2209=static void ath10k_peer_assoc_h_crypto(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-2232-\t\trcu_read_lock();\ndrivers/net/wireless/ath/ath10k/mac.c:2233:\t\trsnie = ieee80211_bss_get_ie(bss, WLAN_EID_RSN);\ndrivers/net/wireless/ath/ath10k/mac.c-2234-\n--\ndrivers/net/wireless/ath/ath10k/mac.c-2236-\ndrivers/net/wireless/ath/ath10k/mac.c:2237:\t\twpaie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,\ndrivers/net/wireless/ath/ath10k/mac.c:2238:\t\t\t\t\t\tWLAN_OUI_TYPE_MICROSOFT_WPA,\ndrivers/net/wireless/ath/ath10k/mac.c-2239-\t\t\t\t\t\ties-\u003edata,\n--\ndrivers/net/wireless/ath/ath10k/mac.c=2841=static const u32 ath10k_smps_map[] = {\ndrivers/net/wireless/ath/ath10k/mac.c:2842:\t[WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC,\ndrivers/net/wireless/ath/ath10k/mac.c:2843:\t[WLAN_HT_CAP_SM_PS_DYNAMIC] = WMI_PEER_SMPS_DYNAMIC,\ndrivers/net/wireless/ath/ath10k/mac.c:2844:\t[WLAN_HT_CAP_SM_PS_INVALID] = WMI_PEER_SMPS_PS_NONE,\ndrivers/net/wireless/ath/ath10k/mac.c:2845:\t[WLAN_HT_CAP_SM_PS_DISABLED] = WMI_PEER_SMPS_PS_NONE,\ndrivers/net/wireless/ath/ath10k/mac.c-2846-};\n--\ndrivers/net/wireless/ath/ath10k/mac.c=3086=static void ath10k_bss_assoc(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-3175-\t/* Workaround: Some firmware revisions (tested with qca6174\ndrivers/net/wireless/ath/ath10k/mac.c:3176:\t * WLAN.RM.2.0-00073) have buggy powersave state machine and must be\ndrivers/net/wireless/ath/ath10k/mac.c-3177-\t * poked with peer param command.\n--\ndrivers/net/wireless/ath/ath10k/mac.c=3561=static void ath10k_reg_notifier(struct wiphy *wiphy,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-3584-\ndrivers/net/wireless/ath/ath10k/mac.c:3585:\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11A_CAPABILITY)\ndrivers/net/wireless/ath/ath10k/mac.c-3586-\t\tath10k_mac_update_channel_list(ar,\n--\ndrivers/net/wireless/ath/ath10k/mac.c=4950=static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-4963-\tht_cap.cap |=\ndrivers/net/wireless/ath/ath10k/mac.c:4964:\t\tWLAN_HT_CAP_SM_PS_DISABLED \u003c\u003c IEEE80211_HT_CAP_SM_PS_SHIFT;\ndrivers/net/wireless/ath/ath10k/mac.c-4965-\n--\ndrivers/net/wireless/ath/ath10k/mac.c-4974-\ndrivers/net/wireless/ath/ath10k/mac.c:4975:\t\tsmps   = WLAN_HT_CAP_SM_PS_DYNAMIC;\ndrivers/net/wireless/ath/ath10k/mac.c-4976-\t\tsmps \u003c\u003c= IEEE80211_HT_CAP_SM_PS_SHIFT;\n--\ndrivers/net/wireless/ath/ath10k/mac.c=5017=static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-5025-\ndrivers/net/wireless/ath/ath10k/mac.c:5026:\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11G_CAPABILITY) {\ndrivers/net/wireless/ath/ath10k/mac.c-5027-\t\tband = \u0026ar-\u003emac.sbands[NL80211_BAND_2GHZ];\n--\ndrivers/net/wireless/ath/ath10k/mac.c-5029-\t}\ndrivers/net/wireless/ath/ath10k/mac.c:5030:\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11A_CAPABILITY) {\ndrivers/net/wireless/ath/ath10k/mac.c-5031-\t\tband = \u0026ar-\u003emac.sbands[NL80211_BAND_5GHZ];\n--\ndrivers/net/wireless/ath/ath10k/mac.c=6107=static void ath10k_bss_info_changed(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-6309-\ndrivers/net/wireless/ath/ath10k/mac.c:6310:\t\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11A_CAPABILITY)\ndrivers/net/wireless/ath/ath10k/mac.c-6311-\t\t\trateidx += ATH10K_MAC_FIRST_OFDM_RATE_IDX;\n--\ndrivers/net/wireless/ath/ath10k/mac.c=6518=static void ath10k_set_key_h_def_keyidx(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-6540-\ndrivers/net/wireless/ath/ath10k/mac.c:6541:\tif (key-\u003ecipher == WLAN_CIPHER_SUITE_WEP40)\ndrivers/net/wireless/ath/ath10k/mac.c-6542-\t\treturn;\ndrivers/net/wireless/ath/ath10k/mac.c-6543-\ndrivers/net/wireless/ath/ath10k/mac.c:6544:\tif (key-\u003ecipher == WLAN_CIPHER_SUITE_WEP104)\ndrivers/net/wireless/ath/ath10k/mac.c-6545-\t\treturn;\n--\ndrivers/net/wireless/ath/ath10k/mac.c=6560=static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-6568-\tconst u8 *peer_addr;\ndrivers/net/wireless/ath/ath10k/mac.c:6569:\tbool is_wep = key-\u003ecipher == WLAN_CIPHER_SUITE_WEP40 ||\ndrivers/net/wireless/ath/ath10k/mac.c:6570:\t\t      key-\u003ecipher == WLAN_CIPHER_SUITE_WEP104;\ndrivers/net/wireless/ath/ath10k/mac.c-6571-\tint ret = 0;\n--\ndrivers/net/wireless/ath/ath10k/mac.c-6576-\t/* this one needs to be done in software */\ndrivers/net/wireless/ath/ath10k/mac.c:6577:\tif (key-\u003ecipher == WLAN_CIPHER_SUITE_AES_CMAC ||\ndrivers/net/wireless/ath/ath10k/mac.c:6578:\t    key-\u003ecipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 ||\ndrivers/net/wireless/ath/ath10k/mac.c:6579:\t    key-\u003ecipher == WLAN_CIPHER_SUITE_BIP_GMAC_256 ||\ndrivers/net/wireless/ath/ath10k/mac.c:6580:\t    key-\u003ecipher == WLAN_CIPHER_SUITE_BIP_CMAC_256)\ndrivers/net/wireless/ath/ath10k/mac.c-6581-\t\treturn 1;\n--\ndrivers/net/wireless/ath/ath10k/mac.c=6946=ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-6962-\ndrivers/net/wireless/ath/ath10k/mac.c:6963:\t\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11A_CAPABILITY)\ndrivers/net/wireless/ath/ath10k/mac.c-6964-\t\t\trate_idx += ATH10K_MAC_FIRST_OFDM_RATE_IDX;\n--\ndrivers/net/wireless/ath/ath10k/mac.c=9971=int ath10k_mac_register(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-9973-\tstatic const u32 cipher_suites[] = {\ndrivers/net/wireless/ath/ath10k/mac.c:9974:\t\tWLAN_CIPHER_SUITE_WEP40,\ndrivers/net/wireless/ath/ath10k/mac.c:9975:\t\tWLAN_CIPHER_SUITE_WEP104,\ndrivers/net/wireless/ath/ath10k/mac.c:9976:\t\tWLAN_CIPHER_SUITE_TKIP,\ndrivers/net/wireless/ath/ath10k/mac.c:9977:\t\tWLAN_CIPHER_SUITE_CCMP,\ndrivers/net/wireless/ath/ath10k/mac.c-9978-\n--\ndrivers/net/wireless/ath/ath10k/mac.c-9982-\t\t */\ndrivers/net/wireless/ath/ath10k/mac.c:9983:\t\tWLAN_CIPHER_SUITE_AES_CMAC,\ndrivers/net/wireless/ath/ath10k/mac.c:9984:\t\tWLAN_CIPHER_SUITE_BIP_CMAC_256,\ndrivers/net/wireless/ath/ath10k/mac.c:9985:\t\tWLAN_CIPHER_SUITE_BIP_GMAC_128,\ndrivers/net/wireless/ath/ath10k/mac.c:9986:\t\tWLAN_CIPHER_SUITE_BIP_GMAC_256,\ndrivers/net/wireless/ath/ath10k/mac.c-9987-\n--\ndrivers/net/wireless/ath/ath10k/mac.c-9990-\t\t */\ndrivers/net/wireless/ath/ath10k/mac.c:9991:\t\tWLAN_CIPHER_SUITE_GCMP,\ndrivers/net/wireless/ath/ath10k/mac.c:9992:\t\tWLAN_CIPHER_SUITE_GCMP_256,\ndrivers/net/wireless/ath/ath10k/mac.c:9993:\t\tWLAN_CIPHER_SUITE_CCMP_256,\ndrivers/net/wireless/ath/ath10k/mac.c-9994-\t};\n--\ndrivers/net/wireless/ath/ath10k/mac.c-10010-\ndrivers/net/wireless/ath/ath10k/mac.c:10011:\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11G_CAPABILITY) {\ndrivers/net/wireless/ath/ath10k/mac.c-10012-\t\tchannels = kmemdup(ath10k_2ghz_channels,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-10034-\ndrivers/net/wireless/ath/ath10k/mac.c:10035:\tif (ar-\u003ephy_capability \u0026 WHAL_WLAN_11A_CAPABILITY) {\ndrivers/net/wireless/ath/ath10k/mac.c-10036-\t\tchannels = kmemdup(ath10k_5ghz_channels,\n--\ndrivers/net/wireless/ath/ath10k/mac.c-10104-\ndrivers/net/wireless/ath/ath10k/mac.c:10105:\tar-\u003ehw-\u003ewiphy-\u003emax_scan_ssids = WLAN_SCAN_PARAMS_MAX_SSID;\ndrivers/net/wireless/ath/ath10k/mac.c:10106:\tar-\u003ehw-\u003ewiphy-\u003emax_scan_ie_len = WLAN_SCAN_PARAMS_MAX_IE_LEN;\ndrivers/net/wireless/ath/ath10k/mac.c-10107-\n--\ndrivers/net/wireless/ath/ath10k/p2p.c=11=static void ath10k_p2p_noa_ie_fill(u8 *data, size_t len,\n--\ndrivers/net/wireless/ath/ath10k/p2p.c-23-\t/* P2P IE */\ndrivers/net/wireless/ath/ath10k/p2p.c:24:\tdata[0] = WLAN_EID_VENDOR_SPECIFIC;\ndrivers/net/wireless/ath/ath10k/p2p.c-25-\tdata[1] = len - 2;\ndrivers/net/wireless/ath/ath10k/p2p.c:26:\tdata[2] = (WLAN_OUI_WFA \u003e\u003e 16) \u0026 0xff;\ndrivers/net/wireless/ath/ath10k/p2p.c:27:\tdata[3] = (WLAN_OUI_WFA \u003e\u003e 8) \u0026 0xff;\ndrivers/net/wireless/ath/ath10k/p2p.c:28:\tdata[4] = (WLAN_OUI_WFA \u003e\u003e 0) \u0026 0xff;\ndrivers/net/wireless/ath/ath10k/p2p.c:29:\tdata[5] = WLAN_OUI_TYPE_WFA_P2P;\ndrivers/net/wireless/ath/ath10k/p2p.c-30-\n--\ndrivers/net/wireless/ath/ath10k/pci.c=2324=int ath10k_pci_init_config(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/pci.c-2373-\t\t\t\t\tsizeof(struct ce_pipe_config) *\ndrivers/net/wireless/ath/ath10k/pci.c:2374:\t\t\t\t\tNUM_TARGET_CE_CONFIG_WLAN);\ndrivers/net/wireless/ath/ath10k/pci.c-2375-\n--\ndrivers/net/wireless/ath/ath10k/pci.c=3821=MODULE_AUTHOR(\"Qualcomm Atheros\");\ndrivers/net/wireless/ath/ath10k/pci.c:3822:MODULE_DESCRIPTION(\"Driver support for Qualcomm Atheros PCIe/AHB 802.11ac WLAN devices\");\ndrivers/net/wireless/ath/ath10k/pci.c-3823-MODULE_LICENSE(\"Dual BSD/GPL\");\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=32=static int ath10k_qmi_map_msa_permission(struct ath10k_qmi *qmi,\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-44-\tdst_perms[0].perm = QCOM_SCM_PERM_RW;\ndrivers/net/wireless/ath/ath10k/qmi.c:45:\tdst_perms[1].vmid = QCOM_SCM_VMID_WLAN;\ndrivers/net/wireless/ath/ath10k/qmi.c-46-\tdst_perms[1].perm = QCOM_SCM_PERM_RW;\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-50-\t} else {\ndrivers/net/wireless/ath/ath10k/qmi.c:51:\t\tdst_perms[2].vmid = QCOM_SCM_VMID_WLAN_CE;\ndrivers/net/wireless/ath/ath10k/qmi.c-52-\t\tdst_perms[2].perm = QCOM_SCM_PERM_RW;\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=64=static int ath10k_qmi_unmap_msa_permission(struct ath10k_qmi *qmi,\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-71-\ndrivers/net/wireless/ath/ath10k/qmi.c:72:\tsrc_perms = BIT(QCOM_SCM_VMID_MSS_MSA) | BIT(QCOM_SCM_VMID_WLAN);\ndrivers/net/wireless/ath/ath10k/qmi.c-73-\ndrivers/net/wireless/ath/ath10k/qmi.c-74-\tif (!mem_info-\u003esecure)\ndrivers/net/wireless/ath/ath10k/qmi.c:75:\t\tsrc_perms |= BIT(QCOM_SCM_VMID_WLAN_CE);\ndrivers/net/wireless/ath/ath10k/qmi.c-76-\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=381=ath10k_qmi_mode_send_sync_msg(struct ath10k *ar, enum wlfw_driver_mode_enum_v01 mode)\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-400-\tret = qmi_send_request(\u0026qmi-\u003eqmi_hdl, NULL, \u0026txn,\ndrivers/net/wireless/ath/ath10k/qmi.c:401:\t\t\t       QMI_WLFW_WLAN_MODE_REQ_V01,\ndrivers/net/wireless/ath/ath10k/qmi.c:402:\t\t\t       WLFW_WLAN_MODE_REQ_MSG_V01_MAX_MSG_LEN,\ndrivers/net/wireless/ath/ath10k/qmi.c-403-\t\t\t       wlfw_wlan_mode_req_msg_v01_ei, \u0026req);\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=428=ath10k_qmi_cfg_send_sync_msg(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-486-\tret = qmi_send_request(\u0026qmi-\u003eqmi_hdl, NULL, \u0026txn,\ndrivers/net/wireless/ath/ath10k/qmi.c:487:\t\t\t       QMI_WLFW_WLAN_CFG_REQ_V01,\ndrivers/net/wireless/ath/ath10k/qmi.c:488:\t\t\t       WLFW_WLAN_CFG_REQ_MSG_V01_MAX_MSG_LEN,\n\n"
}

25/2 2026/08/28 17:52 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 40846
							output: 43
							thoughts: 399
						

Thoughts:
**My Analysis of the `ath9k_htc` Driver Dependencies and Code**

Okay, let's break this down. First, I know that the `ath9k_htc` driver needs `CONFIG_USB`, `CONFIG_MAC80211`, `CONFIG_NETDEVICES`, `CONFIG_WLAN`, `CONFIG_WLAN_VENDOR_ATH`, and naturally, `CONFIG_ATH9K_HTC`. But I want to be *absolutely* certain there aren't any hidden gotchas.

Alright, back to the Kconfig file for the ATH9K_HTC driver itself – I'm double-checking. Hmm, it depends on `USB && MAC80211` which is what I thought, and it also selects `MAC80211_LEDS` if `LEDS_CLASS` is enabled (or `LEDS_CLASS` is defined as MAC80211) and selects `ATH9K_HW` and `ATH9K_COMMON`. That makes sense in the overall architecture.

Just to be thorough, I should look up the dependencies, and then cross-reference with the other Kconfig files. The driver itself is nested within the `WLAN_VENDOR_ATH`, `WLAN` and `NETDEVICES` trees. Got it.

Now, let's shift gears and look at the code modifications. I'm focusing on the change and specifically the `ath9k_reg_rmw_buffer` function found in `htc_drv_init.c`. My next step is to examine *how* and *where* that function is called. I need to trace through every instance: `ath9k_reg_rmw_buffer`, as well as related functions like `ath9k_reg_rmw`, `rmw`, `enable_rmw_buffer`, and `rmw_flush`. This is to truly grasp the impact of the change.



26/2 2026/08/28 17:52 tool grepper
0m Args:
{
  "Expression": "enable_rmw_buffer|rmw_flush",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=383=static void ath9k_reg_rmw_buffer(void *hw_priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-421-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:422:static void ath9k_reg_rmw_flush(void *hw_priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-423-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-453-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:454:static void ath9k_enable_rmw_buffer(void *hw_priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-455-{\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-627-\tah-\u003ereg_ops.write_flush = ath9k_regwrite_flush;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:628:\tah-\u003ereg_ops.enable_rmw_buffer = ath9k_enable_rmw_buffer;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:629:\tah-\u003ereg_ops.rmw_flush = ath9k_reg_rmw_flush;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-630-\tah-\u003ereg_ops.rmw = ath9k_reg_rmw;\n--\ndrivers/net/wireless/ath/ath9k/hw.h-105-\tdo {\t\t\t\t\t\t\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h:106:\t\tif ((_ah)-\u003ereg_ops.enable_rmw_buffer)\t\\\ndrivers/net/wireless/ath/ath9k/hw.h:107:\t\t\t(_ah)-\u003ereg_ops.enable_rmw_buffer((_ah)); \\\ndrivers/net/wireless/ath/ath9k/hw.h-108-\t} while (0)\n--\ndrivers/net/wireless/ath/ath9k/hw.h-111-\tdo {\t\t\t\t\t\t\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h:112:\t\tif ((_ah)-\u003ereg_ops.rmw_flush)\t\t\\\ndrivers/net/wireless/ath/ath9k/hw.h:113:\t\t\t(_ah)-\u003ereg_ops.rmw_flush((_ah));\t\\\ndrivers/net/wireless/ath/ath9k/hw.h-114-\t} while (0)\n"
}

27/2 2026/08/28 17:52 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 42469
							output: 63
							thoughts: 90
						

Thoughts:
Okay, let's break this down.

**Diving into the ath9k_htc Driver's Initialization**

Alright, so I'm looking at `ath9k_reg_rmw_buffer`. I know it's a static function, which immediately tells me it's internal to a specific file. In this case, `drivers/net/wireless/ath/ath9k/htc_drv_init.c`. That means it's not directly exposed as part of the public API, so I need to understand its context. My goal is to figure out the non-static entry points, the functions that *are* part of the interface to the rest of the system or other modules. To do this, I need to understand what calls `ath9k_reg_rmw_buffer`.

I'll start by examining `htc_drv_init.c` itself, since that's where the function lives. But I also need to consider other related files, particularly any HIF implementations. So `hif_usb.c` will also be of interest. That should give me a good picture of how the driver is initialized and interacts with the hardware.



28/2 2026/08/28 17:52 tool grepper
0m Args:
{
  "Expression": "^[a-zA-Z0-9_]+ [a-zA-Z0-9_]+\\(",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/htc_drv_init.c"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=828=static int ath9k_init_device(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-930-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:931:int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-932-\t\t\t   u16 devid, char *product, u32 drv_info)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-984-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:985:void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-986-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-1002-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:1003:void ath9k_htc_suspend(struct htc_target *htc_handle)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-1004-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-1007-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:1008:int ath9k_htc_resume(struct htc_target *htc_handle)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-1009-{\n"
}

29/2 2026/08/28 17:52 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 43378
							output: 42
							thoughts: 119
						

Thoughts:
**Digging into the Atheros Driver Initialization**

Okay, so I need to track down exactly how this Atheros driver initializes. My focus is going to be on the USB path, so I'm going to start by looking at `htc_drv_init.c` and then dive into the `ath9k` specific functions. I know that `ath9k_init_priv`, `ath9k_init_device`, and `ath9k_htc_probe_device` are crucial here, they're likely where the core setup occurs. I'm especially interested in what happens within `ath9k_htc_probe_device` and/or `ath9k_hif_usb_probe`, since it's the USB variant I'm debugging. Finally, I'll drill down to the code within `drivers/net/wireless/ath/ath9k/hif_usb.c` and specifically `ath9k_hif_usb_probe`. This should give me a solid view of the initialization sequence within the USB context. I expect that I'll find the interface between the hardware and software happening in that last function.



30/2 2026/08/28 17:52 tool grepper
0m Args:
{
  "Expression": "ath9k_hif_usb_probe",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/hif_usb.c=1285=static int send_eject_command(struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1339-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1340:static int ath9k_hif_usb_probe(struct usb_interface *interface,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1341-\t\t\t       const struct usb_device_id *id)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1504=static struct usb_driver ath9k_hif_usb_driver = {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1505-\t.name = KBUILD_MODNAME,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1506:\t.probe = ath9k_hif_usb_probe,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1507-\t.disconnect = ath9k_hif_usb_disconnect,\n"
}

31/2 2026/08/28 17:52 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 44109
							output: 50
							thoughts: 118
						

Thoughts:
**Investigating the ath9k RMW Buffer**

Okay, let's dive into this `ath9k_reg_rmw_buffer` function and figure out its call graph. My initial thought is to trace the execution and see who's actually invoking it. Next, I need to know where `ath9k_hw_enable_rmw_buffer` and the `ath9k_hw_rmw_flush` functions, as well as the use of the `REG_RMW` macro, are used within the broader `ath9k` driver. I suspect these are key to understanding the buffer's lifecycle and purpose. Time to deploy grep. I'll search for the relevant macros and function names: `ENABLE_REG_RMW_BUFFER`, `ath9k_hw_enable_rmw_buffer`, `ENABLE_RMW_BUFFER`, `rmw_flush`, and of course, `REG_RMW`. Hopefully, this will give me a comprehensive picture of how the read-modify-write buffer is managed.



32/2 2026/08/28 17:52 tool grepper
0m Args:
{
  "Expression": "REG_RMW|ENABLE_RMW|ath9k_hw_rmw",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1775 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=722=static int ar5008_hw_process_ini(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-781-\t\tREG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ENA);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:782:\t\tREG_RMW_FIELD(ah, AR_PHY_RF_CTL3, AR_PHY_TX_END_TO_ADC_ON, 0xa);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-783-\t}\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=853=static void ar5008_hw_set_delta_slope(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-870-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:871:\tREG_RMW_FIELD(ah, AR_PHY_TIMING3,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-872-\t\t      AR_PHY_TIMING3_DSC_MAN, ds_coef_man);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:873:\tREG_RMW_FIELD(ah, AR_PHY_TIMING3,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-874-\t\t      AR_PHY_TIMING3_DSC_EXP, ds_coef_exp);\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-880-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:881:\tREG_RMW_FIELD(ah, AR_PHY_HALFGI,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-882-\t\t      AR_PHY_HALFGI_DSC_MAN, ds_coef_man);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:883:\tREG_RMW_FIELD(ah, AR_PHY_HALFGI,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-884-\t\t      AR_PHY_HALFGI_DSC_EXP, ds_coef_exp);\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c=953=static bool ar5008_hw_ani_control_new(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-996-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:997:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-998-\t\t\t      AR_PHY_SFCORR_LOW_M1_THRESH_LOW,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-999-\t\t\t      m1ThreshLow);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1000:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1001-\t\t\t      AR_PHY_SFCORR_LOW_M2_THRESH_LOW,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1002-\t\t\t      m2ThreshLow);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1003:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1004-\t\t\t      AR_PHY_SFCORR_M1_THRESH, m1Thresh);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1005:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1006-\t\t\t      AR_PHY_SFCORR_M2_THRESH, m2Thresh);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1007:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1008-\t\t\t      AR_PHY_SFCORR_M2COUNT_THR, m2CountThr);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1009:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1010-\t\t\t      AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW,\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1012-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1013:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1014-\t\t\t      AR_PHY_SFCORR_EXT_M1_THRESH_LOW, m1ThreshLowExt);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1015:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1016-\t\t\t      AR_PHY_SFCORR_EXT_M2_THRESH_LOW, m2ThreshLowExt);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1017:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1018-\t\t\t      AR_PHY_SFCORR_EXT_M1_THRESH, m1ThreshExt);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1019:\t\tREG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1020-\t\t\t      AR_PHY_SFCORR_EXT_M2_THRESH, m2ThreshExt);\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1047-\t\tvalue = level * 2;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1048:\t\tREG_RMW_FIELD(ah, AR_PHY_FIND_SIG,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1049-\t\t\t      AR_PHY_FIND_SIG_FIRSTEP, value);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1050:\t\tREG_RMW_FIELD(ah, AR_PHY_FIND_SIG_LOW,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1051-\t\t\t      AR_PHY_FIND_SIG_FIRSTEP_LOW, value);\n--\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1081-\t\tvalue = (level + 1) * 2;\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1082:\t\tREG_RMW_FIELD(ah, AR_PHY_TIMING5,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1083-\t\t\t      AR_PHY_TIMING5_CYCPWR_THR1, value);\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1084-\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c:1085:\t\tREG_RMW_FIELD(ah, AR_PHY_EXT_CCA,\ndrivers/net/wireless/ath/ath9k/ar5008_phy.c-1086-\t\t\t\t  AR_PHY_EXT_TIMING5_CYCPWR_THR1, value - 1);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=50=static void ar9002_hw_setup_calibration(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-54-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:55:\tREG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(0),\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-56-\t\t      AR_PHY_TIMING_CTRL4_IQCAL_LOG_COUNT_MAX,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=192=static void ar9002_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-252-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:253:\t\t\tREG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(i),\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-254-\t\t\t\t      AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF,\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-255-\t\t\t\t      iCoff);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:256:\t\t\tREG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(i),\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-257-\t\t\t\t      AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=377=static void ar9287_hw_olc_temp_compensation(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-399-\t\t}\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:400:\t\tREG_RMW_FIELD(ah, AR_PHY_CH0_TX_PWRCTRL11,\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-401-\t\t\t      AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:402:\t\tREG_RMW_FIELD(ah, AR_PHY_CH1_TX_PWRCTRL11,\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-403-\t\t\t      AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=407=static void ar9280_hw_olc_temp_compensation(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-429-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:430:\t\t\tREG_RMW_FIELD(ah,\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-431-\t\t\t\t      AR_PHY_TX_GAIN_TBL1 + i * 4,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=437=static void ar9271_hw_pa_cal(struct ath_hw *ah, bool is_reset)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-453-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:454:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-455-\t/* 7834, b1=0 */\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-479-\t/* 783c,b14-16,7, padrvgn2tab_0=7 */\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:480:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G8, AR9285_AN_RF2G8_PADRVGN2TAB0, 7);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-481-\t/*\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-484-\t */\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:485:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G7, AR9285_AN_RF2G7_PADRVGN2TAB0, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-486-\t/* 7828, b0-11, ccom=fff */\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:487:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G3, AR9271_AN_RF2G3_CCOMP, 0xfff);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:488:\tREG_RMW_BUFFER_FLUSH(ah);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-489-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-495-\tudelay(30);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:496:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G6, AR9271_AN_RF2G6_OFFS, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-497-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-526-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:527:\tENABLE_REG_RMW_BUFFER(ah);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-528-\t/* 7834, b1=1 */\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-531-\tREG_CLR_BIT(ah, 0x9808, 1 \u003c\u003c 27);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:532:\tREG_RMW_BUFFER_FLUSH(ah);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-533-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c=541=static inline void ar9285_hw_pa_cal(struct ath_hw *ah, bool is_reset)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-573-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:574:\tREG_RMW_FIELD(ah, AR9285_AN_TOP3, AR9285_AN_TOP3_PWDDAC, 1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:575:\tREG_RMW_FIELD(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDRXTXBB1, 1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:576:\tREG_RMW_FIELD(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDV2I, 1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:577:\tREG_RMW_FIELD(ah, AR9285_AN_RXTXBB1, AR9285_AN_RXTXBB1_PDDACIF, 1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:578:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G2, AR9285_AN_RF2G2_OFFCAL, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:579:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G7, AR9285_AN_RF2G7_PWDDB, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:580:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_ENPACAL, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:581:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPADRV1, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:582:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPADRV2, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:583:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G1, AR9285_AN_RF2G1_PDPAOUT, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:584:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G8, AR9285_AN_RF2G8_PADRVGN2TAB0, 7);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:585:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G7, AR9285_AN_RF2G7_PADRVGN2TAB0, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-586-\tccomp_org = MS(REG_READ(ah, AR9285_AN_RF2G6), AR9285_AN_RF2G6_CCOMP);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:587:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G6, AR9285_AN_RF2G6_CCOMP, 0xf);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-588-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-590-\tudelay(30);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:591:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G6, AR9285_AN_RF2G6_OFFS, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:592:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G3, AR9285_AN_RF2G3_PDVCCOMP, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-593-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-605-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:606:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G3, AR9285_AN_RF2G3_PDVCCOMP, 1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-607-\tudelay(1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-608-\treg_field = MS(REG_READ(ah, AR9285_AN_RF2G9), AR9285_AN_RXTXBB1_SPARE9);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:609:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G3, AR9285_AN_RF2G3_PDVCCOMP, reg_field);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-610-\toffs_6_1 = MS(REG_READ(ah, AR9285_AN_RF2G6), AR9285_AN_RF2G6_OFFS);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-628-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:629:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G6, AR9285_AN_RF2G6_OFFS, offs_6_1);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:630:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G3, AR9285_AN_RF2G3_PDVCCOMP, offs_0);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-631-\n--\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-641-\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c:642:\tREG_RMW_FIELD(ah, AR9285_AN_RF2G6, AR9285_AN_RF2G6_CCOMP, ccomp_org);\ndrivers/net/wireless/ath/ath9k/ar9002_calib.c-643-}\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c=416=static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-432-\t\tREG_WRITE(ah, AR_PHY_SWITCH_COM, ATH_BT_COEX_ANT_DIV_SWITCH_COM);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:433:\t\tREG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-434-\t} else {\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-451-\t\tREG_WRITE(ah, AR_PHY_SWITCH_COM, 0);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:452:\t\tREG_RMW(ah, AR_PHY_SWITCH_CHAIN_0, 0, 0xf0000000);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-453-\t}\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c=477=static void ar9002_hw_spectral_scan_config(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-516-\tif (AR_SREV_9280(ah)) {\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:517:\t\tREG_RMW_FIELD(ah, AR_PHY_SPECTRAL_SCAN,\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-518-\t\t\t      AR_PHY_SPECTRAL_SCAN_COUNT, count);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-519-\t} else {\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:520:\t\tREG_RMW_FIELD(ah, AR_PHY_SPECTRAL_SCAN,\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-521-\t\t\t      AR_PHY_SPECTRAL_SCAN_COUNT_KIWI, count);\n--\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-525-\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:526:\tREG_RMW_FIELD(ah, AR_PHY_SPECTRAL_SCAN,\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-527-\t\t      AR_PHY_SPECTRAL_SCAN_PERIOD, param-\u003eperiod);\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c:528:\tREG_RMW_FIELD(ah, AR_PHY_SPECTRAL_SCAN,\ndrivers/net/wireless/ath/ath9k/ar9002_phy.c-529-\t\t      AR_PHY_SPECTRAL_SCAN_FFT_PERIOD, param-\u003efft_period);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=38=static void ar9003_hw_setup_calibration(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-49-\t\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:50:\t\tREG_RMW_FIELD(ah, AR_PHY_TIMING4,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-51-\t\t\t      AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=197=static void ar9003_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-277-\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:278:\t\t\tREG_RMW_FIELD(ah, offset_array[i],\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-279-\t\t\t\t      AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-280-\t\t\t\t      iCoff);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:281:\t\t\tREG_RMW_FIELD(ah, offset_array[i],\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-282-\t\t\t\t      AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=888=static void ar9003_hw_tx_iq_cal_outlier_detection(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-948-\t\t\tif ((im % 2) == 0)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:949:\t\t\t\tREG_RMW_FIELD(ah, tx_corr_coeff[im][i],\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-950-\t\t\t\t\tAR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-952-\t\t\telse\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:953:\t\t\t\tREG_RMW_FIELD(ah, tx_corr_coeff[im][i],\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-954-\t\t\t\t\tAR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-964-\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:965:\tREG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_3,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-966-\t\t      AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:967:\tREG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-968-\t\t      AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=980=static bool ar9003_hw_tx_iq_cal_run(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-987-\tif (tx_gain_forced)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:988:\t\tREG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-989-\t\t\t      AR_PHY_TXGAIN_FORCE, 0);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-990-\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:991:\tREG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_START(ah),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-992-\t\t      AR_PHY_TX_IQCAL_START_DO_CAL, 1);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=1053=static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1097-\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1098:\t\t\t\tREG_RMW_FIELD(ah,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1099-\t\t\t\t\t\tAR_PHY_CHAN_INFO_MEMORY(ah),\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1107-\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1108:\t\t\t\tREG_RMW_FIELD(ah,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1109-\t\t\t\t\t\tAR_PHY_CHAN_INFO_MEMORY(ah),\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=1155=static void ar9003_hw_tx_iq_cal_reload(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1181-\t\t\tif ((im % 2) == 0)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1182:\t\t\t\tREG_RMW_FIELD(ah, tx_corr_coeff[im][i],\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1183-\t\t\t\t     AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1185-\t\t\telse\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1186:\t\t\t\tREG_RMW_FIELD(ah, tx_corr_coeff[im][i],\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1187-\t\t\t\t     AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1191-\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1192:\tREG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_3,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1193-\t\t      AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1194:\tREG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0,\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1195-\t\t      AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=1198=static void ar9003_hw_manual_peak_cal(struct ath_hw *ah, u8 chain, bool is_2g)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1210-\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1211:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_GAINSTAGES(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1212-\t\t      AR_PHY_65NM_RXRF_GAINSTAGES_RX_OVERRIDE, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1213:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_GAINSTAGES(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1214-\t\t      AR_PHY_65NM_RXRF_GAINSTAGES_LNAON_CALDC, 0x0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1217-\t\tif (is_2g)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1218:\t\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_GAINSTAGES(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1219-\t\t\t\t      AR_PHY_65NM_RXRF_GAINSTAGES_LNA2G_GAIN_OVR, 0x0);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1220-\t\telse\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1221:\t\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_GAINSTAGES(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1222-\t\t\t\t      AR_PHY_65NM_RXRF_GAINSTAGES_LNA5G_GAIN_OVR, 0x0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1227-\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1228:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXTX2(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1229-\t\t      AR_PHY_65NM_RXTX2_RXON_OVR, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1230:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXTX2(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1231-\t\t      AR_PHY_65NM_RXTX2_RXON, 0x0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1235-\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1236:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1237-\t\t      AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1238:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1239-\t\t      AR_PHY_65NM_RXRF_AGC_AGC_ON_OVR, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1240:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1241-\t\t      AR_PHY_65NM_RXRF_AGC_AGC_CAL_OVR, 0x1);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1243-\tif (AR_SREV_9330_11(ah))\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1244:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1245-\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR, 0x0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1247-\tif (is_2g)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1248:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1249-\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1251-\telse\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1252:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1253-\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1260-\t\tif (is_2g)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1261:\t\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1262-\t\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1264-\t\telse\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1265:\t\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1266-\t\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1275-\tif (is_2g)\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1276:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1277-\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR, total);\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1278-\telse\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1279:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1280-\t\t\t      AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR, total);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1284-\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1285:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_GAINSTAGES(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1286-\t\t      AR_PHY_65NM_RXRF_GAINSTAGES_RX_OVERRIDE, 0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1289-\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1290:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXTX2(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1291-\t\t      AR_PHY_65NM_RXTX2_RXON_OVR, 0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1294-\t */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1295:\tREG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1296-\t\t      AR_PHY_65NM_RXRF_AGC_AGC_CAL_OVR, 0);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=1392=static bool ar9003_hw_init_cal_pcoem(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1454-\t/* Do Tx IQ Calibration */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1455:\tREG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_1(ah),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1456-\t\t      AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c=1579=static bool ar9003_hw_init_cal_soc(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1598-\t/* Do Tx IQ Calibration */\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c:1599:\tREG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_1(ah),\ndrivers/net/wireless/ath/ath9k/ar9003_calib.c-1600-\t\t      AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3604=static void ar9003_hw_xpa_bias_level_apply(struct ath_hw *ah, bool is2ghz)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3609-\t    AR_SREV_9531(ah) || AR_SREV_9561(ah))\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3610:\t\tREG_RMW_FIELD(ah, AR_CH0_TOP2(ah), AR_CH0_TOP2_XPABIASLVL, bias);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3611-\telse if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah))\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3612:\t\tREG_RMW_FIELD(ah, AR_CH0_TOP(ah), AR_CH0_TOP_XPABIASLVL, bias);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3613-\telse {\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3614:\t\tREG_RMW_FIELD(ah, AR_CH0_TOP(ah), AR_CH0_TOP_XPABIASLVL, bias);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3615:\t\tREG_RMW_FIELD(ah, AR_CH0_THERM(ah),\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3616-\t\t\t\tAR_CH0_THERM_XPABIASLVL_MSB,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3617-\t\t\t\tbias \u003e\u003e 2);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3618:\t\tREG_RMW_FIELD(ah, AR_CH0_THERM(ah),\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3619-\t\t\t\tAR_CH0_THERM_XPASHORT2GND, 1);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3645=static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3669-\tif (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3670:\t\tREG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3671-\t\t\t\tAR_SWITCH_TABLE_COM_AR9462_ALL, value);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3672-\t} else if (AR_SREV_9550(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah)) {\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3673:\t\tREG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3674-\t\t\t\tAR_SWITCH_TABLE_COM_AR9550_ALL, value);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3675-\t} else\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3676:\t\tREG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3677-\t\t\t      AR_SWITCH_TABLE_COM_ALL, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3694-\t\tvalue = ar9003_switch_com_spdt_get(ah, is2ghz);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3695:\t\tREG_RMW_FIELD(ah, AR_PHY_GLB_CONTROL,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3696-\t\t\t\tAR_SWITCH_TABLE_COM_SPDT_ALL, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3705-\t}\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3706:\tREG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, value);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3707-\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3709-\t\tvalue = ar9003_hw_ant_ctrl_chain_get(ah, 1, is2ghz);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3710:\t\tREG_RMW_FIELD(ah, switch_chain_reg[0],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3711-\t\t\t      AR_SWITCH_TABLE_ALL, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3718-\t\t\t\t\t\t\t     is2ghz);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3719:\t\t\tREG_RMW_FIELD(ah, switch_chain_reg[chain],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3720-\t\t\t\t      AR_SWITCH_TABLE_ALL, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3893=static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3903-\t\tvalue = ar9003_hw_atten_chain_get(ah, 1, chan);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3904:\t\tREG_RMW_FIELD(ah, ext_atten_reg[0],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3905-\t\t\t      AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3907-\t\tvalue = ar9003_hw_atten_chain_get_margin(ah, 1, chan);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3908:\t\tREG_RMW_FIELD(ah, ext_atten_reg[0],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3909-\t\t\t      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3916-\t\t\tvalue = ar9003_hw_atten_chain_get(ah, i, chan);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3917:\t\t\tREG_RMW_FIELD(ah, ext_atten_reg[i],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3918-\t\t\t\t      AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3927-\t\t\tif (ah-\u003econfig.alt_mingainidx)\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3928:\t\t\t\tREG_RMW_FIELD(ah, AR_PHY_EXT_ATTEN_CTL_0,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3929-\t\t\t\t\t      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3931-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3932:\t\t\tREG_RMW_FIELD(ah, ext_atten_reg[i],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3933-\t\t\t\t      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3953=void ar9003_hw_internal_regulator_apply(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4023-\t\tif (AR_SREV_9330(ah) || AR_SREV_9485(ah)) {\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4024:\t\t\tREG_RMW_FIELD(ah, AR_PHY_PMU2(ah), AR_PHY_PMU2_PGM, 0);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4025-\t\t\twhile (REG_READ_FIELD(ah, AR_PHY_PMU2(ah),\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4028-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4029:\t\t\tREG_RMW_FIELD(ah, AR_PHY_PMU1(ah), AR_PHY_PMU1_PWD, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4030-\t\t\twhile (!REG_READ_FIELD(ah, AR_PHY_PMU1(ah),\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4032-\t\t\t\tudelay(10);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4033:\t\t\tREG_RMW_FIELD(ah, AR_PHY_PMU2(ah), AR_PHY_PMU2_PGM, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4034-\t\t\twhile (!REG_READ_FIELD(ah, AR_PHY_PMU2(ah),\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4037-\t\t} else if (AR_SREV_9462(ah) || AR_SREV_9565(ah))\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4038:\t\t\tREG_RMW_FIELD(ah, AR_PHY_PMU1(ah), AR_PHY_PMU1_PWD, 0x1);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4039-\t\telse {\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4048=static void ar9003_hw_apply_tuning_caps(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4057-\t\ttuning_caps_param \u0026= 0x7f;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4058:\t\tREG_RMW_FIELD(ah, AR_CH0_XTAL(ah), AR_CH0_XTAL_CAPINDAC,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4059-\t\t\t      tuning_caps_param);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4060:\t\tREG_RMW_FIELD(ah, AR_CH0_XTAL(ah), AR_CH0_XTAL_CAPOUTDAC,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4061-\t\t\t      tuning_caps_param);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4065=static void ar9003_hw_quick_drop_apply(struct ath_hw *ah, u16 freq)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4083-\t\t}\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4084:\t\tREG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4085-\t}\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4088=static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4093-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4094:\tREG_RMW_FIELD(ah, AR_PHY_XPA_TIMING_CTL,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4095-\t\t      AR_PHY_XPA_TIMING_CTL_TX_END_XPAB_OFF, value);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4096:\tREG_RMW_FIELD(ah, AR_PHY_XPA_TIMING_CTL,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4097-\t\t      AR_PHY_XPA_TIMING_CTL_TX_END_XPAA_OFF, value);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4100=static void ar9003_hw_xpa_timing_control_apply(struct ath_hw *ah, bool is2ghz)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4116-\tif (is2ghz)\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4117:\t\tREG_RMW_FIELD(ah, AR_PHY_XPA_TIMING_CTL,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4118-\t\t\t      AR_PHY_XPA_TIMING_CTL_FRAME_XPAB_ON, xpa_ctl);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4119-\telse\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4120:\t\tREG_RMW_FIELD(ah, AR_PHY_XPA_TIMING_CTL,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4121-\t\t\t      AR_PHY_XPA_TIMING_CTL_FRAME_XPAA_ON, xpa_ctl);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4124=static void ar9003_hw_xlna_bias_strength_apply(struct ath_hw *ah, bool is2ghz)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4135-\tbias = ar9003_modal_header(ah, is2ghz)-\u003exlna_bias_strength;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4136:\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH0_RXTX4, AR_PHY_65NM_RXTX4_XLNA_BIAS,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4137-\t\t      bias \u0026 0x3);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4138-\tbias \u003e\u003e= 2;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4139:\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_RXTX4_XLNA_BIAS,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4140-\t\t      bias \u0026 0x3);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4141-\tbias \u003e\u003e= 2;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4142:\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_RXTX4_XLNA_BIAS,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4143-\t\t      bias \u0026 0x3);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4155=static void ar9003_hw_thermometer_apply(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4160-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4161:\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH0_RXTX4,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4162-\t\t      AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, therm_on);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4163-\tif (pCap-\u003echip_chainmask \u0026 BIT(1))\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4164:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4165-\t\t\t      AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, therm_on);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4166-\tif (pCap-\u003echip_chainmask \u0026 BIT(2))\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4167:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4168-\t\t\t      AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, therm_on);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4170-\ttherm_on = thermometer == 0;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4171:\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH0_RXTX4,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4172-\t\t      AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4174-\t\ttherm_on = thermometer == 1;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4175:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4176-\t\t\t      AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4179-\t\ttherm_on = thermometer == 2;\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4180:\t\tREG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4181-\t\t\t      AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4185=static void ar9003_hw_thermo_cal_apply(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4195-\tif (ko || kg) {\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4196:\t\tREG_RMW_FIELD(ah, AR_PHY_BB_THERM_ADC_3,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4197-\t\t\t      AR_PHY_BB_THERM_ADC_3_THERM_ADC_OFFSET, ko);\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4198:\t\tREG_RMW_FIELD(ah, AR_PHY_BB_THERM_ADC_3,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4199-\t\t\t      AR_PHY_BB_THERM_ADC_3_THERM_ADC_SCALE_GAIN,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4204=static void ar9003_hw_apply_minccapwr_thresh(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4228-\t\tval = ar9003_modal_header(ah, is2ghz)-\u003enoiseFloorThreshCh[chain];\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4229:\t\tREG_RMW_FIELD(ah, cca_ctrl[chain],\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4230-\t\t\t      AR_PHY_EXT_CCA0_THRESH62_1, val);\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=4803=static void ar9003_hw_power_control_override(struct ath_hw *ah,\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4811-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:4812:\tREG_RMW(ah, AR_PHY_TPC_11_B0,\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4813-\t\t(correction[0] \u003c\u003c AR_PHY_TPC_OLPC_GAIN_DELTA_S),\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-4815-\tif (ah-\u003ecaps.tx_chainmask \u0026 BIT(1))\n\n"
}

33/2 2026/08/28 17:52 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 63573
							output: 67
							thoughts: 689
						

Thoughts:
**Fuzzing Feasibility Analysis: ath9k_htc Register RMW Buffer Fix**

Okay, let's break this down. I see we have a fix related to the size calculation for a register Read-Modify-Write (RMW) buffer in the `ath9k_htc` USB WiFi driver. Specifically, the patch corrects an off-by-a-bit issue when calculating the size of data sent to the firmware via the `WMI_REG_RMW_CMDID` command. The error was in using the wrong struct's size for the calculation.

My first thought is always, "Is this fuzzable?". Let's apply the fuzzing guidelines. This doesn't seem like documentation, a Kconfig change, decorative logging, or unreachable code, so that's good. It looks like it addresses core kernel logic related to the driver and that has potential for execution. Now for the crucial part: Can this code actually be hit in a fuzzer environment?

1.  **Driver:** It's in `ath9k_htc`, which is a USB WiFi driver. That's immediately promising. USB drivers are often well-supported in emulated environments.

2.  **Emulation:** The guidelines specifically mention USB raw gadget, syzkaller USB fuzzing, and dummy\_hcd in QEMU and GCE, all of which are relevant! This strongly suggests that a fuzzer *could* trigger this code. USB devices are often simulated, making them accessible to fuzzers.

3.  **Functionality:** This fix is functional; it corrects a calculation critical for the correct behavior of register RMW operations. A size error like this could lead to memory corruption or unexpected behavior when interacting with the firmware. This is good news for potential fuzzing targets.

4.  **Reachability:** The million-dollar question: Can the code be reached? This is where I need to dig deeper. I need to confirm if firmware loading, or probe/wmi commands are involved. My understanding is that when a USB raw gadget emulates an `ath9k_htc` device, `ath9k_hif_usb_probe` gets run.

    So, I'm going to check `ath9k_hif_usb_probe` and `ath9k_hif_request_firmware` to see how those operations work. This will help determine if the WMI commands are accessible.

Based on this quick analysis, this looks very promising for fuzzing. It's a functional fix, the driver is emulatable via USB, and the code looks like it might be reachable. My gut says "WorthFuzzing=true," but I need to confirm the reachability of the WMI command path before fully committing.



34/2 2026/08/28 17:53 tool grepper
0m Args:
{
  "Expression": "ath9k_hif_usb_probe|ath9k_hif_usb_firmware_cb|ath9k_htc_hw_init",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/hif_usb.c=1143=static void ath9k_hif_usb_firmware_fail(struct hif_device_usb *hif_dev)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1158-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1159:static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1160-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1162=static int ath9k_hif_request_firmware(struct hif_device_usb *hif_dev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1216-\t\t\t\t      \u0026hif_dev-\u003eudev-\u003edev, GFP_KERNEL,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1217:\t\t\t\t      hif_dev, ath9k_hif_usb_firmware_cb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1218-\tif (ret)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1225-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1226:static void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1227-{\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1255-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1256:\tret = ath9k_htc_hw_init(hif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1257-\t\t\t\t\u0026hif_dev-\u003einterface-\u003edev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1285=static int send_eject_command(struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1339-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1340:static int ath9k_hif_usb_probe(struct usb_interface *interface,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1341-\t\t\t       const struct usb_device_id *id)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1504=static struct usb_driver ath9k_hif_usb_driver = {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1505-\t.name = KBUILD_MODNAME,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1506:\t.probe = ath9k_hif_usb_probe,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1507-\t.disconnect = ath9k_hif_usb_disconnect,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=523=void ath9k_htc_hw_free(struct htc_target *htc)\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-527-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:528:int ath9k_htc_hw_init(struct htc_target *target,\ndrivers/net/wireless/ath/ath9k/htc_hst.c-529-\t\t      struct device *dev, u16 devid,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.h=224=void ath9k_htc_hw_free(struct htc_target *htc);\ndrivers/net/wireless/ath/ath9k/htc_hst.h:225:int ath9k_htc_hw_init(struct htc_target *target,\ndrivers/net/wireless/ath/ath9k/htc_hst.h-226-\t\t      struct device *dev, u16 devid, char *product,\n"
}

35/2 2026/08/28 17:53 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 66072
							output: 46
							thoughts: 37
						

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

**Diving into the Atheros HTC Driver Initialization**

Okay, time to dig into this Atheros HTC driver code. Specifically, I need to understand how the hardware itself is initialized. The best place to start is `ath9k_htc_hw_init`. That function is probably where the core hardware setup for the Atheros 9k HTC device happens. Let's head over to `drivers/net/wireless/ath/ath9k/htc_hst.c` and take a look. I'm expecting this to be the meat of the initial bring-up sequence. I'll be looking for things like register writes, firmware loading, clock configuration... the usual suspects when getting a wireless chip up and running. I'll need to understand how this function is structured relative to other initialization calls in the overall driver structure. This should tell me a lot.



36/2 2026/08/28 17:53 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/htc_hst.c",
  "FirstLine": 525,
  "LineCount": 50
}

Results:
{
  "Contents": " 525:\t\tkfree(htc);\n 526:\t}\n 527:\t\n 528:\tint ath9k_htc_hw_init(struct htc_target *target,\n 529:\t\t\t      struct device *dev, u16 devid,\n 530:\t\t\t      char *product, u32 drv_info)\n 531:\t{\n 532:\t\tif (ath9k_htc_probe_device(target, dev, devid, product, drv_info)) {\n 533:\t\t\tpr_err(\"Failed to initialize the device\\n\");\n 534:\t\t\treturn -ENODEV;\n 535:\t\t}\n 536:\t\n 537:\t\treturn 0;\n 538:\t}\n 539:\t\n 540:\tvoid ath9k_htc_hw_deinit(struct htc_target *target, bool hot_unplug)\n 541:\t{\n 542:\t\tif (target)\n 543:\t\t\tath9k_htc_disconnect_device(target, hot_unplug);\n 544:\t}\n"
}

37/2 2026/08/28 17:53 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 66662
							output: 48
							thoughts: 41
						

Thoughts:
Okay, let's dive into this. I'm going to pull up `ath9k_htc_probe_device` in `drivers/net/wireless/ath/ath9k/htc_drv_init.c`. I'm curious about the initialization flow for an Atheros AR9000-series device using the HTC (Host Target Communication) interface. I'm specifically interested in how the driver handles device probing. I expect to see the low-level steps – the identification, allocation of resources, and potentially the initial configuration to prepare for operation. I want to understand how the HTC interface is utilized during this probe process; are there specific commands being sent, specific registers accessed, or specific firmware uploads occurring? I’m looking for the key functions and data structures involved, and how they relate to the underlying hardware. Understanding this part is crucial for debugging any subsequent issues that I might encounter with the driver or with related wireless hardware. I'll focus on anything related to resource allocation and initialization of the hardware state, as well as the initial setup of the data paths between the host and the target. I need to refresh my understanding of how the different hardware pieces relate, such as the EEPROM, the device registers, and the firmware loading process.



38/2 2026/08/28 17:53 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/htc_drv_init.c",
  "FirstLine": 930,
  "LineCount": 60
}

Results:
{
  "Contents": " 930:\t\n 931:\tint ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,\n 932:\t\t\t\t   u16 devid, char *product, u32 drv_info)\n 933:\t{\n 934:\t\tstruct hif_device_usb *hif_dev;\n 935:\t\tstruct ath9k_htc_priv *priv;\n 936:\t\tstruct ieee80211_hw *hw;\n 937:\t\tint ret;\n 938:\t\n 939:\t\thw = ieee80211_alloc_hw(sizeof(struct ath9k_htc_priv), \u0026ath9k_htc_ops);\n 940:\t\tif (!hw)\n 941:\t\t\treturn -ENOMEM;\n 942:\t\n 943:\t\tpriv = hw-\u003epriv;\n 944:\t\tpriv-\u003ehw = hw;\n 945:\t\tpriv-\u003ehtc = htc_handle;\n 946:\t\tpriv-\u003edev = dev;\n 947:\t\tSET_IEEE80211_DEV(hw, priv-\u003edev);\n 948:\t\n 949:\t\tret = ath9k_htc_wait_for_target(priv);\n 950:\t\tif (ret)\n 951:\t\t\tgoto err_free;\n 952:\t\n 953:\t\tpriv-\u003ewmi = ath9k_init_wmi(priv);\n 954:\t\tif (!priv-\u003ewmi) {\n 955:\t\t\tret = -EINVAL;\n 956:\t\t\tgoto err_free;\n 957:\t\t}\n 958:\t\n 959:\t\tret = ath9k_init_htc_services(priv, devid, drv_info);\n 960:\t\tif (ret)\n 961:\t\t\tgoto err_init;\n 962:\t\n 963:\t\tret = ath9k_init_device(priv, devid, product, drv_info);\n 964:\t\tif (ret)\n 965:\t\t\tgoto err_init;\n 966:\t\n 967:\t\thtc_handle-\u003edrv_priv = priv;\n 968:\t\n 969:\t\t/* Allow ath9k_wmi_event_tasklet() to operate. */\n 970:\t\tsmp_wmb();\n 971:\t\tpriv-\u003einitialized = true;\n 972:\t\n 973:\t\treturn 0;\n 974:\t\n 975:\terr_init:\n 976:\t\tath9k_stop_wmi(priv);\n 977:\t\thif_dev = htc_handle-\u003ehif_dev;\n 978:\t\tath9k_hif_usb_dealloc_urbs(hif_dev);\n 979:\t\tath9k_destroy_wmi(priv);\n 980:\terr_free:\n 981:\t\tieee80211_free_hw(hw);\n 982:\t\treturn ret;\n 983:\t}\n 984:\t\n 985:\tvoid ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug)\n 986:\t{\n 987:\t\tif (htc_handle-\u003edrv_priv) {\n 988:\t\n 989:\t\t\t/* Check if the device has been yanked out. */\n"
}

39/2 2026/08/28 17:53 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 67932
							output: 182
							thoughts: 1041
						

Thoughts:
**Analysis of the `ath9k_reg_rmw_buffer` Bug for Fuzzing Suitability**

Okay, let's break this down systematically. My primary focus is on the `ath9k_reg_rmw_buffer` function, the target of the bug fix. I need to determine if it's fuzzable and how best to approach that.

First, I identified the key function: `ath9k_reg_rmw_buffer`. It's static within `htc_drv_init.c`, which initially gives me pause. I need to find the entry points that lead to it. I've identified `ath9k_htc_probe_device`, `ath9k_htc_hw_init`, and `ath9k_hif_usb_probe` as non-static possibilities, alongside the potentially inlined `ath9k_reg_rmw_buffer` itself. Based on best practices for fuzzing targets, I will prioritize non-static entry points, since they have distinct symbol addresses, and avoid hot-path functions.

Next, I need to confirm the required configurations. I've tracked down the dependency chain: `ATH9K_HTC` depends on `USB` and `MAC80211`, `WLAN_VENDOR_ATH` depends on `WLAN`, and `WLAN` is a fundamental wireless configuration. These configurations are all standard, and readily available, which is good news for our fuzzing efforts.

I've also examined the `ath9k/Makefile` to understand the build structure and confirm nothing unexpected is going on.

Finally, I've assessed the fuzzability. The patch fixes an incorrect `sizeof` calculation within `ath9k_reg_rmw_buffer`. This directly impacts buffer lengths sent to the firmware for multi-register read-modify-write operations, making it a critical area. This is a USB wireless driver, and thus is readily accessible for USB fuzzing (e.g., via syzkaller's USB raw gadget functionality). Given the clear bug, the USB accessibility, and the importance of buffer handling, this is definitely worth fuzzing.

Therefore, here's my recommended configuration:

*   **WorthFuzzing**: `true`
*   **FocusSymbols**: `["ath9k_reg_rmw_buffer", "ath9k_htc_probe_device", "ath9k_htc_hw_init"]` (I'm including both the target function and entry points, with `ath9k_htc_hw_init` being the preferred entry point.)
*   **EnableConfigs**: `["ATH9K_HTC", "USB", "MAC80211", "WLAN", "WLAN_VENDOR_ATH"]`
*   **Reasoning**: The bug is a critical size calculation error in a USB wireless driver that can be reached and fuzzed via USB, leading to incorrect buffer lengths passed to firmware during read-modify-write operations.



40/2 2026/08/28 17:54 tool set-results
0m Args:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "USB",
    "MAC80211",
    "WLAN",
    "WLAN_VENDOR_ATH"
  ],
  "FocusSymbols": [
    "ath9k_reg_rmw_buffer",
    "ath9k_htc_probe_device",
    "ath9k_htc_hw_init"
  ],
  "Reasoning": "The patch fixes a bug in the ath9k_htc USB WiFi driver where the buffer size in ath9k_reg_rmw_buffer() was computed using sizeof(struct register_write) instead of sizeof(struct register_rmw). This resulted in sending truncated payloads to the firmware during batch register RMW operations. The code is reachable and fuzzable via USB emulation.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "ATH9K_HTC",
    "USB",
    "MAC80211",
    "WLAN",
    "WLAN_VENDOR_ATH"
  ],
  "FocusSymbols": [
    "ath9k_reg_rmw_buffer",
    "ath9k_htc_probe_device",
    "ath9k_htc_hw_init"
  ],
  "Reasoning": "The patch fixes a bug in the ath9k_htc USB WiFi driver where the buffer size in ath9k_reg_rmw_buffer() was computed using sizeof(struct register_write) instead of sizeof(struct register_rmw). This resulted in sending truncated payloads to the firmware during batch register RMW operations. The code is reachable and fuzzable via USB emulation.",
  "WorthFuzzing": true
}

41/1 2026/08/28 17:54 action If
3m Args:
{
  "WorthFuzzing": true
}

Results:
null

42/2 2026/08/28 17:54 agent kmsan-evaluator
3m Model:
core

Args:
null

Results:
{
  "KMSANReasoning": "The patch corrects a sizeof calculation bug in ath9k_reg_rmw_buffer() where sizeof(struct register_write) (8 bytes) was mistakenly used instead of sizeof(struct register_rmw) (12 bytes) when passing the buffer length for WMI_REG_RMW_CMDID to ath9k_wmi_cmd(). \n\nAll elements of the multi_rmw array up to multi_rmw_idx (which is MAX_RMW_CMD_NUMBER = 15 when flushing) are explicitly populated with reg, set, and clr values, and struct register_rmw is a packed structure with no padding holes. The data is copied into an skb and sent to the device firmware, not copied to user space or used in uninitialized conditionals. \n\nThere is no risk of uninitialized memory reads or information leaks. Standard KASAN builds are sufficient to monitor bounds and memory safety for this driver path, and a dedicated KMSAN session is not required.",
  "NeedsKMSAN": false
}

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

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

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

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

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

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

Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
For your convenience, here is the diff of the changes:
commit 991259fc965b9e37c2fbd5ed380700a886902c21
Author: syz-cluster <triage@syzkaller.com>
Date:   Fri Aug 28 17:49:56 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 6de78ae857268..0b49d2cc99f0b 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -405,7 +405,7 @@ static void ath9k_reg_rmw_buffer(void *hw_priv,
 	if (priv->wmi->multi_rmw_idx == MAX_RMW_CMD_NUMBER) {
 		r = ath9k_wmi_cmd(priv->wmi, WMI_REG_RMW_CMDID,
 			  (u8 *) &priv->wmi->multi_rmw,
-			  sizeof(struct register_write) * priv->wmi->multi_rmw_idx,
+			  sizeof(struct register_rmw) * priv->wmi->multi_rmw_idx,
 			  (u8 *) &rsp_status, sizeof(rsp_status),
 			  100);
 		if (unlikely(r)) {

43/3 2026/08/28 17:54 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 2195
							output: 115
							thoughts: 186
						

Thoughts:
**Evaluating the Need for KMSAN Fuzzing**

Okay, so I've been asked to assess this patch to `drivers/net/wireless/ath/ath9k/htc_drv_init.c` and decide if it warrants a dedicated KMSAN fuzzing session, beyond the KASAN coverage we already have. Time to put on the risk assessment hat.

This is a pretty low-stakes scenario, all things considered. It's a defensive code analysis task, essentially a code review and security engineering exercise to evaluate the best sanitizer for the job. There's no hint of offensive activity here, no potential for malware generation or exploit payload development. We're purely in the realm of ensuring code robustness. The "allowed actions" are straightforward: inspect the code, analyze the memory sanitizer requirements, and ultimately call `set-results`.

My plan is to dig into the code itself. I need to take a look at `drivers/net/wireless/ath/ath9k/htc_drv_init.c`, specifically, and also examine `ath9k_reg_rmw_buffer`, and the relevant struct definitions to get a clear picture of the changes and the data structures involved. That's the first step in determining if KMSAN is *really* needed or if KASAN is sufficient. I need to understand the memory access patterns, especially related to the wireless driver. From there, I can determine if we are seeing a sufficient risk level to deploy KMSAN.



44/3 2026/08/28 17:54 tool grepper
0m Args:
{
  "Expression": "ath9k_reg_rmw_buffer",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=367=static void ath9k_regwrite_flush(void *hw_priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-382-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:383:static void ath9k_reg_rmw_buffer(void *hw_priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-384-\t\t\t\t u32 reg_offset, u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=489=static u32 ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-506-\tif (atomic_read(\u0026priv-\u003ewmi-\u003em_rmw_cnt))\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:507:\t\tath9k_reg_rmw_buffer(hw_priv, reg_offset, set, clr);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-508-\telse\n"
}

45/3 2026/08/28 17:54 tool grepper
0m Args:
{
  "Expression": "struct register_rmw",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=383=static void ath9k_reg_rmw_buffer(void *hw_priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-407-\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:408:\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-409-\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=422=static void ath9k_reg_rmw_flush(void *hw_priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-439-\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:440:\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-441-\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=466=static void ath9k_reg_rmw_single(void *hw_priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-471-\tstruct ath9k_htc_priv *priv = common-\u003epriv;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:472:\tstruct register_rmw buf, buf_ret;\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-473-\tint ret;\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=131=struct register_write {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-135-\ndrivers/net/wireless/ath/ath9k/wmi.h:136:struct register_rmw {\ndrivers/net/wireless/ath/ath9k/wmi.h-137-\t__be32 reg;\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=148=struct wmi {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-174-\tatomic_t m_rmw_cnt;\ndrivers/net/wireless/ath/ath9k/wmi.h:175:\tstruct register_rmw multi_rmw[MAX_RMW_CMD_NUMBER];\ndrivers/net/wireless/ath/ath9k/wmi.h-176-\tu32 multi_rmw_idx;\n"
}

46/3 2026/08/28 17:54 tool grepper
0m Args:
{
  "Expression": "struct register_write",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath9k/htc_drv_init.c=283=static void ath9k_regwrite_multi(struct ath_common *common)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-290-\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_write,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:291:\t\t\t  sizeof(struct register_write) * priv-\u003ewmi-\u003emulti_write_idx,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-292-\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=118=enum wmi_event_id {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-130-\ndrivers/net/wireless/ath/ath9k/wmi.h:131:struct register_write {\ndrivers/net/wireless/ath/ath9k/wmi.h-132-\t__be32 reg;\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=148=struct wmi {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-168-\tatomic_t mwrite_cnt;\ndrivers/net/wireless/ath/ath9k/wmi.h:169:\tstruct register_write multi_write[MAX_CMD_NUMBER];\ndrivers/net/wireless/ath/ath9k/wmi.h-170-\tu32 multi_write_idx;\n"
}

47/3 2026/08/28 17:54 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 4387
							output: 92
							thoughts: 68
						

Thoughts:
**Diving into the Atheros Codebase**

Okay, so I need to refresh my memory on how the ath9k driver interacts with the HTC interface, specifically during initialization. My gut tells me there's something related to the way the WMI commands are handled.

Let's start by looking at `drivers/net/wireless/ath/ath9k/htc_drv_init.c`, around lines 380 to 450. I'm focusing on that section because it's usually where the HTC driver is set up, probably where the device gets probed or configured. I want to see how the connection is established. It is probably important for understanding the context of the issue.

Then, to get a better handle on the WMI interface itself, I need to jump over to `drivers/net/wireless/ath/ath9k/wmi.h`, lines 130 to 180. That should give me the definitions of the WMI commands and structures involved during the initial setup phase. Knowing the structures here would be key to debugging. I need to understand what the driver expects from the firmware and vice-versa.



48/3 2026/08/28 17:55 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/htc_drv_init.c",
  "FirstLine": 380,
  "LineCount": 80
}

Results:
{
  "Contents": " 380:\t\tmutex_unlock(\u0026priv-\u003ewmi-\u003emulti_write_mutex);\n 381:\t}\n 382:\t\n 383:\tstatic void ath9k_reg_rmw_buffer(void *hw_priv,\n 384:\t\t\t\t\t u32 reg_offset, u32 set, u32 clr)\n 385:\t{\n 386:\t\tstruct ath_hw *ah = hw_priv;\n 387:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 388:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 389:\t\tu32 rsp_status;\n 390:\t\tint r;\n 391:\t\n 392:\t\tmutex_lock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 393:\t\n 394:\t\t/* Store the register/value */\n 395:\t\tpriv-\u003ewmi-\u003emulti_rmw[priv-\u003ewmi-\u003emulti_rmw_idx].reg =\n 396:\t\t\tcpu_to_be32(reg_offset);\n 397:\t\tpriv-\u003ewmi-\u003emulti_rmw[priv-\u003ewmi-\u003emulti_rmw_idx].set =\n 398:\t\t\tcpu_to_be32(set);\n 399:\t\tpriv-\u003ewmi-\u003emulti_rmw[priv-\u003ewmi-\u003emulti_rmw_idx].clr =\n 400:\t\t\tcpu_to_be32(clr);\n 401:\t\n 402:\t\tpriv-\u003ewmi-\u003emulti_rmw_idx++;\n 403:\t\n 404:\t\t/* If the buffer is full, send it out. */\n 405:\t\tif (priv-\u003ewmi-\u003emulti_rmw_idx == MAX_RMW_CMD_NUMBER) {\n 406:\t\t\tr = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_RMW_CMDID,\n 407:\t\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\n 408:\t\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\n 409:\t\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n 410:\t\t\t\t  100);\n 411:\t\t\tif (unlikely(r)) {\n 412:\t\t\t\tath_dbg(common, WMI,\n 413:\t\t\t\t\t\"REGISTER RMW FAILED, multi len: %d\\n\",\n 414:\t\t\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx);\n 415:\t\t\t}\n 416:\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx = 0;\n 417:\t\t}\n 418:\t\n 419:\t\tmutex_unlock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 420:\t}\n 421:\t\n 422:\tstatic void ath9k_reg_rmw_flush(void *hw_priv)\n 423:\t{\n 424:\t\tstruct ath_hw *ah = hw_priv;\n 425:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 426:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 427:\t\tu32 rsp_status;\n 428:\t\tint r;\n 429:\t\n 430:\t\tif (test_bit(HTC_FWFLAG_NO_RMW, \u0026priv-\u003efw_flags))\n 431:\t\t\treturn;\n 432:\t\n 433:\t\tatomic_dec(\u0026priv-\u003ewmi-\u003em_rmw_cnt);\n 434:\t\n 435:\t\tmutex_lock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 436:\t\n 437:\t\tif (priv-\u003ewmi-\u003emulti_rmw_idx) {\n 438:\t\t\tr = ath9k_wmi_cmd(priv-\u003ewmi, WMI_REG_RMW_CMDID,\n 439:\t\t\t\t  (u8 *) \u0026priv-\u003ewmi-\u003emulti_rmw,\n 440:\t\t\t\t  sizeof(struct register_rmw) * priv-\u003ewmi-\u003emulti_rmw_idx,\n 441:\t\t\t\t  (u8 *) \u0026rsp_status, sizeof(rsp_status),\n 442:\t\t\t\t  100);\n 443:\t\t\tif (unlikely(r)) {\n 444:\t\t\t\tath_dbg(common, WMI,\n 445:\t\t\t\t\t\"REGISTER RMW FAILED, multi len: %d\\n\",\n 446:\t\t\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx);\n 447:\t\t\t}\n 448:\t\t\tpriv-\u003ewmi-\u003emulti_rmw_idx = 0;\n 449:\t\t}\n 450:\t\n 451:\t\tmutex_unlock(\u0026priv-\u003ewmi-\u003emulti_rmw_mutex);\n 452:\t}\n 453:\t\n 454:\tstatic void ath9k_enable_rmw_buffer(void *hw_priv)\n 455:\t{\n 456:\t\tstruct ath_hw *ah = hw_priv;\n 457:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 458:\t\tstruct ath9k_htc_priv *priv = common-\u003epriv;\n 459:\t\n"
}

49/3 2026/08/28 17:55 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/wmi.h",
  "FirstLine": 125,
  "LineCount": 60
}

Results:
{
  "Contents": " 125:\t\tWMI_TXSTATUS_EVENTID,\n 126:\t};\n 127:\t\n 128:\t#define MAX_CMD_NUMBER 62\n 129:\t#define MAX_RMW_CMD_NUMBER 15\n 130:\t\n 131:\tstruct register_write {\n 132:\t\t__be32 reg;\n 133:\t\t__be32 val;\n 134:\t};\n 135:\t\n 136:\tstruct register_rmw {\n 137:\t\t__be32 reg;\n 138:\t\t__be32 set;\n 139:\t\t__be32 clr;\n 140:\t} __packed;\n 141:\t\n 142:\tstruct ath9k_htc_tx_event {\n 143:\t\tint count;\n 144:\t\tstruct __wmi_event_txstatus txs;\n 145:\t\tstruct list_head list;\n 146:\t};\n 147:\t\n 148:\tstruct wmi {\n 149:\t\tstruct ath9k_htc_priv *drv_priv;\n 150:\t\tstruct htc_target *htc;\n 151:\t\tenum htc_endpoint_id ctrl_epid;\n 152:\t\tstruct mutex op_mutex;\n 153:\t\tstruct completion cmd_wait;\n 154:\t\tu16 last_seq_id;\n 155:\t\tstruct sk_buff_head wmi_event_queue;\n 156:\t\tstruct tasklet_struct wmi_event_tasklet;\n 157:\t\tu16 tx_seq_id;\n 158:\t\tu8 *cmd_rsp_buf;\n 159:\t\tu32 cmd_rsp_len;\n 160:\t\tbool stopped;\n 161:\t\n 162:\t\tstruct list_head pending_tx_events;\n 163:\t\tspinlock_t event_lock;\n 164:\t\n 165:\t\tspinlock_t wmi_lock;\n 166:\t\n 167:\t\t/* multi write section */\n 168:\t\tatomic_t mwrite_cnt;\n 169:\t\tstruct register_write multi_write[MAX_CMD_NUMBER];\n 170:\t\tu32 multi_write_idx;\n 171:\t\tstruct mutex multi_write_mutex;\n 172:\t\n 173:\t\t/* multi rmw section */\n 174:\t\tatomic_t m_rmw_cnt;\n 175:\t\tstruct register_rmw multi_rmw[MAX_RMW_CMD_NUMBER];\n 176:\t\tu32 multi_rmw_idx;\n 177:\t\tstruct mutex multi_rmw_mutex;\n 178:\t\n 179:\t};\n 180:\t\n 181:\tstruct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv);\n 182:\tint ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,\n 183:\t\t\t      enum htc_endpoint_id *wmi_ctrl_epid);\n 184:\tint ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,\n"
}

50/3 2026/08/28 17:55 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 7066
							output: 41
							thoughts: 824
						

Thoughts:
**Analyzing the RMW Command Bug in ath9k Driver**

Okay, let's break this down. The core issue seems to be a copy-paste error in `ath9k_reg_rmw_buffer`. It was using the size of `struct register_write` (8 bytes) when calculating the command length, but it should have been using `struct register_rmw` (12 bytes).  We see this discrepancy because `ath9k_reg_rmw_flush` was already correctly using the 12-byte size.  Essentially, when `multi_rmw_idx` hit the maximum value (15), we were sending 120 bytes (8 * 15) instead of the expected 180 bytes (12 * 15) to the firmware.

Now, let's think about the implications.  The `multi_rmw` buffer, within the `wmi` struct, is sized at 180 bytes (15 * 12).  We're populating all 15 elements of this buffer sequentially in a loop, writing the `reg`, `set`, and `clr` fields for each `struct register_rmw`.  Given the nature of the packed `struct register_rmw` (three `__be32` fields, no padding), and the fact that the buffer is either kzalloc'd or initialized sequentially, there's *no* risk of reading uninitialized memory. Every element up to `multi_rmw_idx - 1` is written before the index increments. When we reach the max index all elements are fully initialized.

It's clear that the bug was just a truncation. We're sending an incomplete RMW command to the firmware. The firmware itself then expects a full 180 bytes. Any out-of-bounds or memory access issues at the array level (and the buffer sizes are known) would be caught by KASAN. We are not copying data to user space. There are no conditionals that might use uninitialized variables and no potential for information leakage. The fix, therefore, is straightforward: correct the size calculation in `ath9k_reg_rmw_buffer` to reflect the correct structure size (12 bytes) and ensure that we always send the full 180-byte RMW command to the device firmware when flushing a full buffer. And we can verify that the size of the command passed to `ath9k_wmi_cmd` is correctly calculated after this change.



51/3 2026/08/28 17:56 tool grepper
0m Args:
{
  "Expression": "int ath9k_wmi_cmd",
  "PathPrefix": "drivers/net/wireless/ath/ath9k/"
}

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

52/3 2026/08/28 17:56 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 8915
							output: 44
							thoughts: 21
						

Thoughts:
Here's my take on the thought process, summarized as you requested:

**Diving into the Atheros Driver's WMI Implementation**

Okay, so we need to get into the weeds of the Atheros driver, specifically the `ath9k` module. My gut tells me there's something amiss related to the WMI commands. Let's start by zeroing in on `wmi.c`, that's where the heart of the WMI interaction should be. Specifically, I need to understand what's happening around the `ath9k_wmi_cmd` function. That function is clearly a key entry point for issuing commands over the WMI interface, and understanding its arguments, how it constructs the messages, how it handles the responses...that's where I should be able to get a solid grasp on what's going on and where things might be breaking down. I'll start there and work outward, tracing the calls and data flows.



53/3 2026/08/28 17:56 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/ath/ath9k/wmi.c",
  "FirstLine": 309,
  "LineCount": 40
}

Results:
{
  "Contents": " 309:\t\n 310:\tint ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,\n 311:\t\t\t  u8 *cmd_buf, u32 cmd_len,\n 312:\t\t\t  u8 *rsp_buf, u32 rsp_len,\n 313:\t\t\t  u32 timeout)\n 314:\t{\n 315:\t\tstruct ath_hw *ah = wmi-\u003edrv_priv-\u003eah;\n 316:\t\tstruct ath_common *common = ath9k_hw_common(ah);\n 317:\t\tu16 headroom = sizeof(struct htc_frame_hdr) +\n 318:\t\t\t       sizeof(struct wmi_cmd_hdr);\n 319:\t\tunsigned long time_left, flags;\n 320:\t\tstruct sk_buff *skb;\n 321:\t\tint ret = 0;\n 322:\t\n 323:\t\tif (ah-\u003eah_flags \u0026 AH_UNPLUGGED)\n 324:\t\t\treturn 0;\n 325:\t\n 326:\t\tskb = alloc_skb(headroom + cmd_len, GFP_ATOMIC);\n 327:\t\tif (!skb)\n 328:\t\t\treturn -ENOMEM;\n 329:\t\n 330:\t\tskb_reserve(skb, headroom);\n 331:\t\n 332:\t\tif (cmd_len != 0 \u0026\u0026 cmd_buf != NULL) {\n 333:\t\t\tskb_put_data(skb, cmd_buf, cmd_len);\n 334:\t\t}\n 335:\t\n 336:\t\tmutex_lock(\u0026wmi-\u003eop_mutex);\n 337:\t\n 338:\t\t/* check if wmi stopped flag is set */\n 339:\t\tif (unlikely(wmi-\u003estopped)) {\n 340:\t\t\tret = -EPROTO;\n 341:\t\t\tgoto out;\n 342:\t\t}\n 343:\t\n 344:\t\tret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len, rsp_buf, rsp_len);\n 345:\t\tif (ret)\n 346:\t\t\tgoto out;\n 347:\t\n 348:\t\ttime_left = wait_for_completion_timeout(\u0026wmi-\u003ecmd_wait, timeout);\n"
}

54/3 2026/08/28 17:56 llm kmsan-evaluator
1m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 9823
							output: 236
							thoughts: 314
						

Thoughts:
**My Assessment of the KMSAN Implications**

Okay, let's break this down. My initial observation is that `cmd_buf` is pointing directly at `priv->wmi->multi_rmw`, and we know that array has 15 elements written to it. Crucially, each element's fields are *initialized* before we even think about sending anything. The `skb_put_data` call simply copies `sizeof(struct register_rmw) * 15` bytes from `cmd_buf` into the socket buffer (`skb`).

My analysis needs to confirm that there's *no* uninitialized memory being read, and therefore no risk of information leakage to userspace.

To solidify my conclusion, I’m mentally checking:

*   **Patch Context**: This is a typo fix in `ath9k_reg_rmw_buffer()`. We're correcting the size calculation for the WMI command payload. Instead of `sizeof(struct register_write)`, it should be `sizeof(struct register_rmw)`. This is a size issue.
*   **Initialization**: All 15 entries within `priv->wmi->multi_rmw` are explicitly initialized with `reg`, `set`, and `clr` values before being sent. This is key.
*   **Packing**: `struct register_rmw` is packed, so we don't need to worry about uninitialized padding bytes within the structure itself.
*   **Transmission Path**: The payload goes to the device firmware via the WMI skb. *Nothing* is copied to userspace, which would be the major concern.
*   **Memory Domains**: We're not reading any uninitialized heap, stack, or page memory, and we certainly aren't branching based on the contents. There's no possible leak to userspace in this flow.
*   **Bounds Checks**: Any potential buffer overflows or out-of-bounds accesses are already handled by KASAN.

Given all of this, I'm confident that `NeedsKMSAN` should be `false`. Now, let's run `set-results` and document my analysis with the tool.



55/3 2026/08/28 17:57 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch corrects a sizeof calculation bug in ath9k_reg_rmw_buffer() where sizeof(struct register_write) (8 bytes) was mistakenly used instead of sizeof(struct register_rmw) (12 bytes) when passing the buffer length for WMI_REG_RMW_CMDID to ath9k_wmi_cmd(). \n\nAll elements of the multi_rmw array up to multi_rmw_idx (which is MAX_RMW_CMD_NUMBER = 15 when flushing) are explicitly populated with reg, set, and clr values, and struct register_rmw is a packed structure with no padding holes. The data is copied into an skb and sent to the device firmware, not copied to user space or used in uninitialized conditionals. \n\nThere is no risk of uninitialized memory reads or information leaks. Standard KASAN builds are sufficient to monitor bounds and memory safety for this driver path, and a dedicated KMSAN session is not required.",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch corrects a sizeof calculation bug in ath9k_reg_rmw_buffer() where sizeof(struct register_write) (8 bytes) was mistakenly used instead of sizeof(struct register_rmw) (12 bytes) when passing the buffer length for WMI_REG_RMW_CMDID to ath9k_wmi_cmd(). \n\nAll elements of the multi_rmw array up to multi_rmw_idx (which is MAX_RMW_CMD_NUMBER = 15 when flushing) are explicitly populated with reg, set, and clr values, and struct register_rmw is a packed structure with no padding holes. The data is copied into an skb and sent to the device firmware, not copied to user space or used in uninitialized conditionals. \n\nThere is no risk of uninitialized memory reads or information leaks. Standard KASAN builds are sufficient to monitor bounds and memory safety for this driver path, and a dedicated KMSAN session is not required.",
  "NeedsKMSAN": false
}

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