| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/08 21:42 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"MT76_CONNAC_LIB",
"MT7663U",
"MT7921U",
"MT7925U",
"MAC80211",
"USB"
],
"FocusSymbols": [
"mt76_connac_mcu_update_gtk_rekey",
"mt7615_set_rekey_data",
"mt7921_set_rekey_data",
"mt7925_set_rekey_data"
],
"KMSANReasoning": "The patch replaces `rcu_read_lock()` + `ieee80211_iter_keys_rcu()` + `rcu_read_unlock()` with `ieee80211_iter_keys()` in `mt76_connac_mcu_update_gtk_rekey()`.\n\nThis is purely a locking/iterator cleanup where the wiphy lock is held, allowing the use of the locked iterator rather than the RCU-protected iterator. All buffers involved (`gtk_tlv`) continue to be allocated and zero-initialized with `skb_put_zero()`, and no kernel-to-user copies or uninitialized data reads/branches are introduced or modified. Any potential locking issues are covered by LOCKDEP/KASAN. Therefore, a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies mt76_connac_mcu_update_gtk_rekey() in the MediaTek mt76 wireless driver library, switching key iteration from ieee80211_iter_keys_rcu() to ieee80211_iter_keys(). This code is reachable from userspace via nl80211 (NL80211_CMD_SET_REKEY_DATA) on USB-emulated MediaTek devices (such as MT7663U, MT7921U, and MT7925U), and it invokes new lockdep assertion checks and altered locking/traversal semantics for key lists.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/08 21:42 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 9a9730d50b7930dad123c0ed5954bd769a09052e\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Sep 8 21:42:55 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c\nindex 2f925d22b9aa7..4351fbb617d86 100644\n--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c\n+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c\n@@ -2490,9 +2490,7 @@ int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\n \tgtk_tlv-\u003erekey_mode = 2;\n \tgtk_tlv-\u003eoption = 1;\n \n-\trcu_read_lock();\n-\tieee80211_iter_keys_rcu(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);\n-\trcu_read_unlock();\n+\tieee80211_iter_keys(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);\n \n \tmemcpy(gtk_tlv-\u003ekek, key-\u003ekek, NL80211_KEK_LEN);\n \tmemcpy(gtk_tlv-\u003ekck, key-\u003ekck, NL80211_KCK_LEN);\n"
} |
| 2/1 | 2026/09/08 21:42 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": [
"MT76_CONNAC_LIB",
"MT7663U",
"MT7921U",
"MT7925U",
"MAC80211",
"USB"
],
"FocusSymbols": [
"mt76_connac_mcu_update_gtk_rekey",
"mt7615_set_rekey_data",
"mt7921_set_rekey_data",
"mt7925_set_rekey_data"
],
"Reasoning": "The patch modifies mt76_connac_mcu_update_gtk_rekey() in the MediaTek mt76 wireless driver library, switching key iteration from ieee80211_iter_keys_rcu() to ieee80211_iter_keys(). This code is reachable from userspace via nl80211 (NL80211_CMD_SET_REKEY_DATA) on USB-emulated MediaTek devices (such as MT7663U, MT7921U, and MT7925U), and it invokes new lockdep assertion checks and altered locking/traversal semantics for key lists.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 9a9730d50b7930dad123c0ed5954bd769a09052e
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Sep 8 21:42:55 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 2f925d22b9aa7..4351fbb617d86 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -2490,9 +2490,7 @@ int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,
gtk_tlv->rekey_mode = 2;
gtk_tlv->option = 1;
- rcu_read_lock();
- ieee80211_iter_keys_rcu(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);
- rcu_read_unlock();
+ ieee80211_iter_keys(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);
memcpy(gtk_tlv->kek, key->kek, NL80211_KEK_LEN);
memcpy(gtk_tlv->kck, key->kck, NL80211_KCK_LEN);
|
| 3/2 | 2026/09/08 21:42 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3046 output: 30 thoughts: 259 Thoughts: **Analyzing a WiFi Driver Patch** Okay, let's dive into this. The patch targets `drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c`. Specifically, it alters the `mt76_connac_mcu_update_gtk_rekey` function. I see they've swapped `rcu_read_lock()`/`rcu_read_unlock()` for a plain `ieee80211_iter_keys()`. This is interesting; removing the RCU protection suggests a possible performance optimization, or, perhaps, a concurrency issue that's been addressed more directly. I need to understand the implications of this change. Now, I need to understand the scope. Which devices are even *using* this code? Is this primarily a USB driver, PCIe, SDIO, or something baked into an SoC? Knowing the hardware context is crucial. Can this be easily reproduced in a standard, virtualized fuzzing environment? Can I get a test setup running via USB, USB gadget, or mac80211? I need to figure out a viable fuzzing target. Let me use my grepper skills and a quick read-file to see what's what. I need to map this driver to its common uses and start forming a plan to evaluate the changes properly. |
| 4/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "mt76_connac_mcu_update_gtk_rekey"
}Results: {
"Output": "drivers/net/wireless/mediatek/mt76/mt7615/main.c=1307=static void mt7615_set_rekey_data(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1313-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1314:\tmt76_connac_mcu_update_gtk_rekey(hw, vif, data);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1315-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c=2432=mt76_connac_mcu_key_iter(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2464-\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:2465:int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2466-\t\t\t\t struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2501-}\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:2502:EXPORT_SYMBOL_GPL(mt76_connac_mcu_update_gtk_rekey);\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2503-\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h=2086=int mt76_connac_mcu_set_wow_ctrl(struct mt76_phy *phy, struct ieee80211_vif *vif,\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h-2087-\t\t\t\t bool suspend, struct cfg80211_wowlan *wowlan);\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h:2088:int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h-2089-\t\t\t\t struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/main.c=1190=static void mt7921_set_rekey_data(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/main.c-1196-\tmt792x_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7921/main.c:1197:\tmt76_connac_mcu_update_gtk_rekey(hw, vif, data);\ndrivers/net/wireless/mediatek/mt76/mt7921/main.c-1198-\tmt792x_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/main.c=1751=static void mt7925_set_rekey_data(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/main.c-1757-\tmt792x_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7925/main.c:1758:\tmt76_connac_mcu_update_gtk_rekey(hw, vif, data);\ndrivers/net/wireless/mediatek/mt76/mt7925/main.c-1759-\tmt792x_mutex_release(dev);\n"
} |
| 5/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4781 output: 35 thoughts: 93 Thoughts: **Investigating the mt76_connac_mcu_update_gtk_rekey Function's Scope** Okay, so I'm looking into this `mt76_connac_mcu_update_gtk_rekey` function. I know it's used across the mt7615, mt7921, and mt7925 chipsets – got it. But a question popped into my head: does that include USB support for, say, the mt7921 or the mt7925, or even the general `mt76_connac` functionality, since it's used in several devices? I need to clarify that. Time to dive into the drivers themselves. I'll head over to the `drivers/net/wireless/mediatek/mt76/` directory. That's where I expect to find the specifics on what interfaces and features are supported for each of those devices, particularly regarding USB. I need to understand if the architecture of these drivers handles USB in a similar way, or if there are specific USB-related sections I need to examine. Let's see what the code tells us! |
| 6/2 | 2026/09/08 21:43 | tool | grepper |
0mError:no matches Args: {
"Expression": "usb_register",
"PathPrefix": "drivers/net/wireless/mediatek/mt76"
}Results: {
"error": "no matches"
} |
| 7/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5172 output: 33 thoughts: 25 Thoughts: Here's my thought process, as if I were considering this myself: **Investigating USB Driver Implementation** Okay, so I'm looking into something related to USB driver functionality within the MT76 directory. My initial hunch is to focus my search on either `module_usb_driver` or `usb_register_driver`. These are the two key functions I'd expect to see involved in the registration and initialization of a USB driver module. I'd start with those as my primary targets within that directory, and see where they lead. Given the `mt76` context, I'm probably looking at a specific wireless chipset, so the implementations might have some unique touches compared to generic USB drivers. |
| 8/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "usb",
"PathPrefix": "drivers/net/wireless/mediatek/mt76"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1623 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/mediatek/mt76/Makefile=2=obj-$(CONFIG_MT76_CORE) += mt76.o\ndrivers/net/wireless/mediatek/mt76/Makefile:3:obj-$(CONFIG_MT76_USB) += mt76-usb.o\ndrivers/net/wireless/mediatek/mt76/Makefile-4-obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o\ndrivers/net/wireless/mediatek/mt76/Makefile=5=obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o\ndrivers/net/wireless/mediatek/mt76/Makefile:6:obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o\ndrivers/net/wireless/mediatek/mt76/Makefile-7-obj-$(CONFIG_MT76_CONNAC_LIB) += mt76-connac-lib.o\ndrivers/net/wireless/mediatek/mt76/Makefile=8=obj-$(CONFIG_MT792x_LIB) += mt792x-lib.o\ndrivers/net/wireless/mediatek/mt76/Makefile:9:obj-$(CONFIG_MT792x_USB) += mt792x-usb.o\ndrivers/net/wireless/mediatek/mt76/Makefile-10-\n--\ndrivers/net/wireless/mediatek/mt76/Makefile=21=mt76-$(CONFIG_NL80211_TESTMODE) += testmode.o\ndrivers/net/wireless/mediatek/mt76/Makefile-22-\ndrivers/net/wireless/mediatek/mt76/Makefile:23:mt76-usb-y := usb.o usb_trace.o\ndrivers/net/wireless/mediatek/mt76/Makefile-24-mt76-sdio-y := sdio.o sdio_txrx.o\n--\ndrivers/net/wireless/mediatek/mt76/Makefile=26=CFLAGS_trace.o := -I$(src)\ndrivers/net/wireless/mediatek/mt76/Makefile:27:CFLAGS_usb_trace.o := -I$(src)\ndrivers/net/wireless/mediatek/mt76/Makefile-28-CFLAGS_mt76x02_trace.o := -I$(src)\n--\ndrivers/net/wireless/mediatek/mt76/Makefile=31=mt76x02-lib-y := mt76x02_util.o mt76x02_mac.o mt76x02_mcu.o \\\n--\ndrivers/net/wireless/mediatek/mt76/Makefile-35-\ndrivers/net/wireless/mediatek/mt76/Makefile:36:mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o\ndrivers/net/wireless/mediatek/mt76/Makefile-37-\n--\ndrivers/net/wireless/mediatek/mt76/Makefile=42=mt792x-lib-$(CONFIG_ACPI) += mt792x_acpi_sar.o\ndrivers/net/wireless/mediatek/mt76/Makefile:43:mt792x-usb-y := mt792x_usb.o\ndrivers/net/wireless/mediatek/mt76/Makefile-44-\n--\ndrivers/net/wireless/mediatek/mt76/debugfs.c=74=static int mt76_rx_queues_read(struct seq_file *s, void *data)\n--\ndrivers/net/wireless/mediatek/mt76/debugfs.c-82-\ndrivers/net/wireless/mediatek/mt76/debugfs.c:83:\t\tqueued = mt76_is_usb(dev) ? q-\u003endesc - q-\u003equeued : q-\u003equeued;\ndrivers/net/wireless/mediatek/mt76/debugfs.c-84-\t\tseq_printf(s, \" %9d | %9d | %9d | %9d |\\n\",\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-13-#include \u003clinux/leds.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt76.h:14:#include \u003clinux/usb.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt76.h-15-#include \u003clinux/average.h\u003e\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=95=struct mt76_bus_ops {\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-109-\ndrivers/net/wireless/mediatek/mt76/mt76.h:110:#define mt76_is_usb(dev) ((dev)-\u003ebus-\u003etype == MT76_BUS_USB)\ndrivers/net/wireless/mediatek/mt76/mt76.h-111-#define mt76_is_mmio(dev) ((dev)-\u003ebus-\u003etype == MT76_BUS_MMIO)\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=650=struct mt76_mcu {\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-663-#define MCU_RESP_URB_SIZE\t1024\ndrivers/net/wireless/mediatek/mt76/mt76.h:664:struct mt76_usb {\ndrivers/net/wireless/mediatek/mt76/mt76.h:665:\tstruct mutex usb_ctrl_mtx;\ndrivers/net/wireless/mediatek/mt76/mt76.h-666-\tu8 *data;\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=924=struct mt76_dev {\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1041-\t\tstruct mt76_mmio mmio;\ndrivers/net/wireless/mediatek/mt76/mt76.h:1042:\t\tstruct mt76_usb usb;\ndrivers/net/wireless/mediatek/mt76/mt76.h-1043-\t\tstruct mt76_sdio sdio;\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=1834=void mt76_offchannel_notify(struct mt76_phy *phy, bool offchannel);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1835-\ndrivers/net/wireless/mediatek/mt76/mt76.h:1836:/* usb */\ndrivers/net/wireless/mediatek/mt76/mt76.h-1837-static inline bool mt76u_urb_error(struct urb *urb)\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=1846=mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int *actual_len,\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1848-{\ndrivers/net/wireless/mediatek/mt76/mt76.h:1849:\tstruct usb_interface *uintf = to_usb_interface(dev-\u003edev);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1850:\tstruct usb_device *udev = interface_to_usbdev(uintf);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1851:\tstruct mt76_usb *usb = \u0026dev-\u003eusb;\ndrivers/net/wireless/mediatek/mt76/mt76.h-1852-\tunsigned int pipe;\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1854-\tif (actual_len)\ndrivers/net/wireless/mediatek/mt76/mt76.h:1855:\t\tpipe = usb_rcvbulkpipe(udev, usb-\u003ein_ep[ep]);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1856-\telse\ndrivers/net/wireless/mediatek/mt76/mt76.h:1857:\t\tpipe = usb_sndbulkpipe(udev, usb-\u003eout_ep[ep]);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1858-\ndrivers/net/wireless/mediatek/mt76/mt76.h:1859:\treturn usb_bulk_msg(udev, pipe, data, len, actual_len, timeout);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1860-}\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=1876=void ___mt76u_wr(struct mt76_dev *dev, u8 req, u8 req_type,\ndrivers/net/wireless/mediatek/mt76/mt76.h-1877-\t\t u32 addr, u32 val);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1878:int __mt76u_init(struct mt76_dev *dev, struct usb_interface *intf,\ndrivers/net/wireless/mediatek/mt76/mt76.h-1879-\t\t struct mt76_bus_ops *ops);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1880:int mt76u_init(struct mt76_dev *dev, struct usb_interface *intf);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1881-int mt76u_alloc_mcu_queue(struct mt76_dev *dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile=4=obj-$(CONFIG_MT7615E) += mt7615e.o\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile:5:obj-$(CONFIG_MT7663_USB_SDIO_COMMON) += mt7663-usb-sdio-common.o\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile-6-obj-$(CONFIG_MT7663U) += mt7663u.o\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile=16=mt7615e-$(CONFIG_MT7622_WMAC) += soc.o\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile-17-\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile:18:mt7663-usb-sdio-common-y := usb_sdio.o\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile:19:mt7663u-y := usb.o usb_mcu.o\ndrivers/net/wireless/mediatek/mt76/mt7615/Makefile-20-mt7663s-y := sdio.o sdio_mcu.o\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c=96=mt7615_pm_set(void *data, u64 val)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c-104-\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:105:\tif (!mt7615_firmware_offload(dev) || mt76_is_usb(\u0026dev-\u003emt76))\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c-106-\t\treturn -EOPNOTSUPP;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h=355=extern const u32 mt7663e_reg_map[__MT_BASE_MAX];\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:356:extern const u32 mt7663_usb_sdio_reg_map[__MT_BASE_MAX];\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-357-extern struct pci_driver mt7615_pci_driver;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h=540=void mt7622_trigger_hif_int(struct mt7615_dev *dev, bool en);\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-541-\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:542:/* usb */\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:543:int mt7663_usb_sdio_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-544-\t\t\t\t enum mt76_txq_id qid, struct mt76_wcid *wcid,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-546-\t\t\t\t struct mt76_tx_info *tx_info);\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:547:bool mt7663_usb_sdio_tx_status_data(struct mt76_dev *mdev, u8 *update);\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:548:void mt7663_usb_sdio_tx_complete_skb(struct mt76_dev *mdev,\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-549-\t\t\t\t struct mt76_queue_entry *e);\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:550:int mt7663_usb_sdio_register_device(struct mt7615_dev *dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-551-int mt7663u_mcu_init(struct mt7615_dev *dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c=76=static int mt7663s_probe(struct sdio_func *func,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-81-\t\t.drv_flags = MT_DRV_RX_DMA_HDR,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:82:\t\t.tx_prepare_skb = mt7663_usb_sdio_tx_prepare_skb,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:83:\t\t.tx_complete_skb = mt7663_usb_sdio_tx_complete_skb,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:84:\t\t.tx_status_data = mt7663_usb_sdio_tx_status_data,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-85-\t\t.rx_skb = mt7615_queue_rx_skb,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-118-\tINIT_WORK(\u0026dev-\u003emcu_work, mt7663s_init_work);\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:119:\tdev-\u003ereg_map = mt7663_usb_sdio_reg_map;\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-120-\tdev-\u003eops = ops;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-158-\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:159:\tret = mt7663_usb_sdio_register_device(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-160-\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-10-#include \u003clinux/module.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:11:#include \u003clinux/usb.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-12-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-17-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:18:static const struct usb_device_id mt7615_device_table[] = {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-19-\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0e8d, 0x7663, 0xff, 0xff, 0xff) },\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=24=static u32 mt7663u_rr(struct mt76_dev *dev, u32 addr)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-27-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:28:\tmutex_lock(\u0026dev-\u003eusb.usb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-29-\tret = ___mt76u_rr(dev, MT_VEND_READ_EXT,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-30-\t\t\t USB_DIR_IN | USB_TYPE_VENDOR, addr);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:31:\tmutex_unlock(\u0026dev-\u003eusb.usb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-32-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=36=static void mt7663u_wr(struct mt76_dev *dev, u32 addr, u32 val)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-37-{\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:38:\tmutex_lock(\u0026dev-\u003eusb.usb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-39-\t___mt76u_wr(dev, MT_VEND_WRITE_EXT,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-40-\t\t USB_DIR_OUT | USB_TYPE_VENDOR, addr, val);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:41:\tmutex_unlock(\u0026dev-\u003eusb.usb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-42-}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=44=static u32 mt7663u_rmw(struct mt76_dev *dev, u32 addr,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-46-{\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:47:\tmutex_lock(\u0026dev-\u003eusb.usb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-48-\tval |= ___mt76u_rr(dev, MT_VEND_READ_EXT,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-51-\t\t USB_DIR_OUT | USB_TYPE_VENDOR, addr, val);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:52:\tmutex_unlock(\u0026dev-\u003eusb.usb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-53-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=57=static void mt7663u_copy(struct mt76_dev *dev, u32 offset,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-59-{\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:60:\tstruct mt76_usb *usb = \u0026dev-\u003eusb;\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-61-\tint ret, i = 0, batch_len;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-65-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:66:\tmutex_lock(\u0026usb-\u003eusb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-67-\twhile (i \u003c len) {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:68:\t\tbatch_len = min_t(int, usb-\u003edata_len, len - i);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:69:\t\tmemcpy(usb-\u003edata, val + i, batch_len);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-70-\t\tret = __mt76u_vendor_request(dev, MT_VEND_WRITE_EXT,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-72-\t\t\t\t\t (offset + i) \u003e\u003e 16, offset + i,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:73:\t\t\t\t\t usb-\u003edata, batch_len);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-74-\t\tif (ret \u003c 0)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-78-\t}\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:79:\tmutex_unlock(\u0026usb-\u003eusb_ctrl_mtx);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-80-}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=101=static void mt7663u_init_work(struct work_struct *work)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-111-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:112:static int mt7663u_probe(struct usb_interface *usb_intf,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:113:\t\t\t const struct usb_device_id *id)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-114-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-117-\t\t.drv_flags = MT_DRV_RX_DMA_HDR | MT_DRV_HW_MGMT_TXQ,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:118:\t\t.tx_prepare_skb = mt7663_usb_sdio_tx_prepare_skb,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:119:\t\t.tx_complete_skb = mt7663_usb_sdio_tx_complete_skb,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:120:\t\t.tx_status_data = mt7663_usb_sdio_tx_status_data,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-121-\t\t.rx_skb = mt7615_queue_rx_skb,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-135-\t};\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:136:\tstruct usb_device *udev = interface_to_usbdev(usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-137-\tstruct ieee80211_ops *ops;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-141-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:142:\tops = devm_kmemdup(\u0026usb_intf-\u003edev, \u0026mt7615_ops, sizeof(mt7615_ops),\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-143-\t\t\t GFP_KERNEL);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-148-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:149:\tmdev = mt76_alloc_device(\u0026usb_intf-\u003edev, sizeof(*dev), ops, \u0026drv_ops);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-150-\tif (!mdev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-153-\tdev = container_of(mdev, struct mt7615_dev, mt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:154:\tusb_reset_device(udev);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-155-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:156:\tusb_set_intfdata(usb_intf, dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-157-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-158-\tINIT_WORK(\u0026dev-\u003emcu_work, mt7663u_init_work);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:159:\tdev-\u003ereg_map = mt7663_usb_sdio_reg_map;\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-160-\tdev-\u003eops = ops;\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:161:\tret = __mt76u_init(mdev, usb_intf, \u0026bus_ops);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-162-\tif (ret \u003c 0)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-185-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:186:\tret = mt7663_usb_sdio_register_device(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-187-\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-193-\tmt76u_queues_deinit(\u0026dev-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:194:\tusb_set_intfdata(usb_intf, NULL);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-195-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-200-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:201:static void mt7663u_disconnect(struct usb_interface *usb_intf)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-202-{\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:203:\tstruct mt7615_dev *dev = usb_get_intfdata(usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-204-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-210-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:211:\tusb_set_intfdata(usb_intf, NULL);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-212-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-216-#ifdef CONFIG_PM\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:217:static int mt7663u_suspend(struct usb_interface *intf, pm_message_t state)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-218-{\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:219:\tstruct mt7615_dev *dev = usb_get_intfdata(intf);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-220-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-235-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:236:static int mt7663u_resume(struct usb_interface *intf)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-237-{\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:238:\tstruct mt7615_dev *dev = usb_get_intfdata(intf);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-239-\tint err;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-258-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:259:MODULE_DEVICE_TABLE(usb, mt7615_device_table);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-260-MODULE_FIRMWARE(MT7663_OFFLOAD_FIRMWARE_N9);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=263=MODULE_FIRMWARE(MT7663_ROM_PATCH);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-264-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:265:static struct usb_driver mt7663u_driver = {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-266-\t.name\t\t= KBUILD_MODNAME,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-277-};\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:278:module_usb_driver(mt7663u_driver);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-279-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-9-#include \u003clinux/module.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:10:#include \u003clinux/usb.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-11-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-16-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:17:const u32 mt7663_usb_sdio_reg_map[] = {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-18-\t[MT_TOP_CFG_BASE]\t= 0x80020000,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-40-};\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:41:EXPORT_SYMBOL_GPL(mt7663_usb_sdio_reg_map);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-42-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c=43=static void\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:44:mt7663_usb_sdio_write_txwi(struct mt7615_dev *dev, struct mt76_wcid *wcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-45-\t\t\t enum mt76_txq_id qid, struct ieee80211_sta *sta,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-55-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:56:static int mt7663_usb_sdio_set_rates(struct mt7615_dev *dev,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-57-\t\t\t\t struct mt7615_wtbl_rate_desc *wrd)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-130-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:131:static void mt7663_usb_sdio_rate_work(struct work_struct *work)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-132-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-148-\t\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:149:\t\tmt7663_usb_sdio_set_rates(dev, wrd);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-150-\t\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-155-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:156:bool mt7663_usb_sdio_tx_status_data(struct mt76_dev *mdev, u8 *update)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-157-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-165-}\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:166:EXPORT_SYMBOL_GPL(mt7663_usb_sdio_tx_status_data);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-167-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:168:void mt7663_usb_sdio_tx_complete_skb(struct mt76_dev *mdev,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-169-\t\t\t\t struct mt76_queue_entry *e)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-172-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:173:\tif (mt76_is_usb(mdev))\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-174-\t\theadroom += MT_USB_HDR_SIZE;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-178-}\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:179:EXPORT_SYMBOL_GPL(mt7663_usb_sdio_tx_complete_skb);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-180-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:181:int mt7663_usb_sdio_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-182-\t\t\t\t enum mt76_txq_id qid, struct mt76_wcid *wcid,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-207-\tpktid = mt76_tx_status_skb_add(\u0026dev-\u003emt76, wcid, skb);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:208:\tmt7663_usb_sdio_write_txwi(dev, wcid, qid, sta, key, pktid, skb);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:209:\tif (mt76_is_usb(mdev)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-210-\t\tu32 len = skb-\u003elen;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-224-}\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:225:EXPORT_SYMBOL_GPL(mt7663_usb_sdio_tx_prepare_skb);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-226-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c=227=static int mt7663u_dma_sched_init(struct mt7615_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-278-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:279:static int mt7663_usb_sdio_init_hardware(struct mt7615_dev *dev)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-280-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-286-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:287:\tif (mt76_is_usb(\u0026dev-\u003emt76)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-288-\t\tret = mt7663u_dma_sched_init(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-306-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:307:int mt7663_usb_sdio_register_device(struct mt7615_dev *dev)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-308-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-311-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:312:\tINIT_WORK(\u0026dev-\u003erate_work, mt7663_usb_sdio_rate_work);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-313-\tINIT_LIST_HEAD(\u0026dev-\u003ewrd_head);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-315-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:316:\terr = mt7663_usb_sdio_init_hardware(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-317-\tif (err)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-320-\thw-\u003eextra_tx_headroom += MT_USB_TXD_SIZE;\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:321:\tif (mt76_is_usb(\u0026dev-\u003emt76)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-322-\t\thw-\u003eextra_tx_headroom += MT_USB_HDR_SIZE;\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-323-\t\t/* check hw sg support in order to enable AMSDU */\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:324:\t\tif (dev-\u003emt76.usb.sg_en)\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-325-\t\t\thw-\u003emax_tx_fragments = MT_HW_TXP_MAX_BUF_NUM;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-334-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:335:\tif (!dev-\u003emt76.usb.sg_en) {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-336-\t\tstruct ieee80211_sta_vht_cap *vht_cap;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-348-}\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c:349:EXPORT_SYMBOL_GPL(mt7663_usb_sdio_register_device);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb_sdio.c-350-\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c=36=int mt76_connac_pm_wake(struct mt76_phy *phy, struct mt76_connac_pm *pm)\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c-39-\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c:40:\tif (mt76_is_usb(dev))\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c-41-\t\treturn 0;\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c=62=void mt76_connac_power_save_sched(struct mt76_phy *phy,\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c-66-\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c:67:\tif (mt76_is_usb(dev))\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c-68-\t\treturn;\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c=2623=mt76_connac_mcu_set_wow_ctrl(struct mt76_phy *phy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2665-\t\treq.wow_ctrl_tlv.wakeup_hif = WOW_PCIE;\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:2666:\telse if (mt76_is_usb(dev))\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2667-\t\treq.wow_ctrl_tlv.wakeup_hif = WOW_USB;\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c=2676=int mt76_connac_mcu_set_hif_suspend(struct mt76_dev *dev, bool suspend, bool wait_resp)\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2701-\t\treq.hdr.hif_type = 2;\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:2702:\telse if (mt76_is_usb(dev))\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2703-\t\treq.hdr.hif_type = 1;\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/Makefile=6=mt76x0-common-y := init.o main.o eeprom.o phy.o\ndrivers/net/wireless/mediatek/mt76/mt76x0/Makefile-7-\ndrivers/net/wireless/mediatek/mt76/mt76x0/Makefile:8:mt76x0u-y := usb.o usb_mcu.o\ndrivers/net/wireless/mediatek/mt76/mt76x0/Makefile-9-mt76x0e-y := pci.o pci_mcu.o\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h-14-#include \u003clinux/mutex.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h:15:#include \u003clinux/usb.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h-16-#include \u003clinux/completion.h\u003e\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c=103=mt76x0_rf_wr(struct mt76x02_dev *dev, u32 offset, u8 val)\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c-104-{\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c:105:\tif (mt76_is_usb(\u0026dev-\u003emt76)) {\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c-106-\t\tstruct mt76_reg_pair pair = {\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c=119=static int mt76x0_rf_rr(struct mt76x02_dev *dev, u32 offset)\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c-123-\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c:124:\tif (mt76_is_usb(\u0026dev-\u003emt76)) {\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c-125-\t\tstruct mt76_reg_pair pair = {\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c=913=void mt76x0_phy_set_channel(struct mt76x02_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c-970-\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c:971:\tif (mt76_is_usb(\u0026dev-\u003emt76)) {\ndrivers/net/wireless/mediatek/mt76/mt76x0/phy.c-972-\t\tmt76x0_phy_bbp_set_bw(dev, chandef-\u003ewidth);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-7-#include \u003clinux/module.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:8:#include \u003clinux/usb.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-9-\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-11-#include \"mcu.h\"\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:12:#include \"../mt76x02_usb.h\"\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-13-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:14:static struct usb_device_id mt76x0_device_table[] = {\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-15-\t{ USB_DEVICE(0x148F, 0x7610) },\t/* MT7610U */\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-45-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:46:static void mt76x0_init_usb_dma(struct mt76x02_dev *dev)\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-47-{\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c=151=static int mt76x0u_init_hardware(struct mt76x02_dev *dev, bool reset)\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-163-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:164:\tmt76x0_init_usb_dma(dev);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-165-\terr = mt76x0_init_hardware(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c=179=static int mt76x0u_register_device(struct mt76x02_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-181-\tstruct ieee80211_hw *hw = dev-\u003emt76.hw;\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:182:\tstruct mt76_usb *usb = \u0026dev-\u003emt76.usb;\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-183-\tint err;\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-184-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:185:\tusb-\u003emcu.data = devm_kmalloc(dev-\u003emt76.dev, MCU_RESP_URB_SIZE,\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-186-\t\t\t\t GFP_KERNEL);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:187:\tif (!usb-\u003emcu.data)\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-188-\t\treturn -ENOMEM;\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-198-\t/* check hw sg support in order to enable AMSDU */\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:199:\thw-\u003emax_tx_fragments = dev-\u003emt76.usb.sg_en ? MT_TX_SG_MAX_SIZE : 1;\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-200-\terr = mt76x0_register_device(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-212-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:213:static int mt76x0u_probe(struct usb_interface *usb_intf,\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:214:\t\t\t const struct usb_device_id *id)\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-215-{\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-229-\t};\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:230:\tstruct usb_device *usb_dev = interface_to_usbdev(usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-231-\tstruct mt76x02_dev *dev;\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-235-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:236:\tmdev = mt76_alloc_device(\u0026usb_intf-\u003edev, sizeof(*dev), \u0026mt76x0u_ops,\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-237-\t\t\t\t \u0026drv_ops);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-247-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:248:\tusb_reset_device(usb_dev);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-249-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:250:\tusb_set_intfdata(usb_intf, dev);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-251-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-252-\tmt76x02u_init_mcu(mdev);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:253:\tret = mt76u_init(mdev, usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-254-\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-284-err:\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:285:\tusb_set_intfdata(usb_intf, NULL);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-286-\tmt76u_queues_deinit(\u0026dev-\u003emt76);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-291-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:292:static void mt76x0_disconnect(struct usb_interface *usb_intf)\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-293-{\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:294:\tstruct mt76x02_dev *dev = usb_get_intfdata(usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-295-\tbool initialized = test_bit(MT76_STATE_INITIALIZED, \u0026dev-\u003emphy.state);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-302-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:303:\tusb_set_intfdata(usb_intf, NULL);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-304-\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-307-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:308:static int __maybe_unused mt76x0_suspend(struct usb_interface *usb_intf,\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-309-\t\t\t\t\t pm_message_t state)\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-310-{\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:311:\tstruct mt76x02_dev *dev = usb_get_intfdata(usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-312-\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-319-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:320:static int __maybe_unused mt76x0_resume(struct usb_interface *usb_intf)\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-321-{\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:322:\tstruct mt76x02_dev *dev = usb_get_intfdata(usb_intf);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-323-\tint ret;\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-338-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:339:MODULE_DEVICE_TABLE(usb, mt76x0_device_table);\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-340-MODULE_FIRMWARE(MT7610E_FIRMWARE);\n--\n\n"
} |
| 9/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 21584 output: 55 thoughts: 72 Thoughts: **Investigating MT7921 USB Support** Okay, so I'm trying to figure out if this MT7921 chipset has USB support. My initial hunch is to check the naming conventions, seeing if there's a variant like `mt7921u` or `mt792xu` or maybe even something similar to the mt7663u that I'm more familiar with. Where would that information be located in this kernel configuration? Alright, let's dive into the driver code. I'm going to head straight to `drivers/net/wireless/mediatek/mt76/mt7921/usb.c`. That should contain the relevant USB-specific implementation details. Alongside that, I need to check the `Kconfig` file in that directory as well. It'll be essential to understand if the USB support is conditionally compiled, and what dependencies or build options might be involved. This should give me a solid answer about whether USB is a viable configuration. |
| 10/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "config MT7921U|config MT7663U|config MT7925U",
"PathPrefix": "drivers/net/wireless/mediatek/mt76"
}Results: {
"Output": "drivers/net/wireless/mediatek/mt76/mt7615/Kconfig=32=config MT7663_USB_SDIO_COMMON\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig-35-\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig:36:config MT7663U\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig-37-\ttristate \"MediaTek MT7663U (USB) support\"\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig=17=config MT7921S\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig-27-\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig:28:config MT7921U\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig-29-\ttristate \"MediaTek MT7921U (USB) support\"\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/Kconfig=7=config MT7925E\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/Kconfig-18-\ndrivers/net/wireless/mediatek/mt76/mt7925/Kconfig:19:config MT7925U\ndrivers/net/wireless/mediatek/mt76/mt7925/Kconfig-20-\ttristate \"MediaTek MT7925U (USB) support\"\n"
} |
| 11/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 22361 output: 34 thoughts: 167 Thoughts: **Initial Vulnerability Assessment** Okay, so I've got my sights set on these MediaTek wireless chips – the MT7663U, MT7921U, and MT7925U. A quick scan reveals they all rely on USB drivers, which is promising. The fact that these USB drivers are potentially emulatable using USB gadget or raw_gadget within Syzkaller is a solid lead. I can leverage that to get a controlled environment for testing. The real interesting point is this `mt76_connac_mcu_update_gtk_rekey` function. It's used by functions specific to each chip family, `mt7615_set_rekey_data`, `mt7921_set_rekey_data`, and `mt7925_set_rekey_data`. This screams "common code path" and therefore, potentially, a shared vulnerability. Now, my next step is clear: I need to dig into the mac80211 and cfg80211 operations to understand what `set_rekey_data` actually does. I want to see how this function is integrated into the larger wireless operations and, most importantly, where and how the `set_rekey_data` callback is linked and, crucially, invoked. That will be the key to understanding how I can trigger this and, hopefully, exploit it. |
| 12/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "set_rekey_data",
"PathPrefix": "net/mac80211"
}Results: {
"Output": "net/mac80211/cfg.c=4919=static int ieee80211_get_antenna(struct wiphy *wiphy, int radio_idx,\n--\nnet/mac80211/cfg.c-4926-\nnet/mac80211/cfg.c:4927:static int ieee80211_set_rekey_data(struct wiphy *wiphy,\nnet/mac80211/cfg.c-4928-\t\t\t\t struct net_device *dev,\n--\nnet/mac80211/cfg.c-4933-\nnet/mac80211/cfg.c:4934:\tif (!local-\u003eops-\u003eset_rekey_data)\nnet/mac80211/cfg.c-4935-\t\treturn -EOPNOTSUPP;\nnet/mac80211/cfg.c-4936-\nnet/mac80211/cfg.c:4937:\tdrv_set_rekey_data(local, sdata, data);\nnet/mac80211/cfg.c-4938-\n--\nnet/mac80211/cfg.c=5976=const struct cfg80211_ops mac80211_config_ops = {\n--\nnet/mac80211/cfg.c-6046-\t.get_antenna = ieee80211_get_antenna,\nnet/mac80211/cfg.c:6047:\t.set_rekey_data = ieee80211_set_rekey_data,\nnet/mac80211/cfg.c-6048-\t.tdls_oper = ieee80211_tdls_oper,\n--\nnet/mac80211/driver-ops.h=875=static inline int drv_set_bitrate_mask(struct ieee80211_local *local,\n--\nnet/mac80211/driver-ops.h-895-\nnet/mac80211/driver-ops.h:896:static inline void drv_set_rekey_data(struct ieee80211_local *local,\nnet/mac80211/driver-ops.h-897-\t\t\t\t struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/driver-ops.h-908-\nnet/mac80211/driver-ops.h:909:\ttrace_drv_set_rekey_data(local, sdata, data);\nnet/mac80211/driver-ops.h:910:\tif (local-\u003eops-\u003eset_rekey_data)\nnet/mac80211/driver-ops.h:911:\t\tlocal-\u003eops-\u003eset_rekey_data(\u0026local-\u003ehw, \u0026sdata-\u003evif, data);\nnet/mac80211/driver-ops.h-912-\ttrace_drv_return_void(local);\n--\nnet/mac80211/trace.h=1480=TRACE_EVENT(drv_set_bitrate_mask,\n--\nnet/mac80211/trace.h-1506-\nnet/mac80211/trace.h:1507:TRACE_EVENT(drv_set_rekey_data,\nnet/mac80211/trace.h-1508-\tTP_PROTO(struct ieee80211_local *local,\n"
} |
| 13/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 23785 output: 38 thoughts: 81 Thoughts: **Analyzing the Re-key Data Configuration** Okay, so I'm looking at `set_rekey_data`. Right, this is a `cfg80211` operation, specifically tied to the `NL80211_CMD_SET_REKEY_DATA` netlink command. That means a user-space application can trigger this functionality via netlink. That's good to know, that's the whole point. Now, let's dive into the nl80211 handler to see *exactly* what's going on when this command is received. I need to understand the control flow and data validation in that handler to ensure there are no vulnerabilities, or performance issues. |
| 14/2 | 2026/09/08 21:43 | tool | grepper |
0mError:no matches Args: {
"Expression": "NL80211_CMD_SET_REKEY_DATA",
"PathPrefix": "net/wireless"
}Results: {
"error": "no matches"
} |
| 15/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 24069 output: 29 thoughts: 27 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Investigating `set_rekey_data` in nl80211.c** Alright, time to dive into this. I'm thinking, "Where's the best place to start looking for this `set_rekey_data` function?" Given my familiarity with the kernel's wireless stack, my first instinct is to check `net/wireless/nl80211.c`. That's the logical place where you'd expect to find a function related to rekeying, especially since it's the core of the nl80211 netlink interface. It's a key entry point for wireless configuration and control, so `nl80211.c` is probably the home of anything dealing with key management. Let's see what that file holds. Should be interesting. |
| 16/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "set_rekey_data",
"PathPrefix": "net/wireless"
}Results: {
"Output": "net/wireless/nl80211.c=16219=static int nl80211_set_coalesce(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-16273-\nnet/wireless/nl80211.c:16274:static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info)\nnet/wireless/nl80211.c-16275-{\n--\nnet/wireless/nl80211.c-16316-\nnet/wireless/nl80211.c:16317:\tif (!rdev-\u003eops-\u003eset_rekey_data)\nnet/wireless/nl80211.c-16318-\t\treturn -EOPNOTSUPP;\nnet/wireless/nl80211.c-16319-\nnet/wireless/nl80211.c:16320:\treturn rdev_set_rekey_data(rdev, dev, \u0026rekey_data);\nnet/wireless/nl80211.c-16321-}\n--\nnet/wireless/nl80211.c=19746=static const struct genl_small_ops nl80211_small_ops[] = {\n--\nnet/wireless/nl80211.c-20220-\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\nnet/wireless/nl80211.c:20221:\t\t.doit = nl80211_set_rekey_data,\nnet/wireless/nl80211.c-20222-\t\t.flags = GENL_UNS_ADMIN_PERM,\n--\nnet/wireless/rdev-ops.h=901=static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev,\n--\nnet/wireless/rdev-ops.h-910-\nnet/wireless/rdev-ops.h:911:static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev,\nnet/wireless/rdev-ops.h-912-\t\t\t\t struct net_device *dev,\n--\nnet/wireless/rdev-ops.h-915-\tint ret;\nnet/wireless/rdev-ops.h:916:\ttrace_rdev_set_rekey_data(\u0026rdev-\u003ewiphy, dev);\nnet/wireless/rdev-ops.h:917:\tret = rdev-\u003eops-\u003eset_rekey_data(\u0026rdev-\u003ewiphy, dev, data);\nnet/wireless/rdev-ops.h-918-\ttrace_rdev_return_int(\u0026rdev-\u003ewiphy, ret);\n--\nnet/wireless/trace.h=806=DECLARE_EVENT_CLASS(wiphy_netdev_evt,\n--\nnet/wireless/trace.h-819-\nnet/wireless/trace.h:820:DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data,\nnet/wireless/trace.h-821-\tTP_PROTO(struct wiphy *wiphy, struct net_device *netdev),\n"
} |
| 17/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 25193 output: 53 thoughts: 37 Thoughts: Okay, let's dive into this. Here's my take on those initial thoughts: **Dissecting the GTK Rekey Function** Alright, the first thing I'm going to do is get my hands dirty and pull up the source code for `mt76_connac_mcu_update_gtk_rekey`. I need to understand what's been modified and, more importantly, *how* it's been implemented. I want to see the nitty-gritty details – the specific logic, any new data structures introduced, any changes to existing algorithms. I want to know exactly what's different about this version compared to any previous implementations, and get to grips with any architectural design decisions. |
| 18/2 | 2026/09/08 21:43 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c",
"FirstLine": 2460,
"LineCount": 55
}Results: {
"Contents": "2460:\t\t} else {\n2461:\t\t\tgtk_tlv-\u003egroup_cipher = cpu_to_le32(cipher);\n2462:\t\t}\n2463:\t}\n2464:\t\n2465:\tint mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\n2466:\t\t\t\t\t struct ieee80211_vif *vif,\n2467:\t\t\t\t\t struct cfg80211_gtk_rekey_data *key)\n2468:\t{\n2469:\t\tstruct mt76_vif_link *mvif = (struct mt76_vif_link *)vif-\u003edrv_priv;\n2470:\t\tstruct mt76_connac_gtk_rekey_tlv *gtk_tlv;\n2471:\t\tstruct mt76_phy *phy = hw-\u003epriv;\n2472:\t\tstruct sk_buff *skb;\n2473:\t\tstruct {\n2474:\t\t\tu8 bss_idx;\n2475:\t\t\tu8 pad[3];\n2476:\t\t} __packed hdr = {\n2477:\t\t\t.bss_idx = mvif-\u003eidx,\n2478:\t\t};\n2479:\t\n2480:\t\tskb = mt76_mcu_msg_alloc(phy-\u003edev, NULL,\n2481:\t\t\t\t\t sizeof(hdr) + sizeof(*gtk_tlv));\n2482:\t\tif (!skb)\n2483:\t\t\treturn -ENOMEM;\n2484:\t\n2485:\t\tskb_put_data(skb, \u0026hdr, sizeof(hdr));\n2486:\t\tgtk_tlv = (struct mt76_connac_gtk_rekey_tlv *)skb_put_zero(skb,\n2487:\t\t\t\t\t\t\t\t sizeof(*gtk_tlv));\n2488:\t\tgtk_tlv-\u003etag = cpu_to_le16(UNI_OFFLOAD_OFFLOAD_GTK_REKEY);\n2489:\t\tgtk_tlv-\u003elen = cpu_to_le16(sizeof(*gtk_tlv));\n2490:\t\tgtk_tlv-\u003erekey_mode = 2;\n2491:\t\tgtk_tlv-\u003eoption = 1;\n2492:\t\n2493:\t\tieee80211_iter_keys(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);\n2494:\t\n2495:\t\tmemcpy(gtk_tlv-\u003ekek, key-\u003ekek, NL80211_KEK_LEN);\n2496:\t\tmemcpy(gtk_tlv-\u003ekck, key-\u003ekck, NL80211_KCK_LEN);\n2497:\t\tmemcpy(gtk_tlv-\u003ereplay_ctr, key-\u003ereplay_ctr, NL80211_REPLAY_CTR_LEN);\n2498:\t\n2499:\t\treturn mt76_mcu_skb_send_msg(phy-\u003edev, skb,\n2500:\t\t\t\t\t MCU_UNI_CMD(OFFLOAD), true);\n2501:\t}\n2502:\tEXPORT_SYMBOL_GPL(mt76_connac_mcu_update_gtk_rekey);\n2503:\t\n2504:\tstatic int\n2505:\tmt76_connac_mcu_set_arp_filter(struct mt76_dev *dev, struct ieee80211_vif *vif,\n2506:\t\t\t\t bool suspend)\n2507:\t{\n2508:\t\tstruct mt76_vif_link *mvif = (struct mt76_vif_link *)vif-\u003edrv_priv;\n2509:\t\tstruct {\n2510:\t\t\tstruct {\n2511:\t\t\t\tu8 bss_idx;\n2512:\t\t\t\tu8 pad[3];\n2513:\t\t\t} __packed hdr;\n2514:\t\t\tstruct mt76_connac_arpns_tlv arpns;\n"
} |
| 19/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 26495 output: 39 thoughts: 66 Thoughts: Here's my take: **Investigating Key Iteration Mechanisms in mac80211** Okay, so I'm looking at key iteration within the `mac80211` framework. Specifically, I need to understand the difference and usage scenarios between `ieee80211_iter_keys` and `ieee80211_iter_keys_rcu`. Clearly, one likely deals with standard locking, and the other leverages Read-Copy-Update (RCU) for concurrent access, but I need to figure out the specifics. The immediate next step is to drill down into the source code. I'll start by searching for all instances of `ieee80211_iter_keys` within the `net/mac80211/` directory. That will provide context and show me how it's being used, and then I can compare that with how `ieee80211_iter_keys_rcu` is being handled. This should quickly illuminate the critical differences and when each method is preferred, especially in terms of concurrency and performance implications for key management. |
| 20/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "ieee80211_iter_keys",
"PathPrefix": "net/mac80211"
}Results: {
"Output": "net/mac80211/key.c=1001=ieee80211_key_iter(struct ieee80211_hw *hw,\n--\nnet/mac80211/key.c-1019-\nnet/mac80211/key.c:1020:void ieee80211_iter_keys(struct ieee80211_hw *hw,\nnet/mac80211/key.c-1021-\t\t\t struct ieee80211_vif *vif,\n--\nnet/mac80211/key.c-1046-}\nnet/mac80211/key.c:1047:EXPORT_SYMBOL(ieee80211_iter_keys);\nnet/mac80211/key.c-1048-\nnet/mac80211/key.c=1049=static void\nnet/mac80211/key.c:1050:_ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\nnet/mac80211/key.c-1051-\t\t\t struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/key.c-1064-\nnet/mac80211/key.c:1065:void ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\nnet/mac80211/key.c-1066-\t\t\t struct ieee80211_vif *vif,\n--\nnet/mac80211/key.c-1078-\t\tsdata = vif_to_sdata(vif);\nnet/mac80211/key.c:1079:\t\t_ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);\nnet/mac80211/key.c-1080-\t} else {\nnet/mac80211/key.c-1081-\t\tlist_for_each_entry_rcu(sdata, \u0026local-\u003einterfaces, list)\nnet/mac80211/key.c:1082:\t\t\t_ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);\nnet/mac80211/key.c-1083-\t}\nnet/mac80211/key.c-1084-}\nnet/mac80211/key.c:1085:EXPORT_SYMBOL(ieee80211_iter_keys_rcu);\nnet/mac80211/key.c-1086-\n"
} |
| 21/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 27575 output: 41 thoughts: 35 Thoughts: Okay, let's dive into this. I need to get a handle on the inner workings of `ieee80211_iter_keys` within `net/mac80211/key.c`. This is a crucial function; it's the core of how we iterate through the cryptographic keys associated with 802.11 frames. I'm going to want to understand exactly how it handles different key types, the potential for locking or concurrency issues, and how it deals with the various states a key might be in. I’ll need to figure out what data structures it's interacting with to actually get the key data, and especially how it efficiently handles large numbers of keys. Performance is always a critical concern here; slow key iteration would significantly impact throughput and latency. I'm also going to pay close attention to the error handling within this function to see how resilient it is. I need to thoroughly understand this mechanism to confidently debug any key-related problems I encounter. |
| 22/2 | 2026/09/08 21:43 | tool | read-file |
0mArgs:{
"File": "net/mac80211/key.c",
"FirstLine": 1020,
"LineCount": 40
}Results: {
"Contents": "1020:\tvoid ieee80211_iter_keys(struct ieee80211_hw *hw,\n1021:\t\t\t\t struct ieee80211_vif *vif,\n1022:\t\t\t\t void (*iter)(struct ieee80211_hw *hw,\n1023:\t\t\t\t\t struct ieee80211_vif *vif,\n1024:\t\t\t\t\t struct ieee80211_sta *sta,\n1025:\t\t\t\t\t struct ieee80211_key_conf *key,\n1026:\t\t\t\t\t void *data),\n1027:\t\t\t\t void *iter_data)\n1028:\t{\n1029:\t\tstruct ieee80211_local *local = hw_to_local(hw);\n1030:\t\tstruct ieee80211_key *key, *tmp;\n1031:\t\tstruct ieee80211_sub_if_data *sdata;\n1032:\t\n1033:\t\tlockdep_assert_wiphy(hw-\u003ewiphy);\n1034:\t\n1035:\t\tif (vif) {\n1036:\t\t\tsdata = vif_to_sdata(vif);\n1037:\t\t\tlist_for_each_entry_safe(key, tmp, \u0026sdata-\u003ekey_list, list)\n1038:\t\t\t\tieee80211_key_iter(hw, vif, key, iter, iter_data);\n1039:\t\t} else {\n1040:\t\t\tlist_for_each_entry(sdata, \u0026local-\u003einterfaces, list)\n1041:\t\t\t\tlist_for_each_entry_safe(key, tmp,\n1042:\t\t\t\t\t\t\t \u0026sdata-\u003ekey_list, list)\n1043:\t\t\t\t\tieee80211_key_iter(hw, \u0026sdata-\u003evif, key,\n1044:\t\t\t\t\t\t\t iter, iter_data);\n1045:\t\t}\n1046:\t}\n1047:\tEXPORT_SYMBOL(ieee80211_iter_keys);\n1048:\t\n1049:\tstatic void\n1050:\t_ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\n1051:\t\t\t\t struct ieee80211_sub_if_data *sdata,\n1052:\t\t\t\t void (*iter)(struct ieee80211_hw *hw,\n1053:\t\t\t\t\t struct ieee80211_vif *vif,\n1054:\t\t\t\t\t struct ieee80211_sta *sta,\n1055:\t\t\t\t\t struct ieee80211_key_conf *key,\n1056:\t\t\t\t\t void *data),\n1057:\t\t\t\t void *iter_data)\n1058:\t{\n1059:\t\tstruct ieee80211_key *key;\n"
} |
| 23/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 28634 output: 41 thoughts: 351 Thoughts: **Analyzing the Key Iteration in mt76_connac_mcu.c** Okay, let's dissect this. I'm looking at `ieee80211_iter_keys` and the first thing that jumps out is that `lockdep_assert_wiphy(hw->wiphy)` call. That's immediately interesting – it's a lockdep assertion, meaning it expects either the `wiphy_lock` to be held or for the context to be "wiphy-locked" already. The commit log clarifies the change. It's now calling `ieee80211_iter_keys` directly, instead of `ieee80211_iter_keys_rcu`. The crucial point here is that `ieee80211_iter_keys` is now being used without the RCU protection that `ieee80211_iter_keys_rcu` provided. Now, why is that significant? Well, the code path that invokes this – `mt76_connac_mcu_update_gtk_rekey()` – is the important factor to understand. The fact is that `ieee80211_iter_keys` expects `wiphy_lock` to be held, and that happens when the `nl80211_set_rekey_data()` function is invoked by cfg80211/nl80211. So the lockdep assertion validates that the expected locking is in place, and because the calling path uses the Wiphy lock already, everything is in good shape. To be sure that all the conditions are correct, and this change does not have a side effect, I need to check the configurations related to `mt76_connac_mcu.c` – specifically, what configuration options are set that enable this codepath. Time to check `drivers/net/wireless/mediatek/mt76/Kconfig` and `drivers/net/wireless/mediatek/mt76/Makefile` to see if there are any gotchas in conditional compilation or dependencies I need to be aware of. |
| 24/2 | 2026/09/08 21:43 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/Kconfig",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: BSD-3-Clause-Clear\n 2:\tconfig MT76_CORE\n 3:\t\ttristate\n 4:\t\tselect PAGE_POOL\n 5:\t\n 6:\tconfig MT76_LEDS\n 7:\t\tbool\n 8:\t\tdepends on MT76_CORE\n 9:\t\tdepends on LEDS_CLASS=y || MT76_CORE=LEDS_CLASS\n 10:\t\tdefault y\n 11:\t\n 12:\tconfig MT76_USB\n 13:\t\ttristate\n 14:\t\tdepends on MT76_CORE\n 15:\t\n 16:\tconfig MT76_SDIO\n 17:\t\ttristate\n 18:\t\tdepends on MT76_CORE\n 19:\t\n 20:\tconfig MT76x02_LIB\n 21:\t\ttristate\n 22:\t\tselect MT76_CORE\n 23:\t\n 24:\tconfig MT76x02_USB\n 25:\t\ttristate\n 26:\t\tselect MT76_USB\n 27:\t\n 28:\tconfig MT76_CONNAC_LIB\n 29:\t\ttristate\n 30:\t\tselect MT76_CORE\n 31:\t\n 32:\tconfig MT792x_LIB\n 33:\t\ttristate\n 34:\t\tselect MT76_CONNAC_LIB\n 35:\t\n 36:\tconfig MT792x_USB\n 37:\t\ttristate\n 38:\t\tselect MT76_USB\n 39:\t\n 40:\tconfig MT76_NPU\n 41:\t\ttristate\n 42:\t\tdepends on NET_AIROHA_NPU=y || MT76_CORE=NET_AIROHA_NPU\n 43:\t\n 44:\tsource \"drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig\"\n 45:\tsource \"drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig\"\n 46:\tsource \"drivers/net/wireless/mediatek/mt76/mt7603/Kconfig\"\n 47:\tsource \"drivers/net/wireless/mediatek/mt76/mt7615/Kconfig\"\n 48:\tsource \"drivers/net/wireless/mediatek/mt76/mt7915/Kconfig\"\n 49:\tsource \"drivers/net/wireless/mediatek/mt76/mt7921/Kconfig\"\n 50:\tsource \"drivers/net/wireless/mediatek/mt76/mt7996/Kconfig\"\n 51:\tsource \"drivers/net/wireless/mediatek/mt76/mt7925/Kconfig\"\n"
} |
| 25/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 30213 output: 47 thoughts: 27 Thoughts: Here's my summary, as though I'm thinking through this process: **Diving into the MT7921 Kconfig** Okay, time to get my hands dirty and check the configuration file for the MT7921 wireless driver. I need to understand its build options and dependencies. Specifically, I'm heading straight for `drivers/net/wireless/mediatek/mt76/mt7921/Kconfig`. This is where the core configuration lives, where I'll find the knobs and switches that determine how this driver integrates into the kernel build process. I'm expecting to find settings related to features, debugging options, firmware loading, and any necessary dependencies on other kernel components. This is the starting point for really digging into how this driver is controlled during the build. Let's see what's in there! |
| 26/2 | 2026/09/08 21:43 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/mt7921/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: BSD-3-Clause-Clear\n 2:\tconfig MT7921_COMMON\n 3:\t\ttristate\n 4:\t\tselect MT792x_LIB\n 5:\t\tselect WANT_DEV_COREDUMP\n 6:\t\n 7:\tconfig MT7921E\n 8:\t\ttristate \"MediaTek MT7921E (PCIe) support\"\n 9:\t\tselect MT7921_COMMON\n 10:\t\tdepends on MAC80211\n 11:\t\tdepends on PCI\n 12:\t\thelp\n 13:\t\t This adds support for MT7921E 802.11ax 2x2:2SS wireless devices.\n 14:\t\n 15:\t\t To compile this driver as a module, choose M here.\n 16:\t\n 17:\tconfig MT7921S\n 18:\t\ttristate \"MediaTek MT7921S (SDIO) support\"\n 19:\t\tselect MT76_SDIO\n 20:\t\tselect MT7921_COMMON\n 21:\t\tdepends on MAC80211\n 22:\t\tdepends on MMC\n 23:\t\thelp\n 24:\t\t This adds support for MT7921S 802.11ax 2x2:2SS wireless devices.\n 25:\t\n 26:\t\t To compile this driver as a module, choose M here.\n 27:\t\n 28:\tconfig MT7921U\n 29:\t\ttristate \"MediaTek MT7921U (USB) support\"\n 30:\t\tselect MT792x_USB\n 31:\t\tselect MT7921_COMMON\n 32:\t\tdepends on MAC80211\n 33:\t\tdepends on USB\n 34:\t\thelp\n 35:\t\t This adds support for MT7921U 802.11ax 2x2:2SS wireless devices.\n 36:\t\n 37:\t\t To compile this driver as a module, choose M here.\n"
} |
| 27/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 31008 output: 48 thoughts: 20 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Considering Further Configuration Details** Okay, so we've covered the primary aspects, but I need to make sure we're thorough. Let's not overlook any potential nuances. Given the scope of this project, it's prudent to specifically examine the configurations for the MT7663U and MT7925U chipsets. These are common enough in the architectures we're dealing with, and even seemingly minor differences in their setup can have significant impacts on overall system performance and stability. It's easy to get tunnel vision, so I need to make sure I haven't missed any edge cases by not reviewing their settings. This review should cover parameters relating to power management, radio settings, and perhaps most importantly, any device-specific quirks that might necessitate custom driver modifications or workarounds. This is all part of establishing a baseline understanding before moving forward. |
| 28/2 | 2026/09/08 21:43 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/mt7615/Kconfig",
"FirstLine": 30,
"LineCount": 25
}Results: {
"Contents": " 30:\t\t 2.4 GHz only.\n 31:\t\n 32:\tconfig MT7663_USB_SDIO_COMMON\n 33:\t\ttristate\n 34:\t\tselect MT7615_COMMON\n 35:\t\n 36:\tconfig MT7663U\n 37:\t\ttristate \"MediaTek MT7663U (USB) support\"\n 38:\t\tselect MT76_USB\n 39:\t\tselect MT7663_USB_SDIO_COMMON\n 40:\t\tdepends on MAC80211\n 41:\t\tdepends on USB\n 42:\t\thelp\n 43:\t\t This adds support for MT7663U 802.11ac 2x2:2 wireless devices.\n 44:\t\n 45:\t\t To compile this driver as a module, choose M here.\n 46:\t\n 47:\tconfig MT7663S\n 48:\t\ttristate \"MediaTek MT7663S (SDIO) support\"\n 49:\t\tselect MT76_SDIO\n 50:\t\tselect MT7663_USB_SDIO_COMMON\n 51:\t\tdepends on MAC80211\n 52:\t\tdepends on MMC\n 53:\t\thelp\n 54:\t\t This adds support for MT7663S 802.11ac 2x2:2 wireless devices.\n"
} |
| 29/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 31649 output: 47 thoughts: 28 Thoughts: Okay, here's my take on those thoughts, framed as my own: **Digging Deeper into the MT7925 Driver Configuration** Right, so we've established the general area, but now I need to drill down. I'm thinking, "Let's *also* check the Kconfig file for the MT7925 driver within the MediaTek wireless code." This isn't just a random act; I know that Kconfig files are the heart of the kernel's configuration system. They dictate which options are available for this specific driver, how those options are related, and under what conditions the driver itself gets built into the kernel. Checking it will provide insights into how features are enabled or disabled, any platform dependencies, and if there are any specific parameters I need to be aware of when considering this driver. It's a key source for understanding the build process and potential configuration gotchas related to the MT7925. I really need to get in there and see what's what. |
| 30/2 | 2026/09/08 21:43 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/mt7925/Kconfig",
"FirstLine": 1,
"LineCount": 35
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: BSD-3-Clause-Clear\n 2:\tconfig MT7925_COMMON\n 3:\t\ttristate\n 4:\t\tselect MT792x_LIB\n 5:\t\tselect WANT_DEV_COREDUMP\n 6:\t\n 7:\tconfig MT7925E\n 8:\t\ttristate \"MediaTek MT7925E (PCIe) support\"\n 9:\t\tselect MT7925_COMMON\n 10:\t\tdepends on MAC80211\n 11:\t\tdepends on PCI\n 12:\t\thelp\n 13:\t\t This adds support for MT7925-based wireless PCIe devices,\n 14:\t\t which support operation at 6GHz, 5GHz, and 2.4GHz IEEE 802.11be\n 15:\t\t 2x2:2SS 4096-QAM, 160MHz channels.\n 16:\t\n 17:\t\t To compile this driver as a module, choose M here.\n 18:\t\n 19:\tconfig MT7925U\n 20:\t\ttristate \"MediaTek MT7925U (USB) support\"\n 21:\t\tselect MT792x_USB\n 22:\t\tselect MT7925_COMMON\n 23:\t\tdepends on MAC80211\n 24:\t\tdepends on USB\n 25:\t\thelp\n 26:\t\t This adds support for MT7925-based wireless USB devices,\n 27:\t\t which support operation at 6GHz, 5GHz, and 2.4GHz IEEE 802.11be\n 28:\t\t 2x2:2SS 4096-QAM, 160MHz channels.\n 29:\t\n 30:\t\t To compile this driver as a module, choose M here.\n"
} |
| 31/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 32421 output: 41 thoughts: 34 Thoughts: Okay, let's dive into this. Here's how I'd approach that, summarized in the first person: **Investigating the `mt76-connac-lib` Build Process** Alright, I need to understand how the `mt76-connac-lib` library is being built within the Mediatek wireless driver context. My first port of call will be the `drivers/net/wireless/mediatek/mt76/Makefile`. That's where the build logic for this kind of driver component *should* reside. I'm expecting to find rules or directives that specify how the source files are compiled, linked, and incorporated into the broader driver build. I'll be looking for things like: * The source files (`.c`, `.h`) that make up the library. * Compilation flags (e.g., `-I` for include paths, `-D` for preprocessor definitions, optimization options). * Linking directives. Does it build a static library (`.a`) or a shared object (`.ko`)? * How the `mt76-connac-lib` gets included in other components or the main driver. Is it linked directly, or is it treated as a separate module? * Are there any conditional builds based on specific hardware, kernel versions, or configuration options? * Any dependencies on other libraries or modules, and how they're handled. Essentially, I need to map out the entire build process specific to `mt76-connac-lib`. I'll be scrutinizing the Makefile to extract these specific details. I'm hoping it's well-structured and documented, but even if it isn't, I know how to navigate the common Makefile conventions to find what I need. |
| 32/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "mt76_connac_mcu",
"PathPrefix": "drivers/net/wireless/mediatek/mt76"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 2848 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/mediatek/mt76/Makefile=36=mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o\ndrivers/net/wireless/mediatek/mt76/Makefile-37-\ndrivers/net/wireless/mediatek/mt76/Makefile:38:mt76-connac-lib-y := mt76_connac_mcu.o mt76_connac_mac.o mt76_connac3_mac.o\ndrivers/net/wireless/mediatek/mt76/Makefile-39-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c=51=static int mt7615_config(void *data, u64 val)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c-56-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:57:\tret = mt76_connac_mcu_chip_config(\u0026dev-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/debugfs.c-58-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c=136=mt7615_mac_init(struct mt7615_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c-151-\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c:152:\tmt76_connac_mcu_set_rts_thresh(\u0026dev-\u003emt76, 0x92b, 0);\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c-153-\tmt7615_mac_set_scs(\u0026dev-\u003ephy, true);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c=319=void mt7615_init_work(struct mt7615_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c-323-\tmt7615_phy_init(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c:324:\tmt76_connac_mcu_del_wtbl_all(\u0026dev-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c-325-\tmt7615_check_offload_capability(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c=330=mt7615_regd_notifier(struct wiphy *wiphy,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c-350-\tif (mt7615_firmware_offload(phy-\u003edev)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c:351:\t\tmt76_connac_mcu_set_channel_domain(mphy);\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c:352:\t\tmt76_connac_mcu_set_rate_txpower(mphy);\ndrivers/net/wireless/mediatek/mt76/mt7615/init.c-353-\t}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c=2112=static void mt7615_dfs_stop_radar_detector(struct mt7615_phy *phy)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2116-\tif (phy-\u003erdd_state \u0026 BIT(0))\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2117:\t\tmt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_STOP, 0,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2118-\t\t\t\t\tMT_RX_SEL0, 0);\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2119-\tif (phy-\u003erdd_state \u0026 BIT(1))\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2120:\t\tmt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_STOP, 1,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2121-\t\t\t\t\tMT_RX_SEL0, 0);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c=2124=static int mt7615_dfs_start_rdd(struct mt7615_dev *dev, int chain)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2127-\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2128:\terr = mt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_START, chain,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2129-\t\t\t\t MT_RX_SEL0, 0);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2132-\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2133:\treturn mt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_DET_MODE, chain,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2134-\t\t\t\t MT_RX_SEL0, 1);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c=2137=static int mt7615_dfs_start_radar_detector(struct mt7615_phy *phy)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2144-\t/* start CAC */\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2145:\terr = mt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_CAC_START, ext_phy,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2146-\t\t\t\t MT_RX_SEL0, 0);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c=2205=int mt7615_dfs_init_radar_detector(struct mt7615_phy *phy)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2242-\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2243:\terr = mt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_CAC_END,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2244-\t\t\t\t ext_phy, MT_RX_SEL0, 0);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2253-stop:\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c:2254:\terr = mt76_connac_mcu_rdd_cmd(\u0026dev-\u003emt76, RDD_NORMAL_START, ext_phy,\ndrivers/net/wireless/mediatek/mt76/mt7615/mac.c-2255-\t\t\t\t MT_RX_SEL0, 0);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=27=static int mt7615_start(struct ieee80211_hw *hw)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-46-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:47:\t\tret = mt76_connac_mcu_set_mac_enable(\u0026dev-\u003emt76, 0, true, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-48-\t\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-58-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:59:\t\tret = mt76_connac_mcu_set_mac_enable(\u0026dev-\u003emt76, 1, true, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-60-\t\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-66-\tif (mt7615_firmware_offload(dev)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:67:\t\tret = mt76_connac_mcu_set_channel_domain(phy-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-68-\t\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-70-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:71:\t\tret = mt76_connac_mcu_set_rate_txpower(phy-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-72-\t\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=94=static void mt7615_stop(struct ieee80211_hw *hw, bool suspend)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-116-\t\tmt7615_mcu_set_pm(dev, 1, 1);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:117:\t\tmt76_connac_mcu_set_mac_enable(\u0026dev-\u003emt76, 1, false, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-118-\t}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-121-\t\tmt7615_mcu_set_pm(dev, 0, 1);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:122:\t\tmt76_connac_mcu_set_mac_enable(\u0026dev-\u003emt76, 0, false, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-123-\t}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=335=static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-379-\tif (cmd == SET_KEY \u0026\u0026 !sta \u0026\u0026 !mvif-\u003emt76.cipher) {\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:380:\t\tmvif-\u003emt76.cipher = mt76_connac_mcu_get_cipher(key-\u003ecipher);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-381-\t\tmt7615_mcu_add_bss_info(phy, vif, NULL, true);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=404=static int mt7615_set_sar_specs(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-417-\tif (mt7615_firmware_offload(phy-\u003edev))\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:418:\t\treturn mt76_connac_mcu_set_rate_txpower(phy-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-419-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=567=static void mt7615_bss_info_changed(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-590-\t\tif (mt7615_firmware_offload(dev) \u0026\u0026 vif-\u003ep2p)\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:591:\t\t\tmt76_connac_mcu_set_p2p_oppps(hw, vif);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-592-\t}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-602-\tif (changed \u0026 BSS_CHANGED_PS)\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:603:\t\tmt76_connac_mcu_set_vif_ps(\u0026dev-\u003emt76, vif);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-604-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-608-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:609:\t\tmt76_connac_mcu_update_arp_filter(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-610-\t\t\t\t\t\t info);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=788=static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-795-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:796:\terr = mt76_connac_mcu_set_rts_thresh(\u0026dev-\u003emt76, val, band);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-797-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1089=mt7615_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1100-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1101:\terr = mt76_connac_mcu_hw_scan(mphy, vif, req);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1102-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1108=mt7615_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1113-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1114:\tmt76_connac_mcu_cancel_hw_scan(mphy, vif);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1115-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1119=mt7615_start_sched_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1131-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1132:\terr = mt76_connac_mcu_sched_scan_req(mphy, vif, req);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1133-\tif (err \u003c 0)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1135-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1136:\terr = mt76_connac_mcu_sched_scan_enable(mphy, vif, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1137-out:\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1144=mt7615_stop_sched_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1153-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1154:\terr = mt76_connac_mcu_sched_scan_enable(mphy, vif, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1155-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1232=static int mt7615_suspend(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1251-\t\t\t\t\t IEEE80211_IFACE_ITER_RESUME_ALL,\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1252:\t\t\t\t\t mt76_connac_mcu_set_suspend_iter,\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1253-\t\t\t\t\t phy-\u003emt76);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1255-\tif (!mt7615_dev_running(dev))\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1256:\t\terr = mt76_connac_mcu_set_hif_suspend(\u0026dev-\u003emt76, true, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1257-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1263=static int mt7615_resume(struct ieee80211_hw *hw)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1277-\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1278:\t\terr = mt76_connac_mcu_set_hif_suspend(\u0026dev-\u003emt76, false, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1279-\t\tif (err \u003c 0) {\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1287-\t\t\t\t\t IEEE80211_IFACE_ITER_RESUME_ALL,\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1288:\t\t\t\t\t mt76_connac_mcu_set_suspend_iter,\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1289-\t\t\t\t\t phy-\u003emt76);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c=1307=static void mt7615_set_rekey_data(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1313-\tmt7615_mutex_acquire(dev);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c:1314:\tmt76_connac_mcu_update_gtk_rekey(hw, vif, data);\ndrivers/net/wireless/mediatek/mt76/mt7615/main.c-1315-\tmt7615_mutex_release(dev);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=135=int mt7615_mcu_parse_response(struct mt76_dev *mdev, int cmd,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-165-\t\t cmd == MCU_UNI_CMD(SUSPEND)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:166:\t\tstruct mt76_connac_mcu_uni_event *event;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-167-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-168-\t\tskb_pull(skb, sizeof(*rxd));\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:169:\t\tevent = (struct mt76_connac_mcu_uni_event *)skb-\u003edata;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-170-\t\tret = le32_to_cpu(event-\u003estatus);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-171-\t} else if (cmd == MCU_CE_QUERY(REG_READ)) {\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:172:\t\tstruct mt76_connac_mcu_reg_event *event;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-173-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-174-\t\tskb_pull(skb, sizeof(*rxd));\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:175:\t\tevent = (struct mt76_connac_mcu_reg_event *)skb-\u003edata;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-176-\t\tret = (int)le32_to_cpu(event-\u003eval);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=494=mt7615_mcu_beacon_loss_event(struct mt7615_dev *dev, struct sk_buff *skb)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-508-\t\t\t\t\tIEEE80211_IFACE_ITER_RESUME_ALL,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:509:\t\t\t\t\tmt76_connac_mcu_beacon_loss_iter,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-510-\t\t\t\t\tevent);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=514=mt7615_mcu_bss_event(struct mt7615_dev *dev, struct sk_buff *skb)\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-515-{\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:516:\tstruct mt76_connac_mcu_bss_event *event;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-517-\tstruct mt76_phy *mphy;\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-520-\tskb_pull(skb, sizeof(struct mt7615_mcu_rxd));\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:521:\tevent = (struct mt76_connac_mcu_bss_event *)skb-\u003edata;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-522-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=535=mt7615_mcu_rx_unsolicited_event(struct mt7615_dev *dev, struct sk_buff *skb)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-556-\tcase MCU_EVENT_COREDUMP:\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:557:\t\tmt76_connac_mcu_coredump_event(\u0026dev-\u003emt76, skb,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-558-\t\t\t\t\t \u0026dev-\u003ecoredump);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=734=mt7615_mcu_ctrl_pm_state(struct mt7615_dev *dev, int band, int state)\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-735-{\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:736:\treturn mt76_connac_mcu_set_pm(\u0026dev-\u003emt76, band, state);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-737-}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=740=mt7615_mcu_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-749-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:750:\tskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76, NULL);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-751-\tif (IS_ERR(skb))\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-754-\tif (enable)\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:755:\t\tmt76_connac_mcu_bss_omac_tlv(skb, vif);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-756-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:757:\tmt76_connac_mcu_bss_basic_tlv(skb, vif, sta, phy-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-758-\t\t\t\t mvif-\u003esta.wcid.idx, enable);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-761-\t mvif-\u003emt76.omac_idx \u003c REPEATER_BSSID_START)\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:762:\t\tmt76_connac_mcu_bss_ext_tlv(skb, \u0026mvif-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-763-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=769=mt7615_mcu_wtbl_tx_ba(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-778-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:779:\twtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(\u0026dev-\u003emt76, \u0026msta-\u003ewcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-780-\t\t\t\t\t\t WTBL_SET, NULL, \u0026skb);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-783-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:784:\tmt76_connac_mcu_wtbl_ba_tlv(\u0026dev-\u003emt76, skb, params, enable, true,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-785-\t\t\t\t NULL, wtbl_hdr);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-791-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:792:\tskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-793-\t\t\t\t\t \u0026msta-\u003ewcid);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-796-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:797:\tmt76_connac_mcu_sta_ba_tlv(skb, params, enable, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-798-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=804=mt7615_mcu_wtbl_rx_ba(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-813-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:814:\tskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-815-\t\t\t\t\t \u0026msta-\u003ewcid);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-818-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:819:\tmt76_connac_mcu_sta_ba_tlv(skb, params, enable, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-820-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-826-\tskb = NULL;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:827:\twtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(\u0026dev-\u003emt76, \u0026msta-\u003ewcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-828-\t\t\t\t\t\t WTBL_SET, NULL, \u0026skb);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-831-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:832:\tmt76_connac_mcu_wtbl_ba_tlv(\u0026dev-\u003emt76, skb, params, enable, false,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-833-\t\t\t\t NULL, wtbl_hdr);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=840=mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-855-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:856:\tsskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-857-\t\t\t\t\t \u0026msta-\u003ewcid);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-867-\tconn_state = enable ? CONN_STATE_PORT_SECURE : CONN_STATE_DISCONNECT;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:868:\tmt76_connac_mcu_sta_basic_tlv(\u0026dev-\u003emt76, sskb, \u0026vif-\u003ebss_conf,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-869-\t\t\t\t link_sta, conn_state, new_entry);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-870-\tif (enable \u0026\u0026 sta)\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:871:\t\tmt76_connac_mcu_sta_tlv(phy-\u003emt76, sskb, sta, vif, 0,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-872-\t\t\t\t\tMT76_STA_INFO_STATE_ASSOC);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-873-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:874:\twtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(\u0026dev-\u003emt76, \u0026msta-\u003ewcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-875-\t\t\t\t\t\t WTBL_RESET_AND_SET, NULL,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-882-\tif (enable) {\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:883:\t\tmt76_connac_mcu_wtbl_generic_tlv(\u0026dev-\u003emt76, wskb, vif, sta,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-884-\t\t\t\t\t\t NULL, wtbl_hdr);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-885-\t\tif (sta)\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:886:\t\t\tmt76_connac_mcu_wtbl_ht_tlv(\u0026dev-\u003emt76, wskb, sta,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-887-\t\t\t\t\t\t NULL, wtbl_hdr, true, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:888:\t\tmt76_connac_mcu_wtbl_hdr_trans_tlv(wskb, vif, \u0026msta-\u003ewcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-889-\t\t\t\t\t\t NULL, wtbl_hdr);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=910=mt7615_mcu_wtbl_update_hdr_trans(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-913-{\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:914:\treturn mt76_connac_mcu_wtbl_update_hdr_trans(\u0026dev-\u003emt76, vif, sta);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-915-}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=931=mt7615_mcu_sta_ba(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-940-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:941:\tskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-942-\t\t\t\t\t \u0026msta-\u003ewcid);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-945-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:946:\tmt76_connac_mcu_sta_ba_tlv(skb, params, enable, tx);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-947-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:948:\tsta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL, sizeof(struct tlv));\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-949-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:950:\twtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(\u0026dev-\u003emt76, \u0026msta-\u003ewcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-951-\t\t\t\t\t\t WTBL_SET, sta_wtbl, \u0026skb);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-954-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:955:\tmt76_connac_mcu_wtbl_ba_tlv(\u0026dev-\u003emt76, skb, params, enable, tx,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-956-\t\t\t\t sta_wtbl, wtbl_hdr);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=979=__mt7615_mcu_add_sta(struct mt76_phy *phy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-993-\tinfo.wcid = sta ? (struct mt76_wcid *)sta-\u003edrv_priv : \u0026mvif-\u003esta.wcid;\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:994:\treturn mt76_connac_mcu_sta_cmd(phy, \u0026info);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-995-}\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1006=mt7615_mcu_sta_update_hdr_trans(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1011-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1012:\treturn mt76_connac_mcu_sta_update_hdr_trans(\u0026dev-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1013-\t\t\t\t\t\t vif, \u0026msta-\u003ewcid,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1113=mt7615_mcu_uni_add_dev(struct mt7615_phy *phy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1117-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1118:\treturn mt76_connac_mcu_uni_add_dev(phy-\u003emt76, \u0026vif-\u003ebss_conf, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1119-\t\t\t\t\t \u0026mvif-\u003esta.wcid, enable);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1123=mt7615_mcu_uni_add_bss(struct mt7615_phy *phy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1127-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1128:\treturn mt76_connac_mcu_uni_add_bss(phy-\u003emt76, vif, \u0026mvif-\u003esta.wcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1129-\t\t\t\t\t enable, NULL);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1141=mt7615_mcu_uni_tx_ba(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1146-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1147:\treturn mt76_connac_mcu_sta_ba(\u0026dev-\u003emt76, \u0026sta-\u003evif-\u003emt76, params,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1148-\t\t\t\t MCU_UNI_CMD(STA_REC_UPDATE), enable,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1153=mt7615_mcu_uni_rx_ba(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1163-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1164:\tskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1165-\t\t\t\t\t \u0026msta-\u003ewcid);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1168-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1169:\tmt76_connac_mcu_sta_ba_tlv(skb, params, enable, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1170-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1175-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1176:\tskb = mt76_connac_mcu_alloc_sta_req(\u0026dev-\u003emt76, \u0026mvif-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1177-\t\t\t\t\t \u0026msta-\u003ewcid);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1180-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1181:\tsta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1182-\t\t\t\t\t sizeof(struct tlv));\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1183-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1184:\twtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(\u0026dev-\u003emt76, \u0026msta-\u003ewcid,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1185-\t\t\t\t\t\t WTBL_SET, sta_wtbl, \u0026skb);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1188-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1189:\tmt76_connac_mcu_wtbl_ba_tlv(\u0026dev-\u003emt76, skb, params, enable, false,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1190-\t\t\t\t sta_wtbl, wtbl_hdr);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1197=mt7615_mcu_sta_uni_update_hdr_trans(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1202-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1203:\treturn mt76_connac_mcu_sta_update_hdr_trans(\u0026dev-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1204-\t\t\t\t\t\t vif, \u0026msta-\u003ewcid,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1227=static int mt7615_load_patch(struct mt7615_dev *dev, u32 addr, const char *name)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1242-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1243:\tsem = mt76_connac_mcu_patch_sem_ctrl(\u0026dev-\u003emt76, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1244-\tswitch (sem) {\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1261-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1262:\tret = mt76_connac_mcu_init_download(\u0026dev-\u003emt76, addr, len,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1263-\t\t\t\t\t DL_MODE_NEED_RSP);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1275-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1276:\tret = mt76_connac_mcu_start_patch(\u0026dev-\u003emt76);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1277-\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1280-out:\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1281:\tsem = mt76_connac_mcu_patch_sem_ctrl(\u0026dev-\u003emt76, false);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1282-\tswitch (sem) {\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1298=mt7615_mcu_send_ram_firmware(struct mt7615_dev *dev,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1306-\tfor (i = 0; i \u003c n_region; i++) {\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1307:\t\tmode = mt76_connac_mcu_gen_dl_mode(\u0026dev-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1308-\t\t\t\t\t\t hdr[i].feature_set, is_cr4);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1311-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1312:\t\terr = mt76_connac_mcu_init_download(\u0026dev-\u003emt76, addr, len,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1313-\t\t\t\t\t\t mode);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1332=static int mt7615_load_n9(struct mt7615_dev *dev, const char *name)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1357-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1358:\tret = mt76_connac_mcu_start_firmware(\u0026dev-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1359-\t\t\t\t\t le32_to_cpu(hdr-\u003eaddr),\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1383=static int mt7615_load_cr4(struct mt7615_dev *dev, const char *name)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1408-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1409:\tret = mt76_connac_mcu_start_firmware(\u0026dev-\u003emt76, 0,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1410-\t\t\t\t\t FW_START_WORKING_PDA_CR4);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c=1522=static int mt7663_load_n9(struct mt7615_dev *dev, const char *name)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1553-\t\tbuf = (const struct mt7663_fw_buf *)(base_addr - shift);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1554:\t\tmode = mt76_connac_mcu_gen_dl_mode(\u0026dev-\u003emt76,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1555-\t\t\t\t\t\t buf-\u003efeature_set, false);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1558-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1559:\t\tret = mt76_connac_mcu_init_download(\u0026dev-\u003emt76, addr, len,\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1560-\t\t\t\t\t\t mode);\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1586-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1587:\tret = mt76_connac_mcu_start_firmware(\u0026dev-\u003emt76, override_addr, flag);\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.c-1588-\tif (ret) {\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.h-6-\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.h:7:#include \"../mt76_connac_mcu.h\"\ndrivers/net/wireless/mediatek/mt76/mt7615/mcu.h-8-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-11-#include \u003clinux/regmap.h\u003e\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h:12:#include \"../mt76_connac_mcu.h\"\ndrivers/net/wireless/mediatek/mt76/mt7615/mt7615.h-13-#include \"regs.h\"\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c=72=static int mt7615_pci_suspend(struct pci_dev *pdev, pm_message_t state)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c-85-\tif (hif_suspend) {\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c:86:\t\terr = mt76_connac_mcu_set_hif_suspend(mdev, true, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c-87-\t\tif (err)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c-133-\tif (hif_suspend)\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c:134:\t\tmt76_connac_mcu_set_hif_suspend(mdev, false, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c-135-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c=139=static int mt7615_pci_resume(struct pci_dev *pdev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c-181-\t mt7615_firmware_offload(dev))\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c:182:\t\terr = mt76_connac_mcu_set_hif_suspend(mdev, false, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/pci.c-183-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c=184=static int mt7663s_suspend(struct device *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-193-\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:194:\t\terr = mt76_connac_mcu_set_hif_suspend(\u0026mdev-\u003emt76, true, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-195-\t\tif (err \u003c 0)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c=217=static int mt7663s_resume(struct device *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-232-\t mt7615_firmware_offload(mdev))\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c:233:\t\terr = mt76_connac_mcu_set_hif_suspend(\u0026mdev-\u003emt76, false, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio.c-234-\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c=133=int mt7663s_mcu_init(struct mt7615_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c-139-\t\t.mcu_parse_response = mt7615_mcu_parse_response,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c:140:\t\t.mcu_rr = mt76_connac_mcu_reg_rr,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c:141:\t\t.mcu_wr = mt76_connac_mcu_reg_wr,\ndrivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c-142-\t};\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=217=static int mt7663u_suspend(struct usb_interface *intf, pm_message_t state)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-224-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:225:\t\terr = mt76_connac_mcu_set_hif_suspend(\u0026dev-\u003emt76, true, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-226-\t\tif (err \u003c 0)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c=236=static int mt7663u_resume(struct usb_interface *intf)\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-252-\t mt7615_firmware_offload(dev))\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:253:\t\terr = mt76_connac_mcu_set_hif_suspend(\u0026dev-\u003emt76, false, true);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-254-\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-5-#include \"mt76_connac2_mac.h\"\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:6:#include \"mt76_connac_mcu.h\"\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-7-#include \"mt792x_regs.h\"\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-8-\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:9:int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-10-{\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-21-}\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:22:EXPORT_SYMBOL_GPL(mt76_connac_mcu_start_firmware);\n\n"
} |
| 33/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 49642 output: 40 thoughts: 106 Thoughts: **Analyzing the Driver Dependency Tree** Okay, let's break this down. My initial observation is that `mt76-connac-lib` has a compiled object file, `mt76_connac_mcu.o`, which is what I'd expect. Now I need to understand the dependencies. Specifically, I see that the configuration option `MT76_CONNAC_LIB` selects this library. That means I need to figure out what *selects* `MT76_CONNAC_LIB`. From here, I see two distinct paths: `MT792x_LIB` and `MT7615_COMMON`. The former is selected by `MT7921_COMMON` and `MT7925_COMMON`, which makes sense given the newer generation hardware these likely represent. However, I want to confirm the link between `MT7615_COMMON` and the `MT76_CONNAC_LIB`, so I will check the `MT7615_COMMON` Kconfig entry. Knowing this information, I can now begin to debug the driver. |
| 34/2 | 2026/09/08 21:43 | tool | grepper |
0mArgs:{
"Expression": "MT76_CONNAC_LIB",
"PathPrefix": "drivers/net/wireless/mediatek/mt76"
}Results: {
"Output": "drivers/net/wireless/mediatek/mt76/Kconfig=24=config MT76x02_USB\n--\ndrivers/net/wireless/mediatek/mt76/Kconfig-27-\ndrivers/net/wireless/mediatek/mt76/Kconfig:28:config MT76_CONNAC_LIB\ndrivers/net/wireless/mediatek/mt76/Kconfig-29-\ttristate\n--\ndrivers/net/wireless/mediatek/mt76/Kconfig=32=config MT792x_LIB\ndrivers/net/wireless/mediatek/mt76/Kconfig-33-\ttristate\ndrivers/net/wireless/mediatek/mt76/Kconfig:34:\tselect MT76_CONNAC_LIB\ndrivers/net/wireless/mediatek/mt76/Kconfig-35-\n--\ndrivers/net/wireless/mediatek/mt76/Makefile=6=obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o\ndrivers/net/wireless/mediatek/mt76/Makefile:7:obj-$(CONFIG_MT76_CONNAC_LIB) += mt76-connac-lib.o\ndrivers/net/wireless/mediatek/mt76/Makefile-8-obj-$(CONFIG_MT792x_LIB) += mt792x-lib.o\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig=3=config MT7615_COMMON\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig-5-\tselect WANT_DEV_COREDUMP\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig:6:\tselect MT76_CONNAC_LIB\ndrivers/net/wireless/mediatek/mt76/mt7615/Kconfig-7-\n--\ndrivers/net/wireless/mediatek/mt76/mt7915/Kconfig=2=config MT7915E\ndrivers/net/wireless/mediatek/mt76/mt7915/Kconfig-3-\ttristate \"MediaTek MT7915E (PCIe) support\"\ndrivers/net/wireless/mediatek/mt76/mt7915/Kconfig:4:\tselect MT76_CONNAC_LIB\ndrivers/net/wireless/mediatek/mt76/mt7915/Kconfig-5-\tselect WANT_DEV_COREDUMP\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/Kconfig=2=config MT7996E\ndrivers/net/wireless/mediatek/mt76/mt7996/Kconfig-3-\ttristate \"MediaTek MT7996 (PCIe) support\"\ndrivers/net/wireless/mediatek/mt76/mt7996/Kconfig:4:\tselect MT76_CONNAC_LIB\ndrivers/net/wireless/mediatek/mt76/mt7996/Kconfig-5-\tselect WANT_DEV_COREDUMP\n"
} |
| 35/2 | 2026/09/08 21:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 50799 output: 290 thoughts: 1476 Thoughts: **Analysis of a MediaTek Wireless Driver Vulnerability** Okay, so I've been looking at this patch and here's my breakdown. The drivers `MT7663U`, `MT7921U`, and `MT7925U` – they are all USB-based Wi-Fi drivers, and they all rely on `MT76_CONNAC_LIB`. This library invokes `mt76_connac_mcu_update_gtk_rekey`, and my hunch is this is the key area. Now, `mt76_connac_mcu_update_gtk_rekey` gets called through `rdev_set_rekey_data` or `nl80211_set_rekey_data`, which is triggered by a userspace command, `NL80211_CMD_SET_REKEY_DATA`, sent via netlink to an emulated USB device. The patch itself, a crucial detail, changed `ieee80211_iter_keys_rcu` to `ieee80211_iter_keys`. This immediately caught my attention because the second function, `ieee80211_iter_keys`, internally includes a `lockdep_assert_wiphy(hw->wiphy);`. This suggests the wiphy mutex is now *required* to be held when calling the function, which is interesting. Given that `mt76_connac_mcu_update_gtk_rekey` is called with the wiphy mutex held or not (the patch changed the locking), and `ieee80211_iter_keys` asserts the wiphy lock, this alteration potentially changes the locking and traversal semantics of the key lists during GTK rekey updates. The critical question is, is this code reachable and worth fuzzing? Based on my assessment, it is. The change is within a reachable driver library used by multiple USB wireless device drivers that can be fuzzed via USB and wireless netlink. This patch seems to touch *reachable* executable code: drivers accessible via virtual buses, refactoring/cleanups, and, crucially, runtime assertions. Therefore, by changing from `RCU` to `wiphy mutex`, we are changing the locking semantics. Based on the criteria I use to determine a worth fuzzing opportunity, this clearly indicates that `WorthFuzzing = true`. I've confirmed the focus symbols are: `mt76_connac_mcu_update_gtk_rekey`, and its callers in the different driver-specific set_rekey_data functions: `mt7615_set_rekey_data`, `mt7921_set_rekey_data`, and `mt7925_set_rekey_data`. I've checked the required configurations: `MT76_CONNAC_LIB`, `MT7663U`, `MT7921U`, `MT7925U`, `MAC80211`, and `USB`. The library depends on `MT76_CORE`. All dependent drivers depend on `MAC80211` and `USB`. I've also made a quick final check of the symbol names, config names, and requirements. I'm ready to proceed with reporting my findings. |
| 36/2 | 2026/09/08 21:43 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"MT76_CONNAC_LIB",
"MT7663U",
"MT7921U",
"MT7925U",
"MAC80211",
"USB"
],
"FocusSymbols": [
"mt76_connac_mcu_update_gtk_rekey",
"mt7615_set_rekey_data",
"mt7921_set_rekey_data",
"mt7925_set_rekey_data"
],
"Reasoning": "The patch modifies mt76_connac_mcu_update_gtk_rekey() in the MediaTek mt76 wireless driver library, switching key iteration from ieee80211_iter_keys_rcu() to ieee80211_iter_keys(). This code is reachable from userspace via nl80211 (NL80211_CMD_SET_REKEY_DATA) on USB-emulated MediaTek devices (such as MT7663U, MT7921U, and MT7925U), and it invokes new lockdep assertion checks and altered locking/traversal semantics for key lists.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"MT76_CONNAC_LIB",
"MT7663U",
"MT7921U",
"MT7925U",
"MAC80211",
"USB"
],
"FocusSymbols": [
"mt76_connac_mcu_update_gtk_rekey",
"mt7615_set_rekey_data",
"mt7921_set_rekey_data",
"mt7925_set_rekey_data"
],
"Reasoning": "The patch modifies mt76_connac_mcu_update_gtk_rekey() in the MediaTek mt76 wireless driver library, switching key iteration from ieee80211_iter_keys_rcu() to ieee80211_iter_keys(). This code is reachable from userspace via nl80211 (NL80211_CMD_SET_REKEY_DATA) on USB-emulated MediaTek devices (such as MT7663U, MT7921U, and MT7925U), and it invokes new lockdep assertion checks and altered locking/traversal semantics for key lists.",
"WorthFuzzing": true
} |
| 37/1 | 2026/09/08 21:43 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 38/2 | 2026/09/08 21:43 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch replaces `rcu_read_lock()` + `ieee80211_iter_keys_rcu()` + `rcu_read_unlock()` with `ieee80211_iter_keys()` in `mt76_connac_mcu_update_gtk_rekey()`.\n\nThis is purely a locking/iterator cleanup where the wiphy lock is held, allowing the use of the locked iterator rather than the RCU-protected iterator. All buffers involved (`gtk_tlv`) continue to be allocated and zero-initialized with `skb_put_zero()`, and no kernel-to-user copies or uninitialized data reads/branches are introduced or modified. Any potential locking issues are covered by LOCKDEP/KASAN. 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: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 9a9730d50b7930dad123c0ed5954bd769a09052e
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Sep 8 21:42:55 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 2f925d22b9aa7..4351fbb617d86 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -2490,9 +2490,7 @@ int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,
gtk_tlv->rekey_mode = 2;
gtk_tlv->option = 1;
- rcu_read_lock();
- ieee80211_iter_keys_rcu(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);
- rcu_read_unlock();
+ ieee80211_iter_keys(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);
memcpy(gtk_tlv->kek, key->kek, NL80211_KEK_LEN);
memcpy(gtk_tlv->kck, key->kck, NL80211_KCK_LEN);
|
| 39/3 | 2026/09/08 21:43 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2258 output: 53 thoughts: 345 Thoughts: **Analyzing the Patch for Security Implications** Okay, let's dive into this. The first thing I'm doing is grabbing the patch and opening up my usual toolkit. I need to get a clear picture of what's happening. The change focuses on `drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c`, specifically in the `mt76_connac_mcu_update_gtk_rekey` function. I see that the patch removes the `rcu_read_lock()` and `rcu_read_unlock()` calls and instead uses `ieee80211_iter_keys`. My immediate thought is, "why the removal of the RCU locks?". The RCU (Read-Copy-Update) mechanism is used for concurrent access to shared data structures, particularly in the kernel. Removing those locks can have performance benefits, but it also carries potential risks if not handled correctly. This warrants careful inspection of the surrounding code. My mind is already racing through potential scenarios: are we introducing a race condition? Is the data accessed by `mt76_connac_mcu_key_iter` properly protected by other mechanisms? Is it now safe to use `ieee80211_iter_keys`? The functions `mt76_connac_mcu_update_gtk_rekey`, `ieee80211_iter_keys`, and `mt76_connac_mcu_key_iter` warrant a deep dive. I need to understand how key iterations are handled in this context to see if there is any potential for race conditions or data corruption. I need to see how the keys are accessed, modified, and synchronized to assess the impact of this change. It's time to dig in and understand the details. |
| 40/3 | 2026/09/08 21:44 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c",
"FirstLine": 2460,
"LineCount": 60
}Results: {
"Contents": "2460:\t\t} else {\n2461:\t\t\tgtk_tlv-\u003egroup_cipher = cpu_to_le32(cipher);\n2462:\t\t}\n2463:\t}\n2464:\t\n2465:\tint mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\n2466:\t\t\t\t\t struct ieee80211_vif *vif,\n2467:\t\t\t\t\t struct cfg80211_gtk_rekey_data *key)\n2468:\t{\n2469:\t\tstruct mt76_vif_link *mvif = (struct mt76_vif_link *)vif-\u003edrv_priv;\n2470:\t\tstruct mt76_connac_gtk_rekey_tlv *gtk_tlv;\n2471:\t\tstruct mt76_phy *phy = hw-\u003epriv;\n2472:\t\tstruct sk_buff *skb;\n2473:\t\tstruct {\n2474:\t\t\tu8 bss_idx;\n2475:\t\t\tu8 pad[3];\n2476:\t\t} __packed hdr = {\n2477:\t\t\t.bss_idx = mvif-\u003eidx,\n2478:\t\t};\n2479:\t\n2480:\t\tskb = mt76_mcu_msg_alloc(phy-\u003edev, NULL,\n2481:\t\t\t\t\t sizeof(hdr) + sizeof(*gtk_tlv));\n2482:\t\tif (!skb)\n2483:\t\t\treturn -ENOMEM;\n2484:\t\n2485:\t\tskb_put_data(skb, \u0026hdr, sizeof(hdr));\n2486:\t\tgtk_tlv = (struct mt76_connac_gtk_rekey_tlv *)skb_put_zero(skb,\n2487:\t\t\t\t\t\t\t\t sizeof(*gtk_tlv));\n2488:\t\tgtk_tlv-\u003etag = cpu_to_le16(UNI_OFFLOAD_OFFLOAD_GTK_REKEY);\n2489:\t\tgtk_tlv-\u003elen = cpu_to_le16(sizeof(*gtk_tlv));\n2490:\t\tgtk_tlv-\u003erekey_mode = 2;\n2491:\t\tgtk_tlv-\u003eoption = 1;\n2492:\t\n2493:\t\tieee80211_iter_keys(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);\n2494:\t\n2495:\t\tmemcpy(gtk_tlv-\u003ekek, key-\u003ekek, NL80211_KEK_LEN);\n2496:\t\tmemcpy(gtk_tlv-\u003ekck, key-\u003ekck, NL80211_KCK_LEN);\n2497:\t\tmemcpy(gtk_tlv-\u003ereplay_ctr, key-\u003ereplay_ctr, NL80211_REPLAY_CTR_LEN);\n2498:\t\n2499:\t\treturn mt76_mcu_skb_send_msg(phy-\u003edev, skb,\n2500:\t\t\t\t\t MCU_UNI_CMD(OFFLOAD), true);\n2501:\t}\n2502:\tEXPORT_SYMBOL_GPL(mt76_connac_mcu_update_gtk_rekey);\n2503:\t\n2504:\tstatic int\n2505:\tmt76_connac_mcu_set_arp_filter(struct mt76_dev *dev, struct ieee80211_vif *vif,\n2506:\t\t\t\t bool suspend)\n2507:\t{\n2508:\t\tstruct mt76_vif_link *mvif = (struct mt76_vif_link *)vif-\u003edrv_priv;\n2509:\t\tstruct {\n2510:\t\t\tstruct {\n2511:\t\t\t\tu8 bss_idx;\n2512:\t\t\t\tu8 pad[3];\n2513:\t\t\t} __packed hdr;\n2514:\t\t\tstruct mt76_connac_arpns_tlv arpns;\n2515:\t\t} req = {\n2516:\t\t\t.hdr = {\n2517:\t\t\t\t.bss_idx = mvif-\u003eidx,\n2518:\t\t\t},\n2519:\t\t\t.arpns = {\n"
} |
| 41/3 | 2026/09/08 21:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4164 output: 25 thoughts: 46 Thoughts: Okay, here's my interpretation of those thoughts, summarized from my perspective as someone well-versed in this area: **Investigating the Iteration Change** Alright, time to dig into this modification. My initial thought is to understand the motivations behind this shift. My first move will be to perform a targeted code search. I'll utilize `grep` to hunt down instances of both `ieee80211_iter_keys` and its RCU-enabled counterpart, `ieee80211_iter_keys_rcu`. Comparing where these functions are used, and the context around their changes, will provide significant insight. I expect the introduction of the RCU version likely indicates a concern around concurrent access, possibly during key management or configuration, likely a performance optimization or a solution to a locking issue. I'll be looking to see what the intent of the change was. |
| 42/3 | 2026/09/08 21:44 | tool | grepper |
0mArgs:{
"Expression": "ieee80211_iter_keys"
}Results: {
"Output": "drivers/net/wireless/intel/iwlwifi/dvm/lib.c=1034=int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)\n--\ndrivers/net/wireless/intel/iwlwifi/dvm/lib.c-1146-\t\tmutex_unlock(\u0026priv-\u003emutex);\ndrivers/net/wireless/intel/iwlwifi/dvm/lib.c:1147:\t\tieee80211_iter_keys(priv-\u003ehw, ctx-\u003evif,\ndrivers/net/wireless/intel/iwlwifi/dvm/lib.c-1148-\t\t\t\t iwlagn_wowlan_program_keys,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c=764=iwl_mld_set_wake_packet(struct iwl_mld *mld,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-796-\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c:797:\t\t\tieee80211_iter_keys(mld-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-798-\t\t\t\t\t iwl_mld_wake_pkt_key_iter,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c=1111=iwl_mld_process_rsc_notification(struct iwl_mld *mld,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-1122-\t/* Iterate through all active keys and update RSC */\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c:1123:\tieee80211_iter_keys_rcu(mld-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-1124-\t\t\t\tiwl_mld_rsc_update_key_iter,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c=1243=iwl_mld_update_sec_keys(struct iwl_mld *mld,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-1258-\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c:1259:\tieee80211_iter_keys(mld-\u003ehw, vif, iwl_mld_resume_keys_iter,\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-1260-\t\t\t \u0026key_iter_data);\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c=1855=iwl_mld_suspend_send_security_cmds(struct iwl_mld *mld,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-1870-\tdata.rsc-\u003esta_id = cpu_to_le32(ap_sta_id);\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c:1871:\tieee80211_iter_keys(mld-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mld/d3.c-1872-\t\t\t iwl_mld_suspend_key_data_iter,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/iface.c=20=void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif)\n--\ndrivers/net/wireless/intel/iwlwifi/mld/iface.c-56-\ndrivers/net/wireless/intel/iwlwifi/mld/iface.c:57:\tieee80211_iter_keys(mld-\u003ehw, vif, iwl_mld_cleanup_keys_iter, NULL);\ndrivers/net/wireless/intel/iwlwifi/mld/iface.c-58-\n--\ndrivers/net/wireless/intel/iwlwifi/mld/key.c=367=void iwl_mld_remove_ap_keys(struct iwl_mld *mld, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/key.c-377-\ndrivers/net/wireless/intel/iwlwifi/mld/key.c:378:\tieee80211_iter_keys(mld-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mld/key.c-379-\t\t\t iwl_mld_remove_ap_keys_iter,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/key.c=419=int iwl_mld_update_sta_keys(struct iwl_mld *mld,\n--\ndrivers/net/wireless/intel/iwlwifi/mld/key.c-430-\ndrivers/net/wireless/intel/iwlwifi/mld/key.c:431:\tieee80211_iter_keys(mld-\u003ehw, vif, iwl_mld_update_sta_key_iter,\ndrivers/net/wireless/intel/iwlwifi/mld/key.c-432-\t\t\t \u0026data);\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c=451=static int iwl_mvm_wowlan_config_rsc_tsc(struct iwl_mvm *mvm,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-471-\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:472:\t\tieee80211_iter_keys(mvm-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-473-\t\t\t\t iwl_mvm_wowlan_get_rsc_v5_data,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-489-\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:490:\t\tieee80211_iter_keys(mvm-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-491-\t\t\t\t iwl_mvm_wowlan_get_rsc_tsc_data,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c=994=static int iwl_mvm_wowlan_config_key_params(struct iwl_mvm *mvm,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1007-\t\t/*\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:1008:\t\t * if we have to configure keys, call ieee80211_iter_keys(),\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1009-\t\t * as we need non-atomic context in order to take the\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1017-\t\t */\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:1018:\t\tieee80211_iter_keys(mvm-\u003ehw, vif, iwl_mvm_wowlan_program_keys,\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1019-\t\t\t\t \u0026key_data);\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1046-\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:1047:\t\tieee80211_iter_keys(mvm-\u003ehw, vif, iwl_mvm_wowlan_get_tkip_data,\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1048-\t\t\t\t \u0026tkip_data);\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1076-\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:1077:\t\tieee80211_iter_keys(mvm-\u003ehw, vif, iwl_mvm_wowlan_gtk_type_iter,\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1078-\t\t\t\t \u0026gtk_type_data);\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c=1965=static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1984-\t */\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c:1985:\tieee80211_iter_keys(mvm-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mvm/d3.c-1986-\t\t\t iwl_mvm_d3_update_keys, \u0026gtkdata);\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c=651=iwl_mvm_ftm_set_secured_ranging(struct iwl_mvm *mvm, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c-687-\t\t\ttarget.tk = NULL;\ndrivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:688:\t\t\tieee80211_iter_keys(mvm-\u003ehw, vif, iter, \u0026target);\ndrivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c-689-\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/mld-key.c=344=void iwl_mvm_sec_key_remove_ap(struct iwl_mvm *mvm,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/mld-key.c-358-\ndrivers/net/wireless/intel/iwlwifi/mvm/mld-key.c:359:\tieee80211_iter_keys(mvm-\u003ehw, vif,\ndrivers/net/wireless/intel/iwlwifi/mvm/mld-key.c-360-\t\t\t iwl_mvm_sec_key_remove_ap_iter,\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/ops.c=978=static void iwl_mvm_frob_txf(void *ctx, void *buf, size_t buflen)\n--\ndrivers/net/wireless/intel/iwlwifi/mvm/ops.c-990-\trcu_read_lock();\ndrivers/net/wireless/intel/iwlwifi/mvm/ops.c:991:\tieee80211_iter_keys_rcu(mvm-\u003ehw, NULL, iwl_mvm_frob_txf_key_iter, \u0026txf);\ndrivers/net/wireless/intel/iwlwifi/mvm/ops.c-992-\trcu_read_unlock();\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c=2465=int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2492-\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:2493:\tieee80211_iter_keys(hw, vif, mt76_connac_mcu_key_iter, gtk_tlv);\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c-2494-\n--\ndrivers/net/wireless/mediatek/mt76/mt76x02_mmio.c=393=static void mt76x02_reset_state(struct mt76x02_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt76x02_mmio.c-401-\trcu_read_lock();\ndrivers/net/wireless/mediatek/mt76/mt76x02_mmio.c:402:\tieee80211_iter_keys_rcu(dev-\u003emt76.hw, NULL, mt76x02_key_sync, NULL);\ndrivers/net/wireless/mediatek/mt76/mt76x02_mmio.c-403-\trcu_read_unlock();\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c=292=int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c-375-\tif (!mlink-\u003ewcid-\u003eoffchannel)\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c:376:\t\tieee80211_iter_keys(mphy-\u003ehw, vif, mt7996_key_iter, \u0026it);\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c-377-\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c=404=static void mt7996_vif_link_destroy(struct mt7996_phy *phy,\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c-423-\tif (!mlink-\u003ewcid-\u003eoffchannel)\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c:424:\t\tieee80211_iter_keys(phy-\u003emt76-\u003ehw, vif, mt7996_key_iter, \u0026it);\ndrivers/net/wireless/mediatek/mt76/mt7996/main.c-425-\n--\ndrivers/net/wireless/realtek/rtw88/util.h=8=struct rtw_dev;\n--\ndrivers/net/wireless/realtek/rtw88/util.h-15-#define rtw_iterate_keys(rtwdev, vif, iterator, data)\t\t\t \\\ndrivers/net/wireless/realtek/rtw88/util.h:16:\tieee80211_iter_keys(rtwdev-\u003ehw, vif, iterator, data)\ndrivers/net/wireless/realtek/rtw88/util.h-17-#define rtw_iterate_keys_rcu(rtwdev, vif, iterator, data)\t\t \\\ndrivers/net/wireless/realtek/rtw88/util.h:18:\tieee80211_iter_keys_rcu((rtwdev)-\u003ehw, vif, iterator, data)\ndrivers/net/wireless/realtek/rtw88/util.h-19-\n--\ndrivers/net/wireless/realtek/rtw89/cam.c=606=void rtw89_cam_reset_keys(struct rtw89_dev *rtwdev)\n--\ndrivers/net/wireless/realtek/rtw89/cam.c-608-\trcu_read_lock();\ndrivers/net/wireless/realtek/rtw89/cam.c:609:\tieee80211_iter_keys_rcu(rtwdev-\u003ehw, NULL, rtw89_cam_reset_key_iter, rtwdev);\ndrivers/net/wireless/realtek/rtw89/cam.c-610-\trcu_read_unlock();\n--\ndrivers/net/wireless/realtek/rtw89/wow.c=468=static void rtw89_wow_construct_key_info(struct rtw89_dev *rtwdev)\n--\ndrivers/net/wireless/realtek/rtw89/wow.c-476-\trcu_read_lock();\ndrivers/net/wireless/realtek/rtw89/wow.c:477:\tieee80211_iter_keys_rcu(rtwdev-\u003ehw, wow_vif,\ndrivers/net/wireless/realtek/rtw89/wow.c-478-\t\t\t\trtw89_wow_get_key_info_iter, \u0026err);\n--\ndrivers/net/wireless/realtek/rtw89/wow.c=686=static void rtw89_wow_update_key_info(struct rtw89_dev *rtwdev, bool rx_ready)\n--\ndrivers/net/wireless/realtek/rtw89/wow.c-698-\trcu_read_lock();\ndrivers/net/wireless/realtek/rtw89/wow.c:699:\tieee80211_iter_keys_rcu(rtwdev-\u003ehw, wow_vif,\ndrivers/net/wireless/realtek/rtw89/wow.c-700-\t\t\t\trtw89_wow_set_key_info_iter, \u0026data);\n--\ninclude/net/mac80211.h=6891=u32 ieee80211_txq_aql_pending(struct ieee80211_hw *hw,\n--\ninclude/net/mac80211.h-6894-/**\ninclude/net/mac80211.h:6895: * ieee80211_iter_keys - iterate keys programmed into the device\ninclude/net/mac80211.h-6896- * @hw: pointer obtained from ieee80211_alloc_hw()\n--\ninclude/net/mac80211.h-6911- */\ninclude/net/mac80211.h:6912:void ieee80211_iter_keys(struct ieee80211_hw *hw,\ninclude/net/mac80211.h-6913-\t\t\t struct ieee80211_vif *vif,\n--\ninclude/net/mac80211.h-6921-/**\ninclude/net/mac80211.h:6922: * ieee80211_iter_keys_rcu - iterate keys programmed into the device\ninclude/net/mac80211.h-6923- * @hw: pointer obtained from ieee80211_alloc_hw()\n--\ninclude/net/mac80211.h-6935- */\ninclude/net/mac80211.h:6936:void ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\ninclude/net/mac80211.h-6937-\t\t\t struct ieee80211_vif *vif,\n--\nnet/mac80211/key.c=1001=ieee80211_key_iter(struct ieee80211_hw *hw,\n--\nnet/mac80211/key.c-1019-\nnet/mac80211/key.c:1020:void ieee80211_iter_keys(struct ieee80211_hw *hw,\nnet/mac80211/key.c-1021-\t\t\t struct ieee80211_vif *vif,\n--\nnet/mac80211/key.c-1046-}\nnet/mac80211/key.c:1047:EXPORT_SYMBOL(ieee80211_iter_keys);\nnet/mac80211/key.c-1048-\nnet/mac80211/key.c=1049=static void\nnet/mac80211/key.c:1050:_ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\nnet/mac80211/key.c-1051-\t\t\t struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/key.c-1064-\nnet/mac80211/key.c:1065:void ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\nnet/mac80211/key.c-1066-\t\t\t struct ieee80211_vif *vif,\n--\nnet/mac80211/key.c-1078-\t\tsdata = vif_to_sdata(vif);\nnet/mac80211/key.c:1079:\t\t_ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);\nnet/mac80211/key.c-1080-\t} else {\nnet/mac80211/key.c-1081-\t\tlist_for_each_entry_rcu(sdata, \u0026local-\u003einterfaces, list)\nnet/mac80211/key.c:1082:\t\t\t_ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);\nnet/mac80211/key.c-1083-\t}\nnet/mac80211/key.c-1084-}\nnet/mac80211/key.c:1085:EXPORT_SYMBOL(ieee80211_iter_keys_rcu);\nnet/mac80211/key.c-1086-\n"
} |
| 43/3 | 2026/09/08 21:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 10128 output: 41 thoughts: 52 Thoughts: Here's my take on the `ieee80211_iter_keys` and `ieee80211_iter_keys_rcu` implementations, given my expertise in networking and kernel internals: **Diving Deep into Key Iteration in mac80211** Okay, so I'm looking at `net/mac80211/key.c` and specifically focusing on the key iteration functions. My goal is to quickly grasp the differences and rationale behind `ieee80211_iter_keys` and the RCU-protected variant, `ieee80211_iter_keys_rcu`. The core question is always: *Why the RCU? What's the trade-off here?* I'm immediately expecting that `ieee80211_iter_keys_rcu` is introduced to handle concurrent access to the key list, likely to avoid holding a lock for the entire iteration process, which could be a bottleneck in high-throughput scenarios. Regular iteration with `ieee80211_iter_keys` probably relies on a mutex or spinlock protecting the key list. This is fine for simple, low-concurrency operations, but can become problematic in scenarios where the driver needs to regularly read key information while another thread is adding or removing keys. The overhead of constantly acquiring and releasing a lock is undesirable. The RCU version, `ieee80211_iter_keys_rcu`, would leverage Read-Copy-Update to allow readers (the iterators) to proceed concurrently with writers (adding/removing keys). The iterator likely takes a snapshot of the key list under RCU read-side critical section, and walks that snapshot. The writers will need to synchronize to avoid the classic race conditions that might occur. The key is in the timing of the release. Writers might make a new version of the key list and make it available atomically after the current readers have all passed the call. My mental checklist is now: 1. **Locking:** Confirm if `ieee80211_iter_keys` uses a global or per-STA lock during iteration. 2. **RCU Details:** In `ieee80211_iter_keys_rcu`, trace how the RCU read-side critical section is managed (e.g., `rcu_read_lock`, `rcu_read_unlock`), and understand the implications for key modifications during iteration. What is the RCU grace period? Is there any concern about stale data? 3. **Callback Function:** Observe how the callback function provided to the iterator is used. Is it called with the key itself or a copy? Does it need to be RCU-safe? 4. **Performance Trade-offs:** Ultimately, I need to evaluate the performance implications. When would I pick one over the other? High concurrency and frequent key updates probably justify `ieee80211_iter_keys_rcu`. Lower concurrency, and infrequent key modifications might be fine with a simple locking scheme. There will always be a cost with using RCU. Okay, let's look at the code! I want to confirm my expectations and understand the subtleties involved in protecting the key list's integrity while offering efficient read access. I'll focus on the data structures they iterate over and the RCU grace periods. |
| 44/3 | 2026/09/08 21:44 | tool | read-file |
0mArgs:{
"File": "net/mac80211/key.c",
"FirstLine": 1015,
"LineCount": 75
}Results: {
"Contents": "1015:\t\t\treturn;\n1016:\t\titer(hw, vif, key-\u003esta ? \u0026key-\u003esta-\u003esta : NULL,\n1017:\t\t \u0026key-\u003econf, iter_data);\n1018:\t}\n1019:\t\n1020:\tvoid ieee80211_iter_keys(struct ieee80211_hw *hw,\n1021:\t\t\t\t struct ieee80211_vif *vif,\n1022:\t\t\t\t void (*iter)(struct ieee80211_hw *hw,\n1023:\t\t\t\t\t struct ieee80211_vif *vif,\n1024:\t\t\t\t\t struct ieee80211_sta *sta,\n1025:\t\t\t\t\t struct ieee80211_key_conf *key,\n1026:\t\t\t\t\t void *data),\n1027:\t\t\t\t void *iter_data)\n1028:\t{\n1029:\t\tstruct ieee80211_local *local = hw_to_local(hw);\n1030:\t\tstruct ieee80211_key *key, *tmp;\n1031:\t\tstruct ieee80211_sub_if_data *sdata;\n1032:\t\n1033:\t\tlockdep_assert_wiphy(hw-\u003ewiphy);\n1034:\t\n1035:\t\tif (vif) {\n1036:\t\t\tsdata = vif_to_sdata(vif);\n1037:\t\t\tlist_for_each_entry_safe(key, tmp, \u0026sdata-\u003ekey_list, list)\n1038:\t\t\t\tieee80211_key_iter(hw, vif, key, iter, iter_data);\n1039:\t\t} else {\n1040:\t\t\tlist_for_each_entry(sdata, \u0026local-\u003einterfaces, list)\n1041:\t\t\t\tlist_for_each_entry_safe(key, tmp,\n1042:\t\t\t\t\t\t\t \u0026sdata-\u003ekey_list, list)\n1043:\t\t\t\t\tieee80211_key_iter(hw, \u0026sdata-\u003evif, key,\n1044:\t\t\t\t\t\t\t iter, iter_data);\n1045:\t\t}\n1046:\t}\n1047:\tEXPORT_SYMBOL(ieee80211_iter_keys);\n1048:\t\n1049:\tstatic void\n1050:\t_ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\n1051:\t\t\t\t struct ieee80211_sub_if_data *sdata,\n1052:\t\t\t\t void (*iter)(struct ieee80211_hw *hw,\n1053:\t\t\t\t\t struct ieee80211_vif *vif,\n1054:\t\t\t\t\t struct ieee80211_sta *sta,\n1055:\t\t\t\t\t struct ieee80211_key_conf *key,\n1056:\t\t\t\t\t void *data),\n1057:\t\t\t\t void *iter_data)\n1058:\t{\n1059:\t\tstruct ieee80211_key *key;\n1060:\t\n1061:\t\tlist_for_each_entry_rcu(key, \u0026sdata-\u003ekey_list, list)\n1062:\t\t\tieee80211_key_iter(hw, \u0026sdata-\u003evif, key, iter, iter_data);\n1063:\t}\n1064:\t\n1065:\tvoid ieee80211_iter_keys_rcu(struct ieee80211_hw *hw,\n1066:\t\t\t\t struct ieee80211_vif *vif,\n1067:\t\t\t\t void (*iter)(struct ieee80211_hw *hw,\n1068:\t\t\t\t\t\t struct ieee80211_vif *vif,\n1069:\t\t\t\t\t\t struct ieee80211_sta *sta,\n1070:\t\t\t\t\t\t struct ieee80211_key_conf *key,\n1071:\t\t\t\t\t\t void *data),\n1072:\t\t\t\t void *iter_data)\n1073:\t{\n1074:\t\tstruct ieee80211_local *local = hw_to_local(hw);\n1075:\t\tstruct ieee80211_sub_if_data *sdata;\n1076:\t\n1077:\t\tif (vif) {\n1078:\t\t\tsdata = vif_to_sdata(vif);\n1079:\t\t\t_ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);\n1080:\t\t} else {\n1081:\t\t\tlist_for_each_entry_rcu(sdata, \u0026local-\u003einterfaces, list)\n1082:\t\t\t\t_ieee80211_iter_keys_rcu(hw, sdata, iter, iter_data);\n1083:\t\t}\n1084:\t}\n1085:\tEXPORT_SYMBOL(ieee80211_iter_keys_rcu);\n1086:\t\n1087:\tstatic void ieee80211_free_keys_iface(struct ieee80211_sub_if_data *sdata,\n1088:\t\t\t\t\t struct list_head *keys)\n1089:\t{\n"
} |
| 45/3 | 2026/09/08 21:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 12374 output: 53 thoughts: 501 Thoughts: **Analyzing the GTK Rekey Update in mt76** Okay, let's break this down. It looks like the `mt76_connac_mcu_update_gtk_rekey` function is being called when the wiphy lock is already held. This likely happens within a cfg80211 callback, maybe something like `set_rekey_data`. The code snippet shows `gtk_tlv` being used in this context. Specifically, `gtk_tlv` is created and zeroed using `skb_put_zero`. It has some fields like `tag`, `len`, `rekey_mode`, and `option` that are initialized. The core of this change seems to be the replacement of an RCU read lock section around `ieee80211_iter_keys_rcu` with a plain `ieee80211_iter_keys` call. The reasoning? It appears that `ieee80211_iter_keys` enforces a `lockdep_assert_wiphy(hw->wiphy)` check, and because we already have the wiphy lock held here, we don't need the RCU read lock context anymore. Makes sense. Simplifying the lock context makes things cleaner. Now, let's do a quick scan for potential issues. No uninitialized memory accesses, thankfully. Here's why: 1. `gtk_tlv` is initialized to zero by `skb_put_zero` so that’s good. 2. `mt76_connac_mcu_key_iter` populates some of the fields in `gtk_tlv`. I should probably check that function's implementation next, just to be absolutely sure everything is handled correctly. |
| 46/3 | 2026/09/08 21:44 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c",
"FirstLine": 2440,
"LineCount": 30
}Results: {
"Contents": "2440:\t\n2441:\t\tif (key-\u003ecipher != WLAN_CIPHER_SUITE_AES_CMAC \u0026\u0026\n2442:\t\t key-\u003ecipher != WLAN_CIPHER_SUITE_CCMP \u0026\u0026\n2443:\t\t key-\u003ecipher != WLAN_CIPHER_SUITE_TKIP)\n2444:\t\t\treturn;\n2445:\t\n2446:\t\tif (key-\u003ecipher == WLAN_CIPHER_SUITE_TKIP)\n2447:\t\t\tcipher = BIT(3);\n2448:\t\telse\n2449:\t\t\tcipher = BIT(4);\n2450:\t\n2451:\t\t/* we are assuming here to have a single pairwise key */\n2452:\t\tif (key-\u003eflags \u0026 IEEE80211_KEY_FLAG_PAIRWISE) {\n2453:\t\t\tif (key-\u003ecipher == WLAN_CIPHER_SUITE_TKIP)\n2454:\t\t\t\tgtk_tlv-\u003eproto = cpu_to_le32(NL80211_WPA_VERSION_1);\n2455:\t\t\telse\n2456:\t\t\t\tgtk_tlv-\u003eproto = cpu_to_le32(NL80211_WPA_VERSION_2);\n2457:\t\n2458:\t\t\tgtk_tlv-\u003epairwise_cipher = cpu_to_le32(cipher);\n2459:\t\t\tgtk_tlv-\u003ekeyid = key-\u003ekeyidx;\n2460:\t\t} else {\n2461:\t\t\tgtk_tlv-\u003egroup_cipher = cpu_to_le32(cipher);\n2462:\t\t}\n2463:\t}\n2464:\t\n2465:\tint mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,\n2466:\t\t\t\t\t struct ieee80211_vif *vif,\n2467:\t\t\t\t\t struct cfg80211_gtk_rekey_data *key)\n2468:\t{\n2469:\t\tstruct mt76_vif_link *mvif = (struct mt76_vif_link *)vif-\u003edrv_priv;\n"
} |
| 47/3 | 2026/09/08 21:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 13877 output: 204 thoughts: 258 Thoughts: **My Assessment of the Patch's Memory Safety** Okay, let's break this down. My initial scan of this patch immediately flags the removal of those `rcu_read_lock()` / `rcu_read_unlock()` calls around `ieee80211_iter_keys_rcu(...)` and its replacement with `ieee80211_iter_keys(...)`. That's the core change here. I need to make sure this shift doesn't open the door to uninitialized memory access. Looking closer, the difference between those iterators seems to boil down to locking: `ieee80211_iter_keys` uses a mutex/wiphy-protected iterator, while the `rcu` version relied on RCU. The important thing is that `ieee80211_iter_keys` still iterates through `sdata->key_list`, and the locking is asserted using `lockdep_assert_wiphy`, so we should be good. I don't see any new memory allocations popping up in this patch, nor any uninitialized buffers being introduced. The `gtk_tlv` allocation remains as before, handled via `skb_put_zero()`, so that's safe. No structs are being copied to userspace either, which is a common area for memory exposure. I also see no conditionals dependent on any potentially uninitialized variables. It looks like this is a pure locking and synchronization refactor, replacing RCU with a mutex. Any locking issues or violations introduced by this change will be caught by LOCKDEP, as we expect. So, given this analysis, I'm confident KMSAN isn't needed here. The change is isolated to locking and doesn't introduce any new memory-related risks. NeedsKMSAN = false. Now I just need to verify everything, and prepare my response, and the necessary tool calls. |
| 48/3 | 2026/09/08 21:44 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch replaces `rcu_read_lock()` + `ieee80211_iter_keys_rcu()` + `rcu_read_unlock()` with `ieee80211_iter_keys()` in `mt76_connac_mcu_update_gtk_rekey()`.\n\nThis is purely a locking/iterator cleanup where the wiphy lock is held, allowing the use of the locked iterator rather than the RCU-protected iterator. All buffers involved (`gtk_tlv`) continue to be allocated and zero-initialized with `skb_put_zero()`, and no kernel-to-user copies or uninitialized data reads/branches are introduced or modified. Any potential locking issues are covered by LOCKDEP/KASAN. Therefore, a dedicated KMSAN fuzzing session is not required.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch replaces `rcu_read_lock()` + `ieee80211_iter_keys_rcu()` + `rcu_read_unlock()` with `ieee80211_iter_keys()` in `mt76_connac_mcu_update_gtk_rekey()`.\n\nThis is purely a locking/iterator cleanup where the wiphy lock is held, allowing the use of the locked iterator rather than the RCU-protected iterator. All buffers involved (`gtk_tlv`) continue to be allocated and zero-initialized with `skb_put_zero()`, and no kernel-to-user copies or uninitialized data reads/branches are introduced or modified. Any potential locking issues are covered by LOCKDEP/KASAN. 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) |
|---|