| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/01 02:19 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": [
"ATH9K_HTC",
"USB",
"MAC80211",
"WLAN",
"WLAN_VENDOR_ATH"
],
"FocusSymbols": [
"ath9k_htc_tx_start",
"ath9k_htc_txcompletion_cb",
"htc_send",
"ath9k_htc_txstatus"
],
"KMSANReasoning": "The patch modifies `__hif_usb_tx()` in the ath9k wireless USB driver (`drivers/net/wireless/ath/ath9k/hif_usb.c`) to prevent buffer overflow (`MAX_TX_BUF_SIZE`) during skb aggregation and safely handle skb dequeueing when aggregating packets for transmission over USB.\n\nThese changes address bounds checking and out-of-bounds buffer writes, which are tracked and detected by standard KASAN. The patch does not introduce or modify any uninitialized stack/heap memory, struct padding, or kernel-to-userspace copying routines (`copy_to_user`, netlink, socket options, etc.). Therefore, a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies TX packet aggregation and buffer length calculations in __hif_usb_tx in the ath9k_htc USB driver, preventing potential buffer overflow when aggregating skbs for USB URB transmission. This affects reachable wireless TX logic emulatable via USB fuzzing.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/01 02:19 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 7271941b22017789e4dd04058b9405539ea22c8b\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Sep 1 02:19:27 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c\nindex 47f904e7e6529..029357c57a370 100644\n--- a/drivers/net/wireless/ath/ath9k/hif_usb.c\n+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c\n@@ -328,32 +328,35 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)\n \ttx_skb_cnt = min_t(u16, hif_dev-\u003etx.tx_skb_cnt, MAX_TX_AGGR_NUM);\n \n \tfor (i = 0; i \u003c tx_skb_cnt; i++) {\n-\t\tnskb = __skb_dequeue(\u0026hif_dev-\u003etx.tx_skb_queue);\n+\t\tnskb = skb_peek(\u0026hif_dev-\u003etx.tx_skb_queue);\n+\t\tif (!nskb)\n+\t\t\tbreak;\n \n-\t\t/* Should never be NULL */\n-\t\tBUG_ON(!nskb);\n+\t\tif (tx_buf-\u003eoffset + nskb-\u003elen + 4 \u003e MAX_TX_BUF_SIZE)\n+\t\t\tbreak;\n \n+\t\tnskb = __skb_dequeue(\u0026hif_dev-\u003etx.tx_skb_queue);\n \t\thif_dev-\u003etx.tx_skb_cnt--;\n \n-\t\tbuf = tx_buf-\u003ebuf;\n-\t\tbuf += tx_buf-\u003eoffset;\n+\t\tbuf = tx_buf-\u003ebuf + tx_buf-\u003eoffset;\n \t\thdr = (__le16 *)buf;\n \t\t*hdr++ = cpu_to_le16(nskb-\u003elen);\n \t\t*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);\n-\t\tbuf += 4;\n-\t\tmemcpy(buf, nskb-\u003edata, nskb-\u003elen);\n-\t\ttx_buf-\u003elen = nskb-\u003elen + 4;\n-\n-\t\tif (i \u003c (tx_skb_cnt - 1))\n-\t\t\ttx_buf-\u003eoffset += (((tx_buf-\u003elen - 1) / 4) + 1) * 4;\n+\t\tmemcpy(buf + 4, nskb-\u003edata, nskb-\u003elen);\n \n-\t\tif (i == (tx_skb_cnt - 1))\n-\t\t\ttx_buf-\u003elen += tx_buf-\u003eoffset;\n+\t\ttx_buf-\u003elen = tx_buf-\u003eoffset + nskb-\u003elen + 4;\n+\t\ttx_buf-\u003eoffset += (((tx_buf-\u003elen - 1) / 4) + 1) * 4;\n \n \t\t__skb_queue_tail(\u0026tx_buf-\u003eskb_queue, nskb);\n \t\tTX_STAT_INC(hif_dev, skb_queued);\n \t}\n \n+\tif (!i) {\n+\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\n+\t\thif_dev-\u003etx.tx_buf_cnt++;\n+\t\treturn 0;\n+\t}\n+\n \tusb_fill_bulk_urb(tx_buf-\u003eurb, hif_dev-\u003eudev,\n \t\t\t usb_sndbulkpipe(hif_dev-\u003eudev, USB_WLAN_TX_PIPE),\n \t\t\t tx_buf-\u003ebuf, tx_buf-\u003elen,\n"
} |
| 2/1 | 2026/09/01 02:19 | agent | patch-evaluator |
2mModel:core Args: null Results: {
"EnableConfigs": [
"ATH9K_HTC",
"USB",
"MAC80211",
"WLAN",
"WLAN_VENDOR_ATH"
],
"FocusSymbols": [
"ath9k_htc_tx_start",
"ath9k_htc_txcompletion_cb",
"htc_send",
"ath9k_htc_txstatus"
],
"Reasoning": "The patch modifies TX packet aggregation and buffer length calculations in __hif_usb_tx in the ath9k_htc USB driver, preventing potential buffer overflow when aggregating skbs for USB URB transmission. This affects reachable wireless TX logic emulatable via USB fuzzing.",
"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 7271941b22017789e4dd04058b9405539ea22c8b
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Sep 1 02:19:27 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 47f904e7e6529..029357c57a370 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -328,32 +328,35 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
tx_skb_cnt = min_t(u16, hif_dev->tx.tx_skb_cnt, MAX_TX_AGGR_NUM);
for (i = 0; i < tx_skb_cnt; i++) {
- nskb = __skb_dequeue(&hif_dev->tx.tx_skb_queue);
+ nskb = skb_peek(&hif_dev->tx.tx_skb_queue);
+ if (!nskb)
+ break;
- /* Should never be NULL */
- BUG_ON(!nskb);
+ if (tx_buf->offset + nskb->len + 4 > MAX_TX_BUF_SIZE)
+ break;
+ nskb = __skb_dequeue(&hif_dev->tx.tx_skb_queue);
hif_dev->tx.tx_skb_cnt--;
- buf = tx_buf->buf;
- buf += tx_buf->offset;
+ buf = tx_buf->buf + tx_buf->offset;
hdr = (__le16 *)buf;
*hdr++ = cpu_to_le16(nskb->len);
*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);
- buf += 4;
- memcpy(buf, nskb->data, nskb->len);
- tx_buf->len = nskb->len + 4;
-
- if (i < (tx_skb_cnt - 1))
- tx_buf->offset += (((tx_buf->len - 1) / 4) + 1) * 4;
+ memcpy(buf + 4, nskb->data, nskb->len);
- if (i == (tx_skb_cnt - 1))
- tx_buf->len += tx_buf->offset;
+ tx_buf->len = tx_buf->offset + nskb->len + 4;
+ tx_buf->offset += (((tx_buf->len - 1) / 4) + 1) * 4;
__skb_queue_tail(&tx_buf->skb_queue, nskb);
TX_STAT_INC(hif_dev, skb_queued);
}
+ if (!i) {
+ list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
+ hif_dev->tx.tx_buf_cnt++;
+ return 0;
+ }
+
usb_fill_bulk_urb(tx_buf->urb, hif_dev->udev,
usb_sndbulkpipe(hif_dev->udev, USB_WLAN_TX_PIPE),
tx_buf->buf, tx_buf->len,
|
| 3/2 | 2026/09/01 02:19 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2753 output: 37 thoughts: 528 Thoughts: **Patch Evaluation Thought Process** Okay, first things first, let's get a handle on this patch series. My initial assessment is that the request is benign; it's a straightforward kernel patch evaluation specifically for fuzz testing purposes. I need to determine if this is a suitable candidate for fuzzing. My primary focus right now is on that specific diff, `drivers/net/wireless/ath/ath9k/hif_usb.c`, specifically the `__hif_usb_tx(struct hif_device_usb *hif_dev)` function. The question I need to answer is, can I reach the `ath9k_htc` and `ath9k` USB driver within a virtualized environment? QEMU is the obvious starting point, but I also need to consider if USB emulation, such as Raw Gadget or similar methods, is viable. Ah, syzkaller! Doesn't it have USB fuzzing support via Dummy HCD and Raw Gadget? That could be a key here. Before I jump to conclusions, I need to verify a few things. How is `ath9k_htc` built? What are the relevant Kconfig options? Is this code reachable? Could it be tied to vendor hardware that isn't easily emulated? Wait, I need to consult the evaluation instructions. Let me refresh my memory of the criteria for a "WorthFuzzing=false" determination. It's things like documentation changes, logging modifications, cosmetic changes to constants, unreachable code paths in virtualized environments (including emulated hardware like USB Gadget or mac80211_hwsim), vendor-specific PCIe driver code requiring physical hardware, and teardown callbacks only executed during hot-unplug operations. Alright, that's clear. Now I need to proactively determine if `drivers/net/wireless/ath/ath9k/` is something I can actually execute. I'll need to use grepper and read the relevant files, specifically within `drivers/net/wireless/ath/ath9k/`, and dive into the Makefile and Kconfig to figure out the build process. Only then can I determine if this change affects reachable code and is therefore worth fuzzing. |
| 4/2 | 2026/09/01 02:19 | tool | grepper |
0mArgs:{
"Expression": "ATH9K_HTC",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/Kconfig=13=config ATH9K_BTCOEX_SUPPORT\ndrivers/net/wireless/ath/ath9k/Kconfig-14-\tbool \"Atheros bluetooth coexistence support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:15:\tdepends on (ATH9K || ATH9K_HTC)\ndrivers/net/wireless/ath/ath9k/Kconfig-16-\tdefault y\n--\ndrivers/net/wireless/ath/ath9k/Kconfig=156=config ATH9K_PCI_NO_EEPROM\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-171-\ndrivers/net/wireless/ath/ath9k/Kconfig:172:config ATH9K_HTC\ndrivers/net/wireless/ath/ath9k/Kconfig-173-\ttristate \"Atheros HTC based wireless cards support\"\n--\ndrivers/net/wireless/ath/ath9k/Kconfig-186-\ndrivers/net/wireless/ath/ath9k/Kconfig:187:config ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-188-\tbool \"Atheros ath9k_htc debugging\"\ndrivers/net/wireless/ath/ath9k/Kconfig:189:\tdepends on ATH9K_HTC \u0026\u0026 DEBUG_FS\ndrivers/net/wireless/ath/ath9k/Kconfig-190-\tselect ATH9K_COMMON_DEBUG\n--\ndrivers/net/wireless/ath/ath9k/Kconfig=206=config ATH9K_COMMON_SPECTRAL\ndrivers/net/wireless/ath/ath9k/Kconfig-207-\tbool \"Atheros ath9k/ath9k_htc spectral scan support\"\ndrivers/net/wireless/ath/ath9k/Kconfig:208:\tdepends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/Kconfig-209-\tselect RELAY\n--\ndrivers/net/wireless/ath/ath9k/Makefile=68=ath9k_htc-y +=\thtc_hst.o \\\n--\ndrivers/net/wireless/ath/ath9k/Makefile-76-\ndrivers/net/wireless/ath/ath9k/Makefile:77:ath9k_htc-$(CONFIG_ATH9K_HTC_DEBUGFS) += htc_drv_debug.o\ndrivers/net/wireless/ath/ath9k/Makefile-78-\ndrivers/net/wireless/ath/ath9k/Makefile:79:obj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o\ndrivers/net/wireless/ath/ath9k/Makefile-80-\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c=3390=static bool ath9k_hw_ar9300_fill_eeprom(struct ath_hw *ah)\n--\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3400-\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3401:#if defined(CONFIG_ATH9K_DEBUGFS) || defined(CONFIG_ATH9K_HTC_DEBUGFS)\ndrivers/net/wireless/ath/ath9k/ar9003_eeprom.c-3402-static u32 ar9003_dump_modal_eeprom(char *buf, u32 len, u32 size,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=232=static inline void ath9k_skb_queue_complete(struct hif_device_usb *hif_dev,\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-238-\twhile ((skb = __skb_dequeue(queue)) != NULL) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:239:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/hif_usb.c-240-\t\tint ln = skb-\u003elen;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=379=static int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-402-\t/* Mgmt/Beacon frames don't use the TX buffer pool */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:403:\tif ((tx_ctl-\u003etype == ATH9K_HTC_MGMT) ||\ndrivers/net/wireless/ath/ath9k/hif_usb.c:404:\t (tx_ctl-\u003etype == ATH9K_HTC_BEACON)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-405-\t\tret = hif_usb_send_mgmt(hif_dev, skb);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-409-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:410:\tif ((tx_ctl-\u003etype == ATH9K_HTC_NORMAL) ||\ndrivers/net/wireless/ath/ath9k/hif_usb.c:411:\t (tx_ctl-\u003etype == ATH9K_HTC_AMPDU)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-412-\t\t__skb_queue_tail(\u0026hif_dev-\u003etx.tx_skb_queue, skb);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=490=static inline bool check_index(struct sk_buff *skb, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-495-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:496:\tif ((tx_ctl-\u003etype == ATH9K_HTC_AMPDU) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/hif_usb.c-497-\t (tx_ctl-\u003esta_idx == idx))\n--\ndrivers/net/wireless/ath/ath9k/htc.h=56=enum htc_opmode {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-64-\ndrivers/net/wireless/ath/ath9k/htc.h:65:#define ATH9K_HTC_AMPDU 1\ndrivers/net/wireless/ath/ath9k/htc.h:66:#define ATH9K_HTC_NORMAL 2\ndrivers/net/wireless/ath/ath9k/htc.h:67:#define ATH9K_HTC_BEACON 3\ndrivers/net/wireless/ath/ath9k/htc.h:68:#define ATH9K_HTC_MGMT 4\ndrivers/net/wireless/ath/ath9k/htc.h-69-\ndrivers/net/wireless/ath/ath9k/htc.h:70:#define ATH9K_HTC_TX_CTSONLY 0x1\ndrivers/net/wireless/ath/ath9k/htc.h:71:#define ATH9K_HTC_TX_RTSCTS 0x2\ndrivers/net/wireless/ath/ath9k/htc.h-72-\ndrivers/net/wireless/ath/ath9k/htc.h=73=struct tx_frame_hdr {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-77-\tu8 tidno;\ndrivers/net/wireless/ath/ath9k/htc.h:78:\t__be32 flags; /* ATH9K_HTC_TX_* */\ndrivers/net/wireless/ath/ath9k/htc.h-79-\tu8 key_type;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=194=struct ath9k_htc_target_rx_stats {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-199-\ndrivers/net/wireless/ath/ath9k/htc.h:200:#define ATH9K_HTC_MAX_VIF 2\ndrivers/net/wireless/ath/ath9k/htc.h:201:#define ATH9K_HTC_MAX_BCN_VIF 2\ndrivers/net/wireless/ath/ath9k/htc.h-202-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=249=struct ath9k_vif_iter_data {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-253-\ndrivers/net/wireless/ath/ath9k/htc.h:254:#define ATH9K_HTC_MAX_STA 8\ndrivers/net/wireless/ath/ath9k/htc.h:255:#define ATH9K_HTC_MAX_TID 8\ndrivers/net/wireless/ath/ath9k/htc.h-256-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=264=struct ath9k_htc_sta {\ndrivers/net/wireless/ath/ath9k/htc.h-265-\tu8 index;\ndrivers/net/wireless/ath/ath9k/htc.h:266:\tenum tid_aggr_state tid_state[ATH9K_HTC_MAX_TID];\ndrivers/net/wireless/ath/ath9k/htc.h-267-\tstruct work_struct rc_update_work;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-270-\ndrivers/net/wireless/ath/ath9k/htc.h:271:#define ATH9K_HTC_RXBUF 256\ndrivers/net/wireless/ath/ath9k/htc.h-272-#define HTC_RX_FRAME_HEADER_SIZE 40\n--\ndrivers/net/wireless/ath/ath9k/htc.h=281=struct ath9k_htc_rx {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-286-\ndrivers/net/wireless/ath/ath9k/htc.h:287:#define ATH9K_HTC_TX_CLEANUP_INTERVAL 50 /* ms */\ndrivers/net/wireless/ath/ath9k/htc.h:288:#define ATH9K_HTC_TX_TIMEOUT_INTERVAL 3000 /* ms */\ndrivers/net/wireless/ath/ath9k/htc.h:289:#define ATH9K_HTC_TX_RESERVE 10\ndrivers/net/wireless/ath/ath9k/htc.h:290:#define ATH9K_HTC_TX_TIMEOUT_COUNT 40\ndrivers/net/wireless/ath/ath9k/htc.h:291:#define ATH9K_HTC_TX_THRESHOLD (MAX_TX_BUF_NUM - ATH9K_HTC_TX_RESERVE)\ndrivers/net/wireless/ath/ath9k/htc.h-292-\ndrivers/net/wireless/ath/ath9k/htc.h:293:#define ATH9K_HTC_OP_TX_QUEUES_STOP BIT(0)\ndrivers/net/wireless/ath/ath9k/htc.h:294:#define ATH9K_HTC_OP_TX_DRAIN BIT(1)\ndrivers/net/wireless/ath/ath9k/htc.h-295-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=311=struct ath9k_htc_tx_ctl {\ndrivers/net/wireless/ath/ath9k/htc.h:312:\tu8 type; /* ATH9K_HTC_* */\ndrivers/net/wireless/ath/ath9k/htc.h-313-\tu8 epid;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=319=static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-327-\ndrivers/net/wireless/ath/ath9k/htc.h:328:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-329-#define __STAT_SAFE(hif_dev, expr)\tdo { ((hif_dev)-\u003ehtc_handle-\u003edrv_priv ? (expr) : 0); } while (0)\n--\ndrivers/net/wireless/ath/ath9k/htc.h=388=static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc.h-392-\ndrivers/net/wireless/ath/ath9k/htc.h:393:#endif /* CONFIG_ATH9K_HTC_DEBUGFS */\ndrivers/net/wireless/ath/ath9k/htc.h-394-\n--\ndrivers/net/wireless/ath/ath9k/htc.h=409=struct htc_beacon {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-415-\ndrivers/net/wireless/ath/ath9k/htc.h:416:\tstruct ieee80211_vif *bslot[ATH9K_HTC_MAX_BCN_VIF];\ndrivers/net/wireless/ath/ath9k/htc.h-417-\tu32 bmisscnt;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=456=struct ath9k_htc_priv {\n--\ndrivers/net/wireless/ath/ath9k/htc.h-478-\tu8 sta_slot;\ndrivers/net/wireless/ath/ath9k/htc.h:479:\tu8 vif_sta_pos[ATH9K_HTC_MAX_VIF];\ndrivers/net/wireless/ath/ath9k/htc.h-480-\tu8 num_ibss_vif;\n--\ndrivers/net/wireless/ath/ath9k/htc.h-535-\tstruct delayed_work duty_cycle_work;\ndrivers/net/wireless/ath/ath9k/htc.h:536:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-537-\tstruct ath9k_debug debug;\n--\ndrivers/net/wireless/ath/ath9k/htc.h=641=int ath9k_htc_resume(struct htc_target *htc_handle);\ndrivers/net/wireless/ath/ath9k/htc.h-642-#endif\ndrivers/net/wireless/ath/ath9k/htc.h:643:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc.h-644-int ath9k_htc_init_debug(struct ath_hw *ah);\n--\ndrivers/net/wireless/ath/ath9k/htc.h=648=static inline void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc.h-650-}\ndrivers/net/wireless/ath/ath9k/htc.h:651:#endif /* CONFIG_ATH9K_HTC_DEBUGFS */\ndrivers/net/wireless/ath/ath9k/htc.h-652-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=111=static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-116-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:117:\tath9k_cmn_beacon_config_ap(ah, conf, ATH9K_HTC_MAX_BCN_VIF);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-118-\tath9k_htc_beacon_init(priv, conf, false);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=191=static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-242-\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:243:\ttx_ctl-\u003etype = ATH9K_HTC_BEACON;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-244-\ttx_ctl-\u003eepid = priv-\u003ebeacon_ep;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=264=static int ath9k_htc_choose_bslot(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-276-\ttsftu = TSF_TO_TU(tsf \u003e\u003e 32, tsf);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:277:\tslot = ((tsftu % intval) * ATH9K_HTC_MAX_BCN_VIF) / intval;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:278:\tslot = ATH9K_HTC_MAX_BCN_VIF - slot - 1;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-279-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=325=void ath9k_htc_assign_bslot(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-332-\tspin_lock_bh(\u0026priv-\u003ebeacon_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:333:\tfor (i = 0; i \u003c ATH9K_HTC_MAX_BCN_VIF; i++) {\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-334-\t\tif (priv-\u003ebeacon.bslot[i] == NULL) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=365=void ath9k_htc_set_tsfadjust(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-380-\t */\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:381:\ttsfadjust = cur_conf-\u003ebeacon_interval * avp-\u003ebslot / ATH9K_HTC_MAX_BCN_VIF;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-382-\tavp-\u003etsfadjust = cpu_to_le64(TU_TO_USEC(tsfadjust));\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=398=static const char ath9k_htc_gstrings_stats[][ETH_GSTRING_LEN] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-418-};\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:419:#define ATH9K_HTC_SSTATS_LEN ARRAY_SIZE(ath9k_htc_gstrings_stats)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-420-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=430=int ath9k_htc_get_et_sset_count(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-433-\tif (sset == ETH_SS_STATS)\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:434:\t\treturn ATH9K_HTC_SSTATS_LEN;\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-435-\treturn 0;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c=448=void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-473-\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c:474:\tWARN_ON(i != ATH9K_HTC_SSTATS_LEN);\ndrivers/net/wireless/ath/ath9k/htc_drv_debug.c-475-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=606=static int ath9k_init_priv(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-673-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:674:\tfor (i = 0; i \u003c ATH9K_HTC_MAX_BCN_VIF; i++)\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-675-\t\tpriv-\u003ebeacon.bslot[i] = NULL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=184=void ath9k_htc_reset(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-233-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:234:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-235-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=240=static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-311-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:312:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-313-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=350=static int ath9k_htc_add_monitor_interface(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-357-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:358:\tif ((priv-\u003envifs \u003e= ATH9K_HTC_MAX_VIF) ||\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:359:\t (priv-\u003enstations \u003e= ATH9K_HTC_MAX_STA)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-360-\t\tret = -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-364-\tsta_idx = ffz(priv-\u003esta_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:365:\tif ((sta_idx \u003c 0) || (sta_idx \u003e ATH9K_HTC_MAX_STA)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-366-\t\tret = -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=466=static int ath9k_htc_add_station(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-477-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:478:\tif (priv-\u003enstations \u003e= ATH9K_HTC_MAX_STA)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-479-\t\treturn -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-481-\tsta_idx = ffz(priv-\u003esta_slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:482:\tif ((sta_idx \u003c 0) || (sta_idx \u003e ATH9K_HTC_MAX_STA))\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-483-\t\treturn -ENOBUFS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=702=static int ath9k_htc_tx_aggr_oper(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-713-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:714:\tif (tid \u003e= ATH9K_HTC_MAX_TID)\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-715-\t\treturn -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=907=static int ath9k_htc_start(struct ieee80211_hw *hw)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-960-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:961:\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-962-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-966-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:967:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-968-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1658=static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1688-\tcase IEEE80211_AMPDU_TX_OPERATIONAL:\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1689:\t\tif (tid \u003e= ATH9K_HTC_MAX_TID) {\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1690-\t\t\tret = -EINVAL;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1874=struct ieee80211_ops ath9k_htc_ops = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1906-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1907:#ifdef CONFIG_ATH9K_HTC_DEBUGFS\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1908-\t.get_et_sset_count = ath9k_htc_get_et_sset_count,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=23=static const int subtype_txq_to_hwq[] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-29-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:30:#define ATH9K_HTC_INIT_TXQ(subtype) do {\t\t\t\\\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-31-\t\tqi.tqi_subtype = subtype_txq_to_hwq[subtype];\t\\\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=56=void ath9k_htc_check_stop_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-59-\tpriv-\u003etx.queued_cnt++;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:60:\tif ((priv-\u003etx.queued_cnt \u003e= ATH9K_HTC_TX_THRESHOLD) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:61:\t !(priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_QUEUES_STOP)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:62:\t\tpriv-\u003etx.flags |= ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-63-\t\tieee80211_stop_queues(priv-\u003ehw);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=68=void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-70-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:71:\tif ((priv-\u003etx.queued_cnt \u003c ATH9K_HTC_TX_THRESHOLD) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:72:\t (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_QUEUES_STOP)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:73:\t\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_QUEUES_STOP;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-74-\t\tieee80211_wake_queues(priv-\u003ehw);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=214=static void ath9k_htc_tx_mgmt(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-240-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:241:\ttx_ctl-\u003etype = ATH9K_HTC_MGMT;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-242-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=260=static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-292-\tif (tx_info-\u003eflags \u0026 IEEE80211_TX_CTL_AMPDU) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:293:\t\ttx_ctl-\u003etype = ATH9K_HTC_AMPDU;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:294:\t\ttx_hdr.data_type = ATH9K_HTC_AMPDU;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-295-\t} else {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:296:\t\ttx_ctl-\u003etype = ATH9K_HTC_NORMAL;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:297:\t\ttx_hdr.data_type = ATH9K_HTC_NORMAL;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-298-\t}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-312-\t\tif (skb-\u003elen \u003e priv-\u003ehw-\u003ewiphy-\u003erts_threshold)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:313:\t\t\tflags |= ATH9K_HTC_TX_RTSCTS;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-314-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-315-\t/* CTS-to-self */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:316:\tif (!(flags \u0026 ATH9K_HTC_TX_RTSCTS) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-317-\t (vif \u0026\u0026 vif-\u003ebss_conf.use_cts_prot))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:318:\t\tflags |= ATH9K_HTC_TX_CTSONLY;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-319-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=392=static inline bool __ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-397-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:398:\tif ((tid \u003c ATH9K_HTC_MAX_TID) \u0026\u0026 (ista-\u003etid_state[tid] == AGGR_STOP))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-399-\t\tret = true;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=445=static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-478-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:479:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_ACK) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-480-\t\ttx_info-\u003eflags |= IEEE80211_TX_STAT_ACK;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-484-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:485:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_FILT)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-486-\t\ttx_info-\u003eflags |= IEEE80211_TX_STAT_TX_FILTERED;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-487-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:488:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_RTC_CTS)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-489-\t\trate-\u003eflags |= IEEE80211_TX_RC_USE_RTS_CTS;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-491-\trate-\u003ecount = 1;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:492:\trate-\u003eidx = MS(txs-\u003ets_rate, ATH9K_HTC_TXSTAT_RATE);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-493-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:494:\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_MCS) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-495-\t\trate-\u003eflags |= IEEE80211_TX_RC_MCS;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-496-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:497:\t\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_CW40)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-498-\t\t\trate-\u003eflags |= IEEE80211_TX_RC_40_MHZ_WIDTH;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:499:\t\tif (txs-\u003ets_flags \u0026 ATH9K_HTC_TXSTAT_SGI)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-500-\t\t\trate-\u003eflags |= IEEE80211_TX_RC_SHORT_GI;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=539=void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-543-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:544:\tpriv-\u003etx.flags |= ATH9K_HTC_OP_TX_DRAIN;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-545-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-573-\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:574:\tpriv-\u003etx.flags \u0026= ~ATH9K_HTC_OP_TX_DRAIN;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-575-\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=578=void ath9k_tx_failed_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-582-\tspin_lock(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:583:\tif (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_DRAIN) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-584-\t\tspin_unlock(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=618=static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-624-\tunsigned long flags;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:625:\tu8 epid = MS(txs-\u003ets_rate, ATH9K_HTC_TXSTAT_EPID);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-626-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=716=static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-724-\t\t tx_ctl-\u003etimestamp +\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:725:\t\t msecs_to_jiffies(ATH9K_HTC_TX_TIMEOUT_INTERVAL))) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-726-\t\tath_dbg(common, XMIT, \"Dropping a packet due to TX timeout\\n\");\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=761=void ath9k_htc_tx_cleanup_timer(struct timer_list *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-776-\t\t\t\tevent-\u003etxs.cookie,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:777:\t\t\t\tMS(event-\u003etxs.ts_rate, ATH9K_HTC_TXSTAT_EPID));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-778-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-784-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:785:\t\tif (++event-\u003ecount \u003e= ATH9K_HTC_TX_TIMEOUT_COUNT) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-786-\t\t\tlist_del(\u0026event-\u003elist);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-805-\tmod_timer(\u0026priv-\u003etx.cleanup_timer,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:806:\t\t jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-807-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=827=bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-834-\tmemset(\u0026qi, 0, sizeof(qi));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:835:\tATH9K_HTC_INIT_TXQ(subtype);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-836-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=852=int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-856-\tmemset(\u0026qi, 0, sizeof(qi));\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:857:\tATH9K_HTC_INIT_TXQ(0);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-858-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=1187=int ath9k_rx_init(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1193-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1194:\tfor (i = 0; i \u003c ATH9K_HTC_RXBUF; i++) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1195-\t\tstruct ath9k_htc_rxbuf *rxbuf =\n--\ndrivers/net/wireless/ath/ath9k/wmi.c=138=void ath9k_wmi_event_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-178-\t\t\tspin_lock_bh(\u0026priv-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/wmi.c:179:\t\t\tif (priv-\u003etx.flags \u0026 ATH9K_HTC_OP_TX_DRAIN) {\ndrivers/net/wireless/ath/ath9k/wmi.c-180-\t\t\t\tspin_unlock_bh(\u0026priv-\u003etx.tx_lock);\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=39=struct wmi_event_swba {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-50-\ndrivers/net/wireless/ath/ath9k/wmi.h:51:#define ATH9K_HTC_TXSTAT_ACK BIT(0)\ndrivers/net/wireless/ath/ath9k/wmi.h:52:#define ATH9K_HTC_TXSTAT_FILT BIT(1)\ndrivers/net/wireless/ath/ath9k/wmi.h:53:#define ATH9K_HTC_TXSTAT_RTC_CTS BIT(2)\ndrivers/net/wireless/ath/ath9k/wmi.h:54:#define ATH9K_HTC_TXSTAT_MCS BIT(3)\ndrivers/net/wireless/ath/ath9k/wmi.h:55:#define ATH9K_HTC_TXSTAT_CW40 BIT(4)\ndrivers/net/wireless/ath/ath9k/wmi.h:56:#define ATH9K_HTC_TXSTAT_SGI BIT(5)\ndrivers/net/wireless/ath/ath9k/wmi.h-57-\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-63- */\ndrivers/net/wireless/ath/ath9k/wmi.h:64:#define ATH9K_HTC_TXSTAT_RATE 0x0f\ndrivers/net/wireless/ath/ath9k/wmi.h:65:#define ATH9K_HTC_TXSTAT_RATE_S 0\ndrivers/net/wireless/ath/ath9k/wmi.h-66-\ndrivers/net/wireless/ath/ath9k/wmi.h:67:#define ATH9K_HTC_TXSTAT_EPID 0xf0\ndrivers/net/wireless/ath/ath9k/wmi.h:68:#define ATH9K_HTC_TXSTAT_EPID_S 4\ndrivers/net/wireless/ath/ath9k/wmi.h-69-\n"
} |
| 5/2 | 2026/09/01 02:19 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 16242 output: 42 thoughts: 41 Thoughts: Here's my analysis of the provided files, summarized as my own thought process: **Diving into the Atheros Ath9k USB Driver** Alright, let's take a look at the meat of the Atheros ath9k USB driver implementation. First stop: `drivers/net/wireless/ath/ath9k/hif_usb.c`. I'm curious to see how the host interface layer (HIF) is handling the USB communication. I need to understand how they are moving data packets back and forth between the ath9k core and the USB bus. Are they using bulk transfers, interrupt endpoints, control messages, or a combination? And are they doing anything particularly clever to optimize throughput or minimize latency? I'm expecting to find the USB-specific initialization code here, the interrupt handlers if they're used, and the functions responsible for queuing and dequeuing frames. I'm also looking for any workarounds or quirks related to specific USB chipsets, because those always pop up eventually. Then, I'll switch over to `drivers/net/wireless/ath/ath9k/Kconfig`. This is where the configuration options are defined for the ath9k driver. I want to see which features are modularized, which are built-in, and how they relate to the USB implementation. Are there specific configurations that are only enabled when the USB variant is selected? Are there conditional dependencies on certain USB drivers or features in the kernel? Understanding the configuration options will give me a better picture of the driver's flexibility and potential performance trade-offs. It will also help me understand what features are enabled and disabled by default. And if I am working on a new platform, or custom kernel, this is the first place I will need to inspect. |
| 6/2 | 2026/09/01 02:20 | tool | read-file |
0mArgs:{
"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"
} |
| 7/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 17312 output: 46 thoughts: 37 Thoughts: Here's a summary of my thought process, as requested: **Diving into the Atheros USB TX Path** Okay, time to dig into the Atheros USB driver again. I need to refresh my memory on the transmit path, specifically around the `__hif_usb_tx` function in `drivers/net/wireless/ath/ath9k/hif_usb.c`. This is where the magic happens when the driver is sending data over USB. I suspect there's something specific I need to understand better, or potentially debug, regarding how data is prepped and sent. I'll need to trace the flow from the higher-level netif layer all the way down to the USB endpoint, understanding packet framing, DMA setup, and any relevant buffer management. I know it's probably going to involve looking at the workqueue, potential locking, and how the hardware actually gets the data. Let’s get to it! |
| 8/2 | 2026/09/01 02:20 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/hif_usb.c",
"FirstLine": 310,
"LineCount": 90
}Results: {
"Contents": " 310:\t\tstruct tx_buf *tx_buf = NULL;\n 311:\t\tstruct sk_buff *nskb = NULL;\n 312:\t\tint ret = 0, i;\n 313:\t\tu16 tx_skb_cnt = 0;\n 314:\t\tu8 *buf;\n 315:\t\t__le16 *hdr;\n 316:\t\n 317:\t\tif (hif_dev-\u003etx.tx_skb_cnt == 0)\n 318:\t\t\treturn 0;\n 319:\t\n 320:\t\t/* Check if a free TX buffer is available */\n 321:\t\tif (list_empty(\u0026hif_dev-\u003etx.tx_buf))\n 322:\t\t\treturn 0;\n 323:\t\n 324:\t\ttx_buf = list_first_entry(\u0026hif_dev-\u003etx.tx_buf, struct tx_buf, list);\n 325:\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_pending);\n 326:\t\thif_dev-\u003etx.tx_buf_cnt--;\n 327:\t\n 328:\t\ttx_skb_cnt = min_t(u16, hif_dev-\u003etx.tx_skb_cnt, MAX_TX_AGGR_NUM);\n 329:\t\n 330:\t\tfor (i = 0; i \u003c tx_skb_cnt; i++) {\n 331:\t\t\tnskb = skb_peek(\u0026hif_dev-\u003etx.tx_skb_queue);\n 332:\t\t\tif (!nskb)\n 333:\t\t\t\tbreak;\n 334:\t\n 335:\t\t\tif (tx_buf-\u003eoffset + nskb-\u003elen + 4 \u003e MAX_TX_BUF_SIZE)\n 336:\t\t\t\tbreak;\n 337:\t\n 338:\t\t\tnskb = __skb_dequeue(\u0026hif_dev-\u003etx.tx_skb_queue);\n 339:\t\t\thif_dev-\u003etx.tx_skb_cnt--;\n 340:\t\n 341:\t\t\tbuf = tx_buf-\u003ebuf + tx_buf-\u003eoffset;\n 342:\t\t\thdr = (__le16 *)buf;\n 343:\t\t\t*hdr++ = cpu_to_le16(nskb-\u003elen);\n 344:\t\t\t*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);\n 345:\t\t\tmemcpy(buf + 4, nskb-\u003edata, nskb-\u003elen);\n 346:\t\n 347:\t\t\ttx_buf-\u003elen = tx_buf-\u003eoffset + nskb-\u003elen + 4;\n 348:\t\t\ttx_buf-\u003eoffset += (((tx_buf-\u003elen - 1) / 4) + 1) * 4;\n 349:\t\n 350:\t\t\t__skb_queue_tail(\u0026tx_buf-\u003eskb_queue, nskb);\n 351:\t\t\tTX_STAT_INC(hif_dev, skb_queued);\n 352:\t\t}\n 353:\t\n 354:\t\tif (!i) {\n 355:\t\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\n 356:\t\t\thif_dev-\u003etx.tx_buf_cnt++;\n 357:\t\t\treturn 0;\n 358:\t\t}\n 359:\t\n 360:\t\tusb_fill_bulk_urb(tx_buf-\u003eurb, hif_dev-\u003eudev,\n 361:\t\t\t\t usb_sndbulkpipe(hif_dev-\u003eudev, USB_WLAN_TX_PIPE),\n 362:\t\t\t\t tx_buf-\u003ebuf, tx_buf-\u003elen,\n 363:\t\t\t\t hif_usb_tx_cb, tx_buf);\n 364:\t\n 365:\t\tret = usb_submit_urb(tx_buf-\u003eurb, GFP_ATOMIC);\n 366:\t\tif (ret) {\n 367:\t\t\ttx_buf-\u003elen = tx_buf-\u003eoffset = 0;\n 368:\t\t\tath9k_skb_queue_complete(hif_dev, \u0026tx_buf-\u003eskb_queue, false);\n 369:\t\t\t__skb_queue_head_init(\u0026tx_buf-\u003eskb_queue);\n 370:\t\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\n 371:\t\t\thif_dev-\u003etx.tx_buf_cnt++;\n 372:\t\t} else {\n 373:\t\t\tTX_STAT_INC(hif_dev, buf_queued);\n 374:\t\t}\n 375:\t\n 376:\t\treturn ret;\n 377:\t}\n 378:\t\n 379:\tstatic int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\n 380:\t{\n 381:\t\tstruct ath9k_htc_tx_ctl *tx_ctl;\n 382:\t\tunsigned long flags;\n 383:\t\tint ret = 0;\n 384:\t\n 385:\t\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\n 386:\t\n 387:\t\tif (hif_dev-\u003etx.flags \u0026 HIF_USB_TX_STOP) {\n 388:\t\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\n 389:\t\t\treturn -ENODEV;\n 390:\t\t}\n 391:\t\n 392:\t\t/* Check if the max queue count has been reached */\n 393:\t\tif (hif_dev-\u003etx.tx_skb_cnt \u003e MAX_TX_BUF_NUM) {\n 394:\t\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\n 395:\t\t\treturn -ENOMEM;\n 396:\t\t}\n 397:\t\n 398:\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\n 399:\t\n"
} |
| 9/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 19206 output: 57 thoughts: 48 Thoughts: Here's my analysis of the task and a first-person summary of my thought process: **Diving into the hif_usb_send_tx and __hif_usb_tx Functions** Okay, so I need to trace the flow of data transmission related to the `hif_usb_send_tx` and `__hif_usb_tx` functions. I know these are likely critical pieces in the USB-based network interface, specifically within the Atheros ath9k driver context. My focus is going to be identifying *where* these functions are called from and *what* kind of data they are handling. I immediately think that the search should be within the context of the `drivers/net/wireless/ath/ath9k/` directory. That's the logical place to start looking for the entry points and the related code handling transmit operations. I'll probably be using grep or a similar tool to achieve this. From there I expect to see the typical network stack interactions, probably involving packet preparation, DMA, and USB endpoint interactions. |
| 10/2 | 2026/09/01 02:20 | tool | grepper |
0mArgs:{
"Expression": "hif_usb_send_tx|__hif_usb_tx|ath9k_htc_tx",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/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-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:69:static int __hif_usb_tx(struct hif_device_usb *hif_dev);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-70-\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=253=static void hif_usb_tx_cb(struct urb *urb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-301-\tif (!(hif_dev-\u003etx.flags \u0026 HIF_USB_TX_STOP))\ndrivers/net/wireless/ath/ath9k/hif_usb.c:302:\t\t__hif_usb_tx(hif_dev); /* Check for pending SKBs */\ndrivers/net/wireless/ath/ath9k/hif_usb.c-303-\tTX_STAT_INC(hif_dev, buf_completed);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-307-/* TX lock has to be taken */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:308:static int __hif_usb_tx(struct hif_device_usb *hif_dev)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-309-{\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-378-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:379:static int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-380-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:381:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-382-\tunsigned long flags;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-418-\t (hif_dev-\u003etx.tx_skb_cnt \u003c 2)) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:419:\t\t__hif_usb_tx(hif_dev);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-420-\t}\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=468=static int hif_usb_send(void *hif_handle, u8 pipe_id, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-474-\tcase USB_WLAN_TX_PIPE:\ndrivers/net/wireless/ath/ath9k/hif_usb.c:475:\t\tret = hif_usb_send_tx(hif_dev, skb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-476-\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=490=static inline bool check_index(struct sk_buff *skb, u8 idx)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-491-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:492:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-493-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=503=static void hif_usb_sta_drain(void *hif_handle, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-513-\t\t\t__skb_unlink(skb, \u0026hif_dev-\u003etx.tx_skb_queue);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:514:\t\t\tath9k_htc_txcompletion_cb(hif_dev-\u003ehtc_handle,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-515-\t\t\t\t\t\t skb, false);\n--\ndrivers/net/wireless/ath/ath9k/htc.h=281=struct ath9k_htc_rx {\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=456=struct ath9k_htc_priv {\n--\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=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);\n--\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,\n--\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);\n--\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);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=137=static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,\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--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c=191=static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-197-\tstruct tx_beacon_header beacon_hdr;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c:198:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_beacon.c-199-\tstruct ieee80211_tx_info *info;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=140=static int ath9k_init_htc_services(struct ath9k_htc_priv *priv, u16 devid,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-156-\t/* CAB */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:157:\tret = ath9k_htc_connect_svc(priv, WMI_CAB_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-158-\t\t\t\t \u0026priv-\u003ecab_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-163-\t/* UAPSD */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:164:\tret = ath9k_htc_connect_svc(priv, WMI_UAPSD_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-165-\t\t\t\t \u0026priv-\u003euapsd_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-169-\t/* MGMT */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:170:\tret = ath9k_htc_connect_svc(priv, WMI_MGMT_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-171-\t\t\t\t \u0026priv-\u003emgmt_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-175-\t/* DATA BE */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:176:\tret = ath9k_htc_connect_svc(priv, WMI_DATA_BE_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-177-\t\t\t\t \u0026priv-\u003edata_be_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-181-\t/* DATA BK */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:182:\tret = ath9k_htc_connect_svc(priv, WMI_DATA_BK_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-183-\t\t\t\t \u0026priv-\u003edata_bk_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-187-\t/* DATA VI */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:188:\tret = ath9k_htc_connect_svc(priv, WMI_DATA_VI_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-189-\t\t\t\t \u0026priv-\u003edata_vi_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-193-\t/* DATA VO */\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:194:\tret = ath9k_htc_connect_svc(priv, WMI_DATA_VO_SVC, ath9k_htc_txep,\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-195-\t\t\t\t \u0026priv-\u003edata_vo_ep);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c=544=static int ath9k_init_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-563-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:564:\tif (!ath9k_htc_txq_setup(priv, IEEE80211_AC_BE)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-565-\t\tath_err(common, \"Unable to setup xmit queue for BE traffic\\n\");\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-568-\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:569:\tif (!ath9k_htc_txq_setup(priv, IEEE80211_AC_BK)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-570-\t\tath_err(common, \"Unable to setup xmit queue for BK traffic\\n\");\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-572-\t}\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:573:\tif (!ath9k_htc_txq_setup(priv, IEEE80211_AC_VI)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-574-\t\tath_err(common, \"Unable to setup xmit queue for VI traffic\\n\");\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-576-\t}\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:577:\tif (!ath9k_htc_txq_setup(priv, IEEE80211_AC_VO)) {\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-578-\t\tath_err(common, \"Unable to setup xmit queue for VO traffic\\n\");\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-652-\tINIT_WORK(\u0026priv-\u003efatal_work, ath9k_fatal_work);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c:653:\ttimer_setup(\u0026priv-\u003etx.cleanup_timer, ath9k_htc_tx_cleanup_timer, 0);\ndrivers/net/wireless/ath/ath9k/htc_drv_init.c-654-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=184=void ath9k_htc_reset(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-201-\ttimer_delete_sync(\u0026priv-\u003etx.cleanup_timer);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:202:\tath9k_htc_tx_drain(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-203-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=240=static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-263-\ttimer_delete_sync(\u0026priv-\u003etx.cleanup_timer);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:264:\tath9k_htc_tx_drain(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-265-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=675=static void ath9k_htc_update_rate(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-701-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:702:static int ath9k_htc_tx_aggr_oper(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-703-\t\t\t\t struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=768=void ath9k_htc_ani_work(struct work_struct *work)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-861-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:862:static void ath9k_htc_tx(struct ieee80211_hw *hw,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-863-\t\t\t struct ieee80211_tx_control *control,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-884-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:885:\tslot = ath9k_htc_tx_get_slot(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-886-\tif (slot \u003c 0) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-890-\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:891:\tret = ath9k_htc_tx_start(priv, control-\u003esta, skb, slot, false);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-892-\tif (ret != 0) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-901-clear_slot:\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:902:\tath9k_htc_tx_clear_slot(priv, slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-903-fail_tx:\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=976=static void ath9k_htc_stop(struct ieee80211_hw *hw, bool suspend)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1000-\ttimer_delete_sync(\u0026priv-\u003etx.cleanup_timer);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1001:\tath9k_htc_tx_drain(priv);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1002-\tath9k_wmi_event_drain(priv);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1658=static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1677-\tcase IEEE80211_AMPDU_TX_START:\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1678:\t\tret = ath9k_htc_tx_aggr_oper(priv, vif, sta, action, tid);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1679-\t\tif (!ret)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1684-\tcase IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1685:\t\tath9k_htc_tx_aggr_oper(priv, vif, sta, action, tid);\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1686-\t\tieee80211_stop_tx_ba_cb_irqsafe(vif, sta-\u003eaddr, tid);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c=1874=struct ieee80211_ops ath9k_htc_ops = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1878-\t.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c:1879:\t.tx = ath9k_htc_tx,\ndrivers/net/wireless/ath/ath9k/htc_drv_main.c-1880-\t.wake_tx_queue = ieee80211_handle_wake_tx_queue,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=68=void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-78-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:79:int ath9k_htc_tx_get_slot(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-80-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-94-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:95:void ath9k_htc_tx_clear_slot(struct ath9k_htc_priv *priv, int slot)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-96-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=157=static inline int strip_drv_header(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-160-\tstruct ath_common *common = ath9k_hw_common(priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:161:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-162-\tint slot;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=188=int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-213-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:214:static void ath9k_htc_tx_mgmt(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-215-\t\t\t struct ath9k_htc_vif *avp,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-222-\tstruct tx_mgmt_hdr mgmt_hdr;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:223:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-224-\tu8 *tx_fhdr;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-259-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:260:static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-261-\t\t\t struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-267-\tstruct ieee80211_hdr *hdr;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:268:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-269-\tstruct tx_frame_hdr tx_hdr;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-339-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:340:int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-341-\t\t struct ieee80211_sta *sta,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-381-\tif (ieee80211_is_data(hdr-\u003eframe_control))\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:382:\t\tath9k_htc_tx_data(priv, vif, skb,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-383-\t\t\t\t sta_idx, vif_idx, slot, is_cab);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-384-\telse\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:385:\t\tath9k_htc_tx_mgmt(priv, avp, skb,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-386-\t\t\t\t sta_idx, vif_idx, slot);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=405=static void ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-444-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:445:static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-446-\t\t\t\t struct sk_buff *skb,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-449-\tstruct ieee80211_vif *vif;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:450:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-451-\tstruct ieee80211_tx_info *tx_info;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-513-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:514:\tath9k_htc_tx_clear_slot(priv, slot);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-515-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-528-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:529:static inline void ath9k_htc_tx_drainq(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-530-\t\t\t\t struct sk_buff_head *queue)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-534-\twhile ((skb = skb_dequeue(queue)) != NULL) {\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:535:\t\tath9k_htc_tx_process(priv, skb, NULL);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-536-\t}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-538-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:539:void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-540-{\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:541:\tstruct ath9k_htc_tx_event *event, *tmp;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-542-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-554-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:555:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.mgmt_ep_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:556:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.cab_ep_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:557:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.data_be_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:558:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.data_bk_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:559:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.data_vi_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:560:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.data_vo_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:561:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.tx_failed);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-562-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=578=void ath9k_tx_failed_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-588-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:589:\tath9k_htc_tx_drainq(priv, \u0026priv-\u003etx.tx_failed);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-590-}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=592=static inline bool check_cookie(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-617-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:618:static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-619-\t\t\t\t\t struct __wmi_event_txstatus *txs)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-646-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:647:void ath9k_htc_txstatus(struct ath9k_htc_priv *priv, void *wmi_event)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-648-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-651-\tstruct sk_buff *skb;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:652:\tstruct ath9k_htc_tx_event *tx_pend;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-653-\tint i;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-660-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:661:\t\tskb = ath9k_htc_tx_get_packet(priv, __txs);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-662-\t\tif (!skb) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-666-\t\t\t */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:667:\t\t\ttx_pend = kzalloc_obj(struct ath9k_htc_tx_event,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-668-\t\t\t\t\t GFP_ATOMIC);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-682-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:683:\t\tath9k_htc_tx_process(priv, skb, __txs);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-684-\t}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-689-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:690:void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-691-\t\t enum htc_endpoint_id ep_id, bool txok)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-693-\tstruct ath9k_htc_priv *priv = drv_priv;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:694:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-695-\tstruct sk_buff_head *epid_queue;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=716=static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-718-\tstruct ath_common *common = ath9k_hw_common(priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:719:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-720-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-732-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:733:static void ath9k_htc_tx_cleanup_queue(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-734-\t\t\t\t struct sk_buff_head *epid_queue)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-755-\t\t\t__skb_unlink(skb, \u0026queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:756:\t\t\tath9k_htc_tx_process(priv, skb, NULL);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-757-\t\t}\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-760-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:761:void ath9k_htc_tx_cleanup_timer(struct timer_list *t)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-762-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-765-\tstruct ath_common *common = ath9k_hw_common(priv-\u003eah);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:766:\tstruct ath9k_htc_tx_event *event, *tmp;\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-767-\tstruct sk_buff *skb;\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-771-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:772:\t\tskb = ath9k_htc_tx_get_packet(priv, \u0026event-\u003etxs);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-773-\t\tif (skb) {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-778-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:779:\t\t\tath9k_htc_tx_process(priv, skb, \u0026event-\u003etxs);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-780-\t\t\tlist_del(\u0026event-\u003elist);\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-794-\t */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:795:\tath9k_htc_tx_cleanup_queue(priv, \u0026priv-\u003etx.mgmt_ep_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:796:\tath9k_htc_tx_cleanup_queue(priv, \u0026priv-\u003etx.cab_ep_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:797:\tath9k_htc_tx_cleanup_queue(priv, \u0026priv-\u003etx.data_be_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:798:\tath9k_htc_tx_cleanup_queue(priv, \u0026priv-\u003etx.data_bk_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:799:\tath9k_htc_tx_cleanup_queue(priv, \u0026priv-\u003etx.data_vi_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:800:\tath9k_htc_tx_cleanup_queue(priv, \u0026priv-\u003etx.data_vo_queue);\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-801-\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=822=void ath9k_tx_cleanup(struct ath9k_htc_priv *priv)\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-826-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:827:bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-828-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=307=int htc_send(struct htc_target *target, struct sk_buff *skb)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-308-{\ndrivers/net/wireless/ath/ath9k/htc_hst.c:309:\tstruct ath9k_htc_tx_ctl *tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_hst.c-310-\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=331=void htc_sta_drain(struct htc_target *target, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-335-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:336:void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,\ndrivers/net/wireless/ath/ath9k/htc_hst.c-337-\t\t\t struct sk_buff *skb, bool txok)\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.h=21=struct htc_target;\ndrivers/net/wireless/ath/ath9k/htc_hst.h:22:struct ath9k_htc_tx_ctl;\ndrivers/net/wireless/ath/ath9k/htc_hst.h-23-\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.h=216=void ath9k_htc_rx_msg(struct htc_target *htc_handle,\ndrivers/net/wireless/ath/ath9k/htc_hst.h-217-\t\t struct sk_buff *skb, u32 len, u8 pipe_id);\ndrivers/net/wireless/ath/ath9k/htc_hst.h:218:void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,\ndrivers/net/wireless/ath/ath9k/htc_hst.h-219-\t\t\t struct sk_buff *skb, bool txok);\n--\ndrivers/net/wireless/ath/ath9k/wmi.c=138=void ath9k_wmi_event_tasklet(struct tasklet_struct *t)\n--\ndrivers/net/wireless/ath/ath9k/wmi.c-184-\ndrivers/net/wireless/ath/ath9k/wmi.c:185:\t\t\tath9k_htc_txstatus(priv, wmi_event);\ndrivers/net/wireless/ath/ath9k/wmi.c-186-\t\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/wmi.h=136=struct register_rmw {\n--\ndrivers/net/wireless/ath/ath9k/wmi.h-141-\ndrivers/net/wireless/ath/ath9k/wmi.h:142:struct ath9k_htc_tx_event {\ndrivers/net/wireless/ath/ath9k/wmi.h-143-\tint count;\n"
} |
| 11/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 32613 output: 42 thoughts: 975 Thoughts: **Analyzing the ath9k USB TX Path** Alright, let's dive into this patch for `drivers/net/wireless/ath/ath9k/hif_usb.c`. My initial thought is to analyze the changes in the `__hif_usb_tx` function, specifically what's happening to the transmission buffer, `tx_buf`. Looking at the before and after code, the first thing that jumps out is the apparent fix for a potential buffer overflow condition during packet aggregation. Previously, the code wasn't explicitly checking if adding the next packet's data would exceed `MAX_TX_BUF_SIZE`. This patch includes those checks. A subtle oversight, but a critical one for robustness, and something I would've caught in review. The logic surrounding `tx_buf->len` and offset calculations is also cleaned up. It's more streamlined now, ensuring the correct byte counts, including headers, are being accounted for when concatenating packets. Good catch there. I also see that `BUG_ON(!nskb)` is replaced with a `NULL` check and `break`. That's a reasonable change, avoiding a kernel panic and allowing the transmission process to continue more gracefully if, for whatever reason, the skb queue is unexpectedly empty. This adds a bit of resilience. The addition of the `!i` check, which seems to re-queue the `tx_buf` if no packets could be added, is important, too. This prevents the buffer from being lost if it's too full. Now, the important question: is this reachable? And more importantly, is it worth fuzzing? Thinking about it, since we're dealing with a USB driver, the answer is likely yes. USB drivers are known attack surface. We can definitely fuzz this! We can probably use syzkaller, leveraging the USB Raw Gadget and/or Dummy HCD emulations in syzkaller. I could then send packets through mac80211, raw sockets, or nl80211. I should check the USB IDs and probe function for ath9k_htc so I can understand the driver's initialization sequence, ensuring that I can actually trigger the vulnerable code paths. Right, gotta ensure I can actually initialize and activate the USB device. |
| 12/2 | 2026/09/01 02:20 | tool | grepper |
0mArgs:{
"Expression": "ath9k_hif_usb_probe",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/hif_usb.c=1288=static int send_eject_command(struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1342-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1343:static int ath9k_hif_usb_probe(struct usb_interface *interface,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1344-\t\t\t const struct usb_device_id *id)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=1507=static struct usb_driver ath9k_hif_usb_driver = {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1508-\t.name = KBUILD_MODNAME,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:1509:\t.probe = ath9k_hif_usb_probe,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-1510-\t.disconnect = ath9k_hif_usb_disconnect,\n"
} |
| 13/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 34432 output: 44 thoughts: 155 Thoughts: **Investigating the Atheros USB WiFi Driver Entry Points** Okay, so I need to figure out the primary entry points for the Atheros AR9k USB WiFi driver. My initial instinct is to check for a few specific function names – `ath9k_hif_usb_probe`, `hif_usb_send`, and `ath9k_htc_tx` – to see if they're acting as potential entry points. From there, I'll need to dig into the relevant source files. I'm going to focus on `drivers/net/wireless/ath/ath9k/hif_usb.c` which, from the name, seems critical, along with `drivers/net/wireless/ath/ath9k/htc_drv_txrx.c` and `htc_drv_main.c` . The next step is to get a list of symbols that aren't static and which could be acting as an entrypoint for this device path. I'll need a way to read through those files and identify these functions and how they're involved. Basically, I need to understand the data flow, so I'll go through the source for `drivers/net/wireless/ath/ath9k/hif_usb.c` and hunt for any non-static functions, or functions that seem to be key to the data processing. |
| 14/2 | 2026/09/01 02:20 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/hif_usb.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t/*\n 2:\t * Copyright (c) 2010-2011 Atheros Communications Inc.\n 3:\t *\n 4:\t * Permission to use, copy, modify, and/or distribute this software for any\n 5:\t * purpose with or without fee is hereby granted, provided that the above\n 6:\t * copyright notice and this permission notice appear in all copies.\n 7:\t *\n 8:\t * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n 9:\t * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n 10:\t * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n 11:\t * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n 12:\t * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n 13:\t * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n 14:\t * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n 15:\t */\n 16:\t\n 17:\t#include \u003clinux/unaligned.h\u003e\n 18:\t#include \"htc.h\"\n 19:\t\n 20:\tMODULE_FIRMWARE(HTC_7010_MODULE_FW);\n 21:\tMODULE_FIRMWARE(HTC_9271_MODULE_FW);\n 22:\t\n 23:\tstatic const struct usb_device_id ath9k_hif_usb_ids[] = {\n 24:\t\t{ USB_DEVICE(0x0cf3, 0x9271) }, /* Atheros */\n 25:\t\t{ USB_DEVICE(0x0cf3, 0x1006) }, /* Atheros */\n 26:\t\t{ USB_DEVICE(0x0846, 0x9030) }, /* Netgear N150 */\n 27:\t\t{ USB_DEVICE(0x07b8, 0x9271) }, /* Altai WA1011N-GU */\n 28:\t\t{ USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */\n 29:\t\t{ USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */\n 30:\t\t{ USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */\n 31:\t\t{ USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */\n 32:\t\t{ USB_DEVICE(0x13D3, 0x3348) }, /* Azurewave */\n 33:\t\t{ USB_DEVICE(0x13D3, 0x3349) }, /* Azurewave */\n 34:\t\t{ USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */\n 35:\t\t{ USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */\n 36:\t\t{ USB_DEVICE(0x040D, 0x3801) }, /* VIA */\n 37:\t\t{ USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */\n 38:\t\t{ USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */\n 39:\t\t{ USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */\n 40:\t\t{ USB_DEVICE(0x0471, 0x209e) }, /* Philips (or NXP) PTA01 */\n 41:\t\t{ USB_DEVICE(0x1eda, 0x2315) }, /* AirTies */\n 42:\t\n 43:\t\t{ USB_DEVICE(0x0cf3, 0x7015),\n 44:\t\t .driver_info = AR9287_USB }, /* Atheros */\n 45:\t\n 46:\t\t{ USB_DEVICE(0x0cf3, 0x7010),\n 47:\t\t .driver_info = AR9280_USB }, /* Atheros */\n 48:\t\t{ USB_DEVICE(0x0846, 0x9018),\n 49:\t\t .driver_info = AR9280_USB }, /* Netgear WNDA3200 */\n 50:\t\t{ USB_DEVICE(0x083A, 0xA704),\n 51:\t\t .driver_info = AR9280_USB }, /* SMC Networks */\n 52:\t\t{ USB_DEVICE(0x0411, 0x017f),\n 53:\t\t .driver_info = AR9280_USB }, /* Sony UWA-BR100 */\n 54:\t\t{ USB_DEVICE(0x0411, 0x0197),\n 55:\t\t .driver_info = AR9280_USB }, /* Buffalo WLI-UV-AG300P */\n 56:\t\t{ USB_DEVICE(0x04da, 0x3904),\n 57:\t\t .driver_info = AR9280_USB },\n 58:\t\t{ USB_DEVICE(0x0930, 0x0a08),\n 59:\t\t .driver_info = AR9280_USB }, /* Toshiba WLM-20U2 and GN-1080 */\n 60:\t\n 61:\t\t{ USB_DEVICE(0x0cf3, 0x20ff),\n 62:\t\t .driver_info = STORAGE_DEVICE },\n 63:\t\n 64:\t\t{ },\n 65:\t};\n 66:\t\n 67:\tMODULE_DEVICE_TABLE(usb, ath9k_hif_usb_ids);\n 68:\t\n 69:\tstatic int __hif_usb_tx(struct hif_device_usb *hif_dev);\n 70:\t\n 71:\tstatic void hif_usb_regout_cb(struct urb *urb)\n 72:\t{\n 73:\t\tstruct cmd_buf *cmd = urb-\u003econtext;\n 74:\t\n 75:\t\tswitch (urb-\u003estatus) {\n 76:\t\tcase 0:\n 77:\t\t\tbreak;\n 78:\t\tcase -ENOENT:\n 79:\t\tcase -ECONNRESET:\n 80:\t\tcase -ENODEV:\n"
} |
| 15/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 36605 output: 47 thoughts: 29 Thoughts: Here's a summary of my thought process: **Diving into the Atheros USB WiFi Driver Initialization** Okay, so I need to refresh my memory on the Atheros WiFi USB driver initialization process. Let's start by looking at `ath9k_hif_usb_probe`. I need to understand how the probe function works within that driver context. Specifically, I need to know how the driver sets up its operations. I want to see how the various functions that handle communication and control with the device are registered. Therefore, I need to understand how `hif_usb.c` handles this registration process. This should give me a good overview of how the `hif` (Host Interface) layer is linked into the USB subsystem and where the key entry points are. I'm focusing on the low-level details of how the USB device is initialized and ready to communicate. |
| 16/2 | 2026/09/01 02:20 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/hif_usb.c",
"FirstLine": 1340,
"LineCount": 80
}Results: {
"Contents": "1340:\t\treturn 0;\n1341:\t}\n1342:\t\n1343:\tstatic int ath9k_hif_usb_probe(struct usb_interface *interface,\n1344:\t\t\t\t const struct usb_device_id *id)\n1345:\t{\n1346:\t\tstruct usb_endpoint_descriptor *bulk_in, *bulk_out, *int_in, *int_out;\n1347:\t\tstruct usb_device *udev = interface_to_usbdev(interface);\n1348:\t\tstruct usb_host_interface *alt;\n1349:\t\tstruct hif_device_usb *hif_dev;\n1350:\t\tint ret = 0;\n1351:\t\n1352:\t\t/* Verify the expected endpoints are present */\n1353:\t\talt = interface-\u003ecur_altsetting;\n1354:\t\tif (usb_find_common_endpoints(alt, \u0026bulk_in, \u0026bulk_out, \u0026int_in, \u0026int_out) \u003c 0 ||\n1355:\t\t usb_endpoint_num(bulk_in) != USB_WLAN_RX_PIPE ||\n1356:\t\t usb_endpoint_num(bulk_out) != USB_WLAN_TX_PIPE ||\n1357:\t\t usb_endpoint_num(int_in) != USB_REG_IN_PIPE ||\n1358:\t\t usb_endpoint_num(int_out) != USB_REG_OUT_PIPE) {\n1359:\t\t\tdev_err(\u0026udev-\u003edev,\n1360:\t\t\t\t\"ath9k_htc: Device endpoint numbers are not the expected ones\\n\");\n1361:\t\t\treturn -ENODEV;\n1362:\t\t}\n1363:\t\n1364:\t\tif (id-\u003edriver_info == STORAGE_DEVICE)\n1365:\t\t\treturn send_eject_command(interface);\n1366:\t\n1367:\t\thif_dev = kzalloc_obj(struct hif_device_usb);\n1368:\t\tif (!hif_dev) {\n1369:\t\t\tret = -ENOMEM;\n1370:\t\t\tgoto err_alloc;\n1371:\t\t}\n1372:\t\n1373:\t\thif_dev-\u003eudev = udev;\n1374:\t\thif_dev-\u003einterface = interface;\n1375:\t\thif_dev-\u003eusb_device_id = id;\n1376:\t#ifdef CONFIG_PM\n1377:\t\tudev-\u003ereset_resume = 1;\n1378:\t#endif\n1379:\t\tusb_set_intfdata(interface, hif_dev);\n1380:\t\n1381:\t\tinit_completion(\u0026hif_dev-\u003efw_done);\n1382:\t\n1383:\t\tret = ath9k_hif_request_firmware(hif_dev, true);\n1384:\t\tif (ret)\n1385:\t\t\tgoto err_fw_req;\n1386:\t\n1387:\t\treturn ret;\n1388:\t\n1389:\terr_fw_req:\n1390:\t\tusb_set_intfdata(interface, NULL);\n1391:\t\tkfree(hif_dev);\n1392:\terr_alloc:\n1393:\t\treturn ret;\n1394:\t}\n1395:\t\n1396:\tstatic void ath9k_hif_usb_reboot(struct usb_device *udev)\n1397:\t{\n1398:\t\tu32 reboot_cmd = 0xffffffff;\n1399:\t\tvoid *buf;\n1400:\t\tint ret;\n1401:\t\n1402:\t\tbuf = kmemdup(\u0026reboot_cmd, 4, GFP_KERNEL);\n1403:\t\tif (!buf)\n1404:\t\t\treturn;\n1405:\t\n1406:\t\tret = usb_interrupt_msg(udev, usb_sndintpipe(udev, USB_REG_OUT_PIPE),\n1407:\t\t\t\t buf, 4, NULL, USB_MSG_TIMEOUT);\n1408:\t\tif (ret)\n1409:\t\t\tdev_err(\u0026udev-\u003edev, \"ath9k_htc: USB reboot failed\\n\");\n1410:\t\n1411:\t\tkfree(buf);\n1412:\t}\n1413:\t\n1414:\tstatic void ath9k_hif_usb_disconnect(struct usb_interface *interface)\n1415:\t{\n1416:\t\tstruct usb_device *udev = interface_to_usbdev(interface);\n1417:\t\tstruct hif_device_usb *hif_dev = usb_get_intfdata(interface);\n1418:\t\tbool unplugged = udev-\u003estate == USB_STATE_NOTATTACHED;\n1419:\t\n"
} |
| 17/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 38133 output: 47 thoughts: 57 Thoughts: Okay, here's my take on those code-level investigations, as if they were my own mental process: **Diving into the Atheros Driver's Initialization** Alright, I'm thinking I need to refresh my memory on the initialization sequence for this Atheros wireless driver. My gut feeling tells me the problem lies somewhere around firmware loading or hardware setup. Let's start with `ath9k_hif_usb_probe`, that's the logical starting point for USB-based devices, right? I need to see exactly what happens there. Then, let's trace the firmware loading path – is it `ath9k_hif_request_firmware` or maybe `ath9k_htc_hw_init` that's the culprit? I have to understand the specific flow. The key is to follow the execution and determine what happens *after* the firmware is (supposedly) loaded. I have to pinpoint if the hardware's failing to initialize, if the firmware itself is causing problems, or if something in the communication handshake is getting messed up. I'll meticulously go through the functions and data structures. It's a process of elimination, but focusing on those specific functions should help me narrow down the issue's location. |
| 18/2 | 2026/09/01 02:20 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/hif_usb.c",
"FirstLine": 1200,
"LineCount": 90
}Results: {
"Contents": "1200:\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev, \"no suitable firmware found!\\n\");\n1201:\t\n1202:\t\t\treturn -ENOENT;\n1203:\t\t} else {\n1204:\t\t\tif (IS_AR7010_DEVICE(hif_dev-\u003eusb_device_id-\u003edriver_info))\n1205:\t\t\t\tchip = \"7010\";\n1206:\t\t\telse\n1207:\t\t\t\tchip = \"9271\";\n1208:\t\n1209:\t\t\t/* expected fw locations:\n1210:\t\t\t * - ath9k_htc/htc_9271-1.dev.0.fw (development version)\n1211:\t\t\t * - ath9k_htc/htc_9271-1.4.0.fw (stable version)\n1212:\t\t\t */\n1213:\t\t\tsnprintf(hif_dev-\u003efw_name, sizeof(hif_dev-\u003efw_name),\n1214:\t\t\t\t \"%s/htc_%s-%d.%s.0.fw\", HTC_FW_PATH,\n1215:\t\t\t\t chip, MAJOR_VERSION_REQ, index);\n1216:\t\t}\n1217:\t\n1218:\t\tret = request_firmware_nowait(THIS_MODULE, true, hif_dev-\u003efw_name,\n1219:\t\t\t\t\t \u0026hif_dev-\u003eudev-\u003edev, GFP_KERNEL,\n1220:\t\t\t\t\t hif_dev, ath9k_hif_usb_firmware_cb);\n1221:\t\tif (ret)\n1222:\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\n1223:\t\t\t\t\"ath9k_htc: Async request for firmware %s failed\\n\",\n1224:\t\t\t\thif_dev-\u003efw_name);\n1225:\t\n1226:\t\treturn ret;\n1227:\t}\n1228:\t\n1229:\tstatic void ath9k_hif_usb_firmware_cb(const struct firmware *fw, void *context)\n1230:\t{\n1231:\t\tstruct hif_device_usb *hif_dev = context;\n1232:\t\tint ret;\n1233:\t\n1234:\t\tif (!fw) {\n1235:\t\t\tret = ath9k_hif_request_firmware(hif_dev, false);\n1236:\t\t\tif (!ret)\n1237:\t\t\t\treturn;\n1238:\t\n1239:\t\t\tdev_err(\u0026hif_dev-\u003eudev-\u003edev,\n1240:\t\t\t\t\"ath9k_htc: Failed to get firmware %s\\n\",\n1241:\t\t\t\thif_dev-\u003efw_name);\n1242:\t\t\tgoto err_fw;\n1243:\t\t}\n1244:\t\n1245:\t\thif_dev-\u003ehtc_handle = ath9k_htc_hw_alloc(hif_dev, \u0026hif_usb,\n1246:\t\t\t\t\t\t\t \u0026hif_dev-\u003eudev-\u003edev);\n1247:\t\tif (hif_dev-\u003ehtc_handle == NULL)\n1248:\t\t\tgoto err_dev_alloc;\n1249:\t\n1250:\t\thif_dev-\u003efw_data = fw-\u003edata;\n1251:\t\thif_dev-\u003efw_size = fw-\u003esize;\n1252:\t\n1253:\t\t/* Proceed with initialization */\n1254:\t\n1255:\t\tret = ath9k_hif_usb_dev_init(hif_dev);\n1256:\t\tif (ret)\n1257:\t\t\tgoto err_dev_init;\n1258:\t\n1259:\t\tret = ath9k_htc_hw_init(hif_dev-\u003ehtc_handle,\n1260:\t\t\t\t\t\u0026hif_dev-\u003einterface-\u003edev,\n1261:\t\t\t\t\thif_dev-\u003eusb_device_id-\u003eidProduct,\n1262:\t\t\t\t\thif_dev-\u003eudev-\u003eproduct,\n1263:\t\t\t\t\thif_dev-\u003eusb_device_id-\u003edriver_info);\n1264:\t\tif (ret) {\n1265:\t\t\tret = -EINVAL;\n1266:\t\t\tgoto err_htc_hw_init;\n1267:\t\t}\n1268:\t\n1269:\t\trelease_firmware(fw);\n1270:\t\thif_dev-\u003eflags |= HIF_USB_READY;\n1271:\t\tcomplete_all(\u0026hif_dev-\u003efw_done);\n1272:\t\n1273:\t\treturn;\n1274:\t\n1275:\terr_htc_hw_init:\n1276:\t\tath9k_hif_usb_dev_deinit(hif_dev);\n1277:\terr_dev_init:\n1278:\t\tath9k_htc_hw_free(hif_dev-\u003ehtc_handle);\n1279:\terr_dev_alloc:\n1280:\t\trelease_firmware(fw);\n1281:\terr_fw:\n1282:\t\tath9k_hif_usb_firmware_fail(hif_dev);\n1283:\t}\n1284:\t\n1285:\t/*\n1286:\t * An exact copy of the function from zd1211rw.\n1287:\t */\n1288:\tstatic int send_eject_command(struct usb_interface *interface)\n1289:\t{\n"
} |
| 19/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 39948 output: 45 thoughts: 22 Thoughts: Here's my thought process, as requested: **Digging into the `hif_usb` Definition** Okay, so I need to understand how `hif_usb` is defined. I'm going to jump into the `hif_usb.c` file and pinpoint the exact declaration. I'm looking for the structure, the initialization, the whole shebang. I want to see its internal workings, the data types used, the pointers, everything. This is fundamental to understanding its role in the larger system. I'm thinking I'll need to trace its uses later, so understanding the specifics of its definition is crucial groundwork. Let's get to it. |
| 20/2 | 2026/09/01 02:20 | tool | grepper |
0mArgs:{
"Expression": "struct hif_device_ops|hif_usb =",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/hif_usb.c=503=static void hif_usb_sta_drain(void *hif_handle, u8 idx)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-523-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:524:static struct ath9k_htc_hif hif_usb = {\ndrivers/net/wireless/ath/ath9k/hif_usb.c-525-\t.transport = ATH9K_HIF_USB,\n"
} |
| 21/2 | 2026/09/01 02:20 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 40321 output: 46 thoughts: 23 Thoughts: Here's a summary of my thought process, as requested: **Diving into `hif_usb.c`** Okay, I need to get a handle on what's happening within the `hif_usb.c` file. Specifically, I need to understand what's going on between lines 520 and 540. My immediate thought is, "What's the context here?" Am I looking at an interrupt handler? Data transfer routine? Initialization sequence? Knowing this will help me zero in on the relevant code. I expect this section to be relatively tight, so I'll be looking for keywords or variable names that indicate the code's function. Are we dealing with USB descriptors? Packet parsing? Error handling? The specific function calls within this range will also be critical. I'll pay close attention to the return values and any conditional branches, as those usually indicate the critical path. Ultimately, I'm trying to deduce the exact functionality occurring in this segment of code in this specific file. |
| 22/2 | 2026/09/01 02:21 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/hif_usb.c",
"FirstLine": 520,
"LineCount": 20
}Results: {
"Contents": " 520:\t\n 521:\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\n 522:\t}\n 523:\t\n 524:\tstatic struct ath9k_htc_hif hif_usb = {\n 525:\t\t.transport = ATH9K_HIF_USB,\n 526:\t\t.name = \"ath9k_hif_usb\",\n 527:\t\n 528:\t\t.control_ul_pipe = USB_REG_OUT_PIPE,\n 529:\t\t.control_dl_pipe = USB_REG_IN_PIPE,\n 530:\t\n 531:\t\t.start = hif_usb_start,\n 532:\t\t.stop = hif_usb_stop,\n 533:\t\t.sta_drain = hif_usb_sta_drain,\n 534:\t\t.send = hif_usb_send,\n 535:\t};\n 536:\t\n 537:\t/* Need to free remain_skb allocated in ath9k_hif_usb_rx_stream\n 538:\t * in case ath9k_hif_usb_rx_stream wasn't called next time to\n 539:\t * process the buffer and subsequently free it.\n"
} |
| 23/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 40950 output: 71 thoughts: 486 Thoughts: **Tracing the Atheros HTC TX Path** Okay, let's map out this `ath9k_htc` transmission path. First, I need to confirm the entry point is indeed `ath9k_htc_tx`, which is assigned to the `tx` field of the `ath9k_htc_ops` structure within mac80211. From there, the flow seems to be: `ath9k_htc_tx` calls `ath9k_htc_tx_start`, which then branches to either `ath9k_htc_tx_data` or `ath9k_htc_tx_mgmt`. Both of those call `htc_send`, which hands off to `hif_usb_send`, followed by `hif_usb_send_tx`. Ultimately, that queues the SKB to `hif_dev->tx.tx_skb_queue` and calls `__hif_usb_tx`. I also need to note that the USB URB completion callback, `hif_usb_tx_cb`, *also* calls `__hif_usb_tx`. This is important, as it suggests a re-entry point or some form of completion handling. Now, let's identify the key functions that are non-static and thus represent points of interest for further analysis. Specifically looking within `drivers/net/wireless/ath/ath9k/`: * `ath9k_htc_tx_start` (in htc_drv_txrx.c, declared in htc.h). This is non-static, indicating potential external access. * `htc_send` (in htc_hst.c, declared in htc_hst.h). Again, non-static, so an interesting point of focus. * `ath9k_htc_txcompletion_cb` (in htc_hst.c, declared in htc_hst.h). Also non-static, so it must be handled during TX completion, and this needs to be understood. * `ath9k_htc_tx` (static in htc_drv_main.c, assigned to struct ieee80211_ops ath9k_htc_ops). While static, it's the beginning of the journey. * `ath9k_hif_usb_probe` (static in hif_usb.c). I'm less concerned with this one now, as it's the probe function, but noting its presence. * `ath9k_htc_hw_init` (in htc_drv_init.c, non-static). Potentially crucial for device initialization, it needs to be examined. * `ath9k_htc_txstatus` (in htc_drv_txrx.c, non-static). Likely important for tracking and processing TX status. I need to confirm the declarations of `ath9k_htc_tx_start`, `htc_send` and `ath9k_htc_hw_init`. From these declarations I can understand their parameters, and what is passed, and what can be controlled, and what happens at each of these points. |
| 24/2 | 2026/09/01 02:21 | tool | grepper |
0mArgs:{
"Expression": "(int|void) ath9k_htc_tx_start|(int|void) htc_send|(int|void) ath9k_htc_hw_init",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/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,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=260=static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-339-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:340:int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-341-\t\t struct ieee80211_sta *sta,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=241=int htc_connect_service(struct htc_target *target,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-306-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:307:int htc_send(struct htc_target *target, struct sk_buff *skb)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-308-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-314-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:315:int htc_send_epid(struct htc_target *target, struct sk_buff *skb,\ndrivers/net/wireless/ath/ath9k/htc_hst.c-316-\t\t enum htc_endpoint_id epid)\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=206=int htc_connect_service(struct htc_target *target,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.h-208-\t\t\t enum htc_endpoint_id *conn_rsp_eid);\ndrivers/net/wireless/ath/ath9k/htc_hst.h:209:int htc_send(struct htc_target *target, struct sk_buff *skb);\ndrivers/net/wireless/ath/ath9k/htc_hst.h:210:int htc_send_epid(struct htc_target *target, struct sk_buff *skb,\ndrivers/net/wireless/ath/ath9k/htc_hst.h-211-\t\t enum htc_endpoint_id epid);\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"
} |
| 25/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 43271 output: 36 thoughts: 60 Thoughts: Okay, let's dive into this. I need to get a clear picture of the Kconfig dependencies related to `ATH9K_HTC`. **Kconfig Dependency Deep Dive: ATH9K_HTC** Alright, my first step is to trace the Kconfig dependencies for `ATH9K_HTC`. I'll start by examining the Kconfig files in the relevant directories. I'll need to check the following locations: * `drivers/net/wireless/ath/ath9k/Kconfig` - This is the most specific one, likely to contain direct dependencies. * `drivers/net/wireless/ath/Kconfig` - This file might define parent or broader dependencies that affect `ath9k`. * `drivers/net/wireless/Kconfig` - And finally, the top-level wireless Kconfig to see any overarching dependencies or general networking requirements. Once I have the lay of the land, I can create a dependency tree and understand what other modules or features are required to be enabled for `ATH9K_HTC` to function correctly. This is a critical step to ensure a properly configured kernel. |
| 26/2 | 2026/09/01 02:21 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/Kconfig",
"FirstLine": 1,
"LineCount": 50
}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"
} |
| 27/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 44264 output: 39 thoughts: 19 Thoughts: Here's my take on those thoughts: **Analyzing the Ath9k Makefile** Okay, time to dive into the `drivers/net/wireless/ath/ath9k/Makefile`. I need to get a handle on how this particular driver is built, what its dependencies are, and how it integrates into the overall kernel build process. I'm looking for the key variables, the conditional compilation flags, the module targets, and the include paths – basically, anything that sheds light on the intricacies of building the ath9k module. Understanding the Makefile is crucial for any potential modifications, debugging efforts, or even just for getting a high-level overview of the driver's build architecture. I expect to see the standard kernel Makefile conventions at play here, but I always keep an eye out for any Ath9k-specific nuances. |
| 28/2 | 2026/09/01 02:21 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/Makefile",
"FirstLine": 1,
"LineCount": 85
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: ISC\n 2:\tath9k-y +=\tbeacon.o \\\n 3:\t\t\tgpio.o \\\n 4:\t\t\tinit.o \\\n 5:\t\t\tmain.o \\\n 6:\t\t\trecv.o \\\n 7:\t\t\txmit.o \\\n 8:\t\t\tlink.o \\\n 9:\t\t\tantenna.o \\\n 10:\t\t\tchannel.o\n 11:\t\n 12:\tath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o\n 13:\tath9k-$(CONFIG_ATH9K_PCI) += pci.o\n 14:\tath9k-$(CONFIG_ATH9K_AHB) += ahb.o\n 15:\tath9k-$(CONFIG_ATH9K_DFS_DEBUGFS) += dfs_debug.o\n 16:\tath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += dfs.o\n 17:\tath9k-$(CONFIG_ATH9K_TX99) += tx99.o\n 18:\tath9k-$(CONFIG_ATH9K_WOW) += wow.o\n 19:\tath9k-$(CONFIG_ATH9K_HWRNG) += rng.o\n 20:\t\n 21:\tath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o\n 22:\t\n 23:\tath9k-$(CONFIG_ATH9K_STATION_STATISTICS) += debug_sta.o\n 24:\t\n 25:\tobj-$(CONFIG_ATH9K) += ath9k.o\n 26:\t\n 27:\tath9k_hw-y:=\t\\\n 28:\t\t\tar9002_hw.o \\\n 29:\t\t\tar9003_hw.o \\\n 30:\t\t\thw.o \\\n 31:\t\t\tar9003_phy.o \\\n 32:\t\t\tar9002_phy.o \\\n 33:\t\t\tar5008_phy.o \\\n 34:\t\t\tar9002_calib.o \\\n 35:\t\t\tar9003_calib.o \\\n 36:\t\t\tcalib.o \\\n 37:\t\t\teeprom.o \\\n 38:\t\t\teeprom_def.o \\\n 39:\t\t\teeprom_4k.o \\\n 40:\t\t\teeprom_9287.o \\\n 41:\t\t\tani.o \\\n 42:\t\t\tmac.o \\\n 43:\t\t\tar9002_mac.o \\\n 44:\t\t\tar9003_mac.o \\\n 45:\t\t\tar9003_eeprom.o \\\n 46:\t\t\tar9003_paprd.o\n 47:\t\n 48:\tath9k_hw-$(CONFIG_ATH9K_WOW) += ar9003_wow.o\n 49:\t\n 50:\tath9k_hw-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += btcoex.o \\\n 51:\t\t\t\t\t\t ar9003_mci.o \\\n 52:\t\t\t\t\t\t ar9003_aic.o\n 53:\t\n 54:\tath9k_hw-$(CONFIG_ATH9K_PCOEM) += ar9003_rtt.o\n 55:\t\n 56:\tath9k_hw-$(CONFIG_ATH9K_DYNACK) += dynack.o\n 57:\t\n 58:\tobj-$(CONFIG_ATH9K_HW) += ath9k_hw.o\n 59:\t\n 60:\tobj-$(CONFIG_ATH9K_COMMON) += ath9k_common.o\n 61:\tath9k_common-y:=\tcommon.o \\\n 62:\t\t\t\tcommon-init.o \\\n 63:\t\t\t\tcommon-beacon.o \\\n 64:\t\n 65:\tath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o\n 66:\tath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o\n 67:\t\n 68:\tath9k_htc-y +=\thtc_hst.o \\\n 69:\t\t\thif_usb.o \\\n 70:\t\t\twmi.o \\\n 71:\t\t\thtc_drv_txrx.o \\\n 72:\t\t\thtc_drv_main.o \\\n 73:\t\t\thtc_drv_beacon.o \\\n 74:\t\t\thtc_drv_init.o \\\n 75:\t\t\thtc_drv_gpio.o\n 76:\t\n 77:\tath9k_htc-$(CONFIG_ATH9K_HTC_DEBUGFS) += htc_drv_debug.o\n 78:\t\n 79:\tobj-$(CONFIG_ATH9K_HTC) += ath9k_htc.o\n 80:\t\n 81:\tobj-$(CONFIG_ATH9K_PCI_NO_EEPROM) += ath9k_pci_owl_loader.o\n"
} |
| 29/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 45800 output: 28 thoughts: 81 Thoughts: **Examining the Kconfig Dependencies for ATH9K_HTC** Alright, let's dive in and dissect the dependencies for `ATH9K_HTC`. My initial thought is to make sure we're covering all the bases. I recall that `ATH9K_HTC` hinges on `USB` and `MAC80211` (along with `WLAN_VENDOR_ATH` and `ATH_COMMON`, of course). Now, I need to verify the explicit and precise structure of this in the Kconfig files. I'll have a look at the relevant Kconfig files. Specifically, I need to check `drivers/net/wireless/Kconfig` and `drivers/net/wireless/ath/Kconfig` to get a definitive picture of the complete hierarchy. This is the methodical approach; confirm the immediate dependencies and then trace back up the tree. |
| 30/2 | 2026/09/01 02:21 | tool | grepper |
0mArgs:{
"Expression": "source.*ath",
"PathPrefix": "drivers/net/wireless"
}Results: {
"Output": "drivers/net/wireless/Kconfig=21=source \"drivers/net/wireless/admtek/Kconfig\"\ndrivers/net/wireless/Kconfig:22:source \"drivers/net/wireless/ath/Kconfig\"\ndrivers/net/wireless/Kconfig-23-source \"drivers/net/wireless/atmel/Kconfig\"\n--\ndrivers/net/wireless/ath/Kconfig=49=config ATH_REG_DYNAMIC_USER_CERT_TESTING\n--\ndrivers/net/wireless/ath/Kconfig-56-\ndrivers/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\"\ndrivers/net/wireless/ath/Kconfig:60:source \"drivers/net/wireless/ath/ath6kl/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:61:source \"drivers/net/wireless/ath/ar5523/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:62:source \"drivers/net/wireless/ath/wil6210/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:63:source \"drivers/net/wireless/ath/ath10k/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:64:source \"drivers/net/wireless/ath/wcn36xx/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:65:source \"drivers/net/wireless/ath/ath11k/Kconfig\"\ndrivers/net/wireless/ath/Kconfig:66:source \"drivers/net/wireless/ath/ath12k/Kconfig\"\ndrivers/net/wireless/ath/Kconfig-67-\n--\ndrivers/net/wireless/ath/ath10k/ahb.c=430=static void ath10k_ahb_irq_disable(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/ahb.c-435-\ndrivers/net/wireless/ath/ath10k/ahb.c:436:static int ath10k_ahb_resource_init(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/ahb.c-437-{\n--\ndrivers/net/wireless/ath/ath10k/ahb.c-523-\ndrivers/net/wireless/ath/ath10k/ahb.c:524:static void ath10k_ahb_resource_deinit(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/ahb.c-525-{\n--\ndrivers/net/wireless/ath/ath10k/mac.c=204=ath10k_mac_max_vht_nss(const u16 vht_mcs_mask[NL80211_VHT_NSS_MAX])\n--\ndrivers/net/wireless/ath/ath10k/mac.c-214-\ndrivers/net/wireless/ath/ath10k/mac.c:215:int ath10k_mac_ext_resource_config(struct ath10k *ar, u32 val)\ndrivers/net/wireless/ath/ath10k/mac.c-216-{\n--\ndrivers/net/wireless/ath/ath10k/mac.h=70=struct ieee80211_txq *ath10k_mac_txq_lookup(struct ath10k *ar,\n--\ndrivers/net/wireless/ath/ath10k/mac.h-72-\t\t\t\t\t u8 tid);\ndrivers/net/wireless/ath/ath10k/mac.h:73:int ath10k_mac_ext_resource_config(struct ath10k *ar, u32 val);\ndrivers/net/wireless/ath/ath10k/mac.h-74-void ath10k_mac_wait_tx_complete(struct ath10k *ar);\n--\ndrivers/net/wireless/ath/ath10k/pci.c=1789=void ath10k_pci_hif_send_complete_check(struct ath10k *ar, u8 pipe,\n--\ndrivers/net/wireless/ath/ath10k/pci.c-1804-\t\t */\ndrivers/net/wireless/ath/ath10k/pci.c:1805:\t\tresources = ath10k_pci_hif_get_free_queue_number(ar, pipe);\ndrivers/net/wireless/ath/ath10k/pci.c-1806-\n--\ndrivers/net/wireless/ath/ath10k/pci.c=3437=static bool ath10k_pci_chip_is_supported(u32 dev_id, u32 chip_id)\n--\ndrivers/net/wireless/ath/ath10k/pci.c-3453-\ndrivers/net/wireless/ath/ath10k/pci.c:3454:int ath10k_pci_setup_resource(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/pci.c-3455-{\n--\ndrivers/net/wireless/ath/ath10k/pci.c-3510-\ndrivers/net/wireless/ath/ath10k/pci.c:3511:void ath10k_pci_release_resource(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/pci.c-3512-{\n--\ndrivers/net/wireless/ath/ath10k/pci.h=250=int ath10k_pci_wait_for_target_init(struct ath10k *ar);\ndrivers/net/wireless/ath/ath10k/pci.h:251:int ath10k_pci_setup_resource(struct ath10k *ar);\ndrivers/net/wireless/ath/ath10k/pci.h:252:void ath10k_pci_release_resource(struct ath10k *ar);\ndrivers/net/wireless/ath/ath10k/pci.h-253-\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=761=static void ath10k_snoc_hif_send_complete_check(struct ath10k *ar, u8 pipe,\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-768-\tif (!force) {\ndrivers/net/wireless/ath/ath10k/snoc.c:769:\t\tresources = ath10k_snoc_hif_get_free_queue_number(ar, pipe);\ndrivers/net/wireless/ath/ath10k/snoc.c-770-\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=1305=static void ath10k_snoc_free_irq(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1313-\ndrivers/net/wireless/ath/ath10k/snoc.c:1314:static int ath10k_snoc_resource_init(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/snoc.c-1315-{\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=1371=int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type)\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1408-\ndrivers/net/wireless/ath/ath10k/snoc.c:1409:static int ath10k_snoc_setup_resource(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/snoc.c-1410-{\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1437-\ndrivers/net/wireless/ath/ath10k/snoc.c:1438:static void ath10k_snoc_release_resource(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/snoc.c-1439-{\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=1573=static void ath10k_modem_deinit(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1582-\ndrivers/net/wireless/ath/ath10k/snoc.c:1583:static int ath10k_setup_msa_resources(struct ath10k *ar, u32 msa_size)\ndrivers/net/wireless/ath/ath10k/snoc.c-1584-{\n--\ndrivers/net/wireless/ath/ath10k/snoc.c=1732=static int ath10k_snoc_probe(struct platform_device *pdev)\n--\ndrivers/net/wireless/ath/ath10k/snoc.c-1894-\ndrivers/net/wireless/ath/ath10k/snoc.c:1895:static int ath10k_snoc_free_resources(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/snoc.c-1896-{\n--\ndrivers/net/wireless/ath/ath10k/usb.c=74=static void ath10k_usb_cleanup_recv_urb(struct ath10k_urb_context *urb_context)\n--\ndrivers/net/wireless/ath/ath10k/usb.c-81-\ndrivers/net/wireless/ath/ath10k/usb.c:82:static void ath10k_usb_free_pipe_resources(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/usb.c-83-\t\t\t\t\t struct ath10k_usb_pipe *pipe)\n--\ndrivers/net/wireless/ath/ath10k/usb.c-113-\ndrivers/net/wireless/ath/ath10k/usb.c:114:static void ath10k_usb_cleanup_pipe_resources(struct ath10k *ar)\ndrivers/net/wireless/ath/ath10k/usb.c-115-{\n--\ndrivers/net/wireless/ath/ath10k/usb.c=746=static u8 ath10k_usb_get_logical_pipe_num(u8 ep_address, int *urb_count)\n--\ndrivers/net/wireless/ath/ath10k/usb.c-790-\ndrivers/net/wireless/ath/ath10k/usb.c:791:static int ath10k_usb_alloc_pipe_resources(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/usb.c-792-\t\t\t\t\t struct ath10k_usb_pipe *pipe,\n--\ndrivers/net/wireless/ath/ath10k/usb.c-822-\ndrivers/net/wireless/ath/ath10k/usb.c:823:static int ath10k_usb_setup_pipe_resources(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/usb.c-824-\t\t\t\t\t struct usb_interface *interface)\n--\ndrivers/net/wireless/ath/ath10k/wmi-ops.h=14=struct wmi_ops {\n--\ndrivers/net/wireless/ath/ath10k/wmi-ops.h-209-\t\t\t\t\t\t\tu32 detect_margin);\ndrivers/net/wireless/ath/ath10k/wmi-ops.h:210:\tstruct sk_buff *(*ext_resource_config)(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/wmi-ops.h-211-\t\t\t\t\t enum wmi_host_platform_type type,\n--\ndrivers/net/wireless/ath/ath10k/wmi-ops.h=1579=static inline int\ndrivers/net/wireless/ath/ath10k/wmi-ops.h:1580:ath10k_wmi_ext_resource_config(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/wmi-ops.h-1581-\t\t\t enum wmi_host_platform_type type,\n--\ndrivers/net/wireless/ath/ath10k/wmi.c=8855=static struct sk_buff *\ndrivers/net/wireless/ath/ath10k/wmi.c:8856:ath10k_wmi_10_4_ext_resource_config(struct ath10k *ar,\ndrivers/net/wireless/ath/ath10k/wmi.c-8857-\t\t\t\t enum wmi_host_platform_type type,\n--\ndrivers/net/wireless/ath/ath10k/wmi.c=9438=static const struct wmi_ops wmi_10_4_ops = {\n--\ndrivers/net/wireless/ath/ath10k/wmi.c-9496-\t.fw_stats_fill = ath10k_wmi_10_4_op_fw_stats_fill,\ndrivers/net/wireless/ath/ath10k/wmi.c:9497:\t.ext_resource_config = ath10k_wmi_10_4_ext_resource_config,\ndrivers/net/wireless/ath/ath10k/wmi.c-9498-\t.gen_update_fw_tdls_state = ath10k_wmi_10_4_gen_update_fw_tdls_state,\n--\ndrivers/net/wireless/ath/ath11k/ahb.c=828=static int ath11k_core_get_rproc(struct ath11k_base *ab)\n--\ndrivers/net/wireless/ath/ath11k/ahb.c-847-\ndrivers/net/wireless/ath/ath11k/ahb.c:848:static int ath11k_ahb_setup_msi_resources(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/ahb.c-849-{\n--\ndrivers/net/wireless/ath/ath11k/ahb.c=916=static void ath11k_ahb_release_smp2p_handle(struct ath11k_base *ab)\n--\ndrivers/net/wireless/ath/ath11k/ahb.c-925-\ndrivers/net/wireless/ath/ath11k/ahb.c:926:static int ath11k_ahb_setup_resources(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/ahb.c-927-{\n--\ndrivers/net/wireless/ath/ath11k/ahb.c-946-\ndrivers/net/wireless/ath/ath11k/ahb.c:947:static int ath11k_ahb_setup_msa_resources(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/ahb.c-948-{\n--\ndrivers/net/wireless/ath/ath11k/ahb.c=999=static void ath11k_ahb_ce_unmap(struct ath11k_base *ab)\n--\ndrivers/net/wireless/ath/ath11k/ahb.c-1004-\ndrivers/net/wireless/ath/ath11k/ahb.c:1005:static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/ahb.c-1006-{\n--\ndrivers/net/wireless/ath/ath11k/ahb.c-1103-\ndrivers/net/wireless/ath/ath11k/ahb.c:1104:static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/ahb.c-1105-{\n--\ndrivers/net/wireless/ath/ath11k/ahb.c=1264=static void ath11k_ahb_remove_prepare(struct ath11k_base *ab)\n--\ndrivers/net/wireless/ath/ath11k/ahb.c-1279-\ndrivers/net/wireless/ath/ath11k/ahb.c:1280:static void ath11k_ahb_free_resources(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/ahb.c-1281-{\n--\ndrivers/net/wireless/ath/ath11k/dp.c=43=int ath11k_dp_peer_setup(struct ath11k *ar, int vdev_id, const u8 *addr)\n--\ndrivers/net/wireless/ath/ath11k/dp.c-78-\ndrivers/net/wireless/ath/ath11k/dp.c:79:\t/* TODO: Setup other peer specific resource used in data path */\ndrivers/net/wireless/ath/ath11k/dp.c-80-\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3364=EXPORT_SYMBOL(ath11k_qmi_deinit_service);\ndrivers/net/wireless/ath/ath11k/qmi.c-3365-\ndrivers/net/wireless/ath/ath11k/qmi.c:3366:void ath11k_qmi_free_resource(struct ath11k_base *ab)\ndrivers/net/wireless/ath/ath11k/qmi.c-3367-{\n--\ndrivers/net/wireless/ath/ath11k/qmi.h=521=int ath11k_qmi_init_service(struct ath11k_base *ab);\ndrivers/net/wireless/ath/ath11k/qmi.h:522:void ath11k_qmi_free_resource(struct ath11k_base *ab);\ndrivers/net/wireless/ath/ath11k/qmi.h-523-int ath11k_qmi_fwreset_from_cold_boot(struct ath11k_base *ab);\n--\ndrivers/net/wireless/ath/ath12k/ahb.c=1011=static void ath12k_ahb_deconfigure_rproc(struct ath12k_base *ab)\n--\ndrivers/net/wireless/ath/ath12k/ahb.c-1035-\ndrivers/net/wireless/ath/ath12k/ahb.c:1036:static int ath12k_ahb_resource_init(struct ath12k_base *ab)\ndrivers/net/wireless/ath/ath12k/ahb.c-1037-{\n--\ndrivers/net/wireless/ath/ath12k/ahb.c-1099-\ndrivers/net/wireless/ath/ath12k/ahb.c:1100:static void ath12k_ahb_resource_deinit(struct ath12k_base *ab)\ndrivers/net/wireless/ath/ath12k/ahb.c-1101-{\n--\ndrivers/net/wireless/ath/ath12k/ahb.c=1267=static void ath12k_ahb_remove_prepare(struct ath12k_base *ab)\n--\ndrivers/net/wireless/ath/ath12k/ahb.c-1282-\ndrivers/net/wireless/ath/ath12k/ahb.c:1283:static void ath12k_ahb_free_resources(struct ath12k_base *ab)\ndrivers/net/wireless/ath/ath12k/ahb.c-1284-{\n--\ndrivers/net/wireless/ath/ath12k/dp.c=47=int ath12k_dp_peer_setup(struct ath12k *ar, int vdev_id, const u8 *addr)\n--\ndrivers/net/wireless/ath/ath12k/dp.c-82-\ndrivers/net/wireless/ath/ath12k/dp.c:83:\t/* TODO: Setup other peer specific resource used in data path */\ndrivers/net/wireless/ath/ath12k/dp.c-84-\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=4103=void ath12k_qmi_deinit_service(struct ath12k_base *ab)\n--\ndrivers/net/wireless/ath/ath12k/qmi.c-4116-\ndrivers/net/wireless/ath/ath12k/qmi.c:4117:void ath12k_qmi_free_resource(struct ath12k_base *ab)\ndrivers/net/wireless/ath/ath12k/qmi.c-4118-{\n--\ndrivers/net/wireless/ath/ath12k/qmi.h=633=int ath12k_qmi_init_service(struct ath12k_base *ab);\ndrivers/net/wireless/ath/ath12k/qmi.h:634:void ath12k_qmi_free_resource(struct ath12k_base *ab);\ndrivers/net/wireless/ath/ath12k/qmi.h-635-void ath12k_qmi_trigger_host_cap(struct ath12k_base *ab);\n--\ndrivers/net/wireless/ath/ath12k/wmi.c=4143=static void\ndrivers/net/wireless/ath/ath12k/wmi.c:4144:ath12k_wmi_copy_resource_config(struct ath12k_base *ab,\ndrivers/net/wireless/ath/ath12k/wmi.c-4145-\t\t\t\tstruct ath12k_wmi_resource_config_params *wmi_cfg,\n--\ndrivers/net/wireless/ath/ath6kl/usb.c=177=static inline struct ath6kl_usb *ath6kl_usb_priv(struct ath6kl *ar)\n--\ndrivers/net/wireless/ath/ath6kl/usb.c-182-/* pipe resource allocation/cleanup */\ndrivers/net/wireless/ath/ath6kl/usb.c:183:static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,\ndrivers/net/wireless/ath/ath6kl/usb.c-184-\t\t\t\t\t int urb_cnt)\n--\ndrivers/net/wireless/ath/ath6kl/usb.c-217-\ndrivers/net/wireless/ath/ath6kl/usb.c:218:static void ath6kl_usb_free_pipe_resources(struct ath6kl_usb_pipe *pipe)\ndrivers/net/wireless/ath/ath6kl/usb.c-219-{\n--\ndrivers/net/wireless/ath/ath6kl/usb.c-248-\ndrivers/net/wireless/ath/ath6kl/usb.c:249:static void ath6kl_usb_cleanup_pipe_resources(struct ath6kl_usb *ar_usb)\ndrivers/net/wireless/ath/ath6kl/usb.c-250-{\n--\ndrivers/net/wireless/ath/ath6kl/usb.c=257=static u8 ath6kl_usb_get_logical_pipe_num(struct ath6kl_usb *ar_usb,\n--\ndrivers/net/wireless/ath/ath6kl/usb.c-302-\ndrivers/net/wireless/ath/ath6kl/usb.c:303:static int ath6kl_usb_setup_pipe_resources(struct ath6kl_usb *ar_usb)\ndrivers/net/wireless/ath/ath6kl/usb.c-304-{\n"
} |
| 31/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 52281 output: 34 thoughts: 87 Thoughts: **Checking Wireless Configuration Dependencies** Okay, let's just double-check those Kconfig files again, specifically `drivers/net/wireless/ath/Kconfig` and `drivers/net/wireless/Kconfig`. I want to be absolutely certain we've got all the config dependencies accounted for, especially with the potential for overlaps or omissions. Alright, looking at `drivers/net/wireless/Kconfig` specifically, line 1 to 30 of this file looks most relevant. Ah, yes, `WLAN`, that's a bool or menuconfig. Just confirming there aren't any sneaky omissions I haven't considered. Good, good... let's keep moving. |
| 32/2 | 2026/09/01 02:21 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/Kconfig",
"FirstLine": 1,
"LineCount": 35
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# Wireless LAN device configuration\n 4:\t#\n 5:\t\n 6:\tmenuconfig WLAN\n 7:\t\tbool \"Wireless LAN\"\n 8:\t\tdepends on !S390\n 9:\t\tdepends on NET\n 10:\t\tselect WIRELESS\n 11:\t\tdefault y\n 12:\t\thelp\n 13:\t\t This section contains all the pre 802.11 and 802.11 wireless\n 14:\t\t device drivers. For a complete list of drivers and documentation\n 15:\t\t on them refer to the wireless wiki:\n 16:\t\n 17:\t\t https://wireless.wiki.kernel.org/en/users/Drivers\n 18:\t\n 19:\tif WLAN\n 20:\t\n 21:\tsource \"drivers/net/wireless/admtek/Kconfig\"\n 22:\tsource \"drivers/net/wireless/ath/Kconfig\"\n 23:\tsource \"drivers/net/wireless/atmel/Kconfig\"\n 24:\tsource \"drivers/net/wireless/broadcom/Kconfig\"\n 25:\tsource \"drivers/net/wireless/intel/Kconfig\"\n 26:\tsource \"drivers/net/wireless/intersil/Kconfig\"\n 27:\tsource \"drivers/net/wireless/marvell/Kconfig\"\n 28:\tsource \"drivers/net/wireless/mediatek/Kconfig\"\n 29:\tsource \"drivers/net/wireless/microchip/Kconfig\"\n 30:\tsource \"drivers/net/wireless/morsemicro/Kconfig\"\n 31:\tsource \"drivers/net/wireless/nxp/Kconfig\"\n 32:\tsource \"drivers/net/wireless/purelifi/Kconfig\"\n 33:\tsource \"drivers/net/wireless/ralink/Kconfig\"\n 34:\tsource \"drivers/net/wireless/realtek/Kconfig\"\n 35:\tsource \"drivers/net/wireless/rsi/Kconfig\"\n"
} |
| 33/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 53078 output: 50 thoughts: 769 Thoughts: **Analyzing the Worthiness of Fuzzing the ath9k_htc Driver** Okay, let's break this down. First, I need to understand the configuration dependencies for `ATH9K_HTC`. Looking at `drivers/net/wireless/ath/ath9k/Kconfig`, it's clear that enabling it requires: `WLAN`, `WLAN_VENDOR_ATH`, `ATH9K_HTC`, `USB`, and `MAC80211`. That's the baseline. Now, does this meet the criteria for being worth fuzzing? I need to refer to the WorthFuzzing guidelines. The key questions are: Does it modify core kernel logic, drivers, or architectures? And can the code be executed in a virtualized environment? The guidelines explicitly state that changes to `Kconfig` files alone don't warrant fuzzing, but this isn't *just* a Kconfig change; it's *enabling* something. More importantly, can it be executed in a virtualized environment? USB wireless drivers, like ath9k_htc, are explicitly mentioned as being emulatable with USB Raw Gadget and Dummy HCD in syzkaller. Bingo. That's a definite "yes." Therefore, based on the WorthFuzzing guidelines, this change is highly likely to be worthy of fuzzing. Now, let's consider which specific functions within `ath9k_htc` are most relevant for fuzzing. The FocusSymbols guidance stresses the need for specific, non-inlined API entrypoints. Let's see what stands out: I'm looking at functions such as `ath9k_htc_tx_start`, `ath9k_htc_txcompletion_cb`, `htc_send`, `ath9k_htc_txstatus`, and `ath9k_htc_hw_init`. These seem like the primary entry points and key data paths. I should also check the other files in that driver directory like `hif_usb.c`, `htc_drv_txrx.c`, and `htc_hst.c` to look for additional functions that may be relevant. |
| 34/2 | 2026/09/01 02:21 | tool | grepper |
0mArgs:{
"Expression": "^[a-zA-Z_].*\\(.*\\)",
"PathPrefix": "drivers/net/wireless/ath/ath9k/htc_hst.c"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/htc_hst.c=21=static int htc_issue_send(struct htc_target *target, struct sk_buff* skb,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-39-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:40:static struct htc_endpoint *get_next_avail_ep(struct htc_endpoint *endpoint)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-41-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-49-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:50:static u8 service_to_ulpipe(u16 service_id)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-51-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-68-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:69:static u8 service_to_dlpipe(u16 service_id)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-70-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=103=static void htc_process_conn_rsp(struct htc_target *target,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-153-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:154:static int htc_config_pipe_credits(struct htc_target *target)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-155-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-191-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:192:static int htc_setup_complete(struct htc_target *target)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-193-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-229-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:230:int htc_init(struct htc_target *target)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-231-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=241=int htc_connect_service(struct htc_target *target,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-306-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:307:int htc_send(struct htc_target *target, struct sk_buff *skb)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-308-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=315=int htc_send_epid(struct htc_target *target, struct sk_buff *skb,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-320-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:321:void htc_stop(struct htc_target *target)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-322-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-325-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:326:void htc_start(struct htc_target *target)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-327-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-330-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:331:void htc_sta_drain(struct htc_target *target, u8 idx)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-332-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=495=struct htc_target *ath9k_htc_hw_alloc(void *hif_handle,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-522-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:523:void ath9k_htc_hw_free(struct htc_target *htc)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-524-{\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c=528=int ath9k_htc_hw_init(struct htc_target *target,\n--\ndrivers/net/wireless/ath/ath9k/htc_hst.c-539-\ndrivers/net/wireless/ath/ath9k/htc_hst.c:540:void ath9k_htc_hw_deinit(struct htc_target *target, bool hot_unplug)\ndrivers/net/wireless/ath/ath9k/htc_hst.c-541-{\n"
} |
| 35/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 55758 output: 53 thoughts: 34 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Diving Deeper into ath9k HTC Driver TX/RX** Right, so we've got to be thorough here. We've spent a good chunk of time on this `ath9k` driver, and while we've been focused on specific areas, it's probably prudent to do a once-over on the non-static functions in `drivers/net/wireless/ath/ath9k/htc_drv_txrx.c`. I need to ensure we're not missing anything obvious, especially since we're dealing with the critical TX and RX paths. We should look at this to see if any of these can have an effect on a potential bug or performance. It might be worthwhile. Better safe than sorry. I want to double-check that there aren't any potential hidden issues lurking there. That file handles the HTC interface specifically, so any interactions with the hardware's transmit and receive operations are crucial to understand completely. Let's see what we can find. |
| 36/2 | 2026/09/01 02:21 | tool | grepper |
0mArgs:{
"Expression": "^[a-zA-Z_].*\\(.*\\)",
"PathPrefix": "drivers/net/wireless/ath/ath9k/htc_drv_txrx.c"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/htc_drv_txrx.c=23=static const int subtype_txq_to_hwq[] = {\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-39-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:40:int get_hw_qnum(u16 queue, int *hwq_map)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-41-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-55-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:56:void ath9k_htc_check_stop_queues(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-57-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-67-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:68:void ath9k_htc_check_wake_queues(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-69-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-78-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:79:int ath9k_htc_tx_get_slot(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-80-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-94-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:95:void ath9k_htc_tx_clear_slot(struct ath9k_htc_priv *priv, int slot)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-96-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=130=static inline struct sk_buff_head*\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:131:get_htc_epid_queue(struct ath9k_htc_priv *priv, u8 epid)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-132-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=529=static inline void ath9k_htc_tx_drainq(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-538-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:539:void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-540-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-577-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:578:void ath9k_tx_failed_tasklet(struct tasklet_struct *t)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-579-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=618=static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-646-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:647:void ath9k_htc_txstatus(struct ath9k_htc_priv *priv, void *wmi_event)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-648-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=690=void ath9k_htc_txep(void *drv_priv, struct sk_buff *skb,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-715-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:716:static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-717-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=733=static void ath9k_htc_tx_cleanup_queue(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-760-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:761:void ath9k_htc_tx_cleanup_timer(struct timer_list *t)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-762-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-808-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:809:int ath9k_tx_init(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-810-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-821-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:822:void ath9k_tx_cleanup(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-823-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-826-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:827:bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-828-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-851-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:852:int ath9k_htc_cabq_setup(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-853-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-868- */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:869:u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-870-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-915- */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:916:static void ath9k_htc_opmode_init(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-917-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-929-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:930:void ath9k_host_rx_init(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-931-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=972=static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1080- */\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1081:void ath9k_rx_tasklet(struct tasklet_struct *t)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1082-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c=1135=void ath9k_htc_rxep(void *drv_priv, struct sk_buff *skb,\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1174-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1175:void ath9k_rx_cleanup(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1176-{\n--\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1186-\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1187:int ath9k_rx_init(struct ath9k_htc_priv *priv)\ndrivers/net/wireless/ath/ath9k/htc_drv_txrx.c-1188-{\n"
} |
| 37/2 | 2026/09/01 02:21 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 58714 output: 167 thoughts: 239 Thoughts: **My Analysis of the ath9k_htc USB Driver Patch** Okay, let's break this down. First, I need to focus my attention. I've chosen these key symbols: `ath9k_htc_tx_start`, `ath9k_htc_txcompletion_cb`, `htc_send`, and `ath9k_htc_txstatus`. These seem like the critical points related to transmit operations, which is where the patch is focused. Now, let's verify my assumptions about the configuration. I want to make sure the relevant features are enabled. I'll check these `EnableConfigs`: `ATH9K_HTC`, `USB`, `MAC80211`, `WLAN`, and `WLAN_VENDOR_ATH`. Yes, they are all correctly configured and in place. Good. Time for a sanity check: I'll double-check that the configurations align with what I expect to be enabled. I see `WLAN`, `WLAN_VENDOR_ATH`, `ATH9K_HTC`, `USB`, and `MAC80211` are all set. Excellent. Now, let's get to the heart of it. This patch looks promising for fuzzing. `WorthFuzzing` is set to `true`, and here's why: this fix is all about the `ath9k_htc` USB driver, specifically addressing transmit buffer size and aggregation issues within `__hif_usb_tx`. This is a classic vulnerability point. The patch *should* prevent buffer overflows and incorrect length calculations when dealing with skb aggregation before the USB URBs are sent. The fact that `ath9k_htc` is reachable via USB emulation or fuzzing makes it a high-priority target. I've got a good potential fuzzing target here. Alright, with that confirmed, I'll update the results. Let's call `set-results`. Time to put this knowledge to use and devise some test cases. |
| 38/2 | 2026/09/01 02:21 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"ATH9K_HTC",
"USB",
"MAC80211",
"WLAN",
"WLAN_VENDOR_ATH"
],
"FocusSymbols": [
"ath9k_htc_tx_start",
"ath9k_htc_txcompletion_cb",
"htc_send",
"ath9k_htc_txstatus"
],
"Reasoning": "The patch modifies TX packet aggregation and buffer length calculations in __hif_usb_tx in the ath9k_htc USB driver, preventing potential buffer overflow when aggregating skbs for USB URB transmission. This affects reachable wireless TX logic emulatable via USB fuzzing.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"ATH9K_HTC",
"USB",
"MAC80211",
"WLAN",
"WLAN_VENDOR_ATH"
],
"FocusSymbols": [
"ath9k_htc_tx_start",
"ath9k_htc_txcompletion_cb",
"htc_send",
"ath9k_htc_txstatus"
],
"Reasoning": "The patch modifies TX packet aggregation and buffer length calculations in __hif_usb_tx in the ath9k_htc USB driver, preventing potential buffer overflow when aggregating skbs for USB URB transmission. This affects reachable wireless TX logic emulatable via USB fuzzing.",
"WorthFuzzing": true
} |
| 39/1 | 2026/09/01 02:21 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 40/2 | 2026/09/01 02:21 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch modifies `__hif_usb_tx()` in the ath9k wireless USB driver (`drivers/net/wireless/ath/ath9k/hif_usb.c`) to prevent buffer overflow (`MAX_TX_BUF_SIZE`) during skb aggregation and safely handle skb dequeueing when aggregating packets for transmission over USB.\n\nThese changes address bounds checking and out-of-bounds buffer writes, which are tracked and detected by standard KASAN. The patch does not introduce or modify any uninitialized stack/heap memory, struct padding, or kernel-to-userspace copying routines (`copy_to_user`, netlink, socket options, etc.). Therefore, a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: For your convenience, here is the diff of the changes:
commit 7271941b22017789e4dd04058b9405539ea22c8b
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Sep 1 02:19:27 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 47f904e7e6529..029357c57a370 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -328,32 +328,35 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
tx_skb_cnt = min_t(u16, hif_dev->tx.tx_skb_cnt, MAX_TX_AGGR_NUM);
for (i = 0; i < tx_skb_cnt; i++) {
- nskb = __skb_dequeue(&hif_dev->tx.tx_skb_queue);
+ nskb = skb_peek(&hif_dev->tx.tx_skb_queue);
+ if (!nskb)
+ break;
- /* Should never be NULL */
- BUG_ON(!nskb);
+ if (tx_buf->offset + nskb->len + 4 > MAX_TX_BUF_SIZE)
+ break;
+ nskb = __skb_dequeue(&hif_dev->tx.tx_skb_queue);
hif_dev->tx.tx_skb_cnt--;
- buf = tx_buf->buf;
- buf += tx_buf->offset;
+ buf = tx_buf->buf + tx_buf->offset;
hdr = (__le16 *)buf;
*hdr++ = cpu_to_le16(nskb->len);
*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);
- buf += 4;
- memcpy(buf, nskb->data, nskb->len);
- tx_buf->len = nskb->len + 4;
-
- if (i < (tx_skb_cnt - 1))
- tx_buf->offset += (((tx_buf->len - 1) / 4) + 1) * 4;
+ memcpy(buf + 4, nskb->data, nskb->len);
- if (i == (tx_skb_cnt - 1))
- tx_buf->len += tx_buf->offset;
+ tx_buf->len = tx_buf->offset + nskb->len + 4;
+ tx_buf->offset += (((tx_buf->len - 1) / 4) + 1) * 4;
__skb_queue_tail(&tx_buf->skb_queue, nskb);
TX_STAT_INC(hif_dev, skb_queued);
}
+ if (!i) {
+ list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
+ hif_dev->tx.tx_buf_cnt++;
+ return 0;
+ }
+
usb_fill_bulk_urb(tx_buf->urb, hif_dev->udev,
usb_sndbulkpipe(hif_dev->udev, USB_WLAN_TX_PIPE),
tx_buf->buf, tx_buf->len,
|
| 41/3 | 2026/09/01 02:21 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2750 output: 46 thoughts: 71 Thoughts: **Analyzing the USB Driver Code** Okay, let's dive into this. I need to get a clear picture of what's happening with this patch. My instinct is to focus on the `drivers/net/wireless/ath/ath9k/hif_usb.c` file. This area usually deals with the USB interface for the Atheros 9k wireless driver, so it's a likely place for changes. I need to understand the specifics of the USB communication. First, I should use `read-file` and check around line 328 in that file. Context is king here, so I need to understand the surrounding code. What's happening *before* line 328, and what comes *after*? I want to see how the change might integrate with the existing USB communication flow. |
| 42/3 | 2026/09/01 02:22 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/ath/ath9k/hif_usb.c",
"FirstLine": 310,
"LineCount": 80
}Results: {
"Contents": " 310:\t\tstruct tx_buf *tx_buf = NULL;\n 311:\t\tstruct sk_buff *nskb = NULL;\n 312:\t\tint ret = 0, i;\n 313:\t\tu16 tx_skb_cnt = 0;\n 314:\t\tu8 *buf;\n 315:\t\t__le16 *hdr;\n 316:\t\n 317:\t\tif (hif_dev-\u003etx.tx_skb_cnt == 0)\n 318:\t\t\treturn 0;\n 319:\t\n 320:\t\t/* Check if a free TX buffer is available */\n 321:\t\tif (list_empty(\u0026hif_dev-\u003etx.tx_buf))\n 322:\t\t\treturn 0;\n 323:\t\n 324:\t\ttx_buf = list_first_entry(\u0026hif_dev-\u003etx.tx_buf, struct tx_buf, list);\n 325:\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_pending);\n 326:\t\thif_dev-\u003etx.tx_buf_cnt--;\n 327:\t\n 328:\t\ttx_skb_cnt = min_t(u16, hif_dev-\u003etx.tx_skb_cnt, MAX_TX_AGGR_NUM);\n 329:\t\n 330:\t\tfor (i = 0; i \u003c tx_skb_cnt; i++) {\n 331:\t\t\tnskb = skb_peek(\u0026hif_dev-\u003etx.tx_skb_queue);\n 332:\t\t\tif (!nskb)\n 333:\t\t\t\tbreak;\n 334:\t\n 335:\t\t\tif (tx_buf-\u003eoffset + nskb-\u003elen + 4 \u003e MAX_TX_BUF_SIZE)\n 336:\t\t\t\tbreak;\n 337:\t\n 338:\t\t\tnskb = __skb_dequeue(\u0026hif_dev-\u003etx.tx_skb_queue);\n 339:\t\t\thif_dev-\u003etx.tx_skb_cnt--;\n 340:\t\n 341:\t\t\tbuf = tx_buf-\u003ebuf + tx_buf-\u003eoffset;\n 342:\t\t\thdr = (__le16 *)buf;\n 343:\t\t\t*hdr++ = cpu_to_le16(nskb-\u003elen);\n 344:\t\t\t*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);\n 345:\t\t\tmemcpy(buf + 4, nskb-\u003edata, nskb-\u003elen);\n 346:\t\n 347:\t\t\ttx_buf-\u003elen = tx_buf-\u003eoffset + nskb-\u003elen + 4;\n 348:\t\t\ttx_buf-\u003eoffset += (((tx_buf-\u003elen - 1) / 4) + 1) * 4;\n 349:\t\n 350:\t\t\t__skb_queue_tail(\u0026tx_buf-\u003eskb_queue, nskb);\n 351:\t\t\tTX_STAT_INC(hif_dev, skb_queued);\n 352:\t\t}\n 353:\t\n 354:\t\tif (!i) {\n 355:\t\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\n 356:\t\t\thif_dev-\u003etx.tx_buf_cnt++;\n 357:\t\t\treturn 0;\n 358:\t\t}\n 359:\t\n 360:\t\tusb_fill_bulk_urb(tx_buf-\u003eurb, hif_dev-\u003eudev,\n 361:\t\t\t\t usb_sndbulkpipe(hif_dev-\u003eudev, USB_WLAN_TX_PIPE),\n 362:\t\t\t\t tx_buf-\u003ebuf, tx_buf-\u003elen,\n 363:\t\t\t\t hif_usb_tx_cb, tx_buf);\n 364:\t\n 365:\t\tret = usb_submit_urb(tx_buf-\u003eurb, GFP_ATOMIC);\n 366:\t\tif (ret) {\n 367:\t\t\ttx_buf-\u003elen = tx_buf-\u003eoffset = 0;\n 368:\t\t\tath9k_skb_queue_complete(hif_dev, \u0026tx_buf-\u003eskb_queue, false);\n 369:\t\t\t__skb_queue_head_init(\u0026tx_buf-\u003eskb_queue);\n 370:\t\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\n 371:\t\t\thif_dev-\u003etx.tx_buf_cnt++;\n 372:\t\t} else {\n 373:\t\t\tTX_STAT_INC(hif_dev, buf_queued);\n 374:\t\t}\n 375:\t\n 376:\t\treturn ret;\n 377:\t}\n 378:\t\n 379:\tstatic int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\n 380:\t{\n 381:\t\tstruct ath9k_htc_tx_ctl *tx_ctl;\n 382:\t\tunsigned long flags;\n 383:\t\tint ret = 0;\n 384:\t\n 385:\t\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\n 386:\t\n 387:\t\tif (hif_dev-\u003etx.flags \u0026 HIF_USB_TX_STOP) {\n 388:\t\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\n 389:\t\t\treturn -ENODEV;\n"
} |
| 43/3 | 2026/09/01 02:22 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4499 output: 35 thoughts: 685 Thoughts: **Analyzing the Patch: Addressing a Potential Buffer Overflow in the TX Path** Okay, let's break down this patch. I see the original code segment iterating through a queue of SKBs (Socket Buffer) destined for transmission. The core task appears to be constructing a new buffer (`tx_buf`) from these SKBs, prepending some headers, and then enqueuing this newly formed buffer. Looking at the code *before* the patch, a few things jump out. First, there's a loop that iterates `tx_skb_cnt` times, dequeueing SKBs. The code appears to be constructing a packet by prepending a length and a mode tag. The bug really hits me, there's no bounds checking to see if the assembled data exceeds a maximum buffer size (`MAX_TX_BUF_SIZE`)! This is a classic recipe for a buffer overflow, and quite a nasty one at that, since it's on the transmission path. Also, I see `BUG_ON(!nskb)` which suggests a potential race condition or programming error, if the queue had fewer SKBs than the loop expects. The logic for calculating `tx_buf->len` and `tx_buf->offset` also looks a bit convoluted; it would be easy to introduce errors there. The patch seems to address this by adding some crucial checks before dequeueing any SKB. Specifically, I note these key changes: 1. It peeks at the head of the SKB queue (`skb_peek`) *before* dequeueing. This allows the patch to check conditions without modifying the state of the queue. 2. Crucially, it checks if `tx_buf->offset + nskb->len + 4` exceeds `MAX_TX_BUF_SIZE` before processing an SKB. If it does, the loop breaks, preventing the overflow. This is a very good fix, finally putting in proper bounds checking. 3. The patch updates the calculation of `tx_buf->len`. It looks like it directly sets `tx_buf->len` to the sum of `tx_buf->offset + nskb->len + 4`. 4. Then the `tx_buf->offset` is updated, based on the calculation of `tx_buf->len`. I need to verify that this is safe, that the calculations are correct, given the new `tx_buf->len`. I really need to double check the previous usage and the initialization of `tx_buf`. I'm going to scan the code for initialization and recycling of `tx_buf`. I'll search for `tx_buf` in `hif_usb.c`. Overall, this is a positive change. It fixes a potential, and serious, buffer overflow issue in the transmit path. It's a good practice to add these safety checks. However, I need to verify that `tx_buf->offset` is being correctly updated to avoid fragmenting the packet, and to make sure it's thread safe. |
| 44/3 | 2026/09/01 02:22 | tool | grepper |
0mArgs:{
"Expression": "tx_buf",
"PathPrefix": "drivers/net/wireless/ath/ath9k/"
}Results: {
"Output": "drivers/net/wireless/ath/ath9k/ath9k.h=234=struct ath_atx_tid {\n--\ndrivers/net/wireless/ath/ath9k/ath9k.h-238-\tstruct ath_txq *txq;\ndrivers/net/wireless/ath/ath9k/ath9k.h:239:\tunsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];\ndrivers/net/wireless/ath/ath9k/ath9k.h-240-\tu16 seq_start;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=253=static void hif_usb_tx_cb(struct urb *urb)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-254-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:255:\tstruct tx_buf *tx_buf = urb-\u003econtext;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-256-\tstruct hif_device_usb *hif_dev;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-258-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:259:\tif (!tx_buf || !tx_buf-\u003ehif_dev)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-260-\t\treturn;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-261-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:262:\thif_dev = tx_buf-\u003ehif_dev;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-263-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-279-\t\t\tspin_unlock(\u0026hif_dev-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:280:\t\t\tath9k_skb_queue_purge(hif_dev, \u0026tx_buf-\u003eskb_queue);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-281-\t\t\treturn;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-290-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:291:\tath9k_skb_queue_complete(hif_dev, \u0026tx_buf-\u003eskb_queue, txok);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-292-\ndrivers/net/wireless/ath/ath9k/hif_usb.c-293-\t/* Re-initialize the SKB queue */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:294:\ttx_buf-\u003elen = tx_buf-\u003eoffset = 0;\ndrivers/net/wireless/ath/ath9k/hif_usb.c:295:\t__skb_queue_head_init(\u0026tx_buf-\u003eskb_queue);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-296-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-298-\tspin_lock(\u0026hif_dev-\u003etx.tx_lock);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:299:\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:300:\thif_dev-\u003etx.tx_buf_cnt++;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-301-\tif (!(hif_dev-\u003etx.flags \u0026 HIF_USB_TX_STOP))\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=308=static int __hif_usb_tx(struct hif_device_usb *hif_dev)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-309-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:310:\tstruct tx_buf *tx_buf = NULL;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-311-\tstruct sk_buff *nskb = NULL;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-320-\t/* Check if a free TX buffer is available */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:321:\tif (list_empty(\u0026hif_dev-\u003etx.tx_buf))\ndrivers/net/wireless/ath/ath9k/hif_usb.c-322-\t\treturn 0;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-323-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:324:\ttx_buf = list_first_entry(\u0026hif_dev-\u003etx.tx_buf, struct tx_buf, list);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:325:\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_pending);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:326:\thif_dev-\u003etx.tx_buf_cnt--;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-327-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-334-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:335:\t\tif (tx_buf-\u003eoffset + nskb-\u003elen + 4 \u003e MAX_TX_BUF_SIZE)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-336-\t\t\tbreak;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-340-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:341:\t\tbuf = tx_buf-\u003ebuf + tx_buf-\u003eoffset;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-342-\t\thdr = (__le16 *)buf;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-346-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:347:\t\ttx_buf-\u003elen = tx_buf-\u003eoffset + nskb-\u003elen + 4;\ndrivers/net/wireless/ath/ath9k/hif_usb.c:348:\t\ttx_buf-\u003eoffset += (((tx_buf-\u003elen - 1) / 4) + 1) * 4;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-349-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:350:\t\t__skb_queue_tail(\u0026tx_buf-\u003eskb_queue, nskb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-351-\t\tTX_STAT_INC(hif_dev, skb_queued);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-354-\tif (!i) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:355:\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:356:\t\thif_dev-\u003etx.tx_buf_cnt++;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-357-\t\treturn 0;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-359-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:360:\tusb_fill_bulk_urb(tx_buf-\u003eurb, hif_dev-\u003eudev,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-361-\t\t\t usb_sndbulkpipe(hif_dev-\u003eudev, USB_WLAN_TX_PIPE),\ndrivers/net/wireless/ath/ath9k/hif_usb.c:362:\t\t\t tx_buf-\u003ebuf, tx_buf-\u003elen,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:363:\t\t\t hif_usb_tx_cb, tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-364-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:365:\tret = usb_submit_urb(tx_buf-\u003eurb, GFP_ATOMIC);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-366-\tif (ret) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:367:\t\ttx_buf-\u003elen = tx_buf-\u003eoffset = 0;\ndrivers/net/wireless/ath/ath9k/hif_usb.c:368:\t\tath9k_skb_queue_complete(hif_dev, \u0026tx_buf-\u003eskb_queue, false);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:369:\t\t__skb_queue_head_init(\u0026tx_buf-\u003eskb_queue);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:370:\t\tlist_move_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:371:\t\thif_dev-\u003etx.tx_buf_cnt++;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-372-\t} else {\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=379=static int hif_usb_send_tx(struct hif_device_usb *hif_dev, struct sk_buff *skb)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-416-\t/* Check if AMPDUs have to be sent immediately */\ndrivers/net/wireless/ath/ath9k/hif_usb.c:417:\tif ((hif_dev-\u003etx.tx_buf_cnt == MAX_TX_URB_NUM) \u0026\u0026\ndrivers/net/wireless/ath/ath9k/hif_usb.c-418-\t (hif_dev-\u003etx.tx_skb_cnt \u003c 2)) {\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=439=static void hif_usb_stop(void *hif_handle)\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-441-\tstruct hif_device_usb *hif_dev = hif_handle;\ndrivers/net/wireless/ath/ath9k/hif_usb.c:442:\tstruct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-443-\tunsigned long flags;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-452-\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:453:\tlist_for_each_entry_safe(tx_buf, tx_buf_tmp,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-454-\t\t\t\t \u0026hif_dev-\u003etx.tx_pending, list) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:455:\t\tusb_get_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-456-\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:457:\t\tusb_kill_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:458:\t\tlist_del(\u0026tx_buf-\u003elist);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:459:\t\tusb_free_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:460:\t\tkfree(tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-461-\t\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=806=static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-807-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:808:\tstruct tx_buf *tx_buf = NULL, *tx_buf_tmp = NULL;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-809-\tunsigned long flags;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-811-\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:812:\tlist_for_each_entry_safe(tx_buf, tx_buf_tmp,\ndrivers/net/wireless/ath/ath9k/hif_usb.c:813:\t\t\t\t \u0026hif_dev-\u003etx.tx_buf, list) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:814:\t\tlist_del(\u0026tx_buf-\u003elist);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:815:\t\tusb_free_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:816:\t\tkfree(tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-817-\t}\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-824-\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:825:\tlist_for_each_entry_safe(tx_buf, tx_buf_tmp,\ndrivers/net/wireless/ath/ath9k/hif_usb.c-826-\t\t\t\t \u0026hif_dev-\u003etx.tx_pending, list) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:827:\t\tusb_get_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-828-\t\tspin_unlock_irqrestore(\u0026hif_dev-\u003etx.tx_lock, flags);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:829:\t\tusb_kill_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:830:\t\tlist_del(\u0026tx_buf-\u003elist);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:831:\t\tusb_free_urb(tx_buf-\u003eurb);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:832:\t\tkfree(tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-833-\t\tspin_lock_irqsave(\u0026hif_dev-\u003etx.tx_lock, flags);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c=840=static int ath9k_hif_usb_alloc_tx_urbs(struct hif_device_usb *hif_dev)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-841-{\ndrivers/net/wireless/ath/ath9k/hif_usb.c:842:\tstruct tx_buf *tx_buf;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-843-\tint i;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-844-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:845:\tINIT_LIST_HEAD(\u0026hif_dev-\u003etx.tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-846-\tINIT_LIST_HEAD(\u0026hif_dev-\u003etx.tx_pending);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-851-\tfor (i = 0; i \u003c MAX_TX_URB_NUM; i++) {\ndrivers/net/wireless/ath/ath9k/hif_usb.c:852:\t\ttx_buf = kzalloc_flex(*tx_buf, buf, MAX_TX_BUF_SIZE);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:853:\t\tif (!tx_buf)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-854-\t\t\tgoto err;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-855-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:856:\t\ttx_buf-\u003eurb = usb_alloc_urb(0, GFP_KERNEL);\ndrivers/net/wireless/ath/ath9k/hif_usb.c:857:\t\tif (!tx_buf-\u003eurb)\ndrivers/net/wireless/ath/ath9k/hif_usb.c-858-\t\t\tgoto err;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-859-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:860:\t\ttx_buf-\u003ehif_dev = hif_dev;\ndrivers/net/wireless/ath/ath9k/hif_usb.c:861:\t\t__skb_queue_head_init(\u0026tx_buf-\u003eskb_queue);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-862-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:863:\t\tlist_add_tail(\u0026tx_buf-\u003elist, \u0026hif_dev-\u003etx.tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-864-\t}\ndrivers/net/wireless/ath/ath9k/hif_usb.c-865-\ndrivers/net/wireless/ath/ath9k/hif_usb.c:866:\thif_dev-\u003etx.tx_buf_cnt = MAX_TX_URB_NUM;\ndrivers/net/wireless/ath/ath9k/hif_usb.c-867-\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.c-869-err:\ndrivers/net/wireless/ath/ath9k/hif_usb.c:870:\tkfree(tx_buf);\ndrivers/net/wireless/ath/ath9k/hif_usb.c-871-\tath9k_hif_usb_dealloc_tx_urbs(hif_dev);\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.h=39=extern int htc_use_dev_fw;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.h-78-\ndrivers/net/wireless/ath/ath9k/hif_usb.h:79:struct tx_buf {\ndrivers/net/wireless/ath/ath9k/hif_usb.h-80-\tu16 len;\n--\ndrivers/net/wireless/ath/ath9k/hif_usb.h=97=struct hif_usb_tx {\ndrivers/net/wireless/ath/ath9k/hif_usb.h-98-\tu8 flags;\ndrivers/net/wireless/ath/ath9k/hif_usb.h:99:\tu8 tx_buf_cnt;\ndrivers/net/wireless/ath/ath9k/hif_usb.h-100-\tu16 tx_skb_cnt;\ndrivers/net/wireless/ath/ath9k/hif_usb.h-101-\tstruct sk_buff_head tx_skb_queue;\ndrivers/net/wireless/ath/ath9k/hif_usb.h:102:\tstruct list_head tx_buf;\ndrivers/net/wireless/ath/ath9k/hif_usb.h-103-\tstruct list_head tx_pending;\n--\ndrivers/net/wireless/ath/ath9k/xmit.c=317=static void ath_tx_update_baw(struct ath_atx_tid *tid, struct ath_buf *bf)\n--\ndrivers/net/wireless/ath/ath9k/xmit.c-328-\ndrivers/net/wireless/ath/ath9k/xmit.c:329:\t__clear_bit(cindex, tid-\u003etx_buf);\ndrivers/net/wireless/ath/ath9k/xmit.c-330-\ndrivers/net/wireless/ath/ath9k/xmit.c:331:\twhile (tid-\u003ebaw_head != tid-\u003ebaw_tail \u0026\u0026 !test_bit(tid-\u003ebaw_head, tid-\u003etx_buf)) {\ndrivers/net/wireless/ath/ath9k/xmit.c-332-\t\tINCR(tid-\u003eseq_start, IEEE80211_SEQ_MAX);\n--\ndrivers/net/wireless/ath/ath9k/xmit.c=339=static void ath_tx_addto_baw(struct ath_atx_tid *tid, struct ath_buf *bf)\n--\ndrivers/net/wireless/ath/ath9k/xmit.c-349-\tcindex = (tid-\u003ebaw_head + index) \u0026 (ATH_TID_MAX_BUFS - 1);\ndrivers/net/wireless/ath/ath9k/xmit.c:350:\t__set_bit(cindex, tid-\u003etx_buf);\ndrivers/net/wireless/ath/ath9k/xmit.c-351-\tfi-\u003ebaw_tracked = 1;\n--\ndrivers/net/wireless/ath/ath9k/xmit.c=1571=int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,\n--\ndrivers/net/wireless/ath/ath9k/xmit.c-1602-\ndrivers/net/wireless/ath/ath9k/xmit.c:1603:\tmemset(txtid-\u003etx_buf, 0, sizeof(txtid-\u003etx_buf));\ndrivers/net/wireless/ath/ath9k/xmit.c-1604-\ttxtid-\u003ebaw_head = txtid-\u003ebaw_tail = 0;\n"
} |
| 45/3 | 2026/09/01 02:22 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 11886 output: 179 thoughts: 959 Thoughts: **Patch Analysis and KMSAN Justification** Okay, let's break this down. My initial focus is on what this patch modifies within `__hif_usb_tx`. It looks like it addresses how we handle the transmit buffer (`tx_buf`) and the Socket Buffer (`nskb`) queue, specifically for USB TX. The change from `__skb_dequeue` to `skb_peek` is immediately interesting, as is the subsequent `if (!nskb) break;` This indicates an attempt to handle an empty queue gracefully, which is good. I'm paying close attention to the buffer size checks: `if (tx_buf->offset + nskb->len + 4 > MAX_TX_BUF_SIZE) break;` and the buffer updates: `tx_buf->len = tx_buf->offset + nskb->len + 4;` followed by `tx_buf->offset += (((tx_buf->len - 1) / 4) + 1) * 4;`. There's a slight pause here, the original code had a more intricate offset update and `len` setting. It's a potential area for subtle logic errors, but I don't see any immediate memory safety issues, especially since `tx_buf->buf` is zero-allocated using `kzalloc_flex` and is sent to the USB hardware (`usb_fill_bulk_urb`) not userspace. The most important part is the `MAX_TX_BUF_SIZE` check. The central question is, does this patch introduce any *new* risks related to uninitialized memory? KMSAN is the tool we reach for when we need to detect read of uninitialized memory. But as a general rule, we only enable KMSAN if the patch *introduces* or *modifies* uninitialized memory risks. Standard KASAN (OOB, UAF, double-free) should be catching any existing vulnerabilities. The patch is intended to prevent OOB writes/buffer overflows by bounds-checking against `MAX_TX_BUF_SIZE` and handling empty queues, which is a classic KASAN scenario. The absence of copying to userspace and the zero-allocation of the buffer are reassuring. The patch does not read uninitialized data. Given that KASAN should handle the out-of-bounds write and the patch doesn't introduce or change any uninitialized memory usage, or any potential info-leaks, KMSAN isn't needed here. The standard bug detectors will be sufficient. Therefore, the decision is: `NeedsKMSAN=false`. Let's prepare the reasoning and set the result. |
| 46/3 | 2026/09/01 02:22 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch modifies `__hif_usb_tx()` in the ath9k wireless USB driver (`drivers/net/wireless/ath/ath9k/hif_usb.c`) to prevent buffer overflow (`MAX_TX_BUF_SIZE`) during skb aggregation and safely handle skb dequeueing when aggregating packets for transmission over USB.\n\nThese changes address bounds checking and out-of-bounds buffer writes, which are tracked and detected by standard KASAN. The patch does not introduce or modify any uninitialized stack/heap memory, struct padding, or kernel-to-userspace copying routines (`copy_to_user`, netlink, socket options, etc.). Therefore, a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch modifies `__hif_usb_tx()` in the ath9k wireless USB driver (`drivers/net/wireless/ath/ath9k/hif_usb.c`) to prevent buffer overflow (`MAX_TX_BUF_SIZE`) during skb aggregation and safely handle skb dequeueing when aggregating packets for transmission over USB.\n\nThese changes address bounds checking and out-of-bounds buffer writes, which are tracked and detected by standard KASAN. The patch does not introduce or modify any uninitialized stack/heap memory, struct padding, or kernel-to-userspace copying routines (`copy_to_user`, netlink, socket options, etc.). Therefore, a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|