AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/10 21:28 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": [
    "WLAN",
    "WLAN_VENDOR_MORSEMICRO",
    "MAC80211",
    "USB",
    "MM81X",
    "MM81X_USB"
  ],
  "FocusSymbols": [
    "mm81x_yaps_hw_read_pkts",
    "mm81x_read_pkts_h_is_valid_delim",
    "mm81x_yaps_read_pkts",
    "mm81x_yaps_rx_handler"
  ],
  "KMSANReasoning": "The patch hardens input validation in the Morse Micro mm81x driver's YAPS hardware packet reading logic by:\n1. Ensuring `pkt_size` (phandle size) exceeds `YAPS_RESERVED_PAGE_SIZE` to prevent underflows in `YAPS_DELIM_GET_PKT_SIZE()`.\n2. Validating that `bytes_remaining` is 4-byte aligned before reading delimiters from the chip buffer.\n\nThese changes prevent potential integer underflow, out-of-bounds reads/writes, or protocol desynchronization when parsing hardware packet buffers. Any memory safety violations in this area (e.g., negative size passed to buffer operations resulting in out-of-bounds accesses) are detected by KASAN. The patch does not introduce or expose uninitialized memory reads, uninitialized variables in branching, or kernel-to-user info-leaks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies the packet reception and delimiter validation logic in the Morse Micro MM81x wireless driver (drivers/net/wireless/morsemicro/mm81x/yaps_hw.c), adding alignment verification on remaining bytes and stricter packet size validation against reserved page bounds. The driver supports USB devices and is reachable in virtualized environments via USB emulation.",
  "WorthFuzzing": true
}

1/1 2026/09/10 21:28 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 7691f78b0e3926a9b4f51545ed2802f2d31d90be\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Thu Sep 10 21:28:27 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c b/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c\nindex 3d641d23c35ba..97b2ff93c69ff 100644\n--- a/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c\n+++ b/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c\n@@ -407,7 +407,7 @@ static bool mm81x_read_pkts_h_is_valid_delim(u32 delim)\n \tif (calc_crc != YAPS_DELIM_GET_CRC(delim))\n \t\treturn false;\n \n-\tif (pkt_size == 0)\n+\tif (pkt_size \u003c= YAPS_RESERVED_PAGE_SIZE)\n \t\treturn false;\n \n \tif ((pkt_size + padding) \u003e YAPS_MAX_PKT_SIZE_BYTES)\n@@ -455,6 +455,10 @@ static int mm81x_yaps_hw_read_pkts(struct mm81x_yaps *yaps,\n \t\treturn 0;\n \tif (bytes_remaining \u003c 0)\n \t\treturn bytes_remaining;\n+\tif (!IS_ALIGNED(bytes_remaining, sizeof(u32))) {\n+\t\tdev_warn(yaps-\u003emors-\u003edev, \"yaps truncated delimiter\");\n+\t\treturn -EIO;\n+\t}\n \n \tif (bytes_remaining \u003e YAPS_HW_WINDOW_SIZE_BYTES) {\n \t\tbytes_remaining = YAPS_HW_WINDOW_SIZE_BYTES;\n"
}

2/1 2026/09/10 21:28 agent patch-evaluator
1m Model:
core

Args:
null

Results:
{
  "EnableConfigs": [
    "WLAN",
    "WLAN_VENDOR_MORSEMICRO",
    "MAC80211",
    "USB",
    "MM81X",
    "MM81X_USB"
  ],
  "FocusSymbols": [
    "mm81x_yaps_hw_read_pkts",
    "mm81x_read_pkts_h_is_valid_delim",
    "mm81x_yaps_read_pkts",
    "mm81x_yaps_rx_handler"
  ],
  "Reasoning": "The patch modifies the packet reception and delimiter validation logic in the Morse Micro MM81x wireless driver (drivers/net/wireless/morsemicro/mm81x/yaps_hw.c), adding alignment verification on remaining bytes and stricter packet size validation against reserved page bounds. The driver supports USB devices and is reachable in virtualized environments via USB emulation.",
  "WorthFuzzing": true
}

Instruction:
You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.

================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.

- REACHABILITY IS THE PRIMARY GATE:
  Fuzzing can only discover bugs in code that can actually execute in standard virtualized
  environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
  If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
  regardless of whether it adds assertions or complex logic.

- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
  Patch authors routinely label changes as "cleanups", "refactorings", or state
  "No functional change intended". Do NOT take these claims at face value.
  Code refactorings that rearrange logic, introduce helper functions, or alter state management
  in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
  If reachable executable code is modified or refactored, it MUST be fuzzed.

- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
  When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
  BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
  Even if the author believes the invariant always holds, fuzzing is essential to verify whether
  an unusual sequence of operations can violate it.

================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:

- Non-kernel and non-executable changes:
  * Modifications to Documentation/, comments, or spelling fixes.
  * User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
    that do not affect the compiled kernel image (vmlinux) or kernel modules.
  * Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
    that do not alter control flow or data structures.
  * Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
  * Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
    ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
  * Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
    physical PCI hot-unplug or manual sysfs driver unbinding.
  * Code paths exclusive to architectures other than the target architecture.

================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
  * Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
    BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
  * Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
  * Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
  * Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).

================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:

- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
  Do NOT list generic, ubiquitous functions called by almost every program in the corpus
  (including, but not limited to: general memory allocators and deallocators, page fault
  and trap handlers, or core synchronization primitives; this is not an exhaustive list).
  Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
  which severely dilutes fuzzing effort away from the actual changes.

- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
  List functions that specifically implement the logic being added or altered, or direct API entrypoints
  for the subsystem feature under review.

- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
  Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
  distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
  If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
  functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).

================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


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

Prompt:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit 7691f78b0e3926a9b4f51545ed2802f2d31d90be
Author: syz-cluster <triage@syzkaller.com>
Date:   Thu Sep 10 21:28:27 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c b/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c
index 3d641d23c35ba..97b2ff93c69ff 100644
--- a/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c
+++ b/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c
@@ -407,7 +407,7 @@ static bool mm81x_read_pkts_h_is_valid_delim(u32 delim)
 	if (calc_crc != YAPS_DELIM_GET_CRC(delim))
 		return false;
 
-	if (pkt_size == 0)
+	if (pkt_size <= YAPS_RESERVED_PAGE_SIZE)
 		return false;
 
 	if ((pkt_size + padding) > YAPS_MAX_PKT_SIZE_BYTES)
@@ -455,6 +455,10 @@ static int mm81x_yaps_hw_read_pkts(struct mm81x_yaps *yaps,
 		return 0;
 	if (bytes_remaining < 0)
 		return bytes_remaining;
+	if (!IS_ALIGNED(bytes_remaining, sizeof(u32))) {
+		dev_warn(yaps->mors->dev, "yaps truncated delimiter");
+		return -EIO;
+	}
 
 	if (bytes_remaining > YAPS_HW_WINDOW_SIZE_BYTES) {
 		bytes_remaining = YAPS_HW_WINDOW_SIZE_BYTES;

3/2 2026/09/10 21:28 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 3098
							output: 30
							thoughts: 609
						

Thoughts:
**My Initial Assessment of the Syzkaller Fuzzing Triage Patch**

Okay, here's what I'm thinking. The user wants me to vet this patch for syzkaller fuzzing triage. First, I'm going to run a quick risk analysis. This seems like it's pretty low-stakes, a code review or patch triage specifically for the Linux kernel driver `drivers/net/wireless/morsemicro/mm81x/yaps_hw.c`. Given that context, it looks benign or defensive, something to improve fuzzing configuration. So, yeah, we should proceed with this request.

Now, let's dive into the patch itself. Okay, I see the diff. The core change focuses on the `mm81x_read_pkts_h_is_valid_delim` function, and `mm81x_yaps_hw_read_pkts`. It looks like they've modified the packet size validation logic within `mm81x_read_pkts_h_is_valid_delim`. The old check just ruled out zero-sized packets; now, the condition is `pkt_size <= YAPS_RESERVED_PAGE_SIZE`. Also, a check for aligned read size has been added into `mm81x_yaps_hw_read_pkts`. It seems like the goal is to make the fuzzing more robust by preventing potential integer overflows or underflows or handling truncated reads.

Before I go further, I'd like to get a better handle on the broader context. What kind of bus or device are we dealing with here? Is this SDIO, SPI, USB, or something else? I need to understand how the driver interacts with the hardware to fully assess the impact of this change. I'll need to use either `grepper` or `read-file` to get the lay of the land within `drivers/net/wireless/morsemicro/`. Let's see what we can find.



4/2 2026/09/10 21:28 tool grepper
0m Args:
{
  "Expression": "mm81x",
  "PathPrefix": "drivers/net/wireless/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 4847 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/morsemicro/Kconfig=13=if WLAN_VENDOR_MORSEMICRO\ndrivers/net/wireless/morsemicro/Kconfig:14:source \"drivers/net/wireless/morsemicro/mm81x/Kconfig\"\ndrivers/net/wireless/morsemicro/Kconfig-15-endif # WLAN_VENDOR_MORSEMICRO\n--\ndrivers/net/wireless/morsemicro/Makefile-1-# SPDX-License-Identifier: GPL-2.0\ndrivers/net/wireless/morsemicro/Makefile:2:obj-$(CONFIG_MM81X) += mm81x/\n--\ndrivers/net/wireless/morsemicro/mm81x/Makefile-2-\ndrivers/net/wireless/morsemicro/mm81x/Makefile:3:obj-$(CONFIG_MM81X) += mm81x_core.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile-4-\ndrivers/net/wireless/morsemicro/mm81x/Makefile:5:mm81x_core-y += core.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:6:mm81x_core-y += mac.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:7:mm81x_core-y += hw.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:8:mm81x_core-y += fw.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:9:mm81x_core-y += command.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:10:mm81x_core-y += ps.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:11:mm81x_core-y += skbq.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:12:mm81x_core-y += yaps_hw.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:13:mm81x_core-y += yaps.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:14:mm81x_core-y += rc.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:15:mm81x_core-y += mmrc.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile-16-\ndrivers/net/wireless/morsemicro/mm81x/Makefile:17:obj-$(CONFIG_MM81X_USB) += mm81x_usb.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:18:mm81x_usb-y += usb.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile-19-\ndrivers/net/wireless/morsemicro/mm81x/Makefile:20:obj-$(CONFIG_MM81X_SDIO) += mm81x_sdio.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:21:mm81x_sdio-y += sdio.o\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-11-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:12:enum mm81x_bus_type {\ndrivers/net/wireless/morsemicro/mm81x/bus.h-13-\tMM81X_BUS_TYPE_USB,\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-16-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:17:struct mm81x_bus_ops {\ndrivers/net/wireless/morsemicro/mm81x/bus.h:18:\tint (*dm_read)(struct mm81x *mors, u32 addr, u8 *data, int len);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:19:\tint (*dm_write)(struct mm81x *mors, u32 addr, const u8 *data, int len);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:20:\tint (*reg32_read)(struct mm81x *mors, u32 addr, u32 *data);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:21:\tint (*reg32_write)(struct mm81x *mors, u32 addr, u32 data);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:22:\tint (*digital_reset)(struct mm81x *mors);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:23:\tvoid (*set_bus_enable)(struct mm81x *mors, bool enable);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:24:\tvoid (*config_burst_mode)(struct mm81x *mors, bool enable_burst);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:25:\tvoid (*claim)(struct mm81x *mors);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:26:\tvoid (*set_irq)(struct mm81x *mors, bool enable);\ndrivers/net/wireless/morsemicro/mm81x/bus.h:27:\tvoid (*release)(struct mm81x *mors);\ndrivers/net/wireless/morsemicro/mm81x/bus.h-28-\tunsigned int bulk_alignment;\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-36-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:37:/* mm81x_dm_read - len must be rounded up to the nearest 4-byte boundary */\ndrivers/net/wireless/morsemicro/mm81x/bus.h:38:static inline int mm81x_dm_read(struct mm81x *mors, u32 addr, u8 *data, int len)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-39-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-42-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:43:static inline int mm81x_dm_write(struct mm81x *mors, u32 addr, const u8 *data,\ndrivers/net/wireless/morsemicro/mm81x/bus.h-44-\t\t\t\t int len)\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-48-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:49:static inline int mm81x_reg32_read(struct mm81x *mors, u32 addr, u32 *data)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-50-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-53-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:54:static inline int mm81x_reg32_write(struct mm81x *mors, u32 addr, u32 data)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-55-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-58-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:59:static inline int mm81x_bus_digital_reset(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-60-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-66-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:67:static inline void mm81x_set_bus_enable(struct mm81x *mors, bool enable)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-68-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-71-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:72:static inline void mm81x_bus_config_burst_mode(struct mm81x *mors,\ndrivers/net/wireless/morsemicro/mm81x/bus.h-73-\t\t\t\t\t       bool enable_burst)\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-78-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:79:static inline void mm81x_claim_bus(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-80-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-83-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:84:static inline void mm81x_bus_set_irq(struct mm81x *mors, bool enable)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-85-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-88-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:89:static inline void mm81x_release_bus(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-90-{\n--\ndrivers/net/wireless/morsemicro/mm81x/bus.h-93-\ndrivers/net/wireless/morsemicro/mm81x/bus.h:94:static inline unsigned int mm81x_bus_get_alignment(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/bus.h-95-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c=27=struct host_cmd_resp_cb {\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-32-\ndrivers/net/wireless/morsemicro/mm81x/command.c:33:static int mm81x_cmd_tx(struct mm81x *mors, struct host_cmd_resp *resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-34-\t\t\tstruct host_cmd_req *req, u32 length, u32 timeout)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-41-\tstruct sk_buff *skb;\ndrivers/net/wireless/morsemicro/mm81x/command.c:42:\tstruct mm81x_skbq *cmd_q = mm81x_hif_get_tx_cmd_queue(mors);\ndrivers/net/wireless/morsemicro/mm81x/command.c-43-\tstruct host_cmd_resp_cb *resp_cb;\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-57-\ndrivers/net/wireless/morsemicro/mm81x/command.c:58:\tmm81x_ps_disable(mors);\ndrivers/net/wireless/morsemicro/mm81x/command.c-59-\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-62-\ndrivers/net/wireless/morsemicro/mm81x/command.c:63:\t\tskb = mm81x_skbq_alloc_skb(cmd_q, cmd_len);\ndrivers/net/wireless/morsemicro/mm81x/command.c-64-\t\tif (!skb) {\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-83-\t\ttimeout = timeout ? timeout : HOST_CMD_DEFAULT_TIMEOUT_MS;\ndrivers/net/wireless/morsemicro/mm81x/command.c:84:\t\tret = mm81x_skbq_skb_tx(cmd_q, \u0026skb, NULL,\ndrivers/net/wireless/morsemicro/mm81x/command.c-85-\t\t\t\t\tMM81X_SKB_CHAN_COMMAND);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-88-\t\tif (ret) {\ndrivers/net/wireless/morsemicro/mm81x/command.c:89:\t\t\tdev_err(mors-\u003edev, \"mm81x_skbq_tx fail: %d\", ret);\ndrivers/net/wireless/morsemicro/mm81x/command.c-90-\t\t\tbreak;\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-121-\t\tspin_lock_bh(\u0026cmd_q-\u003elock);\ndrivers/net/wireless/morsemicro/mm81x/command.c:122:\t\tmm81x_skbq_skb_finish(cmd_q, skb, NULL);\ndrivers/net/wireless/morsemicro/mm81x/command.c-123-\t\tspin_unlock_bh(\u0026cmd_q-\u003elock);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-128-\ndrivers/net/wireless/morsemicro/mm81x/command.c:129:\tmm81x_ps_enable(mors);\ndrivers/net/wireless/morsemicro/mm81x/command.c-130-\tmutex_unlock(\u0026mors-\u003ecmd_wait);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-145-\ndrivers/net/wireless/morsemicro/mm81x/command.c:146:int mm81x_cmd_resp_process(struct mm81x *mors, struct sk_buff *skb)\ndrivers/net/wireless/morsemicro/mm81x/command.c-147-{\ndrivers/net/wireless/morsemicro/mm81x/command.c-148-\tint length, ret = -ESRCH; /* No such process */\ndrivers/net/wireless/morsemicro/mm81x/command.c:149:\tstruct mm81x_skbq *cmd_q = mm81x_hif_get_tx_cmd_queue(mors);\ndrivers/net/wireless/morsemicro/mm81x/command.c-150-\tstruct host_cmd_resp *src_resp = (struct host_cmd_resp *)(skb-\u003edata);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-163-\tif (!HOST_CMD_IS_RESP(src_resp)) {\ndrivers/net/wireless/morsemicro/mm81x/command.c:164:\t\tret = mm81x_mac_event_recv(mors, skb);\ndrivers/net/wireless/morsemicro/mm81x/command.c-165-\t\tgoto exit_free;\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-169-\ndrivers/net/wireless/morsemicro/mm81x/command.c:170:\tcmd_skb = mm81x_skbq_tx_pending(cmd_q);\ndrivers/net/wireless/morsemicro/mm81x/command.c-171-\tif (cmd_skb) {\ndrivers/net/wireless/morsemicro/mm81x/command.c:172:\t\tmm81x_skbq_pull_hdr_post_tx(cmd_skb);\ndrivers/net/wireless/morsemicro/mm81x/command.c-173-\t\treq = (struct host_cmd_req *)cmd_skb-\u003edata;\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-231-\ndrivers/net/wireless/morsemicro/mm81x/command.c:232:int mm81x_cmd_sta_state(struct mm81x *mors, struct mm81x_vif *mors_vif, u16 aid,\ndrivers/net/wireless/morsemicro/mm81x/command.c-233-\t\t\tstruct ieee80211_sta *sta,\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-245-\ndrivers/net/wireless/morsemicro/mm81x/command.c:246:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-247-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-248-\ndrivers/net/wireless/morsemicro/mm81x/command.c:249:int mm81x_cmd_add_if(struct mm81x *mors, u16 *vif_id, const u8 *addr,\ndrivers/net/wireless/morsemicro/mm81x/command.c-250-\t\t     enum nl80211_iftype type)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-270-\ndrivers/net/wireless/morsemicro/mm81x/command.c:271:\tret = mm81x_cmd_tx(mors, (struct host_cmd_resp *)\u0026resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-272-\t\t\t   (struct host_cmd_req *)\u0026req, sizeof(resp), 0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-278-\ndrivers/net/wireless/morsemicro/mm81x/command.c:279:int mm81x_cmd_get_capabilities(struct mm81x *mors, u16 vif_id,\ndrivers/net/wireless/morsemicro/mm81x/command.c:280:\t\t\t       struct mm81x_fw_caps *capabilities)\ndrivers/net/wireless/morsemicro/mm81x/command.c-281-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-288-\ndrivers/net/wireless/morsemicro/mm81x/command.c:289:\tret = mm81x_cmd_tx(mors, (struct host_cmd_resp *)\u0026rsp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-290-\t\t\t   (struct host_cmd_req *)\u0026req, sizeof(rsp), 0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-294-\tcapabilities-\u003eampdu_mss = rsp.capabilities.ampdu_mss;\ndrivers/net/wireless/morsemicro/mm81x/command.c:295:\tcapabilities-\u003emm81x_mmss_offset = rsp.morse_mmss_offset;\ndrivers/net/wireless/morsemicro/mm81x/command.c-296-\tcapabilities-\u003ebeamformee_sts_capability =\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-307-\ndrivers/net/wireless/morsemicro/mm81x/command.c:308:int mm81x_cmd_get_max_txpower(struct mm81x *mors, s32 *out_power_mbm)\ndrivers/net/wireless/morsemicro/mm81x/command.c-309-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-315-\ndrivers/net/wireless/morsemicro/mm81x/command.c:316:\tret = mm81x_cmd_tx(mors, (struct host_cmd_resp *)\u0026resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-317-\t\t\t   (struct host_cmd_req *)\u0026req, sizeof(resp), 0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-323-\ndrivers/net/wireless/morsemicro/mm81x/command.c:324:int mm81x_cmd_hw_scan(struct mm81x *mors, struct mm81x_hw_scan_params *params,\ndrivers/net/wireless/morsemicro/mm81x/command.c-325-\t\t      bool store)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-332-\ndrivers/net/wireless/morsemicro/mm81x/command.c:333:\tcmd_size = mm81x_hw_scan_h_get_cmd_size(params);\ndrivers/net/wireless/morsemicro/mm81x/command.c-334-\tcmd_size = ROUND_BYTES_TO_WORD(cmd_size);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-352-\t\treq-\u003edwell_time_ms = cpu_to_le32(params-\u003edwell_time_ms);\ndrivers/net/wireless/morsemicro/mm81x/command.c:353:\t\tbuf = mm81x_hw_scan_h_insert_tlvs(params, buf);\ndrivers/net/wireless/morsemicro/mm81x/command.c-354-\t}\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-358-\treq-\u003ehdr.len = cpu_to_le16((u16)((buf - (u8 *)req) - sizeof(req-\u003ehdr)));\ndrivers/net/wireless/morsemicro/mm81x/command.c:359:\tret = mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-360-\tkfree(req);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-364-\ndrivers/net/wireless/morsemicro/mm81x/command.c:365:int mm81x_cmd_set_txpower(struct mm81x *mors, s32 *out_power_mbm,\ndrivers/net/wireless/morsemicro/mm81x/command.c-366-\t\t\t  int txpower_mbm)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-374-\ndrivers/net/wireless/morsemicro/mm81x/command.c:375:\tret = mm81x_cmd_tx(mors, (struct host_cmd_resp *)\u0026resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-376-\t\t\t   (struct host_cmd_req *)\u0026req, sizeof(resp), 0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-382-\ndrivers/net/wireless/morsemicro/mm81x/command.c:383:int mm81x_cmd_set_channel(struct mm81x *mors, u32 op_chan_freq_hz,\ndrivers/net/wireless/morsemicro/mm81x/command.c-384-\t\t\t  u8 pri_1mhz_chan_idx, u8 op_bw_mhz, u8 pri_bw_mhz,\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-397-\ndrivers/net/wireless/morsemicro/mm81x/command.c:398:\tret = mm81x_cmd_tx(mors, (struct host_cmd_resp *)\u0026resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-399-\t\t\t   (struct host_cmd_req *)\u0026req, sizeof(resp), 0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-405-\ndrivers/net/wireless/morsemicro/mm81x/command.c:406:int mm81x_cmd_disable_key(struct mm81x *mors, struct mm81x_vif *mors_vif,\ndrivers/net/wireless/morsemicro/mm81x/command.c-407-\t\t\t  u16 aid, struct ieee80211_key_conf *key)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-418-\ndrivers/net/wireless/morsemicro/mm81x/command.c:419:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-420-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-421-\ndrivers/net/wireless/morsemicro/mm81x/command.c:422:int mm81x_cmd_install_key(struct mm81x *mors, struct mm81x_vif *mors_vif,\ndrivers/net/wireless/morsemicro/mm81x/command.c-423-\t\t\t  u16 aid, struct ieee80211_key_conf *key,\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-445-\ndrivers/net/wireless/morsemicro/mm81x/command.c:446:\tret = mm81x_cmd_tx(mors, (struct host_cmd_resp *)\u0026resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-447-\t\t\t   (struct host_cmd_req *)\u0026req, sizeof(resp), 0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-456-\ndrivers/net/wireless/morsemicro/mm81x/command.c:457:int mm81x_cmd_cfg_multicast_filter(struct mm81x *mors,\ndrivers/net/wireless/morsemicro/mm81x/command.c:458:\t\t\t\t   struct mm81x_vif *mors_vif)\ndrivers/net/wireless/morsemicro/mm81x/command.c-459-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-474-\ndrivers/net/wireless/morsemicro/mm81x/command.c:475:\tret = mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-476-\tkfree(req);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-479-\ndrivers/net/wireless/morsemicro/mm81x/command.c:480:int mm81x_cmd_cfg_bss(struct mm81x *mors, u16 vif_id, u16 beacon_int,\ndrivers/net/wireless/morsemicro/mm81x/command.c-481-\t\t      u16 dtim_period, u32 cssid)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-489-\ndrivers/net/wireless/morsemicro/mm81x/command.c:490:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-491-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-492-\ndrivers/net/wireless/morsemicro/mm81x/command.c:493:int mm81x_cmd_config_beacon_timer(struct mm81x *mors, void *mm81x_vif,\ndrivers/net/wireless/morsemicro/mm81x/command.c-494-\t\t\t\t  bool enabled)\ndrivers/net/wireless/morsemicro/mm81x/command.c-495-{\ndrivers/net/wireless/morsemicro/mm81x/command.c:496:\tstruct mm81x_vif *vif = mm81x_vif;\ndrivers/net/wireless/morsemicro/mm81x/command.c-497-\tstruct host_cmd_req_bss_beacon_config req = {\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-502-\ndrivers/net/wireless/morsemicro/mm81x/command.c:503:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-504-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-505-\ndrivers/net/wireless/morsemicro/mm81x/command.c:506:int mm81x_cmd_set_ps(struct mm81x *mors, bool enabled)\ndrivers/net/wireless/morsemicro/mm81x/command.c-507-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-512-\ndrivers/net/wireless/morsemicro/mm81x/command.c:513:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0,\ndrivers/net/wireless/morsemicro/mm81x/command.c-514-\t\t\t    HOST_CMD_POWERSAVE_TIMEOUT_MS);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-516-\ndrivers/net/wireless/morsemicro/mm81x/command.c:517:int mm81x_cmd_cfg_qos(struct mm81x *mors, struct mm81x_queue_params *params)\ndrivers/net/wireless/morsemicro/mm81x/command.c-518-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-528-\ndrivers/net/wireless/morsemicro/mm81x/command.c:529:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-530-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-531-\ndrivers/net/wireless/morsemicro/mm81x/command.c:532:int mm81x_cmd_rm_if(struct mm81x *mors, u16 vif_id)\ndrivers/net/wireless/morsemicro/mm81x/command.c-533-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-537-\ndrivers/net/wireless/morsemicro/mm81x/command.c:538:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-539-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-540-\ndrivers/net/wireless/morsemicro/mm81x/command.c:541:int mm81x_cmd_set_frag_threshold(struct mm81x *mors, u32 frag_threshold)\ndrivers/net/wireless/morsemicro/mm81x/command.c-542-{\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-549-\ndrivers/net/wireless/morsemicro/mm81x/command.c:550:\treturn mm81x_cmd_tx(mors, NULL, (struct host_cmd_req *)\u0026req, 0, 0);\ndrivers/net/wireless/morsemicro/mm81x/command.c-551-}\ndrivers/net/wireless/morsemicro/mm81x/command.c-552-\ndrivers/net/wireless/morsemicro/mm81x/command.c:553:int mm81x_cmd_get_disabled_channels(\ndrivers/net/wireless/morsemicro/mm81x/command.c:554:\tstruct mm81x *mors, struct host_cmd_resp_get_disabled_channels *resp,\ndrivers/net/wireless/morsemicro/mm81x/command.c-555-\tuint resp_len)\n--\ndrivers/net/wireless/morsemicro/mm81x/command.c-560-\ndrivers/net/wireless/morsemicro/mm81x/command.c:561:\treturn mm81x_cmd_tx(mors, (struct host_cmd_resp *)resp, \u0026req, resp_len,\ndrivers/net/wireless/morsemicro/mm81x/command.c-562-\t\t\t    0);\n--\ndrivers/net/wireless/morsemicro/mm81x/command.h-18-\ndrivers/net/wireless/morsemicro/mm81x/command.h:19:struct mm81x_queue_params;\ndrivers/net/wireless/morsemicro/mm81x/command.h-20-\ndrivers/net/wireless/morsemicro/mm81x/command.h:21:enum mm81x_cmd_return_code {\ndrivers/net/wireless/morsemicro/mm81x/command.h-22-\tMM81X_RET_SUCCESS = 0,\n--\ndrivers/net/wireless/morsemicro/mm81x/command.h=44=struct host_cmd_event {\n--\ndrivers/net/wireless/morsemicro/mm81x/command.h-48-\ndrivers/net/wireless/morsemicro/mm81x/command.h:49:int mm81x_cmd_resp_process(struct mm81x *mors, struct sk_buff *skb);\ndrivers/net/wireless/morsemicro/mm81x/command.h:50:int mm81x_cmd_add_if(struct mm81x *mors, u16 *vif_id, const u8 *addr,\ndrivers/net/wireless/morsemicro/mm81x/command.h-51-\t\t     enum nl80211_iftype type);\ndrivers/net/wireless/morsemicro/mm81x/command.h:52:int mm81x_cmd_get_capabilities(struct mm81x *mors, u16 vif_id,\ndrivers/net/wireless/morsemicro/mm81x/command.h:53:\t\t\t       struct mm81x_fw_caps *capabilities);\ndrivers/net/wireless/morsemicro/mm81x/command.h:54:int mm81x_cmd_cfg_qos(struct mm81x *mors, struct mm81x_queue_params *params);\ndrivers/net/wireless/morsemicro/mm81x/command.h:55:int mm81x_cmd_config_beacon_timer(struct mm81x *mors, void *mm81x_vif,\ndrivers/net/wireless/morsemicro/mm81x/command.h-56-\t\t\t\t  bool enabled);\ndrivers/net/wireless/morsemicro/mm81x/command.h:57:int mm81x_cmd_cfg_bss(struct mm81x *mors, u16 vif_id, u16 beacon_int,\ndrivers/net/wireless/morsemicro/mm81x/command.h-58-\t\t      u16 dtim_period, u32 cssid);\ndrivers/net/wireless/morsemicro/mm81x/command.h:59:int mm81x_cmd_set_channel(struct mm81x *mors, u32 op_chan_freq_hz,\ndrivers/net/wireless/morsemicro/mm81x/command.h-60-\t\t\t  u8 pri_1mhz_chan_idx, u8 op_bw_mhz, u8 pri_bw_mhz,\ndrivers/net/wireless/morsemicro/mm81x/command.h-61-\t\t\t  s32 *power_mbm);\ndrivers/net/wireless/morsemicro/mm81x/command.h:62:int mm81x_cmd_get_max_txpower(struct mm81x *mors, s32 *out_power_mbm);\ndrivers/net/wireless/morsemicro/mm81x/command.h:63:int mm81x_cmd_set_txpower(struct mm81x *mors, s32 *out_power_mbm,\ndrivers/net/wireless/morsemicro/mm81x/command.h-64-\t\t\t  int txpower_mbm);\ndrivers/net/wireless/morsemicro/mm81x/command.h:65:int mm81x_cmd_hw_scan(struct mm81x *mors, struct mm81x_hw_scan_params *params,\ndrivers/net/wireless/morsemicro/mm81x/command.h-66-\t\t      bool store);\ndrivers/net/wireless/morsemicro/mm81x/command.h:67:int mm81x_cmd_set_ps(struct mm81x *mors, bool enabled);\ndrivers/net/wireless/morsemicro/mm81x/command.h:68:int mm81x_cmd_cfg_multicast_filter(struct mm81x *mors,\ndrivers/net/wireless/morsemicro/mm81x/command.h:69:\t\t\t\t   struct mm81x_vif *mors_vif);\ndrivers/net/wireless/morsemicro/mm81x/command.h:70:int mm81x_cmd_sta_state(struct mm81x *mors, struct mm81x_vif *mors_vif, u16 aid,\ndrivers/net/wireless/morsemicro/mm81x/command.h-71-\t\t\tstruct ieee80211_sta *sta,\ndrivers/net/wireless/morsemicro/mm81x/command.h-72-\t\t\tenum ieee80211_sta_state state);\ndrivers/net/wireless/morsemicro/mm81x/command.h:73:int mm81x_cmd_install_key(struct mm81x *mors, struct mm81x_vif *mors_vif,\ndrivers/net/wireless/morsemicro/mm81x/command.h-74-\t\t\t  u16 aid, struct ieee80211_key_conf *key,\n--\ndrivers/net/wireless/morsemicro/mm81x/command.h-76-\t\t\t  enum host_cmd_aes_key_len length);\ndrivers/net/wireless/morsemicro/mm81x/command.h:77:int mm81x_cmd_disable_key(struct mm81x *mors, struct mm81x_vif *mors_vif,\ndrivers/net/wireless/morsemicro/mm81x/command.h-78-\t\t\t  u16 aid, struct ieee80211_key_conf *key);\ndrivers/net/wireless/morsemicro/mm81x/command.h:79:int mm81x_cmd_rm_if(struct mm81x *mors, u16 vif_id);\ndrivers/net/wireless/morsemicro/mm81x/command.h:80:int mm81x_cmd_set_frag_threshold(struct mm81x *mors, u32 frag_threshold);\ndrivers/net/wireless/morsemicro/mm81x/command.h:81:int mm81x_cmd_get_disabled_channels(\ndrivers/net/wireless/morsemicro/mm81x/command.h:82:\tstruct mm81x *mors, struct host_cmd_resp_get_disabled_channels *resp,\ndrivers/net/wireless/morsemicro/mm81x/command.h-83-\tuint resp_len);\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-10-\ndrivers/net/wireless/morsemicro/mm81x/core.c:11:static int mm81x_core_attach_regs(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-12-{\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-14-\ndrivers/net/wireless/morsemicro/mm81x/core.c:15:\tmm81x_claim_bus(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c:16:\tret = mm81x_reg32_read(mors, MM8108_REG_CHIP_ID, \u0026mors-\u003echip_id);\ndrivers/net/wireless/morsemicro/mm81x/core.c:17:\tmm81x_release_bus(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-18-\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-26-\t\tmors-\u003eregs = \u0026mm8108_regs;\ndrivers/net/wireless/morsemicro/mm81x/core.c:27:\t\tmors-\u003ehif.ops = \u0026mm81x_yaps_ops;\ndrivers/net/wireless/morsemicro/mm81x/core.c-28-\t\tbreak;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-35-\ndrivers/net/wireless/morsemicro/mm81x/core.c:36:static void mm81x_core_init_mac_addr(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-37-{\ndrivers/net/wireless/morsemicro/mm81x/core.c:38:\tint ret = mm81x_hw_otp_get_mac_addr(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-39-\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-43-\ndrivers/net/wireless/morsemicro/mm81x/core.c:44:char *mm81x_core_get_fw_path(u32 chip_id, u32 fw_ver)\ndrivers/net/wireless/morsemicro/mm81x/core.c-45-{\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-58-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:59:EXPORT_SYMBOL_GPL(mm81x_core_get_fw_path);\ndrivers/net/wireless/morsemicro/mm81x/core.c-60-\ndrivers/net/wireless/morsemicro/mm81x/core.c:61:struct mm81x *mm81x_core_alloc(size_t priv_size, struct device *dev)\ndrivers/net/wireless/morsemicro/mm81x/core.c-62-{\ndrivers/net/wireless/morsemicro/mm81x/core.c:63:\treturn mm81x_mac_alloc(priv_size, dev);\ndrivers/net/wireless/morsemicro/mm81x/core.c-64-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:65:EXPORT_SYMBOL_GPL(mm81x_core_alloc);\ndrivers/net/wireless/morsemicro/mm81x/core.c-66-\ndrivers/net/wireless/morsemicro/mm81x/core.c:67:int mm81x_core_init(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-68-{\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-73-\ndrivers/net/wireless/morsemicro/mm81x/core.c:74:\tmm81x_core_init_mac_addr(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-75-\ndrivers/net/wireless/morsemicro/mm81x/core.c:76:\tret = mm81x_core_attach_regs(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-77-\tif (ret)\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-89-\ndrivers/net/wireless/morsemicro/mm81x/core.c:90:\tret = mm81x_hif_init(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-91-\tif (ret)\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-105-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:106:EXPORT_SYMBOL_GPL(mm81x_core_init);\ndrivers/net/wireless/morsemicro/mm81x/core.c-107-\ndrivers/net/wireless/morsemicro/mm81x/core.c:108:int mm81x_core_register(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-109-{\ndrivers/net/wireless/morsemicro/mm81x/core.c:110:\treturn mm81x_mac_register(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-111-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:112:EXPORT_SYMBOL_GPL(mm81x_core_register);\ndrivers/net/wireless/morsemicro/mm81x/core.c-113-\ndrivers/net/wireless/morsemicro/mm81x/core.c:114:void mm81x_core_unregister(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-115-{\ndrivers/net/wireless/morsemicro/mm81x/core.c:116:\tmm81x_mac_unregister(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-117-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:118:EXPORT_SYMBOL_GPL(mm81x_core_unregister);\ndrivers/net/wireless/morsemicro/mm81x/core.c-119-\ndrivers/net/wireless/morsemicro/mm81x/core.c:120:void mm81x_core_deinit(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-121-{\ndrivers/net/wireless/morsemicro/mm81x/core.c:122:\tmm81x_hif_finish(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-123-\tflush_workqueue(mors-\u003enet_wq);\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-127-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:128:EXPORT_SYMBOL_GPL(mm81x_core_deinit);\ndrivers/net/wireless/morsemicro/mm81x/core.c-129-\ndrivers/net/wireless/morsemicro/mm81x/core.c:130:void mm81x_core_free(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/core.c-131-{\ndrivers/net/wireless/morsemicro/mm81x/core.c:132:\tmm81x_mac_free(mors);\ndrivers/net/wireless/morsemicro/mm81x/core.c-133-}\ndrivers/net/wireless/morsemicro/mm81x/core.c:134:EXPORT_SYMBOL_GPL(mm81x_core_free);\ndrivers/net/wireless/morsemicro/mm81x/core.c-135-\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-54-\ndrivers/net/wireless/morsemicro/mm81x/core.h:55:struct mm81x_bus_ops;\ndrivers/net/wireless/morsemicro/mm81x/core.h:56:struct mm81x_hif_ops;\ndrivers/net/wireless/morsemicro/mm81x/core.h-57-\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-62-\ndrivers/net/wireless/morsemicro/mm81x/core.h:63:enum mm81x_caps_flags {\ndrivers/net/wireless/morsemicro/mm81x/core.h-64-\tMM81X_CAPS_FW_START = 0,\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-131-\ndrivers/net/wireless/morsemicro/mm81x/core.h:132:struct mm81x_fw_caps {\ndrivers/net/wireless/morsemicro/mm81x/core.h-133-\tu32 flags[FW_CAPABILITIES_FLAGS_WIDTH];\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-137-\tu8 maximum_ampdu_length_exponent;\ndrivers/net/wireless/morsemicro/mm81x/core.h:138:\tu8 mm81x_mmss_offset;\ndrivers/net/wireless/morsemicro/mm81x/core.h-139-};\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-141-#define MM81X_FW_SUPP(MM81X_CAPS, CAPABILITY) \\\ndrivers/net/wireless/morsemicro/mm81x/core.h:142:\tmm81x_caps_supported(MM81X_CAPS, MM81X_CAPS_##CAPABILITY)\ndrivers/net/wireless/morsemicro/mm81x/core.h-143-\ndrivers/net/wireless/morsemicro/mm81x/core.h:144:static inline bool mm81x_caps_supported(struct mm81x_fw_caps *caps,\ndrivers/net/wireless/morsemicro/mm81x/core.h:145:\t\t\t\t\tenum mm81x_caps_flags flag)\ndrivers/net/wireless/morsemicro/mm81x/core.h-146-{\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-151-\ndrivers/net/wireless/morsemicro/mm81x/core.h:152:struct mm81x_ps {\ndrivers/net/wireless/morsemicro/mm81x/core.h-153-\tu32 wakers;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-160-\ndrivers/net/wireless/morsemicro/mm81x/core.h:161:enum mm81x_page_aci {\ndrivers/net/wireless/morsemicro/mm81x/core.h-162-\tMM81X_ACI_BE = 0,\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-167-\ndrivers/net/wireless/morsemicro/mm81x/core.h:168:enum mm81x_qos_tid_up_index {\ndrivers/net/wireless/morsemicro/mm81x/core.h-169-\tMM81X_QOS_TID_UP_BK = 1,\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-181-\ndrivers/net/wireless/morsemicro/mm81x/core.h:182:struct mm81x_sw_version {\ndrivers/net/wireless/morsemicro/mm81x/core.h-183-\tu8 major;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-187-\ndrivers/net/wireless/morsemicro/mm81x/core.h:188:struct mm81x_sta {\ndrivers/net/wireless/morsemicro/mm81x/core.h-189-\tconst struct ieee80211_vif *vif;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-195-\tint max_bw_mhz;\ndrivers/net/wireless/morsemicro/mm81x/core.h:196:\tstruct mm81x_rc_sta rc;\ndrivers/net/wireless/morsemicro/mm81x/core.h-197-\tstruct mmrc_rate last_sta_tx_rate;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-201-\ndrivers/net/wireless/morsemicro/mm81x/core.h:202:struct mm81x_vif {\ndrivers/net/wireless/morsemicro/mm81x/core.h:203:\tstruct mm81x *mors;\ndrivers/net/wireless/morsemicro/mm81x/core.h-204-\tu16 id;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-216-\ndrivers/net/wireless/morsemicro/mm81x/core.h:217:struct mm81x_stale_tx_status {\ndrivers/net/wireless/morsemicro/mm81x/core.h-218-\t/* Stale Tx lock */\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h=223=struct mcast_filter {\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-232-\ndrivers/net/wireless/morsemicro/mm81x/core.h:233:enum mm81x_hw_scan_op {\ndrivers/net/wireless/morsemicro/mm81x/core.h-234-\tMM81X_HW_SCAN_OP_START,\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-237-\ndrivers/net/wireless/morsemicro/mm81x/core.h:238:struct mm81x_hw_scan_params {\ndrivers/net/wireless/morsemicro/mm81x/core.h-239-\tstruct ieee80211_hw *hw;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-245-\tu32 dwell_on_home_ms;\ndrivers/net/wireless/morsemicro/mm81x/core.h:246:\tenum mm81x_hw_scan_op operation;\ndrivers/net/wireless/morsemicro/mm81x/core.h-247-\tbool store;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-261-\ndrivers/net/wireless/morsemicro/mm81x/core.h:262:enum mm81x_hw_scan_state {\ndrivers/net/wireless/morsemicro/mm81x/core.h-263-\tHW_SCAN_STATE_IDLE,\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-267-\ndrivers/net/wireless/morsemicro/mm81x/core.h:268:struct mm81x_hw_scan {\ndrivers/net/wireless/morsemicro/mm81x/core.h:269:\tenum mm81x_hw_scan_state state;\ndrivers/net/wireless/morsemicro/mm81x/core.h-270-\tstruct completion scan_done;\ndrivers/net/wireless/morsemicro/mm81x/core.h:271:\tstruct mm81x_hw_scan_params *params;\ndrivers/net/wireless/morsemicro/mm81x/core.h-272-\tstruct delayed_work timeout;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-275-\ndrivers/net/wireless/morsemicro/mm81x/core.h:276:enum mm81x_hif_event_flags {\ndrivers/net/wireless/morsemicro/mm81x/core.h-277-\tMM81X_HIF_EVT_RX_PEND,\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-288-\ndrivers/net/wireless/morsemicro/mm81x/core.h:289:enum mm81x_state_flags {\ndrivers/net/wireless/morsemicro/mm81x/core.h-290-\tMM81X_STATE_CHIP_UNRESPONSIVE,\n--\n\n"
}

5/2 2026/09/10 21:28 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 18939
							output: 43
							thoughts: 95
						

Thoughts:
Here's my thought process, as I delve into this configuration:

**Investigating USB and SDIO Support within the mm81x Wireless Driver**

Okay, so I see `CONFIG_MM81X_USB` and `CONFIG_MM81X_SDIO` are the relevant configuration options. Time to dig in. I need to figure out the status of USB probing, specifically for the mm81x chipset. My initial target is the source code. I will check `drivers/net/wireless/morsemicro/mm81x/usb.c` and its associated `Kconfig` file. The `usb.c` file should contain the USB-specific driver code, and the `Kconfig` file should illuminate the configuration options and dependencies. I will use the `Kconfig` for the configuration flags for probing. By referencing both of these files, I can verify whether the module supports USB and ascertain how it’s configured to probe for USB devices. This should give me the complete picture, not just the code, but the intention. This will let me assess what’s going on, and identify if there is an issue to address in this configuration.



6/2 2026/09/10 21:28 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/Kconfig",
  "FirstLine": 1,
  "LineCount": 50
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: GPL-2.0\n   2:\t\n   3:\tconfig MM81X\n   4:\t\ttristate \"Morse Micro MM81x wireless devices\" if COMPILE_TEST\n   5:\t\tdepends on MAC80211\n   6:\t\tselect FW_LOADER\n   7:\t\tselect CRC7\n   8:\t\thelp\n   9:\t\t  This module adds support for wireless devices based\n  10:\t\t  on Morse Micro MM81xx chipsets.\n  11:\t\n  12:\tconfig MM81X_USB\n  13:\t\ttristate \"Morse Micro MM81x USB support\"\n  14:\t\tdepends on MAC80211 \u0026\u0026 USB\n  15:\t\tselect MM81X\n  16:\t\thelp\n  17:\t\t  This module adds support for the USB interface of\n  18:\t\t  devices using the Morse Micro MM81x chipset.\n  19:\t\n  20:\tconfig MM81X_SDIO\n  21:\t\ttristate \"Morse Micro MM81x SDIO support\"\n  22:\t\tdepends on MAC80211 \u0026\u0026 MMC\n  23:\t\tselect MM81X\n  24:\t\thelp\n  25:\t\t  This module adds support for the SDIO interface of\n  26:\t\t  devices using the Morse Micro MM81x chipset.\n"
}

7/2 2026/09/10 21:28 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 19675
							output: 37
							thoughts: 66
						

Thoughts:
Here's my take:

**USB Fuzzing, Let's Dive Deep**

Right, so `MM81X_USB` is *actually* a thing! Syzkaller is hammering away at USB drivers using Raw Gadget and USB emulation, which is fascinating. This means we've got a new avenue for uncovering those gnarly, hard-to-find bugs. Now, the next logical step for me is to understand how this `mm81x` wireless driver interfaces with USB. I'm heading straight for `drivers/net/wireless/morsemicro/mm81x/usb.c`. I need to see exactly how packets and YAPS are actually *reached* through this USB interface. Let's see how the magic happens and what kind of potential vulnerabilities we can sniff out.



8/2 2026/09/10 21:28 tool grepper
0m Args:
{
  "Expression": "yaps",
  "PathPrefix": "drivers/net/wireless/morsemicro/mm81x/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 880 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/morsemicro/mm81x/Makefile=11=mm81x_core-y += skbq.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:12:mm81x_core-y += yaps_hw.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile:13:mm81x_core-y += yaps.o\ndrivers/net/wireless/morsemicro/mm81x/Makefile-14-mm81x_core-y += rc.o\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c=11=static int mm81x_core_attach_regs(struct mm81x *mors)\n--\ndrivers/net/wireless/morsemicro/mm81x/core.c-26-\t\tmors-\u003eregs = \u0026mm8108_regs;\ndrivers/net/wireless/morsemicro/mm81x/core.c:27:\t\tmors-\u003ehif.ops = \u0026mm81x_yaps_ops;\ndrivers/net/wireless/morsemicro/mm81x/core.c-28-\t\tbreak;\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-18-#include \u003clinux/wait.h\u003e\ndrivers/net/wireless/morsemicro/mm81x/core.h:19:#include \"yaps.h\"\ndrivers/net/wireless/morsemicro/mm81x/core.h:20:#include \"yaps_hw.h\"\ndrivers/net/wireless/morsemicro/mm81x/core.h-21-#include \"hw.h\"\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h=303=struct mm81x {\n--\ndrivers/net/wireless/morsemicro/mm81x/core.h-347-\t\tunion {\ndrivers/net/wireless/morsemicro/mm81x/core.h:348:\t\t\tstruct mm81x_yaps yaps;\ndrivers/net/wireless/morsemicro/mm81x/core.h-349-\t\t} u;\n--\ndrivers/net/wireless/morsemicro/mm81x/fw.c=546=int mm81x_fw_parse_ext_host_tbl(struct mm81x *mors)\n--\ndrivers/net/wireless/morsemicro/mm81x/fw.c-578-\t\tcase MM81X_FW_HOST_TABLE_TAG_YAPS_TABLE:\ndrivers/net/wireless/morsemicro/mm81x/fw.c:579:\t\t\tmm81x_yaps_hw_read_table(\ndrivers/net/wireless/morsemicro/mm81x/fw.c:580:\t\t\t\tmors, \u0026((struct ext_host_tbl_yaps_table *)hdr)\ndrivers/net/wireless/morsemicro/mm81x/fw.c:581:\t\t\t\t\t       -\u003eyaps_table);\ndrivers/net/wireless/morsemicro/mm81x/fw.c-582-\t\t\tbreak;\n--\ndrivers/net/wireless/morsemicro/mm81x/fw.h-12-#include \"command_defs.h\"\ndrivers/net/wireless/morsemicro/mm81x/fw.h:13:#include \"yaps_hw.h\"\ndrivers/net/wireless/morsemicro/mm81x/fw.h-14-\n--\ndrivers/net/wireless/morsemicro/mm81x/fw.h=124=struct ext_host_tbl_insert_skb_checksum {\n--\ndrivers/net/wireless/morsemicro/mm81x/fw.h-128-\ndrivers/net/wireless/morsemicro/mm81x/fw.h:129:struct ext_host_tbl_yaps_table {\ndrivers/net/wireless/morsemicro/mm81x/fw.h-130-\tstruct ext_host_tbl_tlv_hdr header;\ndrivers/net/wireless/morsemicro/mm81x/fw.h:131:\tstruct mm81x_yaps_hw_table yaps_table;\ndrivers/net/wireless/morsemicro/mm81x/fw.h-132-} __packed;\n--\ndrivers/net/wireless/morsemicro/mm81x/hw.c-15-#include \"fw.h\"\ndrivers/net/wireless/morsemicro/mm81x/hw.c:16:#include \"yaps.h\"\ndrivers/net/wireless/morsemicro/mm81x/hw.c-17-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-22-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:23:static int mm81x_yaps_alloc_pkt_buffers(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-24-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:25:\tyaps-\u003ehw.to_chip_pkts = kcalloc(MAX_PKTS_PER_TX_TXN,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:26:\t\t\t\t\tsizeof(*yaps-\u003ehw.to_chip_pkts),\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-27-\t\t\t\t\tGFP_KERNEL);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:28:\tif (!yaps-\u003ehw.to_chip_pkts)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-29-\t\treturn -ENOMEM;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-30-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:31:\tyaps-\u003ehw.from_chip_pkts = kcalloc(MAX_PKTS_PER_RX_TXN,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:32:\t\t\t\t\t  sizeof(*yaps-\u003ehw.from_chip_pkts),\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-33-\t\t\t\t\t  GFP_KERNEL);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:34:\tif (!yaps-\u003ehw.from_chip_pkts) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:35:\t\tkfree(yaps-\u003ehw.to_chip_pkts);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:36:\t\tyaps-\u003ehw.to_chip_pkts = NULL;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-37-\t\treturn -ENOMEM;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-42-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:43:static void mm81x_yaps_free_pkt_buffers(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-44-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:45:\tkfree(yaps-\u003ehw.from_chip_pkts);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:46:\tyaps-\u003ehw.from_chip_pkts = NULL;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:47:\tkfree(yaps-\u003ehw.to_chip_pkts);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:48:\tyaps-\u003ehw.to_chip_pkts = NULL;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-49-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-50-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:51:static int mm81x_yaps_write_pkts(struct mm81x_yaps *yaps,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:52:\t\t\t\t struct mm81x_yaps_pkt *pkts, int num_pkts,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-53-\t\t\t\t int *num_pkts_sent)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-54-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:55:\treturn yaps-\u003eops-\u003ewrite_pkts(yaps, pkts, num_pkts, num_pkts_sent);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-56-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-57-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:58:static int mm81x_yaps_read_pkts(struct mm81x_yaps *yaps,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:59:\t\t\t\tstruct mm81x_yaps_pkt *pkts, int num_pkts_max,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-60-\t\t\t\tint *num_pkts_received)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-61-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:62:\treturn yaps-\u003eops-\u003eread_pkts(yaps, pkts, num_pkts_max,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-63-\t\t\t\t    num_pkts_received);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-65-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:66:static int mm81x_yaps_update_status(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-67-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:68:\treturn yaps-\u003eops-\u003eupdate_status(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-69-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-70-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:71:/* Mappings between sk_buff, skbq and yaps */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:72:static struct mm81x_skbq *mm81x_yaps_tc_q_from_aci(struct mm81x *mors, int aci)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-73-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:74:\tstruct mm81x_yaps *yaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-75-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:76:\tif (aci \u003e= ARRAY_SIZE(yaps-\u003edata_tx_qs))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-77-\t\treturn NULL;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:78:\treturn \u0026yaps-\u003edata_tx_qs[aci];\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-79-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-80-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:81:static void mm81x_yaps_get_tx_qs(struct mm81x *mors, struct mm81x_skbq **qs,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-82-\t\t\t\t int *num_qs)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-83-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:84:\t*qs = mors-\u003ehif.u.yaps.data_tx_qs;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-85-\t*num_qs = YAPS_TX_SKBQ_MAX;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-87-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:88:static struct mm81x_skbq *mm81x_yaps_get_bcn_tc_q(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-89-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:90:\treturn \u0026mors-\u003ehif.u.yaps.beacon_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-91-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-92-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:93:static struct mm81x_skbq *mm81x_yaps_get_mgmt_tc_q(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-94-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:95:\treturn \u0026mors-\u003ehif.u.yaps.mgmt_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-96-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-97-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:98:static struct mm81x_skbq *mm81x_yaps_get_tx_cmd_queue(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-99-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:100:\treturn \u0026mors-\u003ehif.u.yaps.cmd_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-101-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-102-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:103:static int mm81x_yaps_irq_handler(struct mm81x *mors, u32 status)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-104-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-108-\tif (status \u0026 BIT(MM81X_INT_YAPS_FC_PACKET_FREED_UP_IRQN)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:109:\t\ttimer_delete_sync_try(\u0026mors-\u003ehif.u.yaps.chip_queue_full.timer);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-110-\t\tset_bit(MM81X_HIF_EVT_TX_PACKET_FREED_UP_PEND,\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-117-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:118:const struct mm81x_hif_ops mm81x_yaps_ops = {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:119:\t.init = mm81x_yaps_init,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:120:\t.flush_tx_data = mm81x_yaps_flush_tx_data,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:121:\t.flush_cmds = mm81x_yaps_flush_cmds,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:122:\t.get_tx_status_pending_count = mm81x_yaps_get_tx_status_pending_count,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:123:\t.get_tx_buffered_count = mm81x_yaps_get_tx_buffered_count,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:124:\t.finish = mm81x_yaps_finish,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:125:\t.skbq_get_tx_qs = mm81x_yaps_get_tx_qs,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:126:\t.get_tx_beacon_queue = mm81x_yaps_get_bcn_tc_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:127:\t.get_tx_mgmt_queue = mm81x_yaps_get_mgmt_tc_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:128:\t.get_tx_cmd_queue = mm81x_yaps_get_tx_cmd_queue,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:129:\t.get_tx_data_queue = mm81x_yaps_tc_q_from_aci,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:130:\t.handle_irq = mm81x_yaps_irq_handler\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-131-};\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-132-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:133:static int mm81x_yaps_read_pkt(struct mm81x_yaps *yaps, struct sk_buff *skb)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-134-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:135:\tstruct mm81x *mors = yaps-\u003emors;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-136-\tstruct sk_buff_head skbq;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-157-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:158:\tif (yaps-\u003emors-\u003ehif.validate_skb_checksum \u0026\u0026\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-159-\t    !mm81x_skbq_validate_checksum(skb-\u003edata)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:160:\t\tdev_dbg(yaps-\u003emors-\u003edev,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-161-\t\t\t\"SKB checksum is invalid hdr:[c:%02X s:%02X len:%d]\",\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-176-\tcase MM81X_SKB_CHAN_MGMT:\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:177:\t\tmq = \u0026yaps-\u003edata_rx_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-178-\t\tbreak;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-179-\tcase MM81X_SKB_CHAN_COMMAND:\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:180:\t\tmq = \u0026yaps-\u003ecmd_resp_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-181-\t\tbreak;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-225-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:226:static int mm81x_yaps_tx(struct mm81x_yaps *yaps, struct mm81x_skbq *mq)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-227-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-237-\tstruct sk_buff *pfirst, *pnext;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:238:\tstruct mm81x *mors = yaps-\u003emors;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-239-\tstruct mm81x_skb_hdr *hdr;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-251-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:252:\tif (mq == \u0026yaps-\u003ecmd_q)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-253-\t\t/* Purge timed-out commands (this should not happen) */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-254-\t\tmm81x_skbq_purge(mq, \u0026mq-\u003epending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:255:\telse if (mq == \u0026yaps-\u003emgmt_q \u0026\u0026 skb_queue_len(\u0026mq-\u003eskbq) \u003e 0)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-256-\t\t/*\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-265-\tskb_queue_walk_safe(\u0026skbq_to_send, pfirst, pnext) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:266:\t\tenum mm81x_yaps_to_chip_q tc_queue;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-267-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-282-\t\t}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:283:\t\tyaps-\u003ehw.to_chip_pkts[tc_pkt_idx].tc_queue = tc_queue;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:284:\t\tyaps-\u003ehw.to_chip_pkts[tc_pkt_idx].skb = pfirst;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-285-\t\ttc_pkt_idx++;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-288-\t/* Send queued packets to chip */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:289:\tret = mm81x_yaps_update_status(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-290-\tif (ret)\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-292-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:293:\tret = mm81x_yaps_write_pkts(yaps, yaps-\u003ehw.to_chip_pkts, tc_pkt_idx,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-294-\t\t\t\t    \u0026num_pkts_sent);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-324-/* Returns true if there are TX data pages waiting to be sent */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:325:static bool mm81x_yaps_tx_data_handler(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-326-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-328-\tu32 count = 0;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:329:\tstruct mm81x *mors = yaps-\u003emors;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-330-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-331-\tfor (aci = MM81X_ACI_VO; aci \u003e= 0; aci--) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:332:\t\tstruct mm81x_skbq *data_q = mm81x_yaps_tc_q_from_aci(mors, aci);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-333-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-336-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:337:\t\tyaps-\u003echip_queue_full.is_full = mm81x_yaps_tx(yaps, data_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-338-\t\tcount += mm81x_skbq_count(data_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-339-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:340:\t\tif (yaps-\u003echip_queue_full.is_full)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-341-\t\t\tbreak;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-357-/* Returns true if there are commands waiting to be sent */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:358:static bool mm81x_yaps_tx_cmd_handler(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-359-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:360:\tstruct mm81x_skbq *cmd_q = \u0026yaps-\u003ecmd_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-361-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:362:\tmm81x_yaps_tx(yaps, cmd_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-363-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-366-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:367:static bool mm81x_yaps_tx_beacon_handler(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-368-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:369:\tstruct mm81x_skbq *beacon_q = \u0026yaps-\u003ebeacon_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-370-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:371:\tmm81x_yaps_tx(yaps, beacon_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-372-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-375-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:376:static bool mm81x_yaps_tx_mgmt_handler(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-377-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:378:\tstruct mm81x_skbq *mgmt_q = \u0026yaps-\u003emgmt_q;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-379-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:380:\tmm81x_yaps_tx(yaps, mgmt_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-381-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-385-/* Returns true if there are populated RX pages left in the device */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:386:static bool mm81x_yaps_rx_handler(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-387-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-391-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:392:\tret = mm81x_yaps_update_status(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-393-\tif (ret)\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-395-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:396:\tret = mm81x_yaps_read_pkts(yaps, yaps-\u003ehw.from_chip_pkts,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-397-\t\t\t\t   MAX_PKTS_PER_RX_TXN, \u0026num_pks_received);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-398-\tif (ret \u0026\u0026 ret != -EAGAIN) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:399:\t\tdev_err(yaps-\u003emors-\u003edev, \"YAPS read_pkts fail: %d\", ret);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-400-\t\tgoto exit;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-403-\tfor (i = 0; i \u003c num_pks_received; ++i) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:404:\t\tmm81x_yaps_read_pkt(yaps, yaps-\u003ehw.from_chip_pkts[i].skb);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:405:\t\tyaps-\u003ehw.from_chip_pkts[i].skb = NULL;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-406-\t}\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-414-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:415:void mm81x_yaps_stale_tx_work(struct work_struct *work)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-416-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-419-\tstruct mm81x *mors = container_of(work, struct mm81x, tx_stale_work);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:420:\tstruct mm81x_yaps *yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-421-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:422:\tyaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:423:\tflushed += mm81x_skbq_check_for_stale_tx(mors, \u0026yaps-\u003ebeacon_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:424:\tflushed += mm81x_skbq_check_for_stale_tx(mors, \u0026yaps-\u003emgmt_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-425-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:426:\tfor (i = 0; i \u003c ARRAY_SIZE(yaps-\u003edata_tx_qs); i++)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-427-\t\tflushed += mm81x_skbq_check_for_stale_tx(mors,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:428:\t\t\t\t\t\t\t \u0026yaps-\u003edata_tx_qs[i]);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-429-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-435-\tif (mors-\u003eps.enable \u0026\u0026 !mors-\u003eps.suspended \u0026\u0026\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:436:\t    (mm81x_yaps_get_tx_buffered_count(mors) == 0)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-437-\t\t/* Evaluate ps to check if it was gated on a stale tx status */\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-442-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:443:void mm81x_yaps_work(struct work_struct *work)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-444-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-446-\tunsigned long *flags = \u0026mors-\u003ehif.event_flags;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:447:\tstruct mm81x_yaps *yaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-448-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-464-\tif (test_and_clear_bit(MM81X_HIF_EVT_RX_PEND, flags)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:465:\t\tif (mm81x_yaps_rx_handler(yaps))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-466-\t\t\tset_bit(MM81X_HIF_EVT_RX_PEND, flags);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-470-\tif (test_and_clear_bit(MM81X_HIF_EVT_TX_COMMAND_PEND, flags)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:471:\t\tif (mm81x_yaps_tx_cmd_handler(yaps))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-472-\t\t\tset_bit(MM81X_HIF_EVT_TX_COMMAND_PEND, flags);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-476-\tif (test_and_clear_bit(MM81X_HIF_EVT_TX_BEACON_PEND, flags)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:477:\t\tif (mm81x_yaps_tx_beacon_handler(yaps))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-478-\t\t\tset_bit(MM81X_HIF_EVT_TX_BEACON_PEND, flags);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-482-\tif (test_and_clear_bit(MM81X_HIF_EVT_TX_MGMT_PEND, flags)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:483:\t\tif (mm81x_yaps_tx_mgmt_handler(yaps))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-484-\t\t\tset_bit(MM81X_HIF_EVT_TX_MGMT_PEND, flags);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-499-\tif (test_and_clear_bit(MM81X_HIF_EVT_TX_PACKET_FREED_UP_PEND, flags))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:500:\t\tyaps-\u003echip_queue_full.is_full = false;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-501-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-504-\t */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:505:\tif (yaps-\u003echip_queue_full.is_full \u0026\u0026\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:506:\t    time_before(jiffies, yaps-\u003echip_queue_full.retry_expiry))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-507-\t\tgoto exit;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-510-\tif (test_and_clear_bit(MM81X_HIF_EVT_TX_DATA_PEND, flags)) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:511:\t\tif (mm81x_yaps_tx_data_handler(yaps))\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-512-\t\t\tset_bit(MM81X_HIF_EVT_TX_DATA_PEND, flags);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-513-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:514:\t\tif (yaps-\u003echip_queue_full.is_full) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:515:\t\t\tyaps-\u003echip_queue_full.retry_expiry =\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-516-\t\t\t\tjiffies +\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-517-\t\t\t\tmsecs_to_jiffies(CHIP_FULL_RECOVERY_TIMEOUT_MS);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:518:\t\t\tmod_timer(\u0026yaps-\u003echip_queue_full.timer,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:519:\t\t\t\t  yaps-\u003echip_queue_full.retry_expiry);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-520-\t\t}\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-529-\t/* Don't requeue work if we are shutting down. */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:530:\tif (yaps-\u003efinish)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-531-\t\treturn;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-541-\t */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:542:\telse if (!yaps-\u003echip_queue_full.is_full \u0026\u0026 *flags)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-543-\t\tqueue_work(mors-\u003echip_wq, \u0026mors-\u003ehif_work);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-545-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:546:int mm81x_yaps_get_tx_status_pending_count(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-547-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-549-\tint count = 0;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:550:\tstruct mm81x_yaps *yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-551-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:552:\tyaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:553:\tcount += skb_queue_len(\u0026yaps-\u003ebeacon_q.pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:554:\tcount += skb_queue_len(\u0026yaps-\u003emgmt_q.pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:555:\tcount += skb_queue_len(\u0026yaps-\u003ecmd_q.pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-556-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:557:\tfor (i = 0; i \u003c ARRAY_SIZE(yaps-\u003edata_tx_qs); i++)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:558:\t\tcount += skb_queue_len(\u0026yaps-\u003edata_tx_qs[i].pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-559-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-562-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:563:int mm81x_yaps_get_tx_buffered_count(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-564-{\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-566-\tint count = 0;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:567:\tstruct mm81x_yaps *yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-568-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:569:\tyaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:570:\tcount += skb_queue_len(\u0026yaps-\u003ebeacon_q.skbq) +\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:571:\t\t skb_queue_len(\u0026yaps-\u003ebeacon_q.pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:572:\tcount += skb_queue_len(\u0026yaps-\u003emgmt_q.skbq) +\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:573:\t\t skb_queue_len(\u0026yaps-\u003emgmt_q.pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:574:\tcount += skb_queue_len(\u0026yaps-\u003ecmd_q.skbq) +\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:575:\t\t skb_queue_len(\u0026yaps-\u003ecmd_q.pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-576-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:577:\tfor (i = 0; i \u003c ARRAY_SIZE(yaps-\u003edata_tx_qs); i++)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:578:\t\tcount += mm81x_skbq_count_tx_ready(\u0026yaps-\u003edata_tx_qs[i]) +\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:579:\t\t\t skb_queue_len(\u0026yaps-\u003edata_tx_qs[i].pending);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-580-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-583-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:584:static void mm81x_yaps_tx_q_full_timer(struct timer_list *t)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-585-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:586:\tstruct mm81x_yaps *yaps =\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:587:\t\ttimer_container_of(yaps, t, chip_queue_full.timer);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-588-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:589:\tqueue_work(yaps-\u003emors-\u003echip_wq, \u0026yaps-\u003emors-\u003ehif_work);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-590-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-591-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:592:static void mm81x_yaps_q_chip_full_timer_init(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-593-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:594:\ttimer_setup(\u0026yaps-\u003echip_queue_full.timer, mm81x_yaps_tx_q_full_timer,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-595-\t\t    0);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-597-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:598:static void mm81x_yaps_q_chip_full_timer_finish(struct mm81x_yaps *yaps)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-599-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:600:\ttimer_shutdown_sync(\u0026yaps-\u003echip_queue_full.timer);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-601-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-602-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:603:int mm81x_yaps_init(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-604-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-605-\tint i, ret;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:606:\tstruct mm81x_yaps *yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-607-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:608:\tret = mm81x_yaps_hw_init(mors);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-609-\tif (ret) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:610:\t\tdev_err(mors-\u003edev, \"mm81x_yaps_hw_init failed %d\", ret);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-611-\t\treturn ret;\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-613-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:614:\tyaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:615:\tyaps-\u003emors = mors;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-616-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-618-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:619:\tret = mm81x_yaps_alloc_pkt_buffers(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-620-\tif (ret) {\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-622-\t\t\tret);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:623:\t\tmm81x_yaps_hw_finish(mors);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-624-\t\tmm81x_release_bus(mors);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-628-\t/* YAPS is bi-directional */\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:629:\tmm81x_skbq_init(mors, \u0026yaps-\u003edata_rx_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-630-\t\t\tMM81X_HIF_FLAGS_DATA | MM81X_HIF_FLAGS_DIR_TO_HOST);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:631:\tmm81x_skbq_init(mors, \u0026yaps-\u003ebeacon_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-632-\t\t\tMM81X_HIF_FLAGS_DATA | MM81X_HIF_FLAGS_DIR_TO_HOST);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:633:\tmm81x_skbq_init(mors, \u0026yaps-\u003emgmt_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-634-\t\t\tMM81X_HIF_FLAGS_DATA | MM81X_HIF_FLAGS_DIR_TO_HOST);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-635-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:636:\tfor (i = 0; i \u003c ARRAY_SIZE(yaps-\u003edata_tx_qs); i++) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:637:\t\tmm81x_skbq_init(mors, \u0026yaps-\u003edata_tx_qs[i],\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-638-\t\t\t\tMM81X_HIF_FLAGS_DATA |\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-641-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:642:\tmm81x_skbq_init(mors, \u0026yaps-\u003ecmd_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-643-\t\t\tMM81X_HIF_FLAGS_COMMAND | MM81X_HIF_FLAGS_DIR_TO_CHIP);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:644:\tmm81x_skbq_init(mors, \u0026yaps-\u003ecmd_resp_q,\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-645-\t\t\tMM81X_HIF_FLAGS_COMMAND | MM81X_HIF_FLAGS_DIR_TO_HOST);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-646-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:647:\tmm81x_yaps_q_chip_full_timer_init(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:648:\tINIT_WORK(\u0026mors-\u003ehif_work, mm81x_yaps_work);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:649:\tINIT_WORK(\u0026mors-\u003etx_stale_work, mm81x_yaps_stale_tx_work);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-650-\tmm81x_release_bus(mors);\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-654-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:655:void mm81x_yaps_finish(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-656-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-657-\tint i;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:658:\tstruct mm81x_yaps *yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-659-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:660:\tmm81x_yaps_hw_enable_irqs(mors, false);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-661-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:662:\tyaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:663:\tyaps-\u003efinish = true;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-664-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:665:\tmm81x_skbq_finish(\u0026yaps-\u003edata_rx_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:666:\tmm81x_skbq_finish(\u0026yaps-\u003ebeacon_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:667:\tmm81x_skbq_finish(\u0026yaps-\u003emgmt_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-668-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:669:\tfor (i = 0; i \u003c ARRAY_SIZE(yaps-\u003edata_tx_qs); i++)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:670:\t\tmm81x_skbq_finish(\u0026yaps-\u003edata_tx_qs[i]);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-671-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:672:\tmm81x_skbq_finish(\u0026yaps-\u003ecmd_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:673:\tmm81x_skbq_finish(\u0026yaps-\u003ecmd_resp_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-674-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:675:\tmm81x_yaps_q_chip_full_timer_finish(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-676-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-679-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:680:\tmm81x_yaps_free_pkt_buffers(yaps);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:681:\tmm81x_yaps_hw_finish(mors);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-682-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-683-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:684:void mm81x_yaps_flush_tx_data(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-685-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-686-\tint i;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:687:\tstruct mm81x_yaps *yaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-688-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:689:\tmm81x_skbq_tx_flush(\u0026yaps-\u003ebeacon_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:690:\tmm81x_skbq_tx_flush(\u0026yaps-\u003emgmt_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-691-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:692:\tfor (i = 0; i \u003c ARRAY_SIZE(yaps-\u003edata_tx_qs); i++)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:693:\t\tmm81x_skbq_tx_flush(\u0026yaps-\u003edata_tx_qs[i]);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-694-}\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-695-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:696:void mm81x_yaps_flush_cmds(struct mm81x *mors)\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-697-{\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:698:\tstruct mm81x_yaps *yaps = \u0026mors-\u003ehif.u.yaps;\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-699-\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:700:\tif (yaps-\u003eflags \u0026 MM81X_HIF_FLAGS_COMMAND) {\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:701:\t\tmm81x_skbq_finish(\u0026yaps-\u003ecmd_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c:702:\t\tmm81x_skbq_finish(\u0026yaps-\u003ecmd_resp_q);\ndrivers/net/wireless/morsemicro/mm81x/yaps.c-703-\t}\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.h=15=struct mm81x_hif_ops;\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:16:extern const struct mm81x_hif_ops mm81x_yaps_ops;\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-17-\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:18:enum mm81x_yaps_to_chip_q {\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-19-\tMM81X_YAPS_TX_Q = 0,\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-26-\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:27:struct mm81x_yaps_pkt {\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-28-\tstruct sk_buff *skb;\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:29:\tenum mm81x_yaps_to_chip_q tc_queue;\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-30-};\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-31-\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:32:struct mm81x_yaps {\ndrivers/net/wireless/morsemicro/mm81x/yaps.h-33-\tstruct mm81x *mors;\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:34:\tstruct mm81x_yaps_hw_aux_data *aux_data;\ndrivers/net/wireless/morsemicro/mm81x/yaps.h:35:\tconst struct mm81x_yaps_ops *ops;\n\n"
}

9/2 2026/09/10 21:28 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 36528
							output: 49
							thoughts: 56
						

Thoughts:
Here's my summary, as though I'm thinking through this process:

**Diving into the YAPS Hardware Code**

Okay, so I need to understand the control flow related to these packet reads within the YAPS hardware. The best place to start is definitely the source code for `yaps_hw.c`. I need to figure out how `mm81x_read_pkts_h_is_valid_delim` and `mm81x_yaps_hw_read_pkts` are being utilized. I'll need to locate where both functions are *defined*, so I can see their implementation, as well as where they are being *called*, so I can understand the execution paths that lead to their invocation. This will give me a clearer picture of how the read operations are being handled and what's validating the delimiters in the process. Time to fire up the editor and start tracing.



10/2 2026/09/10 21:28 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c",
  "FirstLine": 400,
  "LineCount": 80
}

Results:
{
  "Contents": " 400:\t\n 401:\tstatic bool mm81x_read_pkts_h_is_valid_delim(u32 delim)\n 402:\t{\n 403:\t\tu8 calc_crc = mm81x_yaps_hw_crc(delim);\n 404:\t\tint pkt_size = YAPS_DELIM_GET_PHANDLE_SIZE(delim);\n 405:\t\tint padding = YAPS_DELIM_GET_PADDING(delim);\n 406:\t\n 407:\t\tif (calc_crc != YAPS_DELIM_GET_CRC(delim))\n 408:\t\t\treturn false;\n 409:\t\n 410:\t\tif (pkt_size \u003c= YAPS_RESERVED_PAGE_SIZE)\n 411:\t\t\treturn false;\n 412:\t\n 413:\t\tif ((pkt_size + padding) \u003e YAPS_MAX_PKT_SIZE_BYTES)\n 414:\t\t\treturn false;\n 415:\t\n 416:\t\t/* Pkt length + padding should not require more padding */\n 417:\t\tif (YAPS_CALC_PADDING(pkt_size) != padding)\n 418:\t\t\treturn false;\n 419:\t\n 420:\t\treturn true;\n 421:\t}\n 422:\t\n 423:\tstatic int mm81x_read_pkts_h_bytes_remaining(struct mm81x_yaps *yaps)\n 424:\t{\n 425:\t\tu32 bytes_in_queue = yaps-\u003eaux_data-\u003estatus_regs.fc_rx_bytes_in_queue;\n 426:\t\tu32 delim_overhead =\n 427:\t\t\tyaps-\u003eaux_data-\u003estatus_regs.fc_num_pkts * sizeof(u32);\n 428:\t\tu32 reserved_bytes = yaps-\u003eaux_data-\u003estatus_regs.fc_num_pkts *\n 429:\t\t\t\t     yaps-\u003eaux_data-\u003ereserved_yaps_page_size;\n 430:\t\n 431:\t\tif (WARN_ON(bytes_in_queue \u003e INT_MAX) ||\n 432:\t\t    WARN_ON(delim_overhead \u003e INT_MAX) ||\n 433:\t\t    WARN_ON(reserved_bytes \u003e INT_MAX))\n 434:\t\t\treturn -EIO;\n 435:\t\n 436:\t\treturn (int)bytes_in_queue;\n 437:\t}\n 438:\t\n 439:\tstatic int mm81x_yaps_hw_read_pkts(struct mm81x_yaps *yaps,\n 440:\t\t\t\t\t   struct mm81x_yaps_pkt *pkts,\n 441:\t\t\t\t\t   int num_pkts_max, int *num_pkts_received)\n 442:\t{\n 443:\t\tint ret;\n 444:\t\tint i = 0;\n 445:\t\tchar *from_chip_buffer_aligned =\n 446:\t\t\tPTR_ALIGN(yaps-\u003eaux_data-\u003efrom_chip_buffer,\n 447:\t\t\t\t  mm81x_bus_get_alignment(yaps-\u003emors));\n 448:\t\tchar *read_ptr = from_chip_buffer_aligned;\n 449:\t\tint bytes_remaining = mm81x_read_pkts_h_bytes_remaining(yaps);\n 450:\t\tbool again = false;\n 451:\t\n 452:\t\t*num_pkts_received = 0;\n 453:\t\n 454:\t\tif (num_pkts_max == 0 || bytes_remaining == 0)\n 455:\t\t\treturn 0;\n 456:\t\tif (bytes_remaining \u003c 0)\n 457:\t\t\treturn bytes_remaining;\n 458:\t\tif (!IS_ALIGNED(bytes_remaining, sizeof(u32))) {\n 459:\t\t\tdev_warn(yaps-\u003emors-\u003edev, \"yaps truncated delimiter\");\n 460:\t\t\treturn -EIO;\n 461:\t\t}\n 462:\t\n 463:\t\tif (bytes_remaining \u003e YAPS_HW_WINDOW_SIZE_BYTES) {\n 464:\t\t\tbytes_remaining = YAPS_HW_WINDOW_SIZE_BYTES;\n 465:\t\t\tagain = true;\n 466:\t\t}\n 467:\t\n 468:\t\t/*\n 469:\t\t * This is more coarse-grained than it needs to be - once the data\n 470:\t\t * is read into a local buffer the lock can be released, however\n 471:\t\t * access to from_chip_buffer will need to be protected with its\n 472:\t\t * own lock\n 473:\t\t */\n 474:\t\tret = mm81x_yaps_hw_lock(yaps);\n 475:\t\tif (ret) {\n 476:\t\t\tdev_dbg(yaps-\u003emors-\u003edev, \"yaps lock failed %d\", ret);\n 477:\t\t\treturn ret;\n 478:\t\t}\n 479:\t\n"
}

11/2 2026/09/10 21:28 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 38163
							output: 49
							thoughts: 55
						

Thoughts:
Here's my thinking process:

**Diving into the `yaps_hw.c` Code**

Okay, I need to understand the control flow here, especially around how packet reading is handled. My primary interest is in the functions `mm81x_read_pkts_h_is_valid_delim` and `mm81x_yaps_hw_read_pkts`. I'm starting by mentally tracing where those functions are actually *used* within the `yaps_hw.c` file. I need to quickly identify their callers. Are they called in sequence? Are they only called from a single place, or multiple spots? Knowing the call graph will really help me understand how data flows through this module, and identify any potential bottlenecks or areas for optimization. I'm looking for the contexts, the calling parameters, everything. I want a solid mental model of how these packet reading functions fit into the larger YAPS hardware interaction scheme.



12/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c",
  "FirstLine": 480,
  "LineCount": 80
}

Results:
{
  "Contents": " 480:\t\t/* Read all available packets to the buffer */\n 481:\t\tret = mm81x_dm_read(yaps-\u003emors, yaps-\u003eaux_data-\u003eysl_addr,\n 482:\t\t\t\t    from_chip_buffer_aligned, bytes_remaining);\n 483:\t\n 484:\t\tif (ret)\n 485:\t\t\tgoto exit;\n 486:\t\n 487:\t\t/* Split serialised packets from buffer */\n 488:\t\twhile (i \u003c num_pkts_max \u0026\u0026 bytes_remaining \u003e 0) {\n 489:\t\t\tu32 delim;\n 490:\t\t\tint total_len;\n 491:\t\t\tint pkt_size;\n 492:\t\n 493:\t\t\tdelim = le32_to_cpu(*((__le32 *)read_ptr));\n 494:\t\t\tread_ptr += sizeof(delim);\n 495:\t\t\tbytes_remaining -= sizeof(delim);\n 496:\t\n 497:\t\t\t/* End of stream */\n 498:\t\t\tif (!delim)\n 499:\t\t\t\tbreak;\n 500:\t\n 501:\t\t\tif (!mm81x_read_pkts_h_is_valid_delim(delim)) {\n 502:\t\t\t\t/*\n 503:\t\t\t\t * This will start a hunt for a valid delimiter. Given\n 504:\t\t\t\t * the CRC is only 7 bit it's possible to find an\n 505:\t\t\t\t * invalid block with a valid delimiter, leading to\n 506:\t\t\t\t * desynchronisation.\n 507:\t\t\t\t */\n 508:\t\t\t\tdev_warn(yaps-\u003emors-\u003edev, \"yaps invalid delim\");\n 509:\t\t\t\tbreak;\n 510:\t\t\t}\n 511:\t\n 512:\t\t\t/* Total length in chip */\n 513:\t\t\tpkt_size = YAPS_DELIM_GET_PKT_SIZE(delim);\n 514:\t\t\ttotal_len = pkt_size + YAPS_DELIM_GET_PADDING(delim);\n 515:\t\n 516:\t\t\tif (pkts[i].skb)\n 517:\t\t\t\tdev_err(yaps-\u003emors-\u003edev, \"yaps packet leak\");\n 518:\t\n 519:\t\t\t/* SKB doesn't want padding */\n 520:\t\t\tpkts[i].skb = dev_alloc_skb(pkt_size);\n 521:\t\t\tif (!pkts[i].skb) {\n 522:\t\t\t\tret = -ENOMEM;\n 523:\t\t\t\tdev_err(yaps-\u003emors-\u003edev, \"yaps no mem for skb\");\n 524:\t\t\t\tgoto exit;\n 525:\t\t\t}\n 526:\t\t\tskb_put(pkts[i].skb, pkt_size);\n 527:\t\n 528:\t\t\tif (total_len \u003c= bytes_remaining) {\n 529:\t\t\t\tmemcpy(pkts[i].skb-\u003edata, read_ptr, pkt_size);\n 530:\t\t\t\tread_ptr += total_len;\n 531:\t\t\t\tbytes_remaining -= total_len;\n 532:\t\t\t} else {\n 533:\t\t\t\tconst int read_overhang_len =\n 534:\t\t\t\t\ttotal_len - bytes_remaining;\n 535:\t\t\t\tconst int pkt_overhang_len = pkt_size - bytes_remaining;\n 536:\t\n 537:\t\t\t\tmemcpy(pkts[i].skb-\u003edata, read_ptr, bytes_remaining);\n 538:\t\t\t\tread_ptr = from_chip_buffer_aligned;\n 539:\t\n 540:\t\t\t\tret = mm81x_dm_read(\n 541:\t\t\t\t\tyaps-\u003emors,\n 542:\t\t\t\t\t/* Offset by 4 to avoid retry logic */\n 543:\t\t\t\t\tyaps-\u003eaux_data-\u003eysl_addr + 4, read_ptr,\n 544:\t\t\t\t\tread_overhang_len);\n 545:\t\n 546:\t\t\t\tif (ret)\n 547:\t\t\t\t\tgoto exit;\n 548:\t\n 549:\t\t\t\tmemcpy(pkts[i].skb-\u003edata + bytes_remaining, read_ptr,\n 550:\t\t\t\t       pkt_overhang_len);\n 551:\t\t\t\tread_ptr += read_overhang_len;\n 552:\t\t\t\tbytes_remaining = 0;\n 553:\t\t\t}\n 554:\t\n 555:\t\t\t*num_pkts_received += 1;\n 556:\t\t\ti++;\n 557:\t\t}\n 558:\t\n 559:\t\tif (again)\n"
}

13/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 39678
							output: 49
							thoughts: 54
						

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

**Analyzing `yaps_hw_read_pkts` in `yaps_hw.c`**

Okay, I need to understand the connection of `mm81x_yaps_hw_read_pkts` within the `yaps_hw.c` module. I'm going to jump straight into the code, and focus on lines 550 through 600. That's usually a good range to start with for core function calls and initialization routines. Hopefully, the linking is clear and the surrounding context provides sufficient clues. Let's see what we've got.



14/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c",
  "FirstLine": 560,
  "LineCount": 60
}

Results:
{
  "Contents": " 560:\t\t\tret = -EAGAIN;\n 561:\t\n 562:\texit:\n 563:\t\tmm81x_yaps_hw_unlock(yaps);\n 564:\t\treturn ret;\n 565:\t}\n 566:\t\n 567:\tstatic int mm81x_yaps_hw_update_status(struct mm81x_yaps *yaps)\n 568:\t{\n 569:\t\tint ret;\n 570:\t\tint tc_total_pkt_count;\n 571:\t\tunsigned long reg_read_timeout;\n 572:\t\tstruct mm81x_yaps_status_regs *r = \u0026yaps-\u003eaux_data-\u003estatus_regs;\n 573:\t\tstruct mm81x_yaps_hw_status_regs *hw_r = \u0026yaps-\u003eaux_data-\u003ehw_status_regs;\n 574:\t\n 575:\t\tret = mm81x_yaps_hw_lock(yaps);\n 576:\t\tif (ret) {\n 577:\t\t\tdev_dbg(yaps-\u003emors-\u003edev, \"yaps lock failed %d\", ret);\n 578:\t\t\treturn ret;\n 579:\t\t}\n 580:\t\n 581:\t\treg_read_timeout = jiffies + msecs_to_jiffies(100);\n 582:\t\tdo {\n 583:\t\t\tif (time_after(jiffies, reg_read_timeout)) {\n 584:\t\t\t\tdev_err(yaps-\u003emors-\u003edev,\n 585:\t\t\t\t\t\"timed out reading status registers: %d\", ret);\n 586:\t\t\t\tret = -ETIMEDOUT;\n 587:\t\t\t\tbreak;\n 588:\t\t\t}\n 589:\t\n 590:\t\t\tret = mm81x_dm_read(yaps-\u003emors,\n 591:\t\t\t\t\t    yaps-\u003eaux_data-\u003estatus_regs_addr,\n 592:\t\t\t\t\t    (u8 *)hw_r, sizeof(*hw_r));\n 593:\t\t} while (!ret \u0026\u0026 le32_to_cpu(hw_r-\u003elock));\n 594:\t\n 595:\t\tif (ret) {\n 596:\t\t\tif (ret != -ENODEV) {\n 597:\t\t\t\tdev_err(yaps-\u003emors-\u003edev,\n 598:\t\t\t\t\t\"error reading yaps status registers: %d\", ret);\n 599:\t\t\t}\n 600:\t\t\tgoto exit_unlock;\n 601:\t\t}\n 602:\t\n 603:\t\tr-\u003etc_tx_pool_num_pages = le32_to_cpu(hw_r-\u003etc_tx_pool_num_pages);\n 604:\t\tr-\u003etc_cmd_pool_num_pages = le32_to_cpu(hw_r-\u003etc_cmd_pool_num_pages);\n 605:\t\tr-\u003etc_beacon_pool_num_pages = le32_to_cpu(hw_r-\u003etc_beacon_pool_num_pages);\n 606:\t\tr-\u003etc_mgmt_pool_num_pages = le32_to_cpu(hw_r-\u003etc_mgmt_pool_num_pages);\n 607:\t\tr-\u003efc_rx_pool_num_pages = le32_to_cpu(hw_r-\u003efc_rx_pool_num_pages);\n 608:\t\tr-\u003efc_resp_pool_num_pages = le32_to_cpu(hw_r-\u003efc_resp_pool_num_pages);\n 609:\t\tr-\u003efc_tx_sts_pool_num_pages = le32_to_cpu(hw_r-\u003efc_tx_sts_pool_num_pages);\n 610:\t\tr-\u003efc_aux_pool_num_pages = le32_to_cpu(hw_r-\u003efc_aux_pool_num_pages);\n 611:\t\tr-\u003etc_tx_num_pkts = le32_to_cpu(hw_r-\u003etc_tx_num_pkts);\n 612:\t\tr-\u003etc_cmd_num_pkts = le32_to_cpu(hw_r-\u003etc_cmd_num_pkts);\n 613:\t\tr-\u003etc_beacon_num_pkts = le32_to_cpu(hw_r-\u003etc_beacon_num_pkts);\n 614:\t\tr-\u003etc_mgmt_num_pkts = le32_to_cpu(hw_r-\u003etc_mgmt_num_pkts);\n 615:\t\tr-\u003efc_num_pkts = le32_to_cpu(hw_r-\u003efc_num_pkts);\n 616:\t\tr-\u003efc_done_num_pkts = le32_to_cpu(hw_r-\u003efc_done_num_pkts);\n 617:\t\tr-\u003efc_rx_bytes_in_queue = le32_to_cpu(hw_r-\u003efc_rx_bytes_in_queue);\n 618:\t\tr-\u003etc_delim_crc_fail_detected = le32_to_cpu(hw_r-\u003etc_delim_crc_fail_detected);\n 619:\t\tr-\u003elock = le32_to_cpu(hw_r-\u003elock);\n"
}

15/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 41282
							output: 49
							thoughts: 41
						

Thoughts:
Okay, let's dive into this code. I need to understand how this `mm81x_yaps_hw_read_pkts` function fits into the bigger picture, so my first step is to trace where it's being assigned to `ops`. That's the crucial link. I'll need to go through `yaps_hw.c` and figure out where this function is being assigned, this `ops` structure. This is where the core logic will be revealed. I'm looking for the instantiation, I need to understand what this `ops` variable signifies, and what other functions are included in it.



16/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c",
  "FirstLine": 660,
  "LineCount": 40
}

Results:
{
  "Contents": " 660:\t\tif (!yaps-\u003eaux_data) {\n 661:\t\t\tret = -ENOMEM;\n 662:\t\t\tgoto err_exit;\n 663:\t\t}\n 664:\t\n 665:\t\tyaps-\u003eaux_data-\u003eto_chip_buffer =\n 666:\t\t\tkzalloc(YAPS_HW_WINDOW_SIZE_BYTES + alignment - 1, GFP_KERNEL);\n 667:\t\tif (!yaps-\u003eaux_data-\u003eto_chip_buffer) {\n 668:\t\t\tret = -ENOMEM;\n 669:\t\t\tgoto err_exit;\n 670:\t\t}\n 671:\t\n 672:\t\tyaps-\u003eaux_data-\u003efrom_chip_buffer =\n 673:\t\t\tkzalloc(YAPS_HW_WINDOW_SIZE_BYTES + alignment - 1, GFP_KERNEL);\n 674:\t\tif (!yaps-\u003eaux_data-\u003efrom_chip_buffer) {\n 675:\t\t\tret = -ENOMEM;\n 676:\t\t\tgoto err_exit;\n 677:\t\t}\n 678:\t\n 679:\t\tif (!IS_ALIGNED((uintptr_t)\u0026yaps-\u003eaux_data-\u003estatus_regs, alignment)) {\n 680:\t\t\tdev_warn(mors-\u003edev,\n 681:\t\t\t\t \"Status registers are not aligned to %d bytes\",\n 682:\t\t\t\t alignment);\n 683:\t\t}\n 684:\t\n 685:\t\tyaps-\u003eops = \u0026mm81x_yaps_hw_ops;\n 686:\t\treturn ret;\n 687:\t\n 688:\terr_exit:\n 689:\t\tmm81x_yaps_hw_finish(mors);\n 690:\t\treturn ret;\n 691:\t}\n 692:\t\n 693:\tvoid mm81x_yaps_hw_finish(struct mm81x *mors)\n 694:\t{\n 695:\t\tstruct mm81x_yaps *yaps;\n 696:\t\n 697:\t\tyaps = \u0026mors-\u003ehif.u.yaps;\n 698:\t\tif (yaps-\u003eaux_data) {\n 699:\t\t\tkfree(yaps-\u003eaux_data-\u003efrom_chip_buffer);\n"
}

17/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 42121
							output: 46
							thoughts: 45
						

Thoughts:
Here's my take on those thoughts:

**Analyzing the `mm81x_yaps_hw_ops` Structure**

Okay, so I'm looking at this `mm81x_yaps_hw_ops` thing... Immediately, my thought is, let's track this down. I need to understand what this structure is and how it's used. Since it's likely a hardware operations structure, and it has "yaps_hw" in the name, my instinct is to jump right into the `yaps_hw.c` file. Searching for that symbol there is probably the best starting point. Let's see what that reveals.



18/2 2026/09/10 21:29 tool grepper
0m Args:
{
  "Expression": "mm81x_yaps_hw_ops",
  "PathPrefix": "drivers/net/wireless/morsemicro/mm81x/"
}

Results:
{
  "Output": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c=567=static int mm81x_yaps_hw_update_status(struct mm81x_yaps *yaps)\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-644-\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c:645:static const struct mm81x_yaps_ops mm81x_yaps_hw_ops = {\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-646-\t.write_pkts = mm81x_yaps_hw_write_pkts,\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c=651=int mm81x_yaps_hw_init(struct mm81x *mors)\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-684-\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c:685:\tyaps-\u003eops = \u0026mm81x_yaps_hw_ops;\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-686-\treturn ret;\n"
}

19/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 42709
							output: 45
							thoughts: 39
						

Thoughts:
Okay, let's dive into this. I need to refresh my memory on the `mm81x` USB probing process. Time to pull up the source code – specifically, `drivers/net/wireless/morsemicro/mm81x/usb.c`. I'm hoping to get a clearer picture of how the driver handles USB device initialization and detection within that particular module. I want to see how the kernel interacts with the hardware, the sequence of events, and any quirks specific to this `mm81x` implementation. Let's see what secrets it holds!



20/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/usb.c",
  "FirstLine": 1,
  "LineCount": 100
}

Results:
{
  "Contents": "   1:\t// SPDX-License-Identifier: GPL-2.0-only\n   2:\t/*\n   3:\t * Copyright (c) 2017-2026 Morse Micro\n   4:\t */\n   5:\t#include \u003clinux/jiffies.h\u003e\n   6:\t#include \u003clinux/module.h\u003e\n   7:\t#include \u003clinux/usb.h\u003e\n   8:\t#include \"hif.h\"\n   9:\t#include \"bus.h\"\n  10:\t#include \"mac.h\"\n  11:\t#include \"core.h\"\n  12:\t\n  13:\t/*\n  14:\t * URB timeout in milliseconds. If an URB does not complete within this\n  15:\t * time, it will be killed. This timeout needs to account for USB suspendand\n  16:\t * resume occurring before the URB can be transferred, and it also needs to\n  17:\t * account for transferring USB_MAX_TRANSFER_SIZE bytes over a potentially\n  18:\t * slow, congested USB Full Speed link.\n  19:\t */\n  20:\t#define URB_TIMEOUT_MS 250\n  21:\t\n  22:\t/* High speed USB 2^(4-1) * 125usec = 1msec */\n  23:\t#define MM81X_USB_INTERRUPT_INTERVAL 4\n  24:\t\n  25:\t/* Max bytes per USB read/write */\n  26:\t#define USB_MAX_TRANSFER_SIZE (16 * 1024)\n  27:\t\n  28:\t/* INT EP buffer size */\n  29:\t#define MM81X_EP_INT_BUFFER_SIZE 8\n  30:\t\n  31:\t/* Morse vendor IDs*/\n  32:\t#define MM81X_VENDOR_ID 0x325b\n  33:\t#define MM81X_MM810X_PRODUCT_ID 0x8100\n  34:\t\n  35:\t/* Power management runtime auto-suspend delay value in milliseconds */\n  36:\t#define PM_RUNTIME_AUTOSUSPEND_DELAY_MS 100\n  37:\t\n  38:\tenum mm81x_usb_endpoints {\n  39:\t\tMM81X_EP_CMD = 0,\n  40:\t\tMM81X_EP_INT,\n  41:\t\tMM81X_EP_MEM_RD,\n  42:\t\tMM81X_EP_MEM_WR,\n  43:\t\tMM81X_EP_REG_RD,\n  44:\t\tMM81X_EP_REG_WR,\n  45:\t\tMM81X_EP_EP_MAX,\n  46:\t};\n  47:\t\n  48:\tstruct mm81x_usb_endpoint {\n  49:\t\tunsigned char *buffer;\n  50:\t\tstruct urb *urb;\n  51:\t\t__u8 addr;\n  52:\t\tint size;\n  53:\t};\n  54:\t\n  55:\tenum mm81x_usb_flags { MM81X_USB_FLAG_ATTACHED, MM81X_USB_FLAG_SUSPENDED };\n  56:\t\n  57:\tstruct mm81x_usb {\n  58:\t\tstruct usb_device *udev;\n  59:\t\tstruct usb_interface *interface;\n  60:\t\tstruct mm81x_usb_endpoint endpoints[MM81X_EP_EP_MAX];\n  61:\t\tint errors;\n  62:\t\n  63:\t\t/* serialise USB device struct */\n  64:\t\tstruct mutex lock;\n  65:\t\n  66:\t\t/* serialise USB bus access */\n  67:\t\tstruct mutex bus_lock;\n  68:\t\n  69:\t\tbool ongoing_cmd;\n  70:\t\tbool ongoing_rw;\n  71:\t\twait_queue_head_t rw_in_wait;\n  72:\t\tunsigned long flags;\n  73:\t};\n  74:\t\n  75:\tenum mm81x_usb_command_direction {\n  76:\t\tMM81X_USB_WRITE = 0x00,\n  77:\t\tMM81X_USB_READ = 0x80,\n  78:\t\tMM81X_USB_RESET = 0x02,\n  79:\t};\n  80:\t\n  81:\tstruct mm81x_usb_command {\n  82:\t\t__le32 dir; /* Next BULK direction */\n  83:\t\t__le32 address; /* Next BULK address */\n  84:\t\t__le32 length; /* Next BULK size */\n  85:\t};\n  86:\t\n  87:\tstatic const struct usb_device_id mm81x_usb_table[] = {\n  88:\t\t{ USB_DEVICE(MM81X_VENDOR_ID, MM81X_MM810X_PRODUCT_ID) },\n  89:\t\t{} /* Terminating entry */\n  90:\t};\n  91:\t\n  92:\tMODULE_DEVICE_TABLE(usb, mm81x_usb_table);\n  93:\t\n  94:\tstatic void mm81x_usb_irq_work(struct work_struct *work)\n  95:\t{\n  96:\t\tstruct mm81x *mors = container_of(work, struct mm81x, usb_irq_work);\n  97:\t\n  98:\t\tmm81x_claim_bus(mors);\n  99:\t\tmm81x_hw_irq_handle(mors);\n 100:\t\tmm81x_release_bus(mors);\n"
}

21/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 44381
							output: 47
							thoughts: 23
						

Thoughts:
Here's my take on the thought process, as if it were my own:

**Diving into the USB Kernel Code**

Okay, so I need to get a handle on this USB issue. First things first, let's zero in on the `usb.c` file. Specifically, I need to understand how the probing mechanism is working. I'll start by checking out the probe function implementation. From there, I'll keep digging deeper within `usb.c` to see how it interacts with the rest of the USB subsystem and where the issue may lay.



22/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/usb.c",
  "FirstLine": 400,
  "LineCount": 100
}

Results:
{
  "Contents": " 400:\t\n 401:\t\tmutex_lock(\u0026musb-\u003elock);\n 402:\t\n 403:\t\tmusb-\u003eongoing_rw = true;\n 404:\t\tmusb-\u003eerrors = 0;\n 405:\t\n 406:\t\t/* Send command ahead to prepare for Tokens */\n 407:\t\tcmd.dir = cpu_to_le32(MM81X_USB_WRITE);\n 408:\t\tcmd.address = cpu_to_le32(address);\n 409:\t\tcmd.length = cpu_to_le32(size);\n 410:\t\tret = mm81x_usb_cmd(musb, \u0026cmd);\n 411:\t\tif (ret \u003c 0) {\n 412:\t\t\tdev_err(mors-\u003edev, \"mm81x_usb_mem_read error %d\", ret);\n 413:\t\t\tgoto error;\n 414:\t\t}\n 415:\t\n 416:\t\tmemcpy(musb-\u003eendpoints[MM81X_EP_MEM_WR].buffer, data, size);\n 417:\t\n 418:\t\t/* prepare a read */\n 419:\t\tusb_fill_bulk_urb(\n 420:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].urb, musb-\u003eudev,\n 421:\t\t\tusb_sndbulkpipe(musb-\u003eudev,\n 422:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].addr),\n 423:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].buffer, size,\n 424:\t\t\tmm81x_usb_mem_rw_callback, mors);\n 425:\t\n 426:\t\tret = usb_submit_urb(musb-\u003eendpoints[MM81X_EP_MEM_WR].urb, GFP_ATOMIC);\n 427:\t\tif (ret \u003c 0) {\n 428:\t\t\tdev_err(mors-\u003edev, \"- failed submitting write urb, error %d\",\n 429:\t\t\t\tret);\n 430:\t\t\tret = (ret == -ENOMEM) ? ret : -EIO;\n 431:\t\t\tgoto error;\n 432:\t\t}\n 433:\t\n 434:\t\tret = wait_event_interruptible_timeout(\n 435:\t\t\tmusb-\u003erw_in_wait, (!musb-\u003eongoing_rw),\n 436:\t\t\tmsecs_to_jiffies(URB_TIMEOUT_MS));\n 437:\t\tif (ret \u003c 0) {\n 438:\t\t\tdev_err(mors-\u003edev, \"error %d\", ret);\n 439:\t\t\tgoto error;\n 440:\t\t} else if (ret == 0) {\n 441:\t\t\t/* Timed out. */\n 442:\t\t\tusb_kill_urb(musb-\u003eendpoints[MM81X_EP_MEM_WR].urb);\n 443:\t\t}\n 444:\t\n 445:\t\tif (musb-\u003eerrors) {\n 446:\t\t\tret = musb-\u003eerrors;\n 447:\t\t\tdev_err(mors-\u003edev, \"error %d\", ret);\n 448:\t\t\tgoto error;\n 449:\t\t}\n 450:\t\n 451:\t\tret = size;\n 452:\t\n 453:\terror:\n 454:\t\tmusb-\u003eongoing_rw = false;\n 455:\t\tmutex_unlock(\u0026musb-\u003elock);\n 456:\t\treturn ret;\n 457:\t}\n 458:\t\n 459:\tstatic int mm81x_usb_dm_read(struct mm81x *mors, u32 address, u8 *data, int len)\n 460:\t{\n 461:\t\tssize_t offset = 0;\n 462:\t\tint ret;\n 463:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 464:\t\n 465:\t\twhile (offset \u003c len) {\n 466:\t\t\tret = mm81x_usb_mem_read(musb, address + offset,\n 467:\t\t\t\t\t\t (u8 *)(data + offset),\n 468:\t\t\t\t\t\t min((ssize_t)(len - offset),\n 469:\t\t\t\t\t\t     (ssize_t)USB_MAX_TRANSFER_SIZE));\n 470:\t\t\tif (ret \u003c 0) {\n 471:\t\t\t\tdev_err(mors-\u003edev, \"%s failed (errno=%d)\", __func__,\n 472:\t\t\t\t\tret);\n 473:\t\t\t\treturn ret;\n 474:\t\t\t}\n 475:\t\n 476:\t\t\toffset += ret;\n 477:\t\t}\n 478:\t\n 479:\t\treturn 0;\n 480:\t}\n 481:\t\n 482:\tstatic int mm81x_usb_dm_write(struct mm81x *mors, u32 address, const u8 *data,\n 483:\t\t\t\t      int len)\n 484:\t{\n 485:\t\tssize_t offset = 0;\n 486:\t\tint ret;\n 487:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 488:\t\n 489:\t\twhile (offset \u003c len) {\n 490:\t\t\tret = mm81x_usb_mem_write(musb, address + offset,\n 491:\t\t\t\t\t\t  (u8 *)(data + offset),\n 492:\t\t\t\t\t\t  min((ssize_t)(len - offset),\n 493:\t\t\t\t\t\t      (ssize_t)USB_MAX_TRANSFER_SIZE));\n 494:\t\t\tif (ret \u003c 0) {\n 495:\t\t\t\tdev_err(mors-\u003edev, \"%s failed (errno=%d)\", __func__,\n 496:\t\t\t\t\tret);\n 497:\t\t\t\treturn ret;\n 498:\t\t\t}\n 499:\t\n"
}

23/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 46157
							output: 47
							thoughts: 27
						

Thoughts:
Here's my take on the probe function, specifically lines 500-600 in `usb.c`.

**Diving into the `usb.c` Probe Function**

Okay, let's zero in on the probe function, that crucial piece in `usb.c`. I need to refresh my memory on how this particular USB driver handles device detection and initialization. Alright, lines 500 through 600, that should give me a good chunk of the setup logic. I'm looking for how it interacts with the USB core, how it identifies the specific device, and any initial resource allocation. I'm particularly interested in any vendor/product ID checks, and how it handles different USB configurations – that's often where the subtle bugs or performance bottlenecks like to hide. Let's see if there's any cleverness in handling quirks or compatibility issues with older hardware... I'll be keeping an eye out for potential race conditions or locking issues, especially if there's any interaction with interrupt handlers. I'm going to scan for any calls to `usb_alloc_coherent` or similar memory management functions, since that's often a source of contention if not done correctly. Let's get reading!



24/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/usb.c",
  "FirstLine": 500,
  "LineCount": 100
}

Results:
{
  "Contents": " 500:\t\t\toffset += ret;\n 501:\t\t}\n 502:\t\n 503:\t\treturn 0;\n 504:\t}\n 505:\t\n 506:\tstatic int mm81x_usb_reg32_read(struct mm81x *mors, u32 address, u32 *val)\n 507:\t{\n 508:\t\tint ret = 0;\n 509:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 510:\t\n 511:\t\tret = mm81x_usb_mem_read(musb, address, (u8 *)val, sizeof(*val));\n 512:\t\tif (ret == sizeof(*val)) {\n 513:\t\t\t*val = le32_to_cpup((__le32 *)val);\n 514:\t\t\treturn 0;\n 515:\t\t}\n 516:\t\n 517:\t\tdev_err(mors-\u003edev, \"usb reg32 read failed %d\", ret);\n 518:\t\treturn ret;\n 519:\t}\n 520:\t\n 521:\tstatic int mm81x_usb_reg32_write(struct mm81x *mors, u32 address, u32 val)\n 522:\t{\n 523:\t\tint ret = 0;\n 524:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 525:\t\t__le32 val_le = cpu_to_le32(val);\n 526:\t\n 527:\t\tret = mm81x_usb_mem_write(musb, address, (u8 *)\u0026val_le, sizeof(val_le));\n 528:\t\tif (ret == sizeof(val_le))\n 529:\t\t\treturn 0;\n 530:\t\n 531:\t\tdev_err(mors-\u003edev, \"usb reg32 write failed %d\", ret);\n 532:\t\treturn ret;\n 533:\t}\n 534:\t\n 535:\tstatic void mm81x_usb_bus_enable(struct mm81x *mors, bool enable)\n 536:\t{\n 537:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 538:\t\n 539:\t\tif (enable)\n 540:\t\t\tusb_autopm_get_interface(musb-\u003einterface);\n 541:\t\telse\n 542:\t\t\tusb_autopm_put_interface(musb-\u003einterface);\n 543:\t}\n 544:\t\n 545:\tstatic void mm81x_usb_claim_bus(struct mm81x *mors)\n 546:\t{\n 547:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 548:\t\n 549:\t\tmutex_lock(\u0026musb-\u003ebus_lock);\n 550:\t}\n 551:\t\n 552:\tstatic void mm81x_usb_release_bus(struct mm81x *mors)\n 553:\t{\n 554:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 555:\t\n 556:\t\tmutex_unlock(\u0026musb-\u003ebus_lock);\n 557:\t}\n 558:\t\n 559:\tstatic void mm81x_usb_set_irq(struct mm81x *mors, bool enable)\n 560:\t{\n 561:\t}\n 562:\t\n 563:\tstatic const struct mm81x_bus_ops mm81x_usb_ops = {\n 564:\t\t.dm_read = mm81x_usb_dm_read,\n 565:\t\t.dm_write = mm81x_usb_dm_write,\n 566:\t\t.reg32_read = mm81x_usb_reg32_read,\n 567:\t\t.reg32_write = mm81x_usb_reg32_write,\n 568:\t\t.digital_reset = mm81x_usb_ndr_reset,\n 569:\t\t.set_bus_enable = mm81x_usb_bus_enable,\n 570:\t\t.claim = mm81x_usb_claim_bus,\n 571:\t\t.release = mm81x_usb_release_bus,\n 572:\t\t.set_irq = mm81x_usb_set_irq,\n 573:\t\t.bulk_alignment = MM81X_BUS_DEFAULT_BULK_ALIGNMENT,\n 574:\t};\n 575:\t\n 576:\tstatic int mm81x_usb_detect_endpoints(struct mm81x *mors,\n 577:\t\t\t\t\t      const struct usb_interface *intf)\n 578:\t{\n 579:\t\tint ret;\n 580:\t\tunsigned int i;\n 581:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 582:\t\tstruct usb_endpoint_descriptor *ep_desc;\n 583:\t\tstruct usb_host_interface *intf_desc = intf-\u003ecur_altsetting;\n 584:\t\n 585:\t\tfor (i = 0; i \u003c intf_desc-\u003edesc.bNumEndpoints; i++) {\n 586:\t\t\tep_desc = \u0026intf_desc-\u003eendpoint[i].desc;\n 587:\t\n 588:\t\t\tif (usb_endpoint_is_bulk_in(ep_desc)) {\n 589:\t\t\t\tif (!musb-\u003eendpoints[MM81X_EP_MEM_RD].addr) {\n 590:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].addr =\n 591:\t\t\t\t\t\tusb_endpoint_num(ep_desc);\n 592:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].size =\n 593:\t\t\t\t\t\tusb_endpoint_maxp(ep_desc);\n 594:\t\t\t\t} else if (!musb-\u003eendpoints[MM81X_EP_REG_RD].addr) {\n 595:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_RD].addr =\n 596:\t\t\t\t\t\tusb_endpoint_num(ep_desc);\n 597:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_RD].size =\n 598:\t\t\t\t\t\tusb_endpoint_maxp(ep_desc);\n 599:\t\t\t\t}\n"
}

25/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 48272
							output: 47
							thoughts: 35
						

Thoughts:
Here's my thinking process:

**Diving into the mm81x_usb_probe Function**

Okay, so I'm looking at `mm81x_usb_probe` in `usb.c`. Sounds like the probe function for a USB device, likely an mm81x-based device. I'm going to jump straight to lines 600-720. That range usually encompasses a significant portion of the probe's core logic. I expect to find the device ID matching, resource allocation (if required), driver binding, and possibly some initial device setup. I'm hoping it's well-commented, but even if it's not, I'm used to inferring the code flow from the structures and function calls. Let's see what we've got.



26/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/usb.c",
  "FirstLine": 600,
  "LineCount": 100
}

Results:
{
  "Contents": " 600:\t\t\t} else if (usb_endpoint_is_bulk_out(ep_desc)) {\n 601:\t\t\t\tif (!musb-\u003eendpoints[MM81X_EP_MEM_WR].addr) {\n 602:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].addr =\n 603:\t\t\t\t\t\tusb_endpoint_num(ep_desc);\n 604:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].size =\n 605:\t\t\t\t\t\tusb_endpoint_maxp(ep_desc);\n 606:\t\t\t\t} else if (!musb-\u003eendpoints[MM81X_EP_REG_WR].addr) {\n 607:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_WR].addr =\n 608:\t\t\t\t\t\tusb_endpoint_num(ep_desc);\n 609:\t\t\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_WR].size =\n 610:\t\t\t\t\t\tusb_endpoint_maxp(ep_desc);\n 611:\t\t\t\t}\n 612:\t\t\t} else if (usb_endpoint_is_int_in(ep_desc)) {\n 613:\t\t\t\tmusb-\u003eendpoints[MM81X_EP_INT].addr =\n 614:\t\t\t\t\tusb_endpoint_num(ep_desc);\n 615:\t\t\t\tmusb-\u003eendpoints[MM81X_EP_INT].size =\n 616:\t\t\t\t\tusb_endpoint_maxp(ep_desc);\n 617:\t\t\t}\n 618:\t\t}\n 619:\t\n 620:\t\tdev_dbg(mors-\u003edev, \"\\tMemory Endpoint IN %s detected: %u size %u\",\n 621:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].addr ? \"\" : \"not\",\n 622:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].addr,\n 623:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].size);\n 624:\t\tdev_dbg(mors-\u003edev, \"\\tMemory Endpoint OUT %s detected: %u size %u\",\n 625:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].addr ? \"\" : \"not\",\n 626:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].addr,\n 627:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].size);\n 628:\t\tdev_dbg(mors-\u003edev, \"\\tRegister Endpoint IN %s detected: %u\",\n 629:\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_RD].addr ? \"\" : \"not\",\n 630:\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_RD].addr);\n 631:\t\tdev_dbg(mors-\u003edev, \"\\tRegister Endpoint OUT %s detected: %u\",\n 632:\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_WR].addr ? \"\" : \"not\",\n 633:\t\t\tmusb-\u003eendpoints[MM81X_EP_REG_WR].addr);\n 634:\t\tdev_dbg(mors-\u003edev, \"\\tStats IN endpoint %s detected: %u\",\n 635:\t\t\tmusb-\u003eendpoints[MM81X_EP_INT].addr ? \"\" : \"not\",\n 636:\t\t\tmusb-\u003eendpoints[MM81X_EP_INT].addr);\n 637:\t\n 638:\t\t/* Verify we have an IN and OUT */\n 639:\t\tif (!(musb-\u003eendpoints[MM81X_EP_MEM_RD].addr \u0026\u0026\n 640:\t\t      musb-\u003eendpoints[MM81X_EP_MEM_WR].addr))\n 641:\t\t\treturn -ENODEV;\n 642:\t\n 643:\t\t/* Verify the stats MM81X_EP_INT is detected */\n 644:\t\tif (!musb-\u003eendpoints[MM81X_EP_INT].addr)\n 645:\t\t\treturn -ENODEV;\n 646:\t\n 647:\t\t/* Verify minimum interrupt status read */\n 648:\t\tif (musb-\u003eendpoints[MM81X_EP_INT].size \u003c 8)\n 649:\t\t\treturn -ENODEV;\n 650:\t\n 651:\t\tmusb-\u003eendpoints[MM81X_EP_CMD].urb = usb_alloc_urb(0, GFP_KERNEL);\n 652:\t\tif (!musb-\u003eendpoints[MM81X_EP_CMD].urb) {\n 653:\t\t\tret = -ENOMEM;\n 654:\t\t\tgoto err_ep;\n 655:\t\t}\n 656:\t\n 657:\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].urb = usb_alloc_urb(0, GFP_KERNEL);\n 658:\t\tif (!musb-\u003eendpoints[MM81X_EP_MEM_RD].urb) {\n 659:\t\t\tret = -ENOMEM;\n 660:\t\t\tgoto err_ep;\n 661:\t\t}\n 662:\t\n 663:\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].urb = usb_alloc_urb(0, GFP_KERNEL);\n 664:\t\tif (!musb-\u003eendpoints[MM81X_EP_MEM_WR].urb) {\n 665:\t\t\tret = -ENOMEM;\n 666:\t\t\tgoto err_ep;\n 667:\t\t}\n 668:\t\n 669:\t\tmusb-\u003eendpoints[MM81X_EP_MEM_RD].buffer =\n 670:\t\t\tkmalloc(USB_MAX_TRANSFER_SIZE, GFP_KERNEL);\n 671:\t\tif (!musb-\u003eendpoints[MM81X_EP_MEM_RD].buffer) {\n 672:\t\t\tret = -ENOMEM;\n 673:\t\t\tgoto err_ep;\n 674:\t\t}\n 675:\t\n 676:\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].buffer =\n 677:\t\t\tkmalloc(USB_MAX_TRANSFER_SIZE, GFP_KERNEL);\n 678:\t\tif (!musb-\u003eendpoints[MM81X_EP_MEM_WR].buffer) {\n 679:\t\t\tret = -ENOMEM;\n 680:\t\t\tgoto err_ep;\n 681:\t\t}\n 682:\t\n 683:\t\tmusb-\u003eendpoints[MM81X_EP_CMD].buffer = usb_alloc_coherent(\n 684:\t\t\tmusb-\u003eudev, sizeof(struct mm81x_usb_command), GFP_KERNEL,\n 685:\t\t\t\u0026musb-\u003eendpoints[MM81X_EP_CMD].urb-\u003etransfer_dma);\n 686:\t\n 687:\t\tif (!musb-\u003eendpoints[MM81X_EP_CMD].buffer) {\n 688:\t\t\tret = -ENOMEM;\n 689:\t\t\tgoto err_ep;\n 690:\t\t}\n 691:\t\n 692:\t\t/* Assign command to memory out end point */\n 693:\t\tmusb-\u003eendpoints[MM81X_EP_CMD].addr =\n 694:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].addr;\n 695:\t\tmusb-\u003eendpoints[MM81X_EP_CMD].size =\n 696:\t\t\tmusb-\u003eendpoints[MM81X_EP_MEM_WR].size;\n 697:\t\n 698:\t\treturn 0;\n 699:\t\n"
}

27/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 50468
							output: 46
							thoughts: 23
						

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

**Navigating the USB Probe Function**

Okay, let's dive back in. I'm focusing on the `mm81x_usb_probe` function now. I know from experience that probe functions are critical for device initialization and are often the entry point for understanding how a driver interacts with hardware. I'm noting the specific location, around line 700. This is a common pattern, and a good starting point for detailed analysis. I'll need to meticulously examine the code flow from here, mapping the steps the function takes to detect, configure, and ultimately activate the USB device. I will pay close attention to the data structures involved, and the potential error conditions that might arise. I will need to understand what information is passed in, what functions are called, and the conditions under which the device becomes fully operational. I know the devil is often in the details when dealing with USB, so a thorough, line-by-line inspection is in order.



28/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/usb.c",
  "FirstLine": 700,
  "LineCount": 80
}

Results:
{
  "Contents": " 700:\terr_ep:\n 701:\t\tif (musb-\u003eendpoints[MM81X_EP_CMD].urb \u0026\u0026\n 702:\t\t    musb-\u003eendpoints[MM81X_EP_CMD].buffer)\n 703:\t\t\tusb_free_coherent(\n 704:\t\t\t\tmusb-\u003eudev, sizeof(struct mm81x_usb_command),\n 705:\t\t\t\tmusb-\u003eendpoints[MM81X_EP_CMD].buffer,\n 706:\t\t\t\tmusb-\u003eendpoints[MM81X_EP_CMD].urb-\u003etransfer_dma);\n 707:\t\tusb_free_urb(musb-\u003eendpoints[MM81X_EP_MEM_RD].urb);\n 708:\t\tusb_free_urb(musb-\u003eendpoints[MM81X_EP_CMD].urb);\n 709:\t\tusb_free_urb(musb-\u003eendpoints[MM81X_EP_MEM_WR].urb);\n 710:\t\tkfree(musb-\u003eendpoints[MM81X_EP_MEM_RD].buffer);\n 711:\t\tkfree(musb-\u003eendpoints[MM81X_EP_MEM_WR].buffer);\n 712:\t\n 713:\t\treturn ret;\n 714:\t}\n 715:\t\n 716:\tstatic void mm81x_urb_cleanup(struct mm81x *mors)\n 717:\t{\n 718:\t\tstruct mm81x_usb *musb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 719:\t\tstruct mm81x_usb_endpoint *int_ep = \u0026musb-\u003eendpoints[MM81X_EP_INT];\n 720:\t\tstruct mm81x_usb_endpoint *rd_ep = \u0026musb-\u003eendpoints[MM81X_EP_MEM_RD];\n 721:\t\tstruct mm81x_usb_endpoint *wr_ep = \u0026musb-\u003eendpoints[MM81X_EP_MEM_WR];\n 722:\t\tstruct mm81x_usb_endpoint *cmd_ep = \u0026musb-\u003eendpoints[MM81X_EP_CMD];\n 723:\t\n 724:\t\tusb_kill_urb(rd_ep-\u003eurb);\n 725:\t\tusb_kill_urb(wr_ep-\u003eurb);\n 726:\t\tusb_kill_urb(cmd_ep-\u003eurb);\n 727:\t\n 728:\t\tif (int_ep-\u003eurb)\n 729:\t\t\tusb_free_coherent(musb-\u003eudev, MM81X_EP_INT_BUFFER_SIZE,\n 730:\t\t\t\t\t  int_ep-\u003ebuffer, int_ep-\u003eurb-\u003etransfer_dma);\n 731:\t\n 732:\t\tif (cmd_ep-\u003eurb)\n 733:\t\t\tusb_free_coherent(musb-\u003eudev, sizeof(struct mm81x_usb_command),\n 734:\t\t\t\t\t  cmd_ep-\u003ebuffer, cmd_ep-\u003eurb-\u003etransfer_dma);\n 735:\t\n 736:\t\tkfree(wr_ep-\u003ebuffer);\n 737:\t\tkfree(rd_ep-\u003ebuffer);\n 738:\t\n 739:\t\tusb_free_urb(int_ep-\u003eurb);\n 740:\t\tusb_free_urb(wr_ep-\u003eurb);\n 741:\t\tusb_free_urb(rd_ep-\u003eurb);\n 742:\t\tusb_free_urb(cmd_ep-\u003eurb);\n 743:\t}\n 744:\t\n 745:\tstatic int mm81x_usb_probe(struct usb_interface *interface,\n 746:\t\t\t\t   const struct usb_device_id *id)\n 747:\t{\n 748:\t\tint ret;\n 749:\t\tstruct mm81x *mors;\n 750:\t\tstruct mm81x_usb *musb;\n 751:\t\n 752:\t\tmors = mm81x_core_alloc(sizeof(*musb), \u0026interface-\u003edev);\n 753:\t\tif (!mors)\n 754:\t\t\treturn -ENOMEM;\n 755:\t\n 756:\t\tmors-\u003ebus_ops = \u0026mm81x_usb_ops;\n 757:\t\tmors-\u003ebus_type = MM81X_BUS_TYPE_USB;\n 758:\t\n 759:\t\tmusb = (struct mm81x_usb *)mors-\u003edrv_priv;\n 760:\t\tmusb-\u003eudev = usb_get_dev(interface_to_usbdev(interface));\n 761:\t\tmusb-\u003einterface = usb_get_intf(interface);\n 762:\t\n 763:\t\tmutex_init(\u0026musb-\u003elock);\n 764:\t\tmutex_init(\u0026musb-\u003ebus_lock);\n 765:\t\tinit_waitqueue_head(\u0026musb-\u003erw_in_wait);\n 766:\t\tusb_set_intfdata(interface, mors);\n 767:\t\n 768:\t\tret = mm81x_usb_detect_endpoints(mors, interface);\n 769:\t\tif (ret \u003c 0)\n 770:\t\t\tgoto err_core_free;\n 771:\t\n 772:\t\tset_bit(MM81X_USB_FLAG_ATTACHED, \u0026musb-\u003eflags);\n 773:\t\n 774:\t\tret = mm81x_core_init(mors);\n 775:\t\tif (ret)\n 776:\t\t\tgoto err_urb_cleanup;\n 777:\t\n 778:\t\tINIT_WORK(\u0026mors-\u003eusb_irq_work, mm81x_usb_irq_work);\n 779:\t\n"
}

29/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 52236
							output: 35
							thoughts: 1041
						

Thoughts:
**Analyzing the mm81x USB Driver for Potential Vulnerabilities**

Okay, let's dive into this `mm81x_usb_probe` function. My initial thought is to understand how it interfaces with the USB device, particularly focusing on the packet handling within this driver. Specifically, I need to understand what `mm81x_yaps_hw_read_pkts` and `mm81x_read_pkts_h_is_valid_delim` are doing, as those are often spots to look.

Looking at `mm81x_read_pkts_h_is_valid_delim`, there's the standard CRC check, packet size and padding checks, and a new condition, the check for `pkt_size <= YAPS_RESERVED_PAGE_SIZE`, a change which looks like a recent fix. The padding calculations look typical, and the size checks are there.

Then, inspecting `mm81x_yaps_hw_read_pkts`, I see the expected checks for the number of packets and remaining bytes. There's also this new alignment check `!IS_ALIGNED(bytes_remaining, sizeof(u32))`, which, if triggered, will result in an -EIO, and the function will return. This could signal a potential vulnerability.

Now, how does this all fit together? `mm81x_yaps_hw_read_pkts` is part of `mm81x_yaps_hw_ops.read_pkts`. It's called by `mm81x_yaps_read_pkts`, which is then called by `mm81x_yaps_rx_handler` within `drivers/net/wireless/morsemicro/mm81x/yaps.c`. This `rx_handler` is called by `mm81x_yaps_work`, which is triggered by the HIF work queue to handle RX events. So, this is the core of packet reception for this driver.

The next point I need to consider is, are we able to reach this driver? Syzkaller can emulate USB wireless drivers. They use raw USB gadget emulation with calls like `syz_usb_connect`. So yes, this is something we can fuzz.

Let's look at the necessary configuration for this driver. In `drivers/net/wireless/morsemicro/mm81x/Kconfig`, I see `MM81X_USB` which depends on `MAC80211` and `USB`. Also there's `WLAN_VENDOR_MORSEMICRO` in `drivers/net/wireless/morsemicro/Kconfig`, that is dependent on `WLAN`. I need to ensure that these configurations are set.



30/2 2026/09/10 21:29 tool grepper
0m Args:
{
  "Expression": "WLAN_VENDOR_MORSEMICRO",
  "PathPrefix": "drivers/net/wireless/"
}

Results:
{
  "Output": "drivers/net/wireless/Makefile=14=obj-$(CONFIG_WLAN_VENDOR_MICROCHIP) += microchip/\ndrivers/net/wireless/Makefile:15:obj-$(CONFIG_WLAN_VENDOR_MORSEMICRO) += morsemicro/\ndrivers/net/wireless/Makefile-16-obj-$(CONFIG_WLAN_VENDOR_NXP) += nxp/\n--\ndrivers/net/wireless/morsemicro/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/wireless/morsemicro/Kconfig:2:config WLAN_VENDOR_MORSEMICRO\ndrivers/net/wireless/morsemicro/Kconfig-3-\tbool \"Morse Micro devices\"\n--\ndrivers/net/wireless/morsemicro/Kconfig-12-\ndrivers/net/wireless/morsemicro/Kconfig:13:if WLAN_VENDOR_MORSEMICRO\ndrivers/net/wireless/morsemicro/Kconfig-14-source \"drivers/net/wireless/morsemicro/mm81x/Kconfig\"\ndrivers/net/wireless/morsemicro/Kconfig:15:endif # WLAN_VENDOR_MORSEMICRO\n"
}

31/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 54197
							output: 38
							thoughts: 18
						

Thoughts:
Here's my take on those thoughts:

**Examining the Morse Micro Kconfig File**

Okay, so I need to dive into the configuration options for that Morse Micro Wi-Fi driver. Let's start by looking at `drivers/net/wireless/morsemicro/Kconfig`. This Kconfig file is where all the important configurations for the driver are defined. I expect to see things like the ability to enable or disable the driver itself, perhaps options for different hardware variants if there are any, likely debug flags, and maybe even choices related to firmware loading or specific protocol features. It's a critical starting point to understand how this driver is controlled and what settings I can tweak. I want to quickly grasp the high-level configuration structure to see if there's anything I can immediately leverage to address [insert your particular issue here, e.g. "optimize performance" or "resolve that reported conflict"]. From there I will use this information to determine the next phase of debugging.



32/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/Kconfig",
  "FirstLine": 1,
  "LineCount": 20
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: GPL-2.0-only\n   2:\tconfig WLAN_VENDOR_MORSEMICRO\n   3:\t\tbool \"Morse Micro devices\"\n   4:\t\tdefault y\n   5:\t\thelp\n   6:\t\t  If you have a wireless card belonging to this class, say Y.\n   7:\t\n   8:\t\t  Note that the answer to this question doesn't directly affect the\n   9:\t\t  kernel: saying N will just cause the configurator to skip all the\n  10:\t\t  questions about these cards. If you say Y, you will be asked for\n  11:\t\t  your specific card in the following questions.\n  12:\t\n  13:\tif WLAN_VENDOR_MORSEMICRO\n  14:\tsource \"drivers/net/wireless/morsemicro/mm81x/Kconfig\"\n  15:\tendif # WLAN_VENDOR_MORSEMICRO\n"
}

33/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 54692
							output: 29
							thoughts: 26
						

Thoughts:
Here's my thought process, as if I were considering this myself:

**Investigating WLAN Configuration in the Kernel**

Okay, so I need to figure out the parent configuration for `WLAN`. The most logical starting point is the `Kconfig` file in the relevant driver directory. Since we're dealing with wireless networking, that would be `drivers/net/wireless/Kconfig`. Let's navigate there and take a look. I'm expecting to find `WLAN` defined, and my hypothesis is that it will be a parent configuration variable that governs the various wireless options. I need to understand the hierarchy and dependencies, and this should give me a solid starting point. This is standard procedure when I'm working on kernel configurations and need to understand the relationships between different features. I should be able to quickly determine how `WLAN` fits into the bigger picture.



34/2 2026/09/10 21:29 tool grepper
0m Args:
{
  "Expression": "morsemicro",
  "PathPrefix": "drivers/net/wireless/"
}

Results:
{
  "Output": "drivers/net/wireless/Kconfig=29=source \"drivers/net/wireless/microchip/Kconfig\"\ndrivers/net/wireless/Kconfig:30:source \"drivers/net/wireless/morsemicro/Kconfig\"\ndrivers/net/wireless/Kconfig-31-source \"drivers/net/wireless/nxp/Kconfig\"\n--\ndrivers/net/wireless/Makefile=14=obj-$(CONFIG_WLAN_VENDOR_MICROCHIP) += microchip/\ndrivers/net/wireless/Makefile:15:obj-$(CONFIG_WLAN_VENDOR_MORSEMICRO) += morsemicro/\ndrivers/net/wireless/Makefile-16-obj-$(CONFIG_WLAN_VENDOR_NXP) += nxp/\n--\ndrivers/net/wireless/morsemicro/Kconfig=13=if WLAN_VENDOR_MORSEMICRO\ndrivers/net/wireless/morsemicro/Kconfig:14:source \"drivers/net/wireless/morsemicro/mm81x/Kconfig\"\ndrivers/net/wireless/morsemicro/Kconfig-15-endif # WLAN_VENDOR_MORSEMICRO\n--\ndrivers/net/wireless/morsemicro/mm81x/fw.h-15-#define BCF_DATABASE_SIZE (1024)\ndrivers/net/wireless/morsemicro/mm81x/fw.h:16:#define MM81X_FW_DIR \"morsemicro/mm81x\"\ndrivers/net/wireless/morsemicro/mm81x/fw.h-17-#define MM81X_FW_EXT \".bin\"\n"
}

35/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 55324
							output: 34
							thoughts: 23
						

Thoughts:
Here's my take on the thought process:

**Diving into the Wireless Driver Configuration**

Okay, time to get my hands dirty. I need to zero in on the configuration options for wireless drivers. My first instinct is to navigate to the `drivers/net/wireless/Kconfig` file. I'm going to focus my initial investigation around lines 20 through 40. That range is usually a good starting point for understanding how the core wireless driver options are structured and what dependencies or defaults might be defined. Hopefully, I'll be able to quickly grasp the relevant key configuration parameters from there.



36/2 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/Kconfig",
  "FirstLine": 1,
  "LineCount": 40
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: GPL-2.0-only\n   2:\t#\n   3:\t# Wireless LAN device configuration\n   4:\t#\n   5:\t\n   6:\tmenuconfig WLAN\n   7:\t\tbool \"Wireless LAN\"\n   8:\t\tdepends on !S390\n   9:\t\tdepends on NET\n  10:\t\tselect WIRELESS\n  11:\t\tdefault y\n  12:\t\thelp\n  13:\t\t  This section contains all the pre 802.11 and 802.11 wireless\n  14:\t\t  device drivers. For a complete list of drivers and documentation\n  15:\t\t  on them refer to the wireless wiki:\n  16:\t\n  17:\t\t  https://wireless.wiki.kernel.org/en/users/Drivers\n  18:\t\n  19:\tif WLAN\n  20:\t\n  21:\tsource \"drivers/net/wireless/admtek/Kconfig\"\n  22:\tsource \"drivers/net/wireless/ath/Kconfig\"\n  23:\tsource \"drivers/net/wireless/atmel/Kconfig\"\n  24:\tsource \"drivers/net/wireless/broadcom/Kconfig\"\n  25:\tsource \"drivers/net/wireless/intel/Kconfig\"\n  26:\tsource \"drivers/net/wireless/intersil/Kconfig\"\n  27:\tsource \"drivers/net/wireless/marvell/Kconfig\"\n  28:\tsource \"drivers/net/wireless/mediatek/Kconfig\"\n  29:\tsource \"drivers/net/wireless/microchip/Kconfig\"\n  30:\tsource \"drivers/net/wireless/morsemicro/Kconfig\"\n  31:\tsource \"drivers/net/wireless/nxp/Kconfig\"\n  32:\tsource \"drivers/net/wireless/purelifi/Kconfig\"\n  33:\tsource \"drivers/net/wireless/ralink/Kconfig\"\n  34:\tsource \"drivers/net/wireless/realtek/Kconfig\"\n  35:\tsource \"drivers/net/wireless/rsi/Kconfig\"\n  36:\tsource \"drivers/net/wireless/silabs/Kconfig\"\n  37:\tsource \"drivers/net/wireless/st/Kconfig\"\n  38:\tsource \"drivers/net/wireless/ti/Kconfig\"\n  39:\tsource \"drivers/net/wireless/zydas/Kconfig\"\n  40:\tsource \"drivers/net/wireless/quantenna/Kconfig\"\n"
}

37/2 2026/09/10 21:29 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 56138
							output: 216
							thoughts: 934
						

Thoughts:
**Verifying WorthFuzzing for the MM81x Wireless Driver Patch**

Alright, let's confirm if fuzzing this patch is warranted. First, I see the core change is in `mm81x_read_pkts_h_is_valid_delim` and `mm81x_yaps_hw_read_pkts` within the `drivers/net/wireless/morsemicro/mm81x/yaps_hw.c` file. Specifically, we're looking at input validation logic being updated – `pkt_size == 0` is now `pkt_size <= YAPS_RESERVED_PAGE_SIZE` and there's a new alignment check. This is crucial as it directly impacts packet handling, and validation logic is a classic target for fuzzing.

This driver supports USB devices, which is fantastic because that means we can easily replicate the environment with QEMU or even USB Raw Gadget setup for effective fuzzing. The fact that `CONFIG_MM81X_USB` enables this is a green light.

Now, let's get precise on the important symbols. I've noted that `mm81x_read_pkts_h_is_valid_delim` is static, potentially inlined into `mm81x_yaps_hw_read_pkts`. But even if inlined, it's still part of the critical path. `mm81x_yaps_hw_read_pkts` is the main function reading packets and doing delimiter validation. `mm81x_yaps_read_pkts` is also important, since it calls the `ops->read_pkts` function. So, based on the code flow, the relevant symbols are:

*   `mm81x_yaps_hw_read_pkts`
*   `mm81x_read_pkts_h_is_valid_delim`
*   `mm81x_yaps_read_pkts`
*   `mm81x_yaps_rx_handler`

I've confirmed that `mm81x_read_pkts_h_is_valid_delim` is indeed static within `yaps_hw.c`. `mm81x_yaps_hw_read_pkts` is also `static`. I've also verified the call chain from `mm81x_yaps_read_pkts` (in `yaps.c`) to `yaps->ops->read_pkts`, and that `mm81x_yaps_rx_handler` calls `mm81x_yaps_read_pkts`. Furthermore, `mm81x_usb_probe` in `usb.c` initializes the USB interface, thus establishing the USB entrypoint.

Given that the patch involves changes to packet validation and alignment within a wireless driver reachable via USB emulation, all the required elements are in place. The identified configurations and symbols are correct, which is further confirmation to enable fuzzing. Thus, I'm confident that `WorthFuzzing` should be set to `true`, given the potential for exploiting vulnerabilities in packet handling logic.

Now, I'm ready to populate the `set-results` fields and call it a day.



38/2 2026/09/10 21:29 tool set-results
0m Args:
{
  "EnableConfigs": [
    "WLAN",
    "WLAN_VENDOR_MORSEMICRO",
    "MAC80211",
    "USB",
    "MM81X",
    "MM81X_USB"
  ],
  "FocusSymbols": [
    "mm81x_yaps_hw_read_pkts",
    "mm81x_read_pkts_h_is_valid_delim",
    "mm81x_yaps_read_pkts",
    "mm81x_yaps_rx_handler"
  ],
  "Reasoning": "The patch modifies the packet reception and delimiter validation logic in the Morse Micro MM81x wireless driver (drivers/net/wireless/morsemicro/mm81x/yaps_hw.c), adding alignment verification on remaining bytes and stricter packet size validation against reserved page bounds. The driver supports USB devices and is reachable in virtualized environments via USB emulation.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "WLAN",
    "WLAN_VENDOR_MORSEMICRO",
    "MAC80211",
    "USB",
    "MM81X",
    "MM81X_USB"
  ],
  "FocusSymbols": [
    "mm81x_yaps_hw_read_pkts",
    "mm81x_read_pkts_h_is_valid_delim",
    "mm81x_yaps_read_pkts",
    "mm81x_yaps_rx_handler"
  ],
  "Reasoning": "The patch modifies the packet reception and delimiter validation logic in the Morse Micro MM81x wireless driver (drivers/net/wireless/morsemicro/mm81x/yaps_hw.c), adding alignment verification on remaining bytes and stricter packet size validation against reserved page bounds. The driver supports USB devices and is reachable in virtualized environments via USB emulation.",
  "WorthFuzzing": true
}

39/1 2026/09/10 21:29 action If
0m Args:
{
  "WorthFuzzing": true
}

Results:
null

40/2 2026/09/10 21:29 agent kmsan-evaluator
0m Model:
core

Args:
null

Results:
{
  "KMSANReasoning": "The patch hardens input validation in the Morse Micro mm81x driver's YAPS hardware packet reading logic by:\n1. Ensuring `pkt_size` (phandle size) exceeds `YAPS_RESERVED_PAGE_SIZE` to prevent underflows in `YAPS_DELIM_GET_PKT_SIZE()`.\n2. Validating that `bytes_remaining` is 4-byte aligned before reading delimiters from the chip buffer.\n\nThese changes prevent potential integer underflow, out-of-bounds reads/writes, or protocol desynchronization when parsing hardware packet buffers. Any memory safety violations in this area (e.g., negative size passed to buffer operations resulting in out-of-bounds accesses) are detected by KASAN. The patch does not introduce or expose uninitialized memory reads, uninitialized variables in branching, or kernel-to-user info-leaks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
  "NeedsKMSAN": false
}

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

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

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

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

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

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

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


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

Prompt:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit 7691f78b0e3926a9b4f51545ed2802f2d31d90be
Author: syz-cluster <triage@syzkaller.com>
Date:   Thu Sep 10 21:28:27 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c b/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c
index 3d641d23c35ba..97b2ff93c69ff 100644
--- a/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c
+++ b/drivers/net/wireless/morsemicro/mm81x/yaps_hw.c
@@ -407,7 +407,7 @@ static bool mm81x_read_pkts_h_is_valid_delim(u32 delim)
 	if (calc_crc != YAPS_DELIM_GET_CRC(delim))
 		return false;
 
-	if (pkt_size == 0)
+	if (pkt_size <= YAPS_RESERVED_PAGE_SIZE)
 		return false;
 
 	if ((pkt_size + padding) > YAPS_MAX_PKT_SIZE_BYTES)
@@ -455,6 +455,10 @@ static int mm81x_yaps_hw_read_pkts(struct mm81x_yaps *yaps,
 		return 0;
 	if (bytes_remaining < 0)
 		return bytes_remaining;
+	if (!IS_ALIGNED(bytes_remaining, sizeof(u32))) {
+		dev_warn(yaps->mors->dev, "yaps truncated delimiter");
+		return -EIO;
+	}
 
 	if (bytes_remaining > YAPS_HW_WINDOW_SIZE_BYTES) {
 		bytes_remaining = YAPS_HW_WINDOW_SIZE_BYTES;

41/3 2026/09/10 21:29 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 2310
							output: 50
							thoughts: 110
						

Thoughts:
**Diving into the mm81x Wireless Driver**

Okay, so the patch is supposedly nestled within `drivers/net/wireless/morsemicro/mm81x/yaps_hw.c`. Time to get my hands dirty. Let's start by scrutinizing that specific file. I want to zero in on the vicinity of `mm81x_read_pkts_h_is_valid_delim` and `mm81x_yaps_hw_read_pkts`. These function names are screaming potential for the fix, so let's understand their context and interactions.

Let's pull up that `yaps_hw.c` file using `read-file` and get a good look at the surrounding code to grasp the implementation details better. This is where the real investigation begins.



42/3 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c",
  "FirstLine": 390,
  "LineCount": 100
}

Results:
{
  "Contents": " 390:\texit:\n 391:\t\tif (batch_txn_len \u003e 0) {\n 392:\t\t\tret = mm81x_dm_write(yaps-\u003emors, yaps-\u003eaux_data-\u003eyds_addr,\n 393:\t\t\t\t\t     to_chip_buffer_aligned, batch_txn_len);\n 394:\t\t\t*num_pkts_sent += pkts_pending;\n 395:\t\t}\n 396:\t\n 397:\t\tmm81x_yaps_hw_unlock(yaps);\n 398:\t\treturn ret;\n 399:\t}\n 400:\t\n 401:\tstatic bool mm81x_read_pkts_h_is_valid_delim(u32 delim)\n 402:\t{\n 403:\t\tu8 calc_crc = mm81x_yaps_hw_crc(delim);\n 404:\t\tint pkt_size = YAPS_DELIM_GET_PHANDLE_SIZE(delim);\n 405:\t\tint padding = YAPS_DELIM_GET_PADDING(delim);\n 406:\t\n 407:\t\tif (calc_crc != YAPS_DELIM_GET_CRC(delim))\n 408:\t\t\treturn false;\n 409:\t\n 410:\t\tif (pkt_size \u003c= YAPS_RESERVED_PAGE_SIZE)\n 411:\t\t\treturn false;\n 412:\t\n 413:\t\tif ((pkt_size + padding) \u003e YAPS_MAX_PKT_SIZE_BYTES)\n 414:\t\t\treturn false;\n 415:\t\n 416:\t\t/* Pkt length + padding should not require more padding */\n 417:\t\tif (YAPS_CALC_PADDING(pkt_size) != padding)\n 418:\t\t\treturn false;\n 419:\t\n 420:\t\treturn true;\n 421:\t}\n 422:\t\n 423:\tstatic int mm81x_read_pkts_h_bytes_remaining(struct mm81x_yaps *yaps)\n 424:\t{\n 425:\t\tu32 bytes_in_queue = yaps-\u003eaux_data-\u003estatus_regs.fc_rx_bytes_in_queue;\n 426:\t\tu32 delim_overhead =\n 427:\t\t\tyaps-\u003eaux_data-\u003estatus_regs.fc_num_pkts * sizeof(u32);\n 428:\t\tu32 reserved_bytes = yaps-\u003eaux_data-\u003estatus_regs.fc_num_pkts *\n 429:\t\t\t\t     yaps-\u003eaux_data-\u003ereserved_yaps_page_size;\n 430:\t\n 431:\t\tif (WARN_ON(bytes_in_queue \u003e INT_MAX) ||\n 432:\t\t    WARN_ON(delim_overhead \u003e INT_MAX) ||\n 433:\t\t    WARN_ON(reserved_bytes \u003e INT_MAX))\n 434:\t\t\treturn -EIO;\n 435:\t\n 436:\t\treturn (int)bytes_in_queue;\n 437:\t}\n 438:\t\n 439:\tstatic int mm81x_yaps_hw_read_pkts(struct mm81x_yaps *yaps,\n 440:\t\t\t\t\t   struct mm81x_yaps_pkt *pkts,\n 441:\t\t\t\t\t   int num_pkts_max, int *num_pkts_received)\n 442:\t{\n 443:\t\tint ret;\n 444:\t\tint i = 0;\n 445:\t\tchar *from_chip_buffer_aligned =\n 446:\t\t\tPTR_ALIGN(yaps-\u003eaux_data-\u003efrom_chip_buffer,\n 447:\t\t\t\t  mm81x_bus_get_alignment(yaps-\u003emors));\n 448:\t\tchar *read_ptr = from_chip_buffer_aligned;\n 449:\t\tint bytes_remaining = mm81x_read_pkts_h_bytes_remaining(yaps);\n 450:\t\tbool again = false;\n 451:\t\n 452:\t\t*num_pkts_received = 0;\n 453:\t\n 454:\t\tif (num_pkts_max == 0 || bytes_remaining == 0)\n 455:\t\t\treturn 0;\n 456:\t\tif (bytes_remaining \u003c 0)\n 457:\t\t\treturn bytes_remaining;\n 458:\t\tif (!IS_ALIGNED(bytes_remaining, sizeof(u32))) {\n 459:\t\t\tdev_warn(yaps-\u003emors-\u003edev, \"yaps truncated delimiter\");\n 460:\t\t\treturn -EIO;\n 461:\t\t}\n 462:\t\n 463:\t\tif (bytes_remaining \u003e YAPS_HW_WINDOW_SIZE_BYTES) {\n 464:\t\t\tbytes_remaining = YAPS_HW_WINDOW_SIZE_BYTES;\n 465:\t\t\tagain = true;\n 466:\t\t}\n 467:\t\n 468:\t\t/*\n 469:\t\t * This is more coarse-grained than it needs to be - once the data\n 470:\t\t * is read into a local buffer the lock can be released, however\n 471:\t\t * access to from_chip_buffer will need to be protected with its\n 472:\t\t * own lock\n 473:\t\t */\n 474:\t\tret = mm81x_yaps_hw_lock(yaps);\n 475:\t\tif (ret) {\n 476:\t\t\tdev_dbg(yaps-\u003emors-\u003edev, \"yaps lock failed %d\", ret);\n 477:\t\t\treturn ret;\n 478:\t\t}\n 479:\t\n 480:\t\t/* Read all available packets to the buffer */\n 481:\t\tret = mm81x_dm_read(yaps-\u003emors, yaps-\u003eaux_data-\u003eysl_addr,\n 482:\t\t\t\t    from_chip_buffer_aligned, bytes_remaining);\n 483:\t\n 484:\t\tif (ret)\n 485:\t\t\tgoto exit;\n 486:\t\n 487:\t\t/* Split serialised packets from buffer */\n 488:\t\twhile (i \u003c num_pkts_max \u0026\u0026 bytes_remaining \u003e 0) {\n 489:\t\t\tu32 delim;\n"
}

43/3 2026/09/10 21:29 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 4300
							output: 49
							thoughts: 22
						

Thoughts:
Okay, here's my interpretation of what's going through my mind as I approach the code, written in the first person, and tailored for a field expert:

**Diving into `mm81x_yaps_hw_read_pkts`**

Alright, let's get into this `mm81x_yaps_hw_read_pkts` function. Given the naming, I'm expecting this to be the core hardware interface for packet reception on the mm81x, likely involving some interaction with YAPS (Your Application Protocol Service, I assume). I'll want to quickly ascertain a few things: First, how is this function triggered? Is it interrupt-driven, polled, or something else? Second, what's the general flow? I need to understand the data structures involved—pointers to buffers, descriptors, and any associated control registers. I'm going to be looking for potential bottlenecks right away, like any obvious data copies or synchronization issues if we are looking at a shared memory model. Are they using DMA? If so, what's the descriptor setup? I'll also be watching for error handling. Is there robust error checking on the hardware reads, and are the errors handled gracefully? Finally, I need to see how the received packets are passed on up the stack – are they put on a queue, passed directly to the upper layer, or? I need to see if the interface is optimized for high-throughput or prioritizes low-latency, and which trade-offs were made. That will really inform how I might go about any performance tuning later. Let's see what we've got.



44/3 2026/09/10 21:29 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c",
  "FirstLine": 488,
  "LineCount": 80
}

Results:
{
  "Contents": " 488:\t\twhile (i \u003c num_pkts_max \u0026\u0026 bytes_remaining \u003e 0) {\n 489:\t\t\tu32 delim;\n 490:\t\t\tint total_len;\n 491:\t\t\tint pkt_size;\n 492:\t\n 493:\t\t\tdelim = le32_to_cpu(*((__le32 *)read_ptr));\n 494:\t\t\tread_ptr += sizeof(delim);\n 495:\t\t\tbytes_remaining -= sizeof(delim);\n 496:\t\n 497:\t\t\t/* End of stream */\n 498:\t\t\tif (!delim)\n 499:\t\t\t\tbreak;\n 500:\t\n 501:\t\t\tif (!mm81x_read_pkts_h_is_valid_delim(delim)) {\n 502:\t\t\t\t/*\n 503:\t\t\t\t * This will start a hunt for a valid delimiter. Given\n 504:\t\t\t\t * the CRC is only 7 bit it's possible to find an\n 505:\t\t\t\t * invalid block with a valid delimiter, leading to\n 506:\t\t\t\t * desynchronisation.\n 507:\t\t\t\t */\n 508:\t\t\t\tdev_warn(yaps-\u003emors-\u003edev, \"yaps invalid delim\");\n 509:\t\t\t\tbreak;\n 510:\t\t\t}\n 511:\t\n 512:\t\t\t/* Total length in chip */\n 513:\t\t\tpkt_size = YAPS_DELIM_GET_PKT_SIZE(delim);\n 514:\t\t\ttotal_len = pkt_size + YAPS_DELIM_GET_PADDING(delim);\n 515:\t\n 516:\t\t\tif (pkts[i].skb)\n 517:\t\t\t\tdev_err(yaps-\u003emors-\u003edev, \"yaps packet leak\");\n 518:\t\n 519:\t\t\t/* SKB doesn't want padding */\n 520:\t\t\tpkts[i].skb = dev_alloc_skb(pkt_size);\n 521:\t\t\tif (!pkts[i].skb) {\n 522:\t\t\t\tret = -ENOMEM;\n 523:\t\t\t\tdev_err(yaps-\u003emors-\u003edev, \"yaps no mem for skb\");\n 524:\t\t\t\tgoto exit;\n 525:\t\t\t}\n 526:\t\t\tskb_put(pkts[i].skb, pkt_size);\n 527:\t\n 528:\t\t\tif (total_len \u003c= bytes_remaining) {\n 529:\t\t\t\tmemcpy(pkts[i].skb-\u003edata, read_ptr, pkt_size);\n 530:\t\t\t\tread_ptr += total_len;\n 531:\t\t\t\tbytes_remaining -= total_len;\n 532:\t\t\t} else {\n 533:\t\t\t\tconst int read_overhang_len =\n 534:\t\t\t\t\ttotal_len - bytes_remaining;\n 535:\t\t\t\tconst int pkt_overhang_len = pkt_size - bytes_remaining;\n 536:\t\n 537:\t\t\t\tmemcpy(pkts[i].skb-\u003edata, read_ptr, bytes_remaining);\n 538:\t\t\t\tread_ptr = from_chip_buffer_aligned;\n 539:\t\n 540:\t\t\t\tret = mm81x_dm_read(\n 541:\t\t\t\t\tyaps-\u003emors,\n 542:\t\t\t\t\t/* Offset by 4 to avoid retry logic */\n 543:\t\t\t\t\tyaps-\u003eaux_data-\u003eysl_addr + 4, read_ptr,\n 544:\t\t\t\t\tread_overhang_len);\n 545:\t\n 546:\t\t\t\tif (ret)\n 547:\t\t\t\t\tgoto exit;\n 548:\t\n 549:\t\t\t\tmemcpy(pkts[i].skb-\u003edata + bytes_remaining, read_ptr,\n 550:\t\t\t\t       pkt_overhang_len);\n 551:\t\t\t\tread_ptr += read_overhang_len;\n 552:\t\t\t\tbytes_remaining = 0;\n 553:\t\t\t}\n 554:\t\n 555:\t\t\t*num_pkts_received += 1;\n 556:\t\t\ti++;\n 557:\t\t}\n 558:\t\n 559:\t\tif (again)\n 560:\t\t\tret = -EAGAIN;\n 561:\t\n 562:\texit:\n 563:\t\tmm81x_yaps_hw_unlock(yaps);\n 564:\t\treturn ret;\n 565:\t}\n 566:\t\n 567:\tstatic int mm81x_yaps_hw_update_status(struct mm81x_yaps *yaps)\n"
}

45/3 2026/09/10 21:29 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 5914
							output: 24
							thoughts: 444
						

Thoughts:
**Analyzing the Patch: Input Validation & Potential Risks**

Okay, let's break this down. First, I'm seeing a change in `mm81x_read_pkts_h_is_valid_delim` where they're now checking `pkt_size <= YAPS_RESERVED_PAGE_SIZE` instead of just `pkt_size == 0`. That's the first clue. Then, in `mm81x_yaps_hw_read_pkts`, there's a new alignment check: `!IS_ALIGNED(bytes_remaining, sizeof(u32))`. My immediate concern is always: are we introducing or changing anything that could lead to uninitialized memory reads, information leaks, or any other potential security issues?

Looking deeper, `from_chip_buffer_aligned` is populated by `mm81x_dm_read` from hardware, and that's where the data for the packets comes from.  Then, the code copies data into `skb` buffers using `memcpy`.  The change itself seems to be adding more robust input validation; rejecting `pkt_size` if it's too small, and rejecting misaligned `bytes_remaining`.

I think this is all about making sure we're getting valid data from the hardware.  Given the data flow, there's no reason to think it will cause uninitialized memory accesses.  All the `skb`s are allocated, and the data is read directly from the hardware, so it should be fine. It is only about stricter validation and error checking of the hardware input. Now, I need to see exactly what `YAPS_RESERVED_PAGE_SIZE` and `YAPS_DELIM_GET_PHANDLE_SIZE` are, just to have a complete picture.



46/3 2026/09/10 21:29 tool grepper
0m Args:
{
  "Expression": "YAPS_RESERVED_PAGE_SIZE"
}

Results:
{
  "Output": "drivers/net/wireless/morsemicro/mm81x/yaps_hw.c-20-\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c:21:#define YAPS_RESERVED_PAGE_SIZE 256\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-22-\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-35-#define YAPS_DELIM_GET_PKT_SIZE(_delim) \\\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c:36:\t(((_delim) \u0026 0x3FFF) - YAPS_RESERVED_PAGE_SIZE)\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-37-#define YAPS_DELIM_SET_PKT_SIZE(_pkt_size) \\\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c:38:\t(((_pkt_size) \u0026 0x3FFF) + YAPS_RESERVED_PAGE_SIZE)\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-39-#define YAPS_DELIM_GET_PHANDLE_SIZE(_delim) (((_delim) \u0026 0x3FFF))\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c=401=static bool mm81x_read_pkts_h_is_valid_delim(u32 delim)\n--\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-409-\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c:410:\tif (pkt_size \u003c= YAPS_RESERVED_PAGE_SIZE)\ndrivers/net/wireless/morsemicro/mm81x/yaps_hw.c-411-\t\treturn false;\n"
}

47/3 2026/09/10 21:29 llm kmsan-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 7278
							output: 229
							thoughts: 272
						

Thoughts:
**My Analysis of Packet Size Calculation**

Okay, so I'm looking at this `YAPS_DELIM_GET_PKT_SIZE` macro: `(((_delim) & 0x3FFF) - YAPS_RESERVED_PAGE_SIZE)`. It's clear that this calculation could lead to problems if the packet size, which is initially determined by the lower bits of the delimiter (`pkt_size`), is less than or equal to `YAPS_RESERVED_PAGE_SIZE`. That would result in either a negative packet size or, at best, zero. This seems like a textbook case for potential underflow or, more critically, invalid packet size calculations when we're unpacking packets from the chip.

The `if (pkt_size <= YAPS_RESERVED_PAGE_SIZE)` check that's in place directly addresses and corrects this potential underflow/invalid size scenario. Good, good. And the `!IS_ALIGNED(bytes_remaining, sizeof(u32))` condition ensures the data buffer is 4-byte aligned, which is crucial for data integrity.

My immediate concern is always uninitialized memory, of course. But after a review, I can confidently say that there aren't any uninitialized memory issues here. This fixes potential buffer underflow, out-of-bounds memory issues, or logic errors, which KASAN will help detect. Crucially, I'm not introducing or modifying any code that could lead to uninitialized memory leaking to userspace, or uninitialized variable reads.

Therefore, I'll update the associated issue with `NeedsKMSAN: false` and provide a clear explanation of these points in the commit message.



48/3 2026/09/10 21:30 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch hardens input validation in the Morse Micro mm81x driver's YAPS hardware packet reading logic by:\n1. Ensuring `pkt_size` (phandle size) exceeds `YAPS_RESERVED_PAGE_SIZE` to prevent underflows in `YAPS_DELIM_GET_PKT_SIZE()`.\n2. Validating that `bytes_remaining` is 4-byte aligned before reading delimiters from the chip buffer.\n\nThese changes prevent potential integer underflow, out-of-bounds reads/writes, or protocol desynchronization when parsing hardware packet buffers. Any memory safety violations in this area (e.g., negative size passed to buffer operations resulting in out-of-bounds accesses) are detected by KASAN. The patch does not introduce or expose uninitialized memory reads, uninitialized variables in branching, or kernel-to-user info-leaks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch hardens input validation in the Morse Micro mm81x driver's YAPS hardware packet reading logic by:\n1. Ensuring `pkt_size` (phandle size) exceeds `YAPS_RESERVED_PAGE_SIZE` to prevent underflows in `YAPS_DELIM_GET_PKT_SIZE()`.\n2. Validating that `bytes_remaining` is 4-byte aligned before reading delimiters from the chip buffer.\n\nThese changes prevent potential integer underflow, out-of-bounds reads/writes, or protocol desynchronization when parsing hardware packet buffers. Any memory safety violations in this area (e.g., negative size passed to buffer operations resulting in out-of-bounds accesses) are detected by KASAN. The patch does not introduce or expose uninitialized memory reads, uninitialized variables in branching, or kernel-to-user info-leaks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
  "NeedsKMSAN": false
}

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