| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/19 16:46 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The changes modify `drivers/net/ethernet/mediatek/mtk_wed.c`, which implements the Wireless Ethernet Dispatch (WED) hardware offload engine found on MediaTek ARM SoCs (such as MT7622, MT7986, and MT7988). This driver requires specific MediaTek SoC hardware and Device Tree nodes not present or emulated in standard QEMU/GCE virtualized environments on the target amd64 architecture. As such, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/19 16:46 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 08cc0736513d53995f776051ec7c55d356f24c1c\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Sep 19 16:46:45 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c\nindex 53d3b7e00e1cd..3800e602d3c48 100644\n--- a/drivers/net/ethernet/mediatek/mtk_wed.c\n+++ b/drivers/net/ethernet/mediatek/mtk_wed.c\n@@ -257,7 +257,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device *dev)\n \twdma_w32(dev, MTK_WDMA_RESET_IDX, 0);\n \n \tfor (i = 0; i \u003c ARRAY_SIZE(dev-\u003erx_wdma); i++) {\n-\t\tif (dev-\u003erx_wdma[i].desc)\n+\t\tif (!dev-\u003erx_wdma[i].desc)\n \t\t\tcontinue;\n \n \t\twdma_w32(dev,\n@@ -1938,7 +1938,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,\n \twdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_CPU_IDX, 0);\n \twdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_DMA_IDX, 0);\n \n-\tif (reset)\n+\tif (!mtk_wed_is_v3_or_greater(dev-\u003ehw) \u0026\u0026 reset)\n \t\tmtk_wed_ring_reset(wdma, MTK_WED_WDMA_RING_SIZE, true);\n \n \tif (!idx) {\n@@ -2339,6 +2339,13 @@ mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)\n \t\tif (!dev-\u003erx_wdma[i].desc)\n \t\t\tmtk_wed_wdma_rx_ring_setup(dev, i, 16, false);\n \n+\t/*\n+\t * non-DBDC MT7986 allocates only rx_ring[1] and tx_wdma[1] during setup\n+\t * but tx_wdma[0] is also needed for WED to function.\n+\t */\n+\tif (mtk_wed_is_v2(dev-\u003ehw) \u0026\u0026 !dev-\u003erx_ring[0].desc)\n+\t\tmtk_wed_wdma_tx_ring_setup(dev, 0, MTK_WED_WDMA_RING_SIZE, !!dev-\u003etx_wdma[0].desc);\n+\n \tif (dev-\u003ewlan.hw_rro) {\n \t\tfor (i = 0; i \u003c MTK_WED_RX_PAGE_QUEUES; i++) {\n \t\t\tu32 addr = MTK_WED_RRO_MSDU_PG_CTRL0(i) +\n"
} |
| 2/1 | 2026/09/19 16:46 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The changes modify `drivers/net/ethernet/mediatek/mtk_wed.c`, which implements the Wireless Ethernet Dispatch (WED) hardware offload engine found on MediaTek ARM SoCs (such as MT7622, MT7986, and MT7988). This driver requires specific MediaTek SoC hardware and Device Tree nodes not present or emulated in standard QEMU/GCE virtualized environments on the target amd64 architecture. As such, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
}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 08cc0736513d53995f776051ec7c55d356f24c1c
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Sep 19 16:46:45 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
index 53d3b7e00e1cd..3800e602d3c48 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -257,7 +257,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device *dev)
wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++) {
- if (dev->rx_wdma[i].desc)
+ if (!dev->rx_wdma[i].desc)
continue;
wdma_w32(dev,
@@ -1938,7 +1938,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_CPU_IDX, 0);
wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_DMA_IDX, 0);
- if (reset)
+ if (!mtk_wed_is_v3_or_greater(dev->hw) && reset)
mtk_wed_ring_reset(wdma, MTK_WED_WDMA_RING_SIZE, true);
if (!idx) {
@@ -2339,6 +2339,13 @@ mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
if (!dev->rx_wdma[i].desc)
mtk_wed_wdma_rx_ring_setup(dev, i, 16, false);
+ /*
+ * non-DBDC MT7986 allocates only rx_ring[1] and tx_wdma[1] during setup
+ * but tx_wdma[0] is also needed for WED to function.
+ */
+ if (mtk_wed_is_v2(dev->hw) && !dev->rx_ring[0].desc)
+ mtk_wed_wdma_tx_ring_setup(dev, 0, MTK_WED_WDMA_RING_SIZE, !!dev->tx_wdma[0].desc);
+
if (dev->wlan.hw_rro) {
for (i = 0; i < MTK_WED_RX_PAGE_QUEUES; i++) {
u32 addr = MTK_WED_RRO_MSDU_PG_CTRL0(i) +
|
| 3/2 | 2026/09/19 16:46 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3421 output: 35 thoughts: 1007 Thoughts: **Fuzzing Suitability Analysis: mtk_wed.c** Alright, let's dive into this patch and assess its fuzzing potential with syzkaller. The task is to determine whether the modifications within `drivers/net/ethernet/mediatek/mtk_wed.c` introduce new code paths that are likely reachable and could benefit from fuzzing. My initial thought is to identify what the `mtk_wed.c` file is. From the filename and common driver naming conventions, it strongly suggests a MediaTek Wireless Ethernet Dispatch (WED) driver. This implies it's probably interacting with on-SoC hardware – likely MediaTek's MT7622, MT7986, MT7988, or similar ARM/MIPS-based SoCs. Considering the architecture specified in the prompt is `amd64`, my next step would be to confirm this assumption. I'll need to check the relevant `Kconfig` files and the code itself to determine the target architectures and platform dependencies. This is crucial; if it's not compiled or used on the target architecture, it's irrelevant for fuzzing. The patch itself appears to modify several key areas within the driver. One notable change is the conditional logic within `mtk_wdma_rx_reset` and `mtk_wed_wdma_tx_ring_setup` function using negation, which indicates potential logic inversion. Additionally, there seems to be a new conditional check related to `mtk_wed_is_v3_or_greater` and `mtk_wed_is_v2` functions, suggesting version-specific behavior. My immediate focus will be on these conditional statements. I need to understand what triggers the conditions and what code paths are executed when the conditionals are met or not. Specifically, I'll need to identify: 1. **Reachable Code:** Determine if these code paths can be triggered from user-space, either directly or indirectly, through network traffic or device interactions. 2. **Input Dependency:** Analyze the inputs that control the conditional logic, such as device properties, configuration parameters, or network packets, to assess if they're controllable from a user-space process. 3. **Kernel Version:** Is this driver or these modifications conditional to specific kernel versions? This may affect the reproducibility of fuzzing. If the modified code is indeed reachable and controllable via user-space inputs, then it is a good candidate for fuzzing with syzkaller. |
| 4/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "config NET_MEDIATEK",
"PathPrefix": "drivers/net/ethernet/mediatek"
}Results: {
"Output": "drivers/net/ethernet/mediatek/Kconfig=8=if NET_VENDOR_MEDIATEK\ndrivers/net/ethernet/mediatek/Kconfig-9-\ndrivers/net/ethernet/mediatek/Kconfig:10:config NET_MEDIATEK_SOC_WED\ndrivers/net/ethernet/mediatek/Kconfig-11-\tdepends on ARCH_MEDIATEK || COMPILE_TEST\n--\ndrivers/net/ethernet/mediatek/Kconfig-13-\ndrivers/net/ethernet/mediatek/Kconfig:14:config NET_MEDIATEK_SOC\ndrivers/net/ethernet/mediatek/Kconfig-15-\ttristate \"MediaTek SoC Gigabit Ethernet support\"\n--\ndrivers/net/ethernet/mediatek/Kconfig-28-\ndrivers/net/ethernet/mediatek/Kconfig:29:config NET_MEDIATEK_STAR_EMAC\ndrivers/net/ethernet/mediatek/Kconfig-30-\ttristate \"MediaTek STAR Ethernet MAC support\"\n"
} |
| 5/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5249 output: 38 thoughts: 18 Thoughts: Okay, let's dive into this Kconfig file for Mediatek Ethernet drivers. I see it's in the `drivers/net/ethernet/mediatek` directory, which makes sense. I'm expecting this to define the configuration options for various Mediatek Ethernet controllers. I'll be looking for things like: **Mediatek Ethernet Driver Kconfig Analysis** Alright, my first scan of this Kconfig file will focus on the hierarchy and structure. I'll quickly need to grasp the dependencies and the main driver options. Are there separate options for different Mediatek SoCs, or is it a unified driver with conditional features? I'm hoping to see clear separation between the driver core and any device-specific configurations. I'm also going to check if it incorporates any common network driver patterns or standards; a well-organized driver will clearly use helper functions or macros. Next, I'll be searching for specific options that control various aspects of the driver, like support for different Ethernet speeds (10/100/1000 Mbps), VLAN tagging, jumbo frames, and power management. It's likely that it has conditional dependencies based on the hardware available. I anticipate there will be a selection of features, depending on the capabilities of the specific Mediatek chip. I'll need to pay close attention to the default values of these options, and any help text associated with them, to understand their implications. Ultimately, I need to understand how flexible and configurable this driver is. Can it be tailored to a wide range of Mediatek-based networking devices, or is it very tightly coupled to a particular hardware family? The answers to these questions will reveal the quality and maintainability of the Mediatek Ethernet driver integration within the kernel. I will check for things like: * **Chipset-specific configuration:** Are there options for different Mediatek SoCs (e.g., MT7621, MT7620)? * **Feature toggles:** Options to enable/disable features like VLAN, jumbo frames, checksum offload. * **Resource allocation:** How are interrupts and DMA channels configured, if at all? * **Debugging options:** Are there any debug or trace options, or is it already well-integrated with the kernel's debugging system? |
| 6/2 | 2026/09/19 16:47 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mediatek/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig NET_VENDOR_MEDIATEK\n 3:\t\tbool \"MediaTek devices\"\n 4:\t\tdepends on ARCH_MEDIATEK || ARCH_AIROHA || SOC_MT7621 || SOC_MT7620 || COMPILE_TEST\n 5:\t\thelp\n 6:\t\t If you have a Mediatek SoC with ethernet, say Y.\n 7:\t\n 8:\tif NET_VENDOR_MEDIATEK\n 9:\t\n 10:\tconfig NET_MEDIATEK_SOC_WED\n 11:\t\tdepends on ARCH_MEDIATEK || COMPILE_TEST\n 12:\t\tdef_bool NET_MEDIATEK_SOC != n\n 13:\t\n 14:\tconfig NET_MEDIATEK_SOC\n 15:\t\ttristate \"MediaTek SoC Gigabit Ethernet support\"\n 16:\t\tdepends on NET_DSA || !NET_DSA\n 17:\t\tselect PINCTRL\n 18:\t\tselect PHYLINK\n 19:\t\tselect DIMLIB\n 20:\t\tselect GENERIC_ALLOCATOR\n 21:\t\tselect PAGE_POOL\n 22:\t\tselect PAGE_POOL_STATS\n 23:\t\tselect PCS_MTK_LYNXI\n 24:\t\tselect REGMAP_MMIO\n 25:\t\thelp\n 26:\t\t This driver supports the gigabit ethernet MACs in the\n 27:\t\t MediaTek SoC family.\n 28:\t\n 29:\tconfig NET_MEDIATEK_STAR_EMAC\n 30:\t\ttristate \"MediaTek STAR Ethernet MAC support\"\n 31:\t\tselect PHYLIB\n 32:\t\tselect REGMAP_MMIO\n 33:\t\thelp\n 34:\t\t This driver supports the ethernet MAC IP first used on\n 35:\t\t MediaTek MT85** SoCs.\n 36:\t\n 37:\tendif #NET_VENDOR_MEDIATEK\n"
} |
| 7/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6291 output: 34 thoughts: 122 Thoughts: **Analyzing Mediatek Network Driver Configuration** Okay, so I'm looking at this kernel configuration and I see these dependencies for Mediatek network-related options. Specifically, `NET_VENDOR_MEDIATEK` and `NET_MEDIATEK_SOC_WED`. It's pretty clear that `NET_VENDOR_MEDIATEK` relies on either the Mediatek architecture, Airoha architecture, or specific SoCs like MT7621 and MT7620, or even just a compile test. That makes perfect sense; it has to be tied to the hardware. `NET_MEDIATEK_SOC_WED` is similar but seems to be a bit more focused, probably on the WED hardware acceleration. I need to understand how the `mtk_wed` component is being used and initialized within the Mediatek network driver ecosystem. My next step is to grep for instances of 'mtk_wed' within the `drivers/net/ethernet/mediatek/` directory, and maybe even across the whole kernel if I need a broader view. I'm going to look for initialization code, function calls, and anything related to how this WED is integrated into the Mediatek network stack. I'm interested in the driver's entry points and its general usage. This should provide insights into the function and purpose of this specific component. |
| 8/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "mtk_wed_",
"PathPrefix": "drivers/net/ethernet/mediatek"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1847 lines.\nUse more precise expression if possible.\n\ndrivers/net/ethernet/mediatek/Makefile=7=mtk_eth-y := mtk_eth_soc.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_ppe_offload.o\ndrivers/net/ethernet/mediatek/Makefile:8:mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed.o mtk_wed_mcu.o mtk_wed_wo.o\ndrivers/net/ethernet/mediatek/Makefile-9-ifdef CONFIG_DEBUG_FS\ndrivers/net/ethernet/mediatek/Makefile:10:mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o\ndrivers/net/ethernet/mediatek/Makefile-11-endif\ndrivers/net/ethernet/mediatek/Makefile:12:obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o\ndrivers/net/ethernet/mediatek/Makefile-13-obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=4417=static void mtk_pending_work(struct work_struct *work)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-4427-\tmtk_prepare_for_reset(eth);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:4428:\tmtk_wed_fe_reset();\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-4429-\t/* Run again reset preliminary configuration in order to avoid any\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-4476-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:4477:\tmtk_wed_fe_reset_complete();\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-4478-\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=5116=static int mtk_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5246-\t\t\twdma_phy = res ? res-\u003estart + wdma_base : 0;\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5247:\t\t\tmtk_wed_add_hw(np, eth, eth-\u003ebase + wdma_base,\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5248-\t\t\t\t wdma_phy, i);\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5385-err_wed_exit:\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5386:\tmtk_wed_exit();\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5387-err_destroy_sgmii:\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=5393=static void mtk_remove(struct platform_device *pdev)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5407-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5408:\tmtk_wed_exit();\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5409-\tmtk_hw_deinit(eth);\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c=276=mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f,\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-496-\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c:497:\tif (wed_index \u003e= 0 \u0026\u0026 (err = mtk_wed_flow_add(wed_index)) \u003c 0)\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-498-\t\treturn err;\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-524-\tif (wed_index \u003e= 0)\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c:525:\t mtk_wed_flow_remove(wed_index);\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-526-\treturn err;\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c=530=mtk_flow_offload_destroy(struct mtk_eth *eth, struct flow_cls_offload *f)\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-542-\tif (entry-\u003ewed_index \u003e= 0)\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c:543:\t\tmtk_wed_flow_remove(entry-\u003ewed_index);\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-544-\tkfree(entry);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-21-#include \"mtk_ppe.h\"\ndrivers/net/ethernet/mediatek/mtk_wed.c:22:#include \"mtk_wed_wo.h\"\ndrivers/net/ethernet/mediatek/mtk_wed.c-23-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-50-\ndrivers/net/ethernet/mediatek/mtk_wed.c:51:static struct mtk_wed_hw *hw_list[3];\ndrivers/net/ethernet/mediatek/mtk_wed.c-52-static DEFINE_MUTEX(hw_lock);\ndrivers/net/ethernet/mediatek/mtk_wed.c-53-\ndrivers/net/ethernet/mediatek/mtk_wed.c:54:struct mtk_wed_flow_block_priv {\ndrivers/net/ethernet/mediatek/mtk_wed.c:55:\tstruct mtk_wed_hw *hw;\ndrivers/net/ethernet/mediatek/mtk_wed.c-56-\tstruct net_device *dev;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-58-\ndrivers/net/ethernet/mediatek/mtk_wed.c:59:static const struct mtk_wed_soc_data mt7622_data = {\ndrivers/net/ethernet/mediatek/mtk_wed.c-60-\t.regmap = {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-71-\ndrivers/net/ethernet/mediatek/mtk_wed.c:72:static const struct mtk_wed_soc_data mt7986_data = {\ndrivers/net/ethernet/mediatek/mtk_wed.c-73-\t.regmap = {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-84-\ndrivers/net/ethernet/mediatek/mtk_wed.c:85:static const struct mtk_wed_soc_data mt7988_data = {\ndrivers/net/ethernet/mediatek/mtk_wed.c-86-\t.regmap = {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-94-\t},\ndrivers/net/ethernet/mediatek/mtk_wed.c:95:\t.tx_ring_desc_size = sizeof(struct mtk_wed_bm_desc),\ndrivers/net/ethernet/mediatek/mtk_wed.c-96-\t.wdma_desc_size = 2 * sizeof(struct mtk_wdma_desc),\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=99=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:100:wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.c-101-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=105=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:106:wed_set(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-107-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=111=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:112:wed_clr(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-113-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=117=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:118:wdma_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.c-119-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=123=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:124:wdma_set(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-125-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=129=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:130:wdma_clr(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-131-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=135=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:136:wifi_r32(struct mtk_wed_device *dev, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.c-137-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=141=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:142:wifi_w32(struct mtk_wed_device *dev, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.c-143-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=147=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:148:mtk_wed_read_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-149-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=153=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:154:mtk_wdma_read_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-155-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=159=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:160:mtk_wdma_v3_rx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-161-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-163-\ndrivers/net/ethernet/mediatek/mtk_wed.c:164:\tif (!mtk_wed_is_v3_or_greater(dev-\u003ehw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-165-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=243=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:244:mtk_wdma_rx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-245-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=270=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:271:mtk_wed_check_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-272-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=276=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:277:mtk_wed_poll_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-278-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-282-\ndrivers/net/ethernet/mediatek/mtk_wed.c:283:\treturn read_poll_timeout(mtk_wed_check_busy, val, !val, sleep,\ndrivers/net/ethernet/mediatek/mtk_wed.c-284-\t\t\t\t timeout, false, dev, reg, mask);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=287=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:288:mtk_wdma_v3_tx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-289-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-291-\ndrivers/net/ethernet/mediatek/mtk_wed.c:292:\tif (!mtk_wed_is_v3_or_greater(dev-\u003ehw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-293-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=365=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:366:mtk_wdma_tx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-367-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=385=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:386:mtk_wed_reset(struct mtk_wed_device *dev, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-387-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-390-\twed_w32(dev, MTK_WED_RESET, mask);\ndrivers/net/ethernet/mediatek/mtk_wed.c:391:\tif (readx_poll_timeout(mtk_wed_read_reset, dev, status,\ndrivers/net/ethernet/mediatek/mtk_wed.c-392-\t\t\t !(status \u0026 mask), 0, 1000))\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=396=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:397:mtk_wed_wo_read_status(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-398-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=402=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:403:mtk_wed_wo_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-404-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:405:\tstruct mtk_wed_wo *wo = dev-\u003ehw-\u003ewed_wo;\ndrivers/net/ethernet/mediatek/mtk_wed.c-406-\tu8 state = MTK_WED_WO_STATE_DISABLE;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-410-\tmtk_wdma_tx_reset(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:411:\tmtk_wed_reset(dev, MTK_WED_RESET_WED);\ndrivers/net/ethernet/mediatek/mtk_wed.c-412-\ndrivers/net/ethernet/mediatek/mtk_wed.c:413:\tif (mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO,\ndrivers/net/ethernet/mediatek/mtk_wed.c-414-\t\t\t\t MTK_WED_WO_CMD_CHANGE_STATE, \u0026state,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-417-\ndrivers/net/ethernet/mediatek/mtk_wed.c:418:\tif (readx_poll_timeout(mtk_wed_wo_read_status, dev, val,\ndrivers/net/ethernet/mediatek/mtk_wed.c-419-\t\t\t val == MTK_WED_WOIF_DISABLE_DONE,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-444-\ndrivers/net/ethernet/mediatek/mtk_wed.c:445:void mtk_wed_fe_reset(void)\ndrivers/net/ethernet/mediatek/mtk_wed.c-446-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-451-\tfor (i = 0; i \u003c ARRAY_SIZE(hw_list); i++) {\ndrivers/net/ethernet/mediatek/mtk_wed.c:452:\t\tstruct mtk_wed_hw *hw = hw_list[i];\ndrivers/net/ethernet/mediatek/mtk_wed.c:453:\t\tstruct mtk_wed_device *dev;\ndrivers/net/ethernet/mediatek/mtk_wed.c-454-\t\tint err;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-471-\ndrivers/net/ethernet/mediatek/mtk_wed.c:472:void mtk_wed_fe_reset_complete(void)\ndrivers/net/ethernet/mediatek/mtk_wed.c-473-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-478-\tfor (i = 0; i \u003c ARRAY_SIZE(hw_list); i++) {\ndrivers/net/ethernet/mediatek/mtk_wed.c:479:\t\tstruct mtk_wed_hw *hw = hw_list[i];\ndrivers/net/ethernet/mediatek/mtk_wed.c:480:\t\tstruct mtk_wed_device *dev;\ndrivers/net/ethernet/mediatek/mtk_wed.c-481-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-494-\ndrivers/net/ethernet/mediatek/mtk_wed.c:495:static struct mtk_wed_hw *\ndrivers/net/ethernet/mediatek/mtk_wed.c:496:mtk_wed_assign(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-497-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:498:\tstruct mtk_wed_hw *hw;\ndrivers/net/ethernet/mediatek/mtk_wed.c-499-\tint i;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-508-\ndrivers/net/ethernet/mediatek/mtk_wed.c:509:\t\tif (mtk_wed_is_v1(hw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-510-\t\t\treturn NULL;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=528=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:529:mtk_wed_amsdu_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-530-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:531:\tstruct mtk_wed_hw *hw = dev-\u003ehw;\ndrivers/net/ethernet/mediatek/mtk_wed.c:532:\tstruct mtk_wed_amsdu *wed_amsdu;\ndrivers/net/ethernet/mediatek/mtk_wed.c-533-\tint i;\ndrivers/net/ethernet/mediatek/mtk_wed.c-534-\ndrivers/net/ethernet/mediatek/mtk_wed.c:535:\tif (!mtk_wed_is_v3_or_greater(hw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-536-\t\treturn 0;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=572=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:573:mtk_wed_amsdu_free_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-574-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:575:\tstruct mtk_wed_amsdu *wed_amsdu = dev-\u003ehw-\u003ewed_amsdu;\ndrivers/net/ethernet/mediatek/mtk_wed.c-576-\tint i;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=589=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:590:mtk_wed_amsdu_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-591-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:592:\tstruct mtk_wed_amsdu *wed_amsdu = dev-\u003ehw-\u003ewed_amsdu;\ndrivers/net/ethernet/mediatek/mtk_wed.c-593-\tint i, ret;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-611-\ndrivers/net/ethernet/mediatek/mtk_wed.c:612:\tret = mtk_wed_poll_busy(dev, MTK_WED_AMSDU_STA_INFO,\ndrivers/net/ethernet/mediatek/mtk_wed.c-613-\t\t\t\tMTK_WED_AMSDU_STA_INFO_DO_INIT);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-624-\twed_set(dev, MTK_WED_AMSDU_PSE, MTK_WED_AMSDU_PSE_RESET);\ndrivers/net/ethernet/mediatek/mtk_wed.c:625:\tret = mtk_wed_poll_busy(dev, MTK_WED_MON_AMSDU_QMEM_STS1, BIT(29));\ndrivers/net/ethernet/mediatek/mtk_wed.c-626-\tif (ret) {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=640=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:641:mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-642-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-645-\tint token = dev-\u003ewlan.token_start;\ndrivers/net/ethernet/mediatek/mtk_wed.c:646:\tstruct mtk_wed_buf *page_list;\ndrivers/net/ethernet/mediatek/mtk_wed.c-647-\tdma_addr_t desc_phys;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-649-\ndrivers/net/ethernet/mediatek/mtk_wed.c:650:\tif (!mtk_wed_is_v3_or_greater(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-651-\t\tring_size = dev-\u003ewlan.nbuf \u0026 ~(MTK_WED_BUF_PER_PAGE - 1);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-703-\t\t\tdesc-\u003ebuf0 = cpu_to_le32(buf_phys);\ndrivers/net/ethernet/mediatek/mtk_wed.c:704:\t\t\tif (!mtk_wed_is_v3_or_greater(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-705-\t\t\t\tu32 txd_size;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-710-\t\t\t\tctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size);\ndrivers/net/ethernet/mediatek/mtk_wed.c:711:\t\t\t\tif (mtk_wed_is_v1(dev-\u003ehw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-712-\t\t\t\t\tctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG1 |\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=737=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:738:mtk_wed_free_tx_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-739-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:740:\tstruct mtk_wed_buf *page_list = dev-\u003etx_buf_ring.pages;\ndrivers/net/ethernet/mediatek/mtk_wed.c:741:\tstruct mtk_wed_hw *hw = dev-\u003ehw;\ndrivers/net/ethernet/mediatek/mtk_wed.c-742-\tint i, page_idx = 0;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=771=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:772:mtk_wed_hwrro_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-773-{\ndrivers/net/ethernet/mediatek/mtk_wed.c-774-\tint n_pages = MTK_WED_RX_PG_BM_CNT / MTK_WED_RX_BUF_PER_PAGE;\ndrivers/net/ethernet/mediatek/mtk_wed.c:775:\tstruct mtk_wed_buf *page_list;\ndrivers/net/ethernet/mediatek/mtk_wed.c:776:\tstruct mtk_wed_bm_desc *desc;\ndrivers/net/ethernet/mediatek/mtk_wed.c-777-\tdma_addr_t desc_phys;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=834=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:835:mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-836-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:837:\tstruct mtk_wed_bm_desc *desc;\ndrivers/net/ethernet/mediatek/mtk_wed.c-838-\tdma_addr_t desc_phys;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-850-\ndrivers/net/ethernet/mediatek/mtk_wed.c:851:\treturn mtk_wed_hwrro_buffer_alloc(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-852-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=854=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:855:mtk_wed_hwrro_free_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-856-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:857:\tstruct mtk_wed_buf *page_list = dev-\u003ehw_rro.pages;\ndrivers/net/ethernet/mediatek/mtk_wed.c:858:\tstruct mtk_wed_bm_desc *desc = dev-\u003ehw_rro.desc;\ndrivers/net/ethernet/mediatek/mtk_wed.c-859-\tint i, page_idx = 0;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=889=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:890:mtk_wed_free_rx_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-891-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:892:\tstruct mtk_wed_bm_desc *desc = dev-\u003erx_buf_ring.desc;\ndrivers/net/ethernet/mediatek/mtk_wed.c-893-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-900-\ndrivers/net/ethernet/mediatek/mtk_wed.c:901:\tmtk_wed_hwrro_free_buffer(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-902-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=904=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:905:mtk_wed_hwrro_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-906-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:907:\tif (!mtk_wed_get_rx_capa(dev) || !dev-\u003ewlan.hw_rro)\ndrivers/net/ethernet/mediatek/mtk_wed.c-908-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=924=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:925:mtk_wed_rx_buffer_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-926-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-935-\ndrivers/net/ethernet/mediatek/mtk_wed.c:936:\tmtk_wed_hwrro_init(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-937-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=939=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:940:mtk_wed_free_ring(struct mtk_wed_device *dev, struct mtk_wed_ring *ring)\ndrivers/net/ethernet/mediatek/mtk_wed.c-941-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=949=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:950:mtk_wed_free_rx_rings(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-951-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:952:\tmtk_wed_free_rx_buffer(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:953:\tmtk_wed_free_ring(dev, \u0026dev-\u003erro.ring);\ndrivers/net/ethernet/mediatek/mtk_wed.c-954-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=956=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:957:mtk_wed_free_tx_rings(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-958-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-961-\tfor (i = 0; i \u003c ARRAY_SIZE(dev-\u003etx_ring); i++)\ndrivers/net/ethernet/mediatek/mtk_wed.c:962:\t\tmtk_wed_free_ring(dev, \u0026dev-\u003etx_ring[i]);\ndrivers/net/ethernet/mediatek/mtk_wed.c-963-\tfor (i = 0; i \u003c ARRAY_SIZE(dev-\u003erx_wdma); i++)\ndrivers/net/ethernet/mediatek/mtk_wed.c:964:\t\tmtk_wed_free_ring(dev, \u0026dev-\u003erx_wdma[i]);\ndrivers/net/ethernet/mediatek/mtk_wed.c-965-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=967=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:968:mtk_wed_set_ext_int(struct mtk_wed_device *dev, bool en)\ndrivers/net/ethernet/mediatek/mtk_wed.c-969-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=997=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:998:mtk_wed_set_512_support(struct mtk_wed_device *dev, bool enable)\ndrivers/net/ethernet/mediatek/mtk_wed.c-999-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:1000:\tif (!mtk_wed_is_v2(dev-\u003ehw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-1001-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1014=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1015:mtk_wed_check_wfdma_rx_fill(struct mtk_wed_device *dev,\ndrivers/net/ethernet/mediatek/mtk_wed.c:1016:\t\t\t struct mtk_wed_ring *ring)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1017-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1037=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1038:mtk_wed_dma_disable(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1039-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1054-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1055:\tif (mtk_wed_is_v1(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1056-\t\tregmap_write(dev-\u003ehw-\u003emirror, dev-\u003ehw-\u003eindex * 4, 0);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1068-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1069:\t\tif (mtk_wed_is_v3_or_greater(dev-\u003ehw) \u0026\u0026\ndrivers/net/ethernet/mediatek/mtk_wed.c:1070:\t\t mtk_wed_get_rx_capa(dev)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1071-\t\t\twdma_clr(dev, MTK_WDMA_PREF_TX_CFG,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1077-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1078:\tmtk_wed_set_512_support(dev, false);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1079-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1081=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1082:mtk_wed_stop(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1083-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:1084:\tmtk_wed_dma_disable(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1085:\tmtk_wed_set_ext_int(dev, false);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1086-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1091-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1092:\tif (!mtk_wed_get_rx_capa(dev))\ndrivers/net/ethernet/mediatek/mtk_wed.c-1093-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1099=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1100:mtk_wed_deinit(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1101-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:1102:\tmtk_wed_stop(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1103-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1109-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1110:\tif (mtk_wed_is_v1(dev-\u003ehw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-1111-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1117-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1118:\tif (mtk_wed_is_v3_or_greater(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1119-\t\twed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1127=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1128:__mtk_wed_detach(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1129-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:1130:\tstruct mtk_wed_hw *hw = dev-\u003ehw;\ndrivers/net/ethernet/mediatek/mtk_wed.c-1131-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1132:\tmtk_wed_deinit(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1133-\ndrivers/net/ethernet/mediatek/mtk_wed.c-1134-\tmtk_wdma_rx_reset(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1135:\tmtk_wed_reset(dev, MTK_WED_RESET_WED);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1136:\tmtk_wed_amsdu_free_buffer(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1137:\tmtk_wed_free_tx_buffer(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1138:\tmtk_wed_free_tx_rings(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1139-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1140:\tif (mtk_wed_get_rx_capa(dev)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1141-\t\tif (hw-\u003ewed_wo)\ndrivers/net/ethernet/mediatek/mtk_wed.c:1142:\t\t\tmtk_wed_wo_reset(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1143:\t\tmtk_wed_free_rx_rings(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1144-\t\tif (hw-\u003ewed_wo)\ndrivers/net/ethernet/mediatek/mtk_wed.c:1145:\t\t\tmtk_wed_wo_deinit(hw);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1146-\t}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1167=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1168:mtk_wed_detach(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1169-{\ndrivers/net/ethernet/mediatek/mtk_wed.c-1170-\tmutex_lock(\u0026hw_lock);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1171:\t__mtk_wed_detach(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1172-\tmutex_unlock(\u0026hw_lock);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1175=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1176:mtk_wed_bus_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1177-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1181-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1182:\t\tif (mtk_wed_is_v2(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1183-\t\t\tstruct regmap *regs;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1228=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1229:mtk_wed_set_wpdma(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1230-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1232-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1233:\tif (mtk_wed_is_v1(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1234-\t\twed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev-\u003ewlan.wpdma_phys);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1237-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1238:\tmtk_wed_bus_init(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1239-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1244-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1245:\tif (!mtk_wed_get_rx_capa(dev))\ndrivers/net/ethernet/mediatek/mtk_wed.c-1246-\t\treturn;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1250-\t\tdev-\u003ewlan.wpdma_rx[0]);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1251:\tif (mtk_wed_is_v3_or_greater(dev-\u003ehw))\ndrivers/net/ethernet/mediatek/mtk_wed.c-1252-\t\twed_w32(dev, dev-\u003ehw-\u003esoc-\u003eregmap.wpdma_rx_ring[1],\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1265=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1266:mtk_wed_hw_init_early(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1267-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1270-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1271:\tmtk_wed_deinit(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1272:\tmtk_wed_reset(dev, MTK_WED_RESET_WED);\ndrivers/net/ethernet/mediatek/mtk_wed.c:1273:\tmtk_wed_set_wpdma(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1274-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1275:\tif (!mtk_wed_is_v3_or_greater(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1276-\t\tmask |= MTK_WED_WDMA_GLO_CFG_DYNAMIC_DMAD_RECYCLE |\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1282-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1283:\tif (mtk_wed_is_v1(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1284-\t\tu32 offset = dev-\u003ehw-\u003eindex ? 0x04000400 : 0;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1312=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1313:mtk_wed_rro_ring_alloc(struct mtk_wed_device *dev, struct mtk_wed_ring *ring,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1314-\t\t int size)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1329=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1330:mtk_wed_rro_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1331-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1341-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1342:\treturn mtk_wed_rro_ring_alloc(dev, \u0026dev-\u003erro.ring,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1343-\t\t\t\t MTK_WED_RRO_QUE_CNT);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1346=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1347:mtk_wed_rro_cfg(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1348-{\ndrivers/net/ethernet/mediatek/mtk_wed.c:1349:\tstruct mtk_wed_wo *wo = dev-\u003ehw-\u003ewed_wo;\ndrivers/net/ethernet/mediatek/mtk_wed.c-1350-\tstruct {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1371-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1372:\treturn mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1373-\t\t\t\t MTK_WED_WO_CMD_WED_CFG,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1377=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1378:mtk_wed_rro_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1379-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1404=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1405:mtk_wed_route_qm_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1406-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1415-\t/* configure RX_ROUTE_QM */\ndrivers/net/ethernet/mediatek/mtk_wed.c:1416:\tif (mtk_wed_is_v2(dev-\u003ehw)) {\ndrivers/net/ethernet/mediatek/mtk_wed.c-1417-\t\twed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_Q_RST);\n\n"
} |
| 9/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 20028 output: 28 thoughts: 60 Thoughts: **Diving into the mtk_wed Code** Alright, let's get down to brass tacks. I need to understand this `mtk_wed` thing. First, I need to figure out what exactly it *is* and how it gets probed and called within the kernel. My initial thought is to trace the execution, following the call chain. I'll probably start with the definition itself, digging into potential initialization functions like `mtk_wed_add_hw` or even the implementation file, `mtk_wed_ops.c`, if that's where the primary operations are defined. My gut tells me I should be looking closely at how the `mtk_wed_device` structure is initialized; that's often the key. I need to find the entry point, the initialization sequence, and the driver's core operations. Let's see what we can uncover! |
| 10/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "mtk_wed_device",
"PathPrefix": "drivers/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1171 lines.\nUse more precise expression if possible.\n\ndrivers/net/ethernet/mediatek/mtk_wed.c=99=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:100:wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.c-101-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=105=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:106:wed_set(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-107-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=111=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:112:wed_clr(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-113-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=117=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:118:wdma_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.c-119-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=123=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:124:wdma_set(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-125-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=129=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:130:wdma_clr(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-131-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=135=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:136:wifi_r32(struct mtk_wed_device *dev, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.c-137-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=141=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:142:wifi_w32(struct mtk_wed_device *dev, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.c-143-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=147=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:148:mtk_wed_read_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-149-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=153=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:154:mtk_wdma_read_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-155-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=159=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:160:mtk_wdma_v3_rx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-161-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=243=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:244:mtk_wdma_rx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-245-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=270=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:271:mtk_wed_check_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-272-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=276=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:277:mtk_wed_poll_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-278-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=287=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:288:mtk_wdma_v3_tx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-289-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=365=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:366:mtk_wdma_tx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-367-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=385=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:386:mtk_wed_reset(struct mtk_wed_device *dev, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-387-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=396=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:397:mtk_wed_wo_read_status(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-398-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=402=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:403:mtk_wed_wo_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-404-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=445=void mtk_wed_fe_reset(void)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-452-\t\tstruct mtk_wed_hw *hw = hw_list[i];\ndrivers/net/ethernet/mediatek/mtk_wed.c:453:\t\tstruct mtk_wed_device *dev;\ndrivers/net/ethernet/mediatek/mtk_wed.c-454-\t\tint err;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=472=void mtk_wed_fe_reset_complete(void)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-479-\t\tstruct mtk_wed_hw *hw = hw_list[i];\ndrivers/net/ethernet/mediatek/mtk_wed.c:480:\t\tstruct mtk_wed_device *dev;\ndrivers/net/ethernet/mediatek/mtk_wed.c-481-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=495=static struct mtk_wed_hw *\ndrivers/net/ethernet/mediatek/mtk_wed.c:496:mtk_wed_assign(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-497-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=528=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:529:mtk_wed_amsdu_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-530-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=572=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:573:mtk_wed_amsdu_free_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-574-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=589=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:590:mtk_wed_amsdu_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-591-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=640=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:641:mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-642-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=737=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:738:mtk_wed_free_tx_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-739-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=771=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:772:mtk_wed_hwrro_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-773-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=834=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:835:mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-836-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=854=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:855:mtk_wed_hwrro_free_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-856-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=889=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:890:mtk_wed_free_rx_buffer(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-891-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=904=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:905:mtk_wed_hwrro_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-906-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=924=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:925:mtk_wed_rx_buffer_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-926-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=939=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:940:mtk_wed_free_ring(struct mtk_wed_device *dev, struct mtk_wed_ring *ring)\ndrivers/net/ethernet/mediatek/mtk_wed.c-941-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=949=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:950:mtk_wed_free_rx_rings(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-951-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=956=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:957:mtk_wed_free_tx_rings(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-958-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=967=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:968:mtk_wed_set_ext_int(struct mtk_wed_device *dev, bool en)\ndrivers/net/ethernet/mediatek/mtk_wed.c-969-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=997=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:998:mtk_wed_set_512_support(struct mtk_wed_device *dev, bool enable)\ndrivers/net/ethernet/mediatek/mtk_wed.c-999-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1014=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1015:mtk_wed_check_wfdma_rx_fill(struct mtk_wed_device *dev,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1016-\t\t\t struct mtk_wed_ring *ring)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1037=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1038:mtk_wed_dma_disable(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1039-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1081=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1082:mtk_wed_stop(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1083-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1099=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1100:mtk_wed_deinit(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1101-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1127=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1128:__mtk_wed_detach(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1129-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1167=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1168:mtk_wed_detach(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1169-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1175=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1176:mtk_wed_bus_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1177-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1228=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1229:mtk_wed_set_wpdma(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1230-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1265=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1266:mtk_wed_hw_init_early(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1267-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1312=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1313:mtk_wed_rro_ring_alloc(struct mtk_wed_device *dev, struct mtk_wed_ring *ring,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1314-\t\t int size)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1329=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1330:mtk_wed_rro_alloc(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1331-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1346=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1347:mtk_wed_rro_cfg(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1348-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1377=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1378:mtk_wed_rro_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1379-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1404=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1405:mtk_wed_route_qm_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1406-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1432=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1433:mtk_wed_hw_init(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1434-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1560=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1561:mtk_wed_rx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1562-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1723=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1724:mtk_wed_reset_dma(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1725-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1858=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1859:mtk_wed_ring_alloc(struct mtk_wed_device *dev, struct mtk_wed_ring *ring,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1860-\t\t int size, u32 desc_size, bool tx)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1874=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1875:mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1876-\t\t\t bool reset)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1902=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1903:mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1904-\t\t\t bool reset)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1958=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1959:mtk_wed_ppe_check(struct mtk_wed_device *dev, struct sk_buff *skb,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1960-\t\t u32 reason, u32 hash)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1977=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:1978:mtk_wed_configure_irq(struct mtk_wed_device *dev, u32 irq_mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-1979-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2050=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2051:mtk_wed_dma_enable(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2052-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2165=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2166:mtk_wed_start_hw_rro(struct mtk_wed_device *dev, u32 irq_mask, bool reset)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2167-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2239=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2240:mtk_wed_rro_rx_ring_setup(struct mtk_wed_device *dev, int idx,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2241-\t\t\t void __iomem *regs)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2253=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2254:mtk_wed_msdu_pg_rx_ring_setup(struct mtk_wed_device *dev, int idx, void __iomem *regs)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2255-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2266=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:2267:mtk_wed_ind_rx_ring_setup(struct mtk_wed_device *dev, void __iomem *regs)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2268-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2330=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2331:mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2332-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2398=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:2399:mtk_wed_attach(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2400-\t__releases(RCU)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2483=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:2484:mtk_wed_tx_ring_setup(struct mtk_wed_device *dev, int idx, void __iomem *regs,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2485-\t\t bool reset)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2546=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:2547:mtk_wed_txfree_ring_setup(struct mtk_wed_device *dev, void __iomem *regs)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2548-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2570=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:2571:mtk_wed_rx_ring_setup(struct mtk_wed_device *dev, int idx, void __iomem *regs,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2572-\t\t bool reset)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2603=static u32\ndrivers/net/ethernet/mediatek/mtk_wed.c:2604:mtk_wed_irq_get(struct mtk_wed_device *dev, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2605-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2629=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2630:mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2631-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2766=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:2767:mtk_wed_setup_tc(struct mtk_wed_device *wed, struct net_device *dev,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2768-\t\t enum tc_setup_type type, void *type_data)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=33=struct mtk_wed_hw {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h-43-\tstruct dentry *debugfs_dir;\ndrivers/net/ethernet/mediatek/mtk_wed.h:44:\tstruct mtk_wed_device *wed_dev;\ndrivers/net/ethernet/mediatek/mtk_wed.h-45-\tstruct mtk_wed_wo *wed_wo;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=85=static inline void\ndrivers/net/ethernet/mediatek/mtk_wed.h:86:wed_w32(struct mtk_wed_device *dev, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.h-87-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=91=static inline u32\ndrivers/net/ethernet/mediatek/mtk_wed.h:92:wed_r32(struct mtk_wed_device *dev, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.h-93-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=101=static inline void\ndrivers/net/ethernet/mediatek/mtk_wed.h:102:wdma_w32(struct mtk_wed_device *dev, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.h-103-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=107=static inline u32\ndrivers/net/ethernet/mediatek/mtk_wed.h:108:wdma_r32(struct mtk_wed_device *dev, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.h-109-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=113=static inline u32\ndrivers/net/ethernet/mediatek/mtk_wed.h:114:wpdma_tx_r32(struct mtk_wed_device *dev, int ring, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.h-115-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=122=static inline void\ndrivers/net/ethernet/mediatek/mtk_wed.h:123:wpdma_tx_w32(struct mtk_wed_device *dev, int ring, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.h-124-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=131=static inline u32\ndrivers/net/ethernet/mediatek/mtk_wed.h:132:wpdma_rx_r32(struct mtk_wed_device *dev, int ring, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.h-133-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=140=static inline void\ndrivers/net/ethernet/mediatek/mtk_wed.h:141:wpdma_rx_w32(struct mtk_wed_device *dev, int ring, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.h-142-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=149=static inline u32\ndrivers/net/ethernet/mediatek/mtk_wed.h:150:wpdma_txfree_r32(struct mtk_wed_device *dev, u32 reg)\ndrivers/net/ethernet/mediatek/mtk_wed.h-151-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=158=static inline void\ndrivers/net/ethernet/mediatek/mtk_wed.h:159:wpdma_txfree_w32(struct mtk_wed_device *dev, u32 reg, u32 val)\ndrivers/net/ethernet/mediatek/mtk_wed.h-160-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h-166-\ndrivers/net/ethernet/mediatek/mtk_wed.h:167:static inline u32 mtk_wed_get_pcie_base(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.h-168-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c=56=static void\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c:57:dump_wed_regs(struct seq_file *s, struct mtk_wed_device *dev,\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-58-\t const struct reg_dump *regs, int n_regs)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c=92=wed_txinfo_show(struct seq_file *s, void *data)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-145-\tstruct mtk_wed_hw *hw = s-\u003eprivate;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c:146:\tstruct mtk_wed_device *dev = hw-\u003ewed_dev;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-147-\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c=156=wed_rxinfo_show(struct seq_file *s, void *data)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-260-\tstruct mtk_wed_hw *hw = s-\u003eprivate;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c:261:\tstruct mtk_wed_device *dev = hw-\u003ewed_dev;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-262-\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c=278=wed_amsdu_show(struct seq_file *s, void *data)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-488-\tstruct mtk_wed_hw *hw = s-\u003eprivate;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c:489:\tstruct mtk_wed_device *dev = hw-\u003ewed_dev;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-490-\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c=499=wed_rtqm_show(struct seq_file *s, void *data)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-538-\tstruct mtk_wed_hw *hw = s-\u003eprivate;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c:539:\tstruct mtk_wed_device *dev = hw-\u003ewed_dev;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-540-\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c=549=wed_rro_show(struct seq_file *s, void *data)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-575-\tstruct mtk_wed_hw *hw = s-\u003eprivate;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c:576:\tstruct mtk_wed_device *dev = hw-\u003ewed_dev;\ndrivers/net/ethernet/mediatek/mtk_wed_debugfs.c-577-\n--\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c=80=static void\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c:81:mtk_wed_update_rx_stats(struct mtk_wed_device *wed, struct sk_buff *skb)\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c-82-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c=190=int mtk_wed_mcu_send_msg(struct mtk_wed_wo *wo, int id, int cmd,\n--\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c-220-\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c:221:int mtk_wed_mcu_msg_update(struct mtk_wed_device *dev, int id, void *data,\ndrivers/net/ethernet/mediatek/mtk_wed_mcu.c-222-\t\t\t int len)\n--\ndrivers/net/ethernet/mediatek/mtk_wed_wo.h=273=int mtk_wed_mcu_send_msg(struct mtk_wed_wo *wo, int id, int cmd,\ndrivers/net/ethernet/mediatek/mtk_wed_wo.h-274-\t\t\t const void *data, int len, bool wait_resp);\ndrivers/net/ethernet/mediatek/mtk_wed_wo.h:275:int mtk_wed_mcu_msg_update(struct mtk_wed_device *dev, int id, void *data,\ndrivers/net/ethernet/mediatek/mtk_wed_wo.h-276-\t\t\t int len);\n--\ndrivers/net/wireless/mediatek/mt76/dma.c=829=mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,\n--\ndrivers/net/wireless/mediatek/mt76/dma.c-872-\ndrivers/net/wireless/mediatek/mt76/dma.c:873:\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed)) {\ndrivers/net/wireless/mediatek/mt76/dma.c-874-\t\tif ((mtk_wed_get_rx_capa(\u0026dev-\u003emmio.wed) \u0026\u0026 mt76_queue_is_wed_rro(q)) ||\n--\ndrivers/net/wireless/mediatek/mt76/dma.c=888=mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)\n--\ndrivers/net/wireless/mediatek/mt76/dma.c-908-\ndrivers/net/wireless/mediatek/mt76/dma.c:909:\t\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed) \u0026\u0026\ndrivers/net/wireless/mediatek/mt76/dma.c-910-\t\t mt76_queue_is_wed_rro(q))\n--\ndrivers/net/wireless/mediatek/mt76/dma.c=932=mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)\n--\ndrivers/net/wireless/mediatek/mt76/dma.c-954-\ndrivers/net/wireless/mediatek/mt76/dma.c:955:\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed) \u0026\u0026\ndrivers/net/wireless/mediatek/mt76/dma.c-956-\t mt76_queue_is_wed_rro(q))\n--\ndrivers/net/wireless/mediatek/mt76/dma.c=1195=void mt76_dma_cleanup(struct mt76_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/dma.c-1225-\ndrivers/net/wireless/mediatek/mt76/dma.c:1226:\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed))\ndrivers/net/wireless/mediatek/mt76/dma.c:1227:\t\tmtk_wed_device_detach(\u0026dev-\u003emmio.wed);\ndrivers/net/wireless/mediatek/mt76/dma.c-1228-\ndrivers/net/wireless/mediatek/mt76/dma.c:1229:\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed_hif2))\ndrivers/net/wireless/mediatek/mt76/dma.c:1230:\t\tmtk_wed_device_detach(\u0026dev-\u003emmio.wed_hif2);\ndrivers/net/wireless/mediatek/mt76/dma.c-1231-\n--\ndrivers/net/wireless/mediatek/mt76/dma.h=52=mt76_dma_handle_read(struct mt76_queue *q, u32 offset, u32 *val)\n--\ndrivers/net/wireless/mediatek/mt76/dma.h-55-\tif (q-\u003eflags \u0026 MT_QFLAG_WED) {\ndrivers/net/wireless/mediatek/mt76/dma.h:56:\t\t*val = mtk_wed_device_reg_read(q-\u003ewed, q-\u003ewed_regs + offset);\ndrivers/net/wireless/mediatek/mt76/dma.h-57-\n--\ndrivers/net/wireless/mediatek/mt76/dma.h=80=mt76_dma_handle_write(struct mt76_queue *q, u32 offset, u32 val)\n--\ndrivers/net/wireless/mediatek/mt76/dma.h-83-\tif (q-\u003eflags \u0026 MT_QFLAG_WED) {\ndrivers/net/wireless/mediatek/mt76/dma.h:84:\t\tmtk_wed_device_reg_write(q-\u003ewed, q-\u003ewed_regs + offset, val);\ndrivers/net/wireless/mediatek/mt76/dma.h-85-\n--\ndrivers/net/wireless/mediatek/mt76/dma.h=179=mt76_dma_reset_tx_queue(struct mt76_dev *dev, struct mt76_queue *q)\n--\ndrivers/net/wireless/mediatek/mt76/dma.h-183-\tdev-\u003equeue_ops-\u003ereset_q(dev, q, reset_idx);\ndrivers/net/wireless/mediatek/mt76/dma.h:184:\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed))\ndrivers/net/wireless/mediatek/mt76/dma.h-185-\t\tmt76_wed_dma_setup(dev, q, true);\n--\ndrivers/net/wireless/mediatek/mt76/mac80211.c=1570=void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,\n--\ndrivers/net/wireless/mediatek/mt76/mac80211.c-1579-\t\tmt76_check_sta(dev, skb);\ndrivers/net/wireless/mediatek/mt76/mac80211.c:1580:\t\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed) ||\ndrivers/net/wireless/mediatek/mt76/mac80211.c-1581-\t\t mt76_npu_device_active(dev))\n--\ndrivers/net/wireless/mediatek/mt76/mmio.c=91=void mt76_set_irq_mask(struct mt76_dev *dev, u32 addr,\n--\ndrivers/net/wireless/mediatek/mt76/mmio.c-99-\tif (addr) {\ndrivers/net/wireless/mediatek/mt76/mmio.c:100:\t\tif (mtk_wed_device_active(\u0026dev-\u003emmio.wed))\ndrivers/net/wireless/mediatek/mt76/mmio.c:101:\t\t\tmtk_wed_device_irq_set_mask(\u0026dev-\u003emmio.wed,\ndrivers/net/wireless/mediatek/mt76/mmio.c-102-\t\t\t\t\t\t dev-\u003emmio.irqmask);\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=235=struct mt76_queue {\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-260-\ndrivers/net/wireless/mediatek/mt76/mt76.h:261:\tstruct mtk_wed_device *wed;\ndrivers/net/wireless/mediatek/mt76/mt76.h-262-\tstruct mt76_dev *dev;\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=717=struct mt76_mmio {\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-721-\ndrivers/net/wireless/mediatek/mt76/mt76.h:722:\tstruct mtk_wed_device wed;\ndrivers/net/wireless/mediatek/mt76/mt76.h:723:\tstruct mtk_wed_device wed_hif2;\ndrivers/net/wireless/mediatek/mt76/mt76.h-724-\tstruct completion wed_reset;\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=1241=static inline u16 mt76_rev(struct mt76_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1245-\ndrivers/net/wireless/mediatek/mt76/mt76.h:1246:void mt76_wed_release_rx_buf(struct mtk_wed_device *wed);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1247:void mt76_wed_offload_disable(struct mtk_wed_device *wed);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1248:void mt76_wed_reset_complete(struct mtk_wed_device *wed);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1249-void mt76_wed_dma_reset(struct mt76_dev *dev);\ndrivers/net/wireless/mediatek/mt76/mt76.h=1250=int mt76_wed_net_setup_tc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1253-#ifdef CONFIG_NET_MEDIATEK_SOC_WED\ndrivers/net/wireless/mediatek/mt76/mt76.h:1254:u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size);\ndrivers/net/wireless/mediatek/mt76/mt76.h:1255:int mt76_wed_offload_enable(struct mtk_wed_device *wed);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1256-int mt76_wed_dma_setup(struct mt76_dev *dev, struct mt76_queue *q, bool reset);\ndrivers/net/wireless/mediatek/mt76/mt76.h-1257-#else\ndrivers/net/wireless/mediatek/mt76/mt76.h:1258:static inline u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size)\ndrivers/net/wireless/mediatek/mt76/mt76.h-1259-{\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1262-\ndrivers/net/wireless/mediatek/mt76/mt76.h:1263:static inline int mt76_wed_offload_enable(struct mtk_wed_device *wed)\ndrivers/net/wireless/mediatek/mt76/mt76.h-1264-{\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h=1268=static inline int mt76_wed_dma_setup(struct mt76_dev *dev, struct mt76_queue *q,\n--\ndrivers/net/wireless/mediatek/mt76/mt76.h-1296-\ndrivers/net/wireless/mediatek/mt76/mt76.h:1297:static inline struct mt76_dev *mt76_wed_to_dev(struct mtk_wed_device *wed)\ndrivers/net/wireless/mediatek/mt76/mt76.h-1298-{\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c=504=void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,\n--\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c-547-\t\t/* mt7915 WA only counts WED path */\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c:548:\t\tif (is_mt7915(dev) \u0026\u0026 mtk_wed_device_active(\u0026dev-\u003emmio.wed))\ndrivers/net/wireless/mediatek/mt76/mt76_connac_mac.c-549-\t\t\twcid-\u003estats.tx_packets++;\n--\n\n"
} |
| 11/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 33147 output: 33 thoughts: 110 Thoughts: **My Initial Thoughts on the MediaTek Ethernet Driver** Okay, so I'm looking into this `mtk_wed` thing, which is definitely connected to the `mtk_eth` driver. That places it squarely within the `drivers/net/ethernet/mediatek/` directory, which is a good starting point. Now, I need to understand how this MediaTek ethernet driver actually gets probed and initialized. My first instinct is to dig into `mtk_eth_soc.c`. Let's see... Aha! Found it: `static int mtk_probe(struct platform_device *pdev)`. That's the function I need to focus on. My next step will be to explore `mtk_eth_soc.c` more closely to understand exactly how `mtk_probe` is registered, its purpose in the overall initialization process, and how it fits into the broader ethernet framework. |
| 12/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "mtk_probe",
"PathPrefix": "drivers/net/ethernet/mediatek"
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=5095=static int mtk_setup_legacy_sram(struct mtk_eth *eth, struct resource *res)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5115-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5116:static int mtk_probe(struct platform_device *pdev)\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5117-{\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=5682=static struct platform_driver mtk_driver = {\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5683:\t.probe = mtk_probe,\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5684-\t.remove = mtk_remove,\n"
} |
| 13/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 33744 output: 34 thoughts: 81 Thoughts: **Analyzing the MediaTek Gigabit Ethernet Driver** Okay, so I'm looking at this `platform_driver` for the MediaTek SoC Gigabit Ethernet. Right, `mtk_driver` is essentially a `platform_driver`. That's the basic setup. Now, my immediate thought is around emulation and testing. Can I spin up some standard QEMU / amd64 instances and instantiate or emulate the platform devices for this MediaTek ethernet? I'm trying to figure out if I can get this running in a virtual environment without needing specific hardware. I need to be able to debug and test this efficiently. Wait a minute, I need to check the `of_match_table` for the `mtk_driver`. That table is crucial for device tree binding and matching. I need to understand how the driver knows which devices it's supposed to handle. Let's dig into that and see what devices this driver is designed to work with. That will give me insight into how easily I can integrate it into a virtual system, or if I am looking at custom setups. |
| 14/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "of_match_table",
"PathPrefix": "drivers/net/ethernet/mediatek"
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=5682=static struct platform_driver mtk_driver = {\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5686-\t\t.name = \"mtk_soc_eth\",\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5687:\t\t.of_match_table = of_mtk_match,\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5688-\t},\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c=1749=static struct platform_driver mtk_star_driver = {\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1752-\t\t.pm = \u0026mtk_star_pm_ops,\ndrivers/net/ethernet/mediatek/mtk_star_emac.c:1753:\t\t.of_match_table = of_match_ptr(mtk_star_of_match),\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1754-\t},\n"
} |
| 15/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 34399 output: 35 thoughts: 12 Thoughts: Okay, here's my interpretation of that thought process, assuming I'm an expert in the field and the "text below" is some kind of code or system documentation: **Checking `of_mtk_match`** Alright, time to dive in. "Let's check `of_mtk_match`." That's the key. I need to understand what this function or module does. Based on the naming convention, it likely relates to matching, perhaps object matching or model training kit matching. I need to quickly recall where it's used in the larger system. Is it a core component? A utility function? Does it deal with data validation, model selection, or maybe feature extraction? I'm thinking: what parameters does it take? What does it return? Are there any known issues or edge cases? Are there recent changes to it I should be aware of? Are there any unit tests associated with it, and what do they cover? I'll probably start by looking at the documentation, if it exists, and then the code itself to see how it operates. My priority is to grasp its functionality and identify any potential areas for improvement or potential problems. I need to figure out what makes this function tick. |
| 16/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "of_mtk_match",
"PathPrefix": "drivers/net/ethernet/mediatek"
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=5645=static const struct mtk_soc_data rt5350_data = {\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5667-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5668:const struct of_device_id of_mtk_match[] = {\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5669-\t{ .compatible = \"mediatek,mt2701-eth\", .data = \u0026mt2701_data },\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5679-};\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5680:MODULE_DEVICE_TABLE(of, of_mtk_match);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5681-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c=5682=static struct platform_driver mtk_driver = {\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5686-\t\t.name = \"mtk_soc_eth\",\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5687:\t\t.of_match_table = of_mtk_match,\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5688-\t},\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.h=1369=struct mtk_mac {\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.h-1385-/* the struct describing the SoC. these are declared in the soc_xyz.c files */\ndrivers/net/ethernet/mediatek/mtk_eth_soc.h:1386:extern const struct of_device_id of_mtk_match[];\ndrivers/net/ethernet/mediatek/mtk_eth_soc.h-1387-\n"
} |
| 17/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35259 output: 47 thoughts: 133 Thoughts: **Digging into the Mediatek Ethernet Driver** Okay, so I'm looking at this `mtk_soc_eth` driver, and it's clear this is a platform driver, matching specific DeviceTree nodes like "mediatek,mt2701-eth". That's standard practice. But the question is, *what else* might probe this thing? Is there another avenue of entry here I'm missing? And then, I'm trying to wrap my head around `mtk_wed`. I'm not entirely clear on its role. How is `mtk_wed` even *used*? Time to investigate. I see `mtk_wed.c` defines `mtk_wed_add_hw`, and it looks like that function gets called from `mtk_probe` in `mtk_eth_soc.c`. Okay, that's a key connection. Now, let's zoom in on `mtk_eth_soc.c`, I'll check around line 5246, that should show me where that interaction occurs. Let's see what's going on there. |
| 18/2 | 2026/09/19 16:47 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mediatek/mtk_eth_soc.c",
"FirstLine": 5230,
"LineCount": 40
}Results: {
"Contents": "5230:\t\n5231:\t\tif (eth-\u003esoc-\u003eoffload_version) {\n5232:\t\t\tfor (i = 0;; i++) {\n5233:\t\t\t\tstruct device_node *np;\n5234:\t\t\t\tphys_addr_t wdma_phy;\n5235:\t\t\t\tu32 wdma_base;\n5236:\t\n5237:\t\t\t\tif (i \u003e= ARRAY_SIZE(eth-\u003esoc-\u003ereg_map-\u003ewdma_base))\n5238:\t\t\t\t\tbreak;\n5239:\t\n5240:\t\t\t\tnp = of_parse_phandle(pdev-\u003edev.of_node,\n5241:\t\t\t\t\t\t \"mediatek,wed\", i);\n5242:\t\t\t\tif (!np)\n5243:\t\t\t\t\tbreak;\n5244:\t\n5245:\t\t\t\twdma_base = eth-\u003esoc-\u003ereg_map-\u003ewdma_base[i];\n5246:\t\t\t\twdma_phy = res ? res-\u003estart + wdma_base : 0;\n5247:\t\t\t\tmtk_wed_add_hw(np, eth, eth-\u003ebase + wdma_base,\n5248:\t\t\t\t\t wdma_phy, i);\n5249:\t\t\t}\n5250:\t\t}\n5251:\t\n5252:\t\terr = mtk_get_irqs(pdev, eth);\n5253:\t\tif (err)\n5254:\t\t\tgoto err_wed_exit;\n5255:\t\n5256:\t\tfor (i = 0; i \u003c ARRAY_SIZE(eth-\u003eclks); i++) {\n5257:\t\t\teth-\u003eclks[i] = devm_clk_get(eth-\u003edev,\n5258:\t\t\t\t\t\t mtk_clks_source_name[i]);\n5259:\t\t\tif (IS_ERR(eth-\u003eclks[i])) {\n5260:\t\t\t\tif (PTR_ERR(eth-\u003eclks[i]) == -EPROBE_DEFER) {\n5261:\t\t\t\t\terr = -EPROBE_DEFER;\n5262:\t\t\t\t\tgoto err_wed_exit;\n5263:\t\t\t\t}\n5264:\t\t\t\tif (eth-\u003esoc-\u003erequired_clks \u0026 BIT(i)) {\n5265:\t\t\t\t\tdev_err(\u0026pdev-\u003edev, \"clock %s not found\\n\",\n5266:\t\t\t\t\t\tmtk_clks_source_name[i]);\n5267:\t\t\t\t\terr = -EINVAL;\n5268:\t\t\t\t\tgoto err_wed_exit;\n5269:\t\t\t\t}\n"
} |
| 19/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 36345 output: 33 thoughts: 66 Thoughts: **My Line of Inquiry: WED and the MT76 Wireless Interface** Okay, so `mtk_wed_add_hw` is responsible for interpreting that `mediatek,wed` phandle in the device tree. That's good. But I need to understand the connection between that WED hardware abstraction and the wireless side of things. How does the driver interface with it? I recall seeing something related to the MT76 wireless drivers, specifically in `drivers/net/wireless/mediatek/mt76/`, from a previous `grep`. Now, let's dive deeper into how MT76 actually attaches to or interacts with the WED component. I need to trace that connection. |
| 20/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "mtk_wed_device_attach",
"PathPrefix": "drivers/net/wireless"
}Results: {
"Output": "drivers/net/wireless/mediatek/mt76/mt7915/mmio.c=633=int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,\n--\ndrivers/net/wireless/mediatek/mt76/mt7915/mmio.c-723-\ndrivers/net/wireless/mediatek/mt76/mt7915/mmio.c:724:\tif (mtk_wed_device_attach(wed))\ndrivers/net/wireless/mediatek/mt76/mt7915/mmio.c-725-\t\treturn 0;\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mmio.c=482=int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr,\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mmio.c-623-\ndrivers/net/wireless/mediatek/mt76/mt7996/mmio.c:624:\tif (mtk_wed_device_attach(wed))\ndrivers/net/wireless/mediatek/mt76/mt7996/mmio.c-625-\t\treturn 0;\n"
} |
| 21/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 36942 output: 66 thoughts: 183 Thoughts: **Analyzing the Impact of the Patch on MTK WED Devices** Okay, so `mt7915` and `mt7996` both ultimately go through `mtk_wed_device_attach`. Now, the important question is: where are the specific functions that this patch is touching *actually* being called? I need to understand the ripple effects here. Let me re-examine the patch to make sure I have all the functions that are being modified. Right, here they are: `mtk_wdma_rx_reset`, `mtk_wed_wdma_tx_ring_setup`, and `mtk_wed_start`. Now, the next logical step is to track the call chains. I need to figure out which other parts of the driver, or potentially even other modules, are calling `mtk_wdma_rx_reset`, `mtk_wed_wdma_tx_ring_setup`, and `mtk_wed_start`. That's where the real impact of this patch will be. I need to understand what's triggering those calls to fully assess the potential risks or benefits. |
| 22/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "mtk_wdma_rx_reset|mtk_wed_wdma_tx_ring_setup|mtk_wed_start",
"PathPrefix": "drivers/net/ethernet/mediatek/mtk_wed.c"
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_wed.c=243=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:244:mtk_wdma_rx_reset(struct mtk_wed_device *dev)\ndrivers/net/ethernet/mediatek/mtk_wed.c-245-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1128=__mtk_wed_detach(struct mtk_wed_device *dev)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1133-\ndrivers/net/ethernet/mediatek/mtk_wed.c:1134:\tmtk_wdma_rx_reset(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1135-\tmtk_wed_reset(dev, MTK_WED_RESET_WED);\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1724=mtk_wed_reset_dma(struct mtk_wed_device *dev)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1750-\t/* 2. reset WDMA rx DMA */\ndrivers/net/ethernet/mediatek/mtk_wed.c:1751:\tbusy = !!mtk_wdma_rx_reset(dev);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1752-\tif (mtk_wed_is_v3_or_greater(dev-\u003ehw)) {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1902=static int\ndrivers/net/ethernet/mediatek/mtk_wed.c:1903:mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,\ndrivers/net/ethernet/mediatek/mtk_wed.c-1904-\t\t\t bool reset)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2165=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2166:mtk_wed_start_hw_rro(struct mtk_wed_device *dev, u32 irq_mask, bool reset)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2167-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2330=static void\ndrivers/net/ethernet/mediatek/mtk_wed.c:2331:mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)\ndrivers/net/ethernet/mediatek/mtk_wed.c-2332-{\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-2346-\tif (mtk_wed_is_v2(dev-\u003ehw) \u0026\u0026 !dev-\u003erx_ring[0].desc)\ndrivers/net/ethernet/mediatek/mtk_wed.c:2347:\t\tmtk_wed_wdma_tx_ring_setup(dev, 0, MTK_WED_WDMA_RING_SIZE, !!dev-\u003etx_wdma[0].desc);\ndrivers/net/ethernet/mediatek/mtk_wed.c-2348-\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2571=mtk_wed_rx_ring_setup(struct mtk_wed_device *dev, int idx, void __iomem *regs,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-2582-\ndrivers/net/ethernet/mediatek/mtk_wed.c:2583:\tif (mtk_wed_wdma_tx_ring_setup(dev, idx, MTK_WED_WDMA_RING_SIZE,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2584-\t\t\t\t reset))\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=2784=void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-2793-\t\t.msg_update = mtk_wed_mcu_msg_update,\ndrivers/net/ethernet/mediatek/mtk_wed.c:2794:\t\t.start = mtk_wed_start,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2795-\t\t.stop = mtk_wed_stop,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-2803-\t\t.setup_tc = mtk_wed_setup_tc,\ndrivers/net/ethernet/mediatek/mtk_wed.c:2804:\t\t.start_hw_rro = mtk_wed_start_hw_rro,\ndrivers/net/ethernet/mediatek/mtk_wed.c-2805-\t\t.rro_rx_ring_setup = mtk_wed_rro_rx_ring_setup,\n"
} |
| 23/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 38756 output: 30 thoughts: 62 Thoughts: **Analyzing the mt76 Wireless Driver Initialization** Okay, so I'm digging into this `mtk_wed_add_hw` function. It looks like it's crucial for setting up the hardware, specifically setting the `.start` member to `mtk_wed_start`. My immediate thought is, where is this `.start` member *used*? That's the key to understanding how this whole thing functions. Since we're dealing with `mtk_wed`, that probably means the Mediatek wireless driver, `mt76`. So, the likely place to find this usage is within that driver's code. I'll need to do a code search. I'm going to look for any calls to `.start()` in the driver, or maybe even specifically for `mtk_wed_device_start`. Either of those will likely reveal the exact point where `mtk_wed_start` is actually *executed*, giving me a clearer picture of the initialization sequence. |
| 24/2 | 2026/09/19 16:47 | tool | grepper |
0mArgs:{
"Expression": "mtk_wed_device_start",
"PathPrefix": "drivers/"
}Results: {
"Output": "drivers/net/wireless/mediatek/mt76/mt7915/dma.c=255=int mt7915_dma_start(struct mt7915_dev *dev, bool reset, bool wed_reset)\n--\ndrivers/net/wireless/mediatek/mt76/mt7915/dma.c-322-\ndrivers/net/wireless/mediatek/mt76/mt7915/dma.c:323:\t\tmtk_wed_device_start(\u0026dev-\u003emt76.mmio.wed, wed_irq_mask);\ndrivers/net/wireless/mediatek/mt76/mt7915/dma.c-324-\t}\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c=306=void mt7996_dma_start(struct mt7996_dev *dev, bool reset, bool wed_reset)\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c-358-\t\tmt76_wr(dev, MT_INT_MASK_CSR, wed_irq_mask);\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c:359:\t\tmtk_wed_device_start(wed, wed_irq_mask);\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c-360-\t}\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c=622=void mt7996_dma_rro_start(struct mt7996_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c-630-\t\tmt76_wr(dev, MT_INT_MASK_CSR, irq_mask);\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c:631:\t\tmtk_wed_device_start_hw_rro(\u0026dev-\u003emt76.mmio.wed, irq_mask,\ndrivers/net/wireless/mediatek/mt76/mt7996/dma.c-632-\t\t\t\t\t false);\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c=690=static int mt7996_register_phy(struct mt7996_dev *dev, enum mt76_band_id band)\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c-769-\t\tmt76_wr(dev, MT_INT_PCIE1_MASK_CSR, MT_INT_TX_RX_DONE_EXT);\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c:770:\t\tmtk_wed_device_start(\u0026dev-\u003emt76.mmio.wed_hif2,\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c-771-\t\t\t\t MT_INT_TX_RX_DONE_EXT);\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c=2286=mt7996_mac_restart(struct mt7996_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2374-\t\tmt76_wr(dev, MT_INT_MASK_CSR, wed_irq_mask);\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c:2375:\t\tmtk_wed_device_start_hw_rro(\u0026dev-\u003emt76.mmio.wed, wed_irq_mask,\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2376-\t\t\t\t\t false);\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2383-\t\t\tMT_INT_TX_RX_DONE_EXT);\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c:2384:\t\tmtk_wed_device_start(\u0026dev-\u003emt76.mmio.wed_hif2,\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2385-\t\t\t\t MT_INT_TX_RX_DONE_EXT);\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c=2523=void mt7996_mac_reset_work(struct work_struct *work)\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2629-\t\tmt76_wr(dev, MT_INT_MASK_CSR, wed_irq_mask);\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c:2630:\t\tmtk_wed_device_start_hw_rro(\u0026dev-\u003emt76.mmio.wed, wed_irq_mask,\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2631-\t\t\t\t\t true);\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2637-\t\tmt76_wr(dev, MT_INT_PCIE1_MASK_CSR, MT_INT_TX_RX_DONE_EXT);\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c:2638:\t\tmtk_wed_device_start(\u0026dev-\u003emt76.mmio.wed_hif2,\ndrivers/net/wireless/mediatek/mt76/mt7996/mac.c-2639-\t\t\t\t MT_INT_TX_RX_DONE_EXT);\n"
} |
| 25/2 | 2026/09/19 16:47 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 40575 output: 45 thoughts: 107 Thoughts: **Delving into the MediaTek Wireless Ethernet Dispatch** Okay, so `mtk_wed` clearly stands for MediaTek Wireless Ethernet Dispatch. I need to understand this better – specifically, how the hardware implementation functions. Given that MediaTek WED is an on-SoC hardware engine, I know it's present on certain MediaTek SoCs like the MT7622, MT7986, and MT7988. I'll need to dig deeper. Let's start by analyzing `mtk_wed_add_hw`. The code seems like a solid place to begin. Time to consult lines 2780 through 2850 of `drivers/net/ethernet/mediatek/mtk_wed.c`. I'm expecting this section to reveal some key details about how this hardware component is initialized or integrated. This should give me a better understanding of the overall WED architecture. |
| 26/2 | 2026/09/19 16:48 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mediatek/mtk_wed.c",
"FirstLine": 2780,
"LineCount": 70
}Results: {
"Contents": "2780:\t\t\treturn -EOPNOTSUPP;\n2781:\t\t}\n2782:\t}\n2783:\t\n2784:\tvoid mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,\n2785:\t\t\t void __iomem *wdma, phys_addr_t wdma_phy,\n2786:\t\t\t int index)\n2787:\t{\n2788:\t\tstatic const struct mtk_wed_ops wed_ops = {\n2789:\t\t\t.attach = mtk_wed_attach,\n2790:\t\t\t.tx_ring_setup = mtk_wed_tx_ring_setup,\n2791:\t\t\t.rx_ring_setup = mtk_wed_rx_ring_setup,\n2792:\t\t\t.txfree_ring_setup = mtk_wed_txfree_ring_setup,\n2793:\t\t\t.msg_update = mtk_wed_mcu_msg_update,\n2794:\t\t\t.start = mtk_wed_start,\n2795:\t\t\t.stop = mtk_wed_stop,\n2796:\t\t\t.reset_dma = mtk_wed_reset_dma,\n2797:\t\t\t.reg_read = wed_r32,\n2798:\t\t\t.reg_write = wed_w32,\n2799:\t\t\t.irq_get = mtk_wed_irq_get,\n2800:\t\t\t.irq_set_mask = mtk_wed_irq_set_mask,\n2801:\t\t\t.detach = mtk_wed_detach,\n2802:\t\t\t.ppe_check = mtk_wed_ppe_check,\n2803:\t\t\t.setup_tc = mtk_wed_setup_tc,\n2804:\t\t\t.start_hw_rro = mtk_wed_start_hw_rro,\n2805:\t\t\t.rro_rx_ring_setup = mtk_wed_rro_rx_ring_setup,\n2806:\t\t\t.msdu_pg_rx_ring_setup = mtk_wed_msdu_pg_rx_ring_setup,\n2807:\t\t\t.ind_rx_ring_setup = mtk_wed_ind_rx_ring_setup,\n2808:\t\t};\n2809:\t\tstruct device_node *eth_np = eth-\u003edev-\u003eof_node;\n2810:\t\tstruct platform_device *pdev;\n2811:\t\tstruct mtk_wed_hw *hw;\n2812:\t\tstruct regmap *regs;\n2813:\t\tint irq;\n2814:\t\n2815:\t\tif (!np)\n2816:\t\t\treturn;\n2817:\t\n2818:\t\tpdev = of_find_device_by_node(np);\n2819:\t\tif (!pdev)\n2820:\t\t\tgoto err_of_node_put;\n2821:\t\n2822:\t\tirq = platform_get_irq(pdev, 0);\n2823:\t\tif (irq \u003c 0)\n2824:\t\t\tgoto err_put_device;\n2825:\t\n2826:\t\tregs = syscon_regmap_lookup_by_phandle(np, NULL);\n2827:\t\tif (IS_ERR(regs))\n2828:\t\t\tgoto err_put_device;\n2829:\t\n2830:\t\trcu_assign_pointer(mtk_soc_wed_ops, \u0026wed_ops);\n2831:\t\n2832:\t\tmutex_lock(\u0026hw_lock);\n2833:\t\n2834:\t\tif (WARN_ON(hw_list[index]))\n2835:\t\t\tgoto unlock;\n2836:\t\n2837:\t\thw = kzalloc_obj(*hw);\n2838:\t\tif (!hw)\n2839:\t\t\tgoto unlock;\n2840:\t\n2841:\t\thw-\u003enode = np;\n2842:\t\thw-\u003eregs = regs;\n2843:\t\thw-\u003eeth = eth;\n2844:\t\thw-\u003edev = \u0026pdev-\u003edev;\n2845:\t\thw-\u003ewdma_phy = wdma_phy;\n2846:\t\thw-\u003ewdma = wdma;\n2847:\t\thw-\u003eindex = index;\n2848:\t\thw-\u003eirq = irq;\n2849:\t\thw-\u003eversion = eth-\u003esoc-\u003eversion;\n"
} |
| 27/2 | 2026/09/19 16:48 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 42088 output: 47 thoughts: 625 Thoughts: **My Assessment of `mtk_wed` Fuzzing Feasibility** Okay, let's break this down. My initial thought is about how `mtk_soc_wed_ops` is initialized; it's within `mtk_wed_add_hw`, which hinges on `of_find_device_by_node(np)` and `syscon_regmap_lookup_by_phandle(np, NULL)`. That, in turn, only happens if `mtk_probe` in `mtk_eth_soc.c` runs. `mtk_probe` is, as I recall, a platform driver probe specifically for MediaTek ethernet hardware - think MT2701, MT7622, MT7623, and so on... The problem? Our target architecture for this fuzzing review is amd64. The big question is whether we can reach this code on amd64. Even on ARM, standard virtualized environments like QEMU amd64, or QEMU virt machine, won't typically have the physical MediaTek SoC hardware, their specific Device Tree nodes for the ethernet controller and WED, or even their Wi-Fi chipsets connected to WED. That's a huge blocker. Now, let's verify if `mtk_wed` is even *remotely* reachable in a standard virtualized environment on amd64, like QEMU or GCE. I need to run through the negative criteria: "When to return WorthFuzzing=false". I'm focusing on "Structurally unreachable hardware" and "Unreachable execution paths." Hang on a minute... Could `mtk_wed`, `mtk_eth`, or `mt7915` be loaded or emulated in *any* way on amd64? I need to figure out if `mtk_eth` can even probe on this architecture. I'm going to look for any PCI, USB, or platform device emulation that might trick it into probing. In `mtk_eth_soc.c`, I see `static struct platform_driver mtk_driver`, but the only match table is `of_mtk_match`. No ACPI IDs, no standard platform device creation on x86/amd64. That means there is no platform driver to load on the `amd64` architecture, and thus not a `worthfuzzing` target. Wait a second, what if someone created a platform device via something like configfs? Even *if* a platform device was conjured up with the name "mtk_soc_eth", would it *actually* probe? I'll need to check the `mtk_probe` function itself. |
| 28/2 | 2026/09/19 16:48 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mediatek/mtk_eth_soc.c",
"FirstLine": 5116,
"LineCount": 50
}Results: {
"Contents": "5116:\tstatic int mtk_probe(struct platform_device *pdev)\n5117:\t{\n5118:\t\tstruct resource *res = NULL;\n5119:\t\tstruct device_node *mac_np;\n5120:\t\tstruct mtk_eth *eth;\n5121:\t\tint err, i;\n5122:\t\n5123:\t\teth = devm_kzalloc(\u0026pdev-\u003edev, sizeof(*eth), GFP_KERNEL);\n5124:\t\tif (!eth)\n5125:\t\t\treturn -ENOMEM;\n5126:\t\n5127:\t\teth-\u003esoc = of_device_get_match_data(\u0026pdev-\u003edev);\n5128:\t\n5129:\t\teth-\u003edev = \u0026pdev-\u003edev;\n5130:\t\teth-\u003edma_dev = \u0026pdev-\u003edev;\n5131:\t\teth-\u003ebase = devm_platform_ioremap_resource(pdev, 0);\n5132:\t\tif (IS_ERR(eth-\u003ebase))\n5133:\t\t\treturn PTR_ERR(eth-\u003ebase);\n5134:\t\n5135:\t\tif (MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_SOC_MT7628))\n5136:\t\t\teth-\u003eip_align = NET_IP_ALIGN;\n5137:\t\n5138:\t\tif (MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_36BIT_DMA)) {\n5139:\t\t\terr = dma_set_mask(\u0026pdev-\u003edev, DMA_BIT_MASK(36));\n5140:\t\t\tif (!err)\n5141:\t\t\t\terr = dma_set_coherent_mask(\u0026pdev-\u003edev, DMA_BIT_MASK(32));\n5142:\t\n5143:\t\t\tif (err) {\n5144:\t\t\t\tdev_err(\u0026pdev-\u003edev, \"Wrong DMA config\\n\");\n5145:\t\t\t\treturn -EINVAL;\n5146:\t\t\t}\n5147:\t\t}\n5148:\t\n5149:\t\tspin_lock_init(\u0026eth-\u003epage_lock);\n5150:\t\tspin_lock_init(\u0026eth-\u003etx_irq_lock);\n5151:\t\tspin_lock_init(\u0026eth-\u003erx_irq_lock);\n5152:\t\tspin_lock_init(\u0026eth-\u003edim_lock);\n5153:\t\n5154:\t\teth-\u003erx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;\n5155:\t\tINIT_WORK(\u0026eth-\u003erx_dim.work, mtk_dim_rx);\n5156:\t\tINIT_DELAYED_WORK(\u0026eth-\u003ereset.monitor_work, mtk_hw_reset_monitor_work);\n5157:\t\n5158:\t\teth-\u003etx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;\n5159:\t\tINIT_WORK(\u0026eth-\u003etx_dim.work, mtk_dim_tx);\n5160:\t\n5161:\t\tif (!MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_SOC_MT7628)) {\n5162:\t\t\teth-\u003eethsys = syscon_regmap_lookup_by_phandle(pdev-\u003edev.of_node,\n5163:\t\t\t\t\t\t\t\t \"mediatek,ethsys\");\n5164:\t\t\tif (IS_ERR(eth-\u003eethsys)) {\n5165:\t\t\t\tdev_err(\u0026pdev-\u003edev, \"no ethsys regmap found\\n\");\n"
} |
| 29/2 | 2026/09/19 16:48 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 44274 output: 39 thoughts: 873 Thoughts: **Analyzing a Potential NULL Dereference and Examining Recent Code Changes in mtk_wed.c** Okay, so I'm looking at this code and I see a potential issue: `eth->soc = of_device_get_match_data(&pdev->dev);`. If the device doesn't have an OF node, `eth->soc` will be NULL. Boom, immediate dereference at `if (MTK_HAS_CAPS(eth->soc->caps, ...))`, that's a crash or a null pointer dereference waiting to happen. Plus, `devm_platform_ioremap_resource(pdev, 0)` failing without resources is another red flag. I know `pdev->dev.of_node` is crucial for functions like `syscon_regmap_lookup_by_phandle` and `of_parse_phandle` as well. The interesting bit here is `config NET_MEDIATEK_SOC_WED` depends on `ARCH_MEDIATEK || COMPILE_TEST`. Let's check the defconfig and syzkaller x86_64 configs. Even if we're building with `COMPILE_TEST` on amd64, the hardware likely doesn't exist in standard virtualized environments like QEMU or GCE. This is an important piece of the puzzle, and can inform the root cause. But hold on, let's take a closer look at what's been changed in `drivers/net/ethernet/mediatek/mtk_wed.c`. I need to understand the implications of the modifications. Here are the parts of the code that I need to investigate: 1. `mtk_wdma_rx_reset`: It looks like the change swapped the condition for a continue, which is suspicious in this context, now we are checking if `dev->rx_wdma[i].desc` is *not* initialized. 2. `mtk_wed_wdma_tx_ring_setup`: I see a conditional inclusion of a `mtk_wed_ring_reset` based on versioning, as well as if reset. Looks like we are resetting the ring if we are not v3. 3. `mtk_wed_start`: A check `if (!dev->rx_wdma[i].desc)`, suggesting ring setup if there isn't one already. Also, a specific allocation for non-DBDC MT7986, where `tx_wdma[0]` is explicitly set up if the ring hasn't been set up yet. This could point to a potential initialization problem in specific hardware or configuration cases. Okay, these changes are critical. I need to understand *why* these modifications were made, and how they relate to the potential NULL dereference. The best way to do that is to check the Git log for the commit message related to these code changes and understand the developer's rationale and the context of the bug fix. It should shed light on any specific hardware conditions or scenarios these changes were intended to address. |
| 30/2 | 2026/09/19 16:48 | tool | grepper |
0mArgs:{
"Expression": "non-DBDC MT7986 allocates",
"PathPrefix": "drivers/net/ethernet/mediatek"
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_wed.c=2331=mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-2342-\t/*\ndrivers/net/ethernet/mediatek/mtk_wed.c:2343:\t * non-DBDC MT7986 allocates only rx_ring[1] and tx_wdma[1] during setup\ndrivers/net/ethernet/mediatek/mtk_wed.c-2344-\t * but tx_wdma[0] is also needed for WED to function.\n"
} |
| 31/2 | 2026/09/19 16:48 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 46020 output: 143 thoughts: 877 Thoughts: **Fuzzing Verdict: Unreachable Code in MediaTek WED Driver** Okay, let's break this down. First, I need to understand the change. The commit message clarifies that it's about allocating TX/RX rings for the WED offload engine on the MT7986, a MediaTek Wi-Fi 6 SoC. Specifically, it seems like we're addressing a resource allocation issue related to Wireless Ethernet Dispatch (WED). Now, the crucial question: is this code fuzzable, given the constraints of our standard virtualized environments like QEMU and GCE? Let's consult the guidelines. Section 1 emphasizes reachability as the primary factor. If the code *cannot* execute in these standard environments, it's a no-go for fuzzing, regardless of its complexity or assertions. Section 2 spells out the "structurally unreachable" scenarios. I see a few key points: vendor-specific hardware like PCIe switches or SmartNICs that *require physical hardware* and architecture-exclusive code paths. Looking at the code, it resides in `drivers/net/ethernet/mediatek/mtk_wed.c`. This is part of the MediaTek WED driver (`NET_MEDIATEK_SOC_WED`). The driver's functionality is to drive the WED offload unit, which is integrated *into* MediaTek ARM-based SoCs (MT7622, MT7986, MT7988). Given that our target architecture is amd64 and the WED offload unit is hardware-specific, it's clear: the WED driver's code *cannot* be instantiated via standard QEMU or GCE on amd64, due to the missing hardware and device-tree bindings that is specific to the MediaTek SoC. This means it's unreachable in our standard fuzzing environment. The code paths involved—`mtk_wdma_rx_reset`, `mtk_wed_wdma_tx_ring_setup`, and `mtk_wed_start`—directly interact with this specialized hardware. Therefore, according to the guidelines, `WorthFuzzing` must be `false`. Here's my reasoning, concise and clear: 1. Modified code: `drivers/net/ethernet/mediatek/mtk_wed.c` (WED driver code). 2. Driver Function: MediaTek WED offload engine for MediaTek ARM SoCs. 3. Unreachability: Requires physical MediaTek SoC hardware and device tree peripherals which are not emulated in standard QEMU/GCE environments, and the target architecture is amd64. 4. Conclusion: Meets the negative criteria for structurally unreachable hardware and architecture-exclusive SoC drivers. I'm confident in this assessment. Let's call `set-results` with this analysis. |
| 32/2 | 2026/09/19 16:48 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The changes modify `drivers/net/ethernet/mediatek/mtk_wed.c`, which implements the Wireless Ethernet Dispatch (WED) hardware offload engine found on MediaTek ARM SoCs (such as MT7622, MT7986, and MT7988). This driver requires specific MediaTek SoC hardware and Device Tree nodes not present or emulated in standard QEMU/GCE virtualized environments on the target amd64 architecture. As such, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The changes modify `drivers/net/ethernet/mediatek/mtk_wed.c`, which implements the Wireless Ethernet Dispatch (WED) hardware offload engine found on MediaTek ARM SoCs (such as MT7622, MT7986, and MT7988). This driver requires specific MediaTek SoC hardware and Device Tree nodes not present or emulated in standard QEMU/GCE virtualized environments on the target amd64 architecture. As such, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 33/1 | 2026/09/19 16:48 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|