AI Trajectory


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

Results:
{
  "EnableConfigs": [
    "MAC80211",
    "CFG80211",
    "MT7921U"
  ],
  "FocusSymbols": [
    "ieee80211_8023_xmit",
    "ieee80211_subif_start_xmit_8023"
  ],
  "KMSANReasoning": "The patch sets the `info-\u003eband` field in `ieee80211_8023_xmit()` for non-MLD interfaces based on the channel context configuration. The `info` structure (`IEEE80211_SKB_CB(skb)`) is explicitly cleared via `memset(info, 0, sizeof(*info))` prior to this assignment. There are no allocations of uninitialized memory, no structures copied to user space, and no reads from uninitialized stack or heap variables. Potential failure modes (such as NULL dereference or RCU locking issues) are covered by standard kernel bug detectors and KASAN/LOCKDEP. Therefore, dedicated KMSAN fuzzing is not justified.",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies net/mac80211/tx.c in ieee80211_8023_xmit() to set info-\u003eband from the channel context configuration for non-MLD interfaces and drop packets if the channel context configuration is NULL. This is part of the 802.3 transmit encapsulation offload path in the mac80211 wireless networking subsystem, reachable when hardware encapsulation offload is supported (such as via MT7921U USB emulated devices). Fuzzing is warranted to test this transmit path and null-check handling.",
  "WorthFuzzing": true
}

1/1 2026/09/28 00:24 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit a3e8879f3880d379aa4d2701135635f522db8787\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Mon Sep 28 00:24:16 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/net/mac80211/tx.c b/net/mac80211/tx.c\nindex c8217f6d146e7..b88acb18e04d8 100644\n--- a/net/mac80211/tx.c\n+++ b/net/mac80211/tx.c\n@@ -4735,6 +4735,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n {\n \tstruct ieee80211_tx_info *info;\n \tstruct ieee80211_local *local = sdata-\u003elocal;\n+\tstruct ieee80211_chanctx_conf *chanctx_conf;\n \tstruct tid_ampdu_tx *tid_tx = NULL;\n \tstruct sk_buff *seg, *next;\n \tunsigned int skbs = 0, len = 0;\n@@ -4784,6 +4785,16 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n \t\tsdata = container_of(sdata-\u003ebss,\n \t\t\t\t     struct ieee80211_sub_if_data, u.ap);\n \n+\t/* MLD transmissions must not rely on the band */\n+\tif (!ieee80211_vif_is_mld(\u0026sdata-\u003evif)) {\n+\t\tchanctx_conf = rcu_dereference(sdata-\u003evif.bss_conf.chanctx_conf);\n+\t\tif (unlikely(!chanctx_conf)) {\n+\t\t\tkfree_skb_list(skb);\n+\t\t\treturn;\n+\t\t}\n+\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\n+\t}\n+\n \tinfo-\u003eflags |= IEEE80211_TX_CTL_HW_80211_ENCAP;\n \tinfo-\u003econtrol.vif = \u0026sdata-\u003evif;\n \n"
}

2/1 2026/09/28 00:24 agent patch-evaluator
2m Model:
core

Args:
null

Results:
{
  "EnableConfigs": [
    "MAC80211",
    "CFG80211",
    "MT7921U"
  ],
  "FocusSymbols": [
    "ieee80211_8023_xmit",
    "ieee80211_subif_start_xmit_8023"
  ],
  "Reasoning": "The patch modifies net/mac80211/tx.c in ieee80211_8023_xmit() to set info-\u003eband from the channel context configuration for non-MLD interfaces and drop packets if the channel context configuration is NULL. This is part of the 802.3 transmit encapsulation offload path in the mac80211 wireless networking subsystem, reachable when hardware encapsulation offload is supported (such as via MT7921U USB emulated devices). Fuzzing is warranted to test this transmit path and null-check handling.",
  "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 a3e8879f3880d379aa4d2701135635f522db8787
Author: syz-cluster <triage@syzkaller.com>
Date:   Mon Sep 28 00:24:16 2026 +0000

    syz-cluster: applied patch under review

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c8217f6d146e7..b88acb18e04d8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4735,6 +4735,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 {
 	struct ieee80211_tx_info *info;
 	struct ieee80211_local *local = sdata->local;
+	struct ieee80211_chanctx_conf *chanctx_conf;
 	struct tid_ampdu_tx *tid_tx = NULL;
 	struct sk_buff *seg, *next;
 	unsigned int skbs = 0, len = 0;
@@ -4784,6 +4785,16 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 		sdata = container_of(sdata->bss,
 				     struct ieee80211_sub_if_data, u.ap);
 
+	/* MLD transmissions must not rely on the band */
+	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+		chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+		if (unlikely(!chanctx_conf)) {
+			kfree_skb_list(skb);
+			return;
+		}
+		info->band = chanctx_conf->def.chan->band;
+	}
+
 	info->flags |= IEEE80211_TX_CTL_HW_80211_ENCAP;
 	info->control.vif = &sdata->vif;
 

3/2 2026/09/28 00:24 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 3198
							output: 41
							thoughts: 93
						

Thoughts:
Here's my analysis of the situation:

**Reviewing the Network Driver Patch**

Alright, let's dive into this patch and the associated review request. My initial focus is on the modified file, `net/mac80211/tx.c`. I need to understand the implications of these changes, and the specific function of interest is `ieee80211_8023_xmit`.

To properly understand the modifications and their impact, I need to get the bigger picture. I'm going to jump into `net/mac80211/tx.c` and take a look around lines 4735-4800. This should give me the context I need – what was there before, what's been changed, and why. I'll need to consider how this function interacts with other parts of the mac80211 stack, any potential side effects, and if this change addresses a known issue or introduces new functionality. Let's get started.



4/2 2026/09/28 00:24 tool read-file
0m Args:
{
  "File": "net/mac80211/tx.c",
  "FirstLine": 4730,
  "LineCount": 80
}

Results:
{
  "Contents": "4730:\t}\n4731:\t\n4732:\tstatic void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n4733:\t\t\t\t\tstruct net_device *dev, struct sta_info *sta,\n4734:\t\t\t\t\tstruct ieee80211_key *key, struct sk_buff *skb)\n4735:\t{\n4736:\t\tstruct ieee80211_tx_info *info;\n4737:\t\tstruct ieee80211_local *local = sdata-\u003elocal;\n4738:\t\tstruct ieee80211_chanctx_conf *chanctx_conf;\n4739:\t\tstruct tid_ampdu_tx *tid_tx = NULL;\n4740:\t\tstruct sk_buff *seg, *next;\n4741:\t\tunsigned int skbs = 0, len = 0;\n4742:\t\tu16 queue;\n4743:\t\tu8 tid;\n4744:\t\n4745:\t\tqueue = ieee80211_select_queue(sdata, sta, skb);\n4746:\t\tskb_set_queue_mapping(skb, queue);\n4747:\t\n4748:\t\tif (unlikely(test_bit(SCAN_SW_SCANNING, \u0026local-\u003escanning)) \u0026\u0026\n4749:\t\t    test_bit(SDATA_STATE_OFFCHANNEL, \u0026sdata-\u003estate))\n4750:\t\t\tgoto out_free;\n4751:\t\n4752:\t\tskb = skb_share_check(skb, GFP_ATOMIC);\n4753:\t\tif (unlikely(!skb))\n4754:\t\t\treturn;\n4755:\t\n4756:\t\tieee80211_aggr_check(sdata, sta, skb);\n4757:\t\n4758:\t\ttid = skb-\u003epriority \u0026 IEEE80211_QOS_CTL_TAG1D_MASK;\n4759:\t\n4760:\t\tif (sta)\n4761:\t\t\ttid_tx = rcu_dereference(sta-\u003eampdu_mlme.tid_tx[tid]);\n4762:\t\tif (tid_tx) {\n4763:\t\t\tif (!test_bit(HT_AGG_STATE_OPERATIONAL, \u0026tid_tx-\u003estate)) {\n4764:\t\t\t\t/* fall back to non-offload slow path */\n4765:\t\t\t\t__ieee80211_subif_start_xmit(skb, dev, 0,\n4766:\t\t\t\t\t\t\t     IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,\n4767:\t\t\t\t\t\t\t     0);\n4768:\t\t\t\treturn;\n4769:\t\t\t}\n4770:\t\n4771:\t\t\tif (tid_tx-\u003etimeout)\n4772:\t\t\t\ttid_tx-\u003elast_tx = jiffies;\n4773:\t\t}\n4774:\t\n4775:\t\tskb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata));\n4776:\t\tif (!skb)\n4777:\t\t\treturn;\n4778:\t\n4779:\t\tinfo = IEEE80211_SKB_CB(skb);\n4780:\t\tmemset(info, 0, sizeof(*info));\n4781:\t\n4782:\t\tinfo-\u003ehw_queue = sdata-\u003evif.hw_queue[queue];\n4783:\t\n4784:\t\tif (sdata-\u003evif.type == NL80211_IFTYPE_AP_VLAN)\n4785:\t\t\tsdata = container_of(sdata-\u003ebss,\n4786:\t\t\t\t\t     struct ieee80211_sub_if_data, u.ap);\n4787:\t\n4788:\t\t/* MLD transmissions must not rely on the band */\n4789:\t\tif (!ieee80211_vif_is_mld(\u0026sdata-\u003evif)) {\n4790:\t\t\tchanctx_conf = rcu_dereference(sdata-\u003evif.bss_conf.chanctx_conf);\n4791:\t\t\tif (unlikely(!chanctx_conf)) {\n4792:\t\t\t\tkfree_skb_list(skb);\n4793:\t\t\t\treturn;\n4794:\t\t\t}\n4795:\t\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\n4796:\t\t}\n4797:\t\n4798:\t\tinfo-\u003eflags |= IEEE80211_TX_CTL_HW_80211_ENCAP;\n4799:\t\tinfo-\u003econtrol.vif = \u0026sdata-\u003evif;\n4800:\t\n4801:\t\tif (key)\n4802:\t\t\tinfo-\u003econtrol.hw_key = \u0026key-\u003econf;\n4803:\t\n4804:\t\tskb_list_walk_safe(skb, seg, next) {\n4805:\t\t\tskbs++;\n4806:\t\t\tlen += seg-\u003elen;\n4807:\t\t\tif (seg != skb)\n4808:\t\t\t\tmemcpy(IEEE80211_SKB_CB(seg), info, sizeof(*info));\n4809:\t\t}\n"
}

5/2 2026/09/28 00:24 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 4958
							output: 43
							thoughts: 29
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating the 802.3 Transmission Path**

Right, let's dive into this `ieee80211_8023_xmit` function. I need to understand its role in the data transmission process. Specifically, I want to trace the calls to this function. I'll need to figure out where it's being invoked within the broader network stack context. Knowing the call sites will be critical to grasping its purpose.

Beyond just the call graph, I'll need to examine the function's internal operations. What kind of data is it receiving? What modifications or encapsulations is it performing on the Ethernet frame, if any? Is it related to fragmentation, queueing, or hardware offloading? I'll probably be able to infer all of this, by quickly skimming the code, but I need to make sure I am on the right path.



6/2 2026/09/28 00:24 tool grepper
0m Args:
{
  "Expression": "ieee80211_8023_xmit",
  "PathPrefix": "net/mac80211"
}

Results:
{
  "Output": "net/mac80211/tx.c=4712=static bool ieee80211_tx_8023(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-4731-\nnet/mac80211/tx.c:4732:static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\nnet/mac80211/tx.c-4733-\t\t\t\tstruct net_device *dev, struct sta_info *sta,\n--\nnet/mac80211/tx.c=4855=static void __ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\n--\nnet/mac80211/tx.c-4902-\tsk_pacing_shift_update(skb-\u003esk, sdata-\u003elocal-\u003ehw.tx_sk_pacing_shift);\nnet/mac80211/tx.c:4903:\tieee80211_8023_xmit(sdata, dev, sta, key, skb);\nnet/mac80211/tx.c-4904-\tgoto out;\n"
}

7/2 2026/09/28 00:24 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 5590
							output: 49
							thoughts: 29
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, tailored for an expert audience:

**Analyzing `__ieee80211_subif_start_xmit_8023` Callers**

Alright, let's dive in. My immediate thought is to trace the callers of the `__ieee80211_subif_start_xmit_8023` function. This is key to understanding its role within the broader 802.11 stack, and how data actually gets pushed onto the network. I need to figure out the entry points.

I'm thinking about the different possible layers – likely a combination of the networking stack, MAC layer, and potentially drivers. It's almost certain it is used with the 802.3 encapsulation in a certain configuration. Now I need to consider all the various entry points from the higher layers, because this function is low-level. I'll be looking for clues in related functions as well. Knowing the callers will help me visualize the data flow, and identify where this function is being invoked and why. This is the first step in debugging or understanding the complete data path of an 802.3 frame.



8/2 2026/09/28 00:24 tool grepper
0m Args:
{
  "Expression": "__ieee80211_subif_start_xmit_8023",
  "PathPrefix": "net/mac80211"
}

Results:
{
  "Output": "net/mac80211/tx.c=4835=static bool ieee80211_check_mcast_offload(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-4854-\nnet/mac80211/tx.c:4855:static void __ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\nnet/mac80211/tx.c-4856-\t\t\t\t\t      struct net_device *dev)\n--\nnet/mac80211/tx.c=4912=netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\n--\nnet/mac80211/tx.c-4929-\t\twhile ((skb = __skb_dequeue(\u0026queue)))\nnet/mac80211/tx.c:4930:\t\t\t__ieee80211_subif_start_xmit_8023(skb, dev);\nnet/mac80211/tx.c-4931-\t} else {\nnet/mac80211/tx.c:4932:\t\t__ieee80211_subif_start_xmit_8023(skb, dev);\nnet/mac80211/tx.c-4933-\t}\n"
}

9/2 2026/09/28 00:24 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 6324
							output: 48
							thoughts: 82
						

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

**Diving into the 802.3 Transmit Path in mac80211**

Okay, so I'm focusing on `ieee80211_subif_start_xmit_8023`. This is the core function – the network device's `ndo_start_xmit` callback – for handling 802.3 frames within the mac80211 framework. It's the entry point for the transmit path when dealing with standard Ethernet-style frames (as opposed to 802.11 wireless frames that we might be more used to dealing with in mac80211). Now, the crucial thing is, where *exactly* is this function being called within the system? I need to understand its context and how it fits into the broader data flow. Let's trace all of the references to `ieee80211_subif_start_xmit_8023`. Time to dig in!



10/2 2026/09/28 00:24 tool grepper
0m Args:
{
  "Expression": "ieee80211_subif_start_xmit_8023",
  "PathPrefix": "net/mac80211"
}

Results:
{
  "Output": "net/mac80211/ieee80211_i.h=2229=netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,\nnet/mac80211/ieee80211_i.h-2230-\t\t\t\t       struct net_device *dev);\nnet/mac80211/ieee80211_i.h:2231:netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\nnet/mac80211/ieee80211_i.h-2232-\t\t\t\t\t    struct net_device *dev);\n--\nnet/mac80211/iface.c=1076=static const struct net_device_ops ieee80211_dataif_8023_ops = {\n--\nnet/mac80211/iface.c-1079-\t.ndo_uninit\t\t= ieee80211_uninit,\nnet/mac80211/iface.c:1080:\t.ndo_start_xmit\t\t= ieee80211_subif_start_xmit_8023,\nnet/mac80211/iface.c-1081-\t.ndo_set_rx_mode\t= ieee80211_set_multicast_list,\n--\nnet/mac80211/tx.c=4835=static bool ieee80211_check_mcast_offload(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-4854-\nnet/mac80211/tx.c:4855:static void __ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\nnet/mac80211/tx.c-4856-\t\t\t\t\t      struct net_device *dev)\n--\nnet/mac80211/tx.c-4911-\nnet/mac80211/tx.c:4912:netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\nnet/mac80211/tx.c-4913-\t\t\t\t\t    struct net_device *dev)\n--\nnet/mac80211/tx.c-4929-\t\twhile ((skb = __skb_dequeue(\u0026queue)))\nnet/mac80211/tx.c:4930:\t\t\t__ieee80211_subif_start_xmit_8023(skb, dev);\nnet/mac80211/tx.c-4931-\t} else {\nnet/mac80211/tx.c:4932:\t\t__ieee80211_subif_start_xmit_8023(skb, dev);\nnet/mac80211/tx.c-4933-\t}\n"
}

11/2 2026/09/28 00:24 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 7505
							output: 45
							thoughts: 809
						

Thoughts:
**Analyzing a Recent mac80211 Change**

Okay, first things first, I need to understand the context of this code change. I need to figure out *why* this modification was made to `net/mac80211/tx.c` and which commit introduced it. Ideally, I'd have direct access to `git` to review the log or commit details, but since I'm operating in a limited environment, I'll have to work with what I have. I'll see if I can use a "grepper" tool or something similar to trace the commit. I could also revisit the patch diff itself to glean some clues.

Looking at the diff, it appears a new `chanctx_conf` variable is introduced within the `ieee80211_8023_xmit` function, and some conditional logic is added to set `info->band`. The comment suggests this might be related to Multicast Listener Discovery (MLD) transmissions and avoiding a dependency on the band configuration. It looks like it's trying to get the band information from the channel context. This feels like it might be addressing a subtle race condition or a corner case related to how MLD packets are handled in the transmission path. It seems like it prevents band from being NULL when vif is MLD.

Now, I need to consider the implications of this change within a larger testing context. I know that `mac80211` is reachable in virtualized environments like QEMU and syzkaller. I'm specifically interested in `mac80211_hwsim`, which syzkaller leverages extensively via nl80211. My concern is whether this change impacts how `mac80211_hwsim` or other virtual drivers support 802.3 xmit or hardware 802.11 encapsulation. I need to verify if `ieee80211_8023_xmit` is even reachable in those environments. I'll search for where `ieee80211_dataif_8023_ops` is used as that function is likely the one that calls `ieee80211_8023_xmit`.



12/2 2026/09/28 00:24 tool grepper
0m Args:
{
  "Expression": "ieee80211_dataif_8023_ops",
  "PathPrefix": "net/mac80211"
}

Results:
{
  "Output": "net/mac80211/iface.c=1018=static int ieee80211_netdev_fill_forward_path(struct net_device_path_ctx *ctx,\n--\nnet/mac80211/iface.c-1075-\nnet/mac80211/iface.c:1076:static const struct net_device_ops ieee80211_dataif_8023_ops = {\nnet/mac80211/iface.c-1077-\t.ndo_open\t\t= ieee80211_open,\n--\nnet/mac80211/iface.c=1139=static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata)\n--\nnet/mac80211/iface.c-1160-\nnet/mac80211/iface.c:1161:\tsdata-\u003edev-\u003enetdev_ops = enabled ? \u0026ieee80211_dataif_8023_ops :\nnet/mac80211/iface.c-1162-\t\t\t\t\t   \u0026ieee80211_dataif_ops;\n"
}

13/2 2026/09/28 00:24 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 9178
							output: 42
							thoughts: 40
						

Thoughts:
Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person:

**Diving into `ieee80211_set_vif_encap_ops`**

Alright, let's dissect this. My focus is on understanding the encapsulation operations in mac80211, and that means I should be looking at `ieee80211_set_vif_encap_ops`. I know this function is crucial for defining how a virtual interface (VIF) within the mac80211 framework handles data framing and the specifics of its interaction with the underlying hardware, so I'll be digging into `net/mac80211/iface.c` to understand the details. My goal is to figure out the exact mechanisms by which different VIF types are configured with appropriate encapsulation operations. This likely involves handling various 802.11 frame formats, potentially including things like mesh, IBSS, AP, and station mode intricacies, so I expect a comprehensive look. I want to see how these operations impact packet processing, fragmenting, and reassembly. I'll need to pay close attention to the parameter passing and any potential side effects on other related functions in the mac80211 framework. I anticipate this function is a key piece in ensuring proper data transmission and reception, so a careful analysis is warranted.



14/2 2026/09/28 00:25 tool read-file
0m Args:
{
  "File": "net/mac80211/iface.c",
  "FirstLine": 1138,
  "LineCount": 40
}

Results:
{
  "Contents": "1138:\t\n1139:\tstatic void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata)\n1140:\t{\n1141:\t\tstruct ieee80211_local *local = sdata-\u003elocal;\n1142:\t\tstruct ieee80211_sub_if_data *bss = sdata;\n1143:\t\tbool enabled;\n1144:\t\n1145:\t\tif (sdata-\u003evif.type == NL80211_IFTYPE_AP_VLAN) {\n1146:\t\t\tif (!sdata-\u003ebss)\n1147:\t\t\t\treturn;\n1148:\t\n1149:\t\t\tbss = container_of(sdata-\u003ebss, struct ieee80211_sub_if_data, u.ap);\n1150:\t\t}\n1151:\t\n1152:\t\tif (!ieee80211_hw_check(\u0026local-\u003ehw, SUPPORTS_TX_ENCAP_OFFLOAD) ||\n1153:\t\t    !ieee80211_iftype_supports_hdr_offload(bss-\u003evif.type))\n1154:\t\t\treturn;\n1155:\t\n1156:\t\tenabled = bss-\u003evif.offload_flags \u0026 IEEE80211_OFFLOAD_ENCAP_ENABLED;\n1157:\t\tif (sdata-\u003ewdev.use_4addr \u0026\u0026\n1158:\t\t    !(bss-\u003evif.offload_flags \u0026 IEEE80211_OFFLOAD_ENCAP_4ADDR))\n1159:\t\t\tenabled = false;\n1160:\t\n1161:\t\tsdata-\u003edev-\u003enetdev_ops = enabled ? \u0026ieee80211_dataif_8023_ops :\n1162:\t\t\t\t\t\t   \u0026ieee80211_dataif_ops;\n1163:\t}\n1164:\t\n1165:\tstatic void ieee80211_recalc_sdata_offload(struct ieee80211_sub_if_data *sdata)\n1166:\t{\n1167:\t\tstruct ieee80211_local *local = sdata-\u003elocal;\n1168:\t\tstruct ieee80211_sub_if_data *vsdata;\n1169:\t\n1170:\t\tif (ieee80211_set_sdata_offload_flags(sdata)) {\n1171:\t\t\tdrv_update_vif_offload(local, sdata);\n1172:\t\t\tieee80211_set_vif_encap_ops(sdata);\n1173:\t\t}\n1174:\t\n1175:\t\tlist_for_each_entry(vsdata, \u0026local-\u003einterfaces, list) {\n1176:\t\t\tif (vsdata-\u003evif.type != NL80211_IFTYPE_AP_VLAN ||\n1177:\t\t\t    vsdata-\u003ebss != \u0026sdata-\u003eu.ap)\n"
}

15/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 10372
							output: 24
							thoughts: 27
						

Thoughts:
Okay, here's my attempt at summarizing those thoughts from an expert's perspective, using the first person and aiming for a fulsome rendering:

**Investigating Network Offload Capabilities**

Alright, let's dive into this. I need to understand which network drivers out there are actually implementing, or at least advertising, support for transmit encapsulation offload or, more specifically, 802.3 transmit offload. This kind of investigation is critical for optimizing network performance. My expertise tells me that identifying these drivers is the first step in determining which hardware/software combinations can leverage these offloading features.

I'm thinking, are we talking about new NICs using the most recent standards, or is there legacy support out there? I need to know where I can expect to find this functionality to make some informed decisions about the best hardware to deploy for a particular task. From the vendor-specific documentation, I'll need to tease out the specific configurations and commands to enable and monitor the offload features. Finally, how do they measure up against other technologies and methods, like hardware checksum offload and TCP Segmentation Offload, when used in conjunction? I also have to investigate how these features are exposed, or rather, how they aren't, when using a virtualized environment.



16/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "SUPPORTS_TX_ENCAP_OFFLOAD"
}

Results:
{
  "Output": "drivers/net/wireless/ath/ath10k/mac.c=9971=int ath10k_mac_register(struct ath10k *ar)\n--\ndrivers/net/wireless/ath/ath10k/mac.c-10151-\t\t    WMI_VDEV_PARAM_UNSUPPORTED)\ndrivers/net/wireless/ath/ath10k/mac.c:10152:\t\t\tieee80211_hw_set(ar-\u003ehw, SUPPORTS_TX_ENCAP_OFFLOAD);\ndrivers/net/wireless/ath/ath10k/mac.c-10153-\t}\n--\ndrivers/net/wireless/ath/ath11k/mac.c=10454=static int __ath11k_mac_register(struct ath11k *ar)\n--\ndrivers/net/wireless/ath/ath11k/mac.c-10523-\tif (ath11k_frame_mode == ATH11K_HW_TXRX_ETHERNET) {\ndrivers/net/wireless/ath/ath11k/mac.c:10524:\t\tieee80211_hw_set(ar-\u003ehw, SUPPORTS_TX_ENCAP_OFFLOAD);\ndrivers/net/wireless/ath/ath11k/mac.c-10525-\t\tieee80211_hw_set(ar-\u003ehw, SUPPORTS_RX_DECAP_OFFLOAD);\n--\ndrivers/net/wireless/ath/ath12k/mac.c=14793=static int ath12k_mac_hw_register(struct ath12k_hw *ah)\n--\ndrivers/net/wireless/ath/ath12k/mac.c-14903-\tif (test_bit(WMI_TLV_SERVICE_ETH_OFFLOAD, ar-\u003ewmi-\u003ewmi_ab-\u003esvc_map)) {\ndrivers/net/wireless/ath/ath12k/mac.c:14904:\t\tieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);\ndrivers/net/wireless/ath/ath12k/mac.c-14905-\t\tieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);\n--\ndrivers/net/wireless/mediatek/mt76/mt7915/init.c=388=mt7915_init_wiphy(struct mt7915_phy *phy)\n--\ndrivers/net/wireless/mediatek/mt76/mt7915/init.c-439-\tieee80211_hw_set(hw, HAS_RATE_CONTROL);\ndrivers/net/wireless/mediatek/mt76/mt7915/init.c:440:\tieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);\ndrivers/net/wireless/mediatek/mt76/mt7915/init.c-441-\tieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);\n--\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c=750=int mt792x_init_wiphy(struct ieee80211_hw *hw)\n--\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c-834-\tieee80211_hw_set(hw, HAS_RATE_CONTROL);\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c:835:\tieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c-836-\tieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c=478=mt7996_init_wiphy(struct ieee80211_hw *hw, struct mtk_wed_device *wed)\n--\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c-537-\tieee80211_hw_set(hw, HAS_RATE_CONTROL);\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c:538:\tieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);\ndrivers/net/wireless/mediatek/mt76/mt7996/init.c-539-\tieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);\n--\ninclude/net/mac80211.h=2825=struct ieee80211_txq {\n--\ninclude/net/mac80211.h-3054- *\ninclude/net/mac80211.h:3055: * @IEEE80211_HW_SUPPORTS_TX_ENCAP_OFFLOAD: Hardware supports tx encapsulation\ninclude/net/mac80211.h-3056- *\toffload\n--\ninclude/net/mac80211.h=3091=enum ieee80211_hw_flags {\n--\ninclude/net/mac80211.h-3140-\tIEEE80211_HW_AMPDU_KEYBORDER_SUPPORT,\ninclude/net/mac80211.h:3141:\tIEEE80211_HW_SUPPORTS_TX_ENCAP_OFFLOAD,\ninclude/net/mac80211.h-3142-\tIEEE80211_HW_SUPPORTS_RX_DECAP_OFFLOAD,\n--\nnet/mac80211/debugfs.c=405=static const char *hw_flag_names[] = {\n--\nnet/mac80211/debugfs.c-455-\tFLAG(AMPDU_KEYBORDER_SUPPORT),\nnet/mac80211/debugfs.c:456:\tFLAG(SUPPORTS_TX_ENCAP_OFFLOAD),\nnet/mac80211/debugfs.c-457-\tFLAG(SUPPORTS_RX_DECAP_OFFLOAD),\n--\nnet/mac80211/iface.c=1099=static bool ieee80211_set_sdata_offload_flags(struct ieee80211_sub_if_data *sdata)\n--\nnet/mac80211/iface.c-1105-\nnet/mac80211/iface.c:1106:\tif (ieee80211_hw_check(\u0026local-\u003ehw, SUPPORTS_TX_ENCAP_OFFLOAD) \u0026\u0026\nnet/mac80211/iface.c-1107-\t    ieee80211_iftype_supports_hdr_offload(sdata-\u003evif.type)) {\n--\nnet/mac80211/iface.c=1139=static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata)\n--\nnet/mac80211/iface.c-1151-\nnet/mac80211/iface.c:1152:\tif (!ieee80211_hw_check(\u0026local-\u003ehw, SUPPORTS_TX_ENCAP_OFFLOAD) ||\nnet/mac80211/iface.c-1153-\t    !ieee80211_iftype_supports_hdr_offload(bss-\u003evif.type))\n--\nnet/mac80211/iface.c=1184=void ieee80211_recalc_offload(struct ieee80211_local *local)\n--\nnet/mac80211/iface.c-1187-\nnet/mac80211/iface.c:1188:\tif (!ieee80211_hw_check(\u0026local-\u003ehw, SUPPORTS_TX_ENCAP_OFFLOAD))\nnet/mac80211/iface.c-1189-\t\treturn;\n"
}

17/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 12834
							output: 37
							thoughts: 99
						

Thoughts:
Okay, here's my thought process on this, as I understand it:

**Investigating TX Encap Offload Support in Wireless Drivers**

Alright, the core question is whether or not `mac80211_hwsim` has implemented support for `SUPPORTS_TX_ENCAP_OFFLOAD`. That's the first thing I need to confirm. I'll need to dig into the `mac80211_hwsim` code directly to be certain. Specifically, I'll need to check the relevant code and configurations within `mac80211_hwsim`.

Beyond that, I'm thinking about broader support in the Linux kernel. Does USB WiFi in general offer this functionality? What about more specific USB WiFi devices? I'm particularly interested in the `mt76` family, and the `mt7921u` in particular. I'll probably need to look at specific driver implementations for those.

Finally, just to be thorough and because it's good practice, I'll extend my search beyond physical hardware. Are there any other virtual wireless devices, besides `mac80211_hwsim`, that *might* be implementing it? Let's check `drivers/net/wireless/virtual/` or any other virtual wireless device.



18/2 2026/09/28 00:25 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "SUPPORTS_TX_ENCAP_OFFLOAD",
  "PathPrefix": "drivers/net/wireless/virtual"
}

Results:
{
  "error": "no matches"
}

19/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 13261
							output: 34
							thoughts: 17
						

Thoughts:
Here's my thought process, as it stands:

**Checking Wireless Driver Infrastructure**

Okay, first things first. Before I go too deep down any particular rabbit hole, I need to take a quick sanity check. My gut instinct tells me the issue is probably in the wireless driver space. So, I need to see if there's any relevant simulation or virtualization infrastructure I should be aware of, right off the bat. The directory to investigate should be `drivers/net/wireless/`. I'm hoping to find either some specifically built-in simulation environment for these drivers, or maybe some virtualization tools that interact with the wireless functionality. It's a key first step to understanding how things are wired up.



20/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "mac80211_hwsim",
  "PathPrefix": "drivers/net/wireless"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1588 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/virtual/Kconfig=1=config MAC80211_HWSIM\n--\ndrivers/net/wireless/virtual/Kconfig-7-\t  needed for normal wireless LAN usage and is only for testing. See\ndrivers/net/wireless/virtual/Kconfig:8:\t  Documentation/networking/mac80211_hwsim for more information on how\ndrivers/net/wireless/virtual/Kconfig-9-\t  to use this tool.\n--\ndrivers/net/wireless/virtual/Kconfig-11-\t  To compile this driver as a module, choose M here: the module will be\ndrivers/net/wireless/virtual/Kconfig:12:\t  called mac80211_hwsim.  If unsure, say N.\ndrivers/net/wireless/virtual/Kconfig-13-\n--\ndrivers/net/wireless/virtual/Makefile:1:obj-$(CONFIG_MAC80211_HWSIM)\t+= mac80211_hwsim.o\ndrivers/net/wireless/virtual/Makefile:2:mac80211_hwsim-objs\t\t+= mac80211_hwsim_main.o\ndrivers/net/wireless/virtual/Makefile:3:mac80211_hwsim-objs\t\t+= mac80211_hwsim_nan.o\ndrivers/net/wireless/virtual/Makefile-4-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-2-/*\ndrivers/net/wireless/virtual/mac80211_hwsim.h:3: * mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211\ndrivers/net/wireless/virtual/mac80211_hwsim.h-4- * Copyright (c) 2008, Jouni Malinen \u003cj@w1.fi\u003e\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h=23=enum hwsim_tx_control_flags {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-33- * entities such as wmediumd to receive and process all broadcasted\ndrivers/net/wireless/virtual/mac80211_hwsim.h:34: * frames from a mac80211_hwsim radio device.\ndrivers/net/wireless/virtual/mac80211_hwsim.h-35- *\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-42- * Once registered the user application has to take responsibility of\ndrivers/net/wireless/virtual/mac80211_hwsim.h:43: * broadcasting the frames to all listening mac80211_hwsim radio\ndrivers/net/wireless/virtual/mac80211_hwsim.h-44- * interfaces.\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-55- * @HWSIM_CMD_REGISTER: request to register and received all broadcasted\ndrivers/net/wireless/virtual/mac80211_hwsim.h:56: *\tframes by any mac80211_hwsim radio device.\ndrivers/net/wireless/virtual/mac80211_hwsim.h-57- * @HWSIM_CMD_FRAME: send/receive a broadcasted frame from/to kernel/user\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-2-/*\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:3: * mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-4- * Copyright (c) 2008, Jouni Malinen \u003cj@w1.fi\u003e\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-13-#include \u003cnet/mac80211.h\u003e\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:14:#include \"mac80211_hwsim.h\"\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:15:#include \"mac80211_hwsim_nan.h\"\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-16-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h=27=struct hwsim_sta_priv {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-37-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:38:struct mac80211_hwsim_link_data {\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-39-\tu32 link_id;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-50-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:51:struct mac80211_hwsim_data {\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-52-\tstruct list_head list;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-65-\t/* Storage space for channels, etc. */\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:66:\tstruct mac80211_hwsim_phy_data *phy_data;\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-67-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-144-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:145:\tstruct mac80211_hwsim_link_data link_data[IEEE80211_MLD_MAX_NUM_LINKS];\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-146-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:147:\tstruct mac80211_hwsim_nan_data nan;\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-148-};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h=151=extern struct list_head hwsim_radios;\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-152-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:153:ktime_t mac80211_hwsim_tsf_to_boottime(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-154-\t\t\t\t       u64 tsf);\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:155:u64 mac80211_hwsim_boottime_to_tsf(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-156-\t\t\t\t   ktime_t ts);\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-157-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:158:u64 mac80211_hwsim_get_tsf(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-159-\t\t\t   struct ieee80211_vif *vif);\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-160-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:161:void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-162-\t\t\t     struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2-/*\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:3: * mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4- * Copyright (c) 2008, Jouni Malinen \u003cj@w1.fi\u003e\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-40-#include \u003clinux/string.h\u003e\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:41:#include \"mac80211_hwsim.h\"\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:42:#include \"mac80211_hwsim_i.h\"\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-43-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=335=static const struct class hwsim_class = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:336:\t.name\t= \"mac80211_hwsim\"\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-337-};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=604=hwsim_vendor_test_policy[QCA_WLAN_VENDOR_ATTR_MAX + 1] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-607-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:608:static int mac80211_hwsim_vendor_cmd_test(struct wiphy *wiphy,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-609-\t\t\t\t\t  struct wireless_dev *wdev,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-630-\t *\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:631:\t * event_idx = 0 (index in mac80211_hwsim_vendor_commands)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-632-\t */\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-658-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:659:static struct wiphy_vendor_command mac80211_hwsim_vendor_commands[] = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-660-\t{\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-663-\t\t.flags = WIPHY_VENDOR_CMD_NEED_NETDEV,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:664:\t\t.doit = mac80211_hwsim_vendor_cmd_test,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-665-\t\t.policy = hwsim_vendor_test_policy,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-670-/* Advertise support vendor specific events */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:671:static const struct nl80211_vendor_cmd_info mac80211_hwsim_vendor_events[] = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-672-\t{ .vendor_id = OUI_QCA, .subcmd = 1 },\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=679=static int hwsim_radios_generation = 1;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-680-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:681:static struct platform_driver mac80211_hwsim_driver = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-682-\t.driver = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:683:\t\t.name = \"mac80211_hwsim\",\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-684-\t},\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=687=static const struct rhashtable_params hwsim_rht_params = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-690-\t.key_len = ETH_ALEN,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:691:\t.key_offset = offsetof(struct mac80211_hwsim_data, addresses[1]),\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:692:\t.head_offset = offsetof(struct mac80211_hwsim_data, rht),\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-693-};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=704=struct hwsim_radiotap_ack_hdr {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-711-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:712:static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-713-{\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=908=static DECLARE_WORK(hwsim_virtio_rx, hwsim_virtio_rx_work);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-909-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:910:static int hwsim_tx_virtio(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-911-\t\t\t   struct sk_buff *skb)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-938-/* cause a linker error if this ends up being needed */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:939:extern int hwsim_tx_virtio(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-940-\t\t\t   struct sk_buff *skb);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=979=static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-980-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:981:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-982-\tstruct hwsim_vif_priv *vp = (void *)vif-\u003edrv_priv;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1004-\trcu_read_lock();\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1005:\tmac80211_hwsim_tx_frame(data-\u003ehw, skb,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1006-\t\t\t\trcu_dereference(vif-\u003ebss_conf.chanctx_conf)-\u003edef.chan);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1009-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1010:static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1011-\t\t\t\tstruct ieee80211_vif *vif, int ps)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1042-\trcu_read_lock();\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1043:\tmac80211_hwsim_tx_frame(data-\u003ehw, skb,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1044-\t\t\t\trcu_dereference(vif-\u003ebss_conf.chanctx_conf)-\u003edef.chan);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1049=static void hwsim_send_nullfunc_ps(void *dat, u8 *mac,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1051-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1052:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1053-\thwsim_send_nullfunc(data, mac, vif, 1);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1056=static void hwsim_send_nullfunc_no_ps(void *dat, u8 *mac,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1058-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1059:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1060-\thwsim_send_nullfunc(data, mac, vif, 0);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1063=static int hwsim_fops_ps_read(void *dat, u64 *val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1064-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1065:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1066-\t*val = data-\u003eps;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1070=static int hwsim_fops_ps_write(void *dat, u64 val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1071-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1072:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1073-\tenum ps_mode old_ps;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1110=static int hwsim_write_simulate_radar(void *dat, u64 val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1111-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1112:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1113-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1122=static ssize_t hwsim_background_cac_write(struct file *file,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1125-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1126:\tstruct mac80211_hwsim_data *data = file-\u003eprivate_data;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1127-\tchar buf[8] = {};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1174=static ssize_t hwsim_simulate_incumbent_signal_write(struct file *file,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1177-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1178:\tstruct mac80211_hwsim_data *data = file-\u003eprivate_data;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1179-\tstruct hwsim_chanctx_iter_arg arg = {};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1216=static int hwsim_fops_group_read(void *dat, u64 *val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1217-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1218:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1219-\t*val = data-\u003egroup;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1223=static int hwsim_fops_group_write(void *dat, u64 val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1224-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1225:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1226-\tdata-\u003egroup = val;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1234=static int hwsim_fops_rx_rssi_read(void *dat, u64 *val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1235-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1236:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1237-\t*val = data-\u003erx_rssi;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1241=static int hwsim_fops_rx_rssi_write(void *dat, u64 val)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1242-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1243:\tstruct mac80211_hwsim_data *data = dat;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1244-\tint rssi = (int)val;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1257=static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1264-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1265:static inline u64 mac80211_hwsim_get_sim_tsf(void)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1266-{\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1269-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1270:ktime_t mac80211_hwsim_tsf_to_boottime(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1271-\t\t\t\t       u64 tsf)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1277-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1278:u64 mac80211_hwsim_boottime_to_tsf(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1279-\t\t\t\t   ktime_t ts)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1285-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1286:u64 mac80211_hwsim_get_tsf(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1287-\t\t\t   struct ieee80211_vif *vif)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1288-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1289:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1290:\tu64 sim_time = mac80211_hwsim_get_sim_tsf();\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1291-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1296-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1297:static __le64 __mac80211_hwsim_get_tsf(struct mac80211_hwsim_data *data)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1298-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1299:\tu64 sim_time = mac80211_hwsim_get_sim_tsf();\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1300-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1305-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1306:static void mac80211_hwsim_set_tsf(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1307-\t\tstruct ieee80211_vif *vif, u64 tsf)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1308-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1309:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1310:\tu64 now = mac80211_hwsim_get_tsf(hw, vif);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1311-\tu64 delta = abs(tsf - now);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1327=static struct ieee80211_rate *\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1328:mac80211_hwsim_get_tx_rate(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1329-\t\t\t   struct ieee80211_tx_info *info)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1337-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1338:static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1339-\t\t\t\t      struct sk_buff *tx_skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1341-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1342:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1343-\tstruct sk_buff *skb;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1346-\tstruct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1347:\tstruct ieee80211_rate *txrate = mac80211_hwsim_get_tx_rate(hw, info);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1348-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1368-\t\t\t\t\t  (1 \u003c\u003c IEEE80211_RADIOTAP_CHANNEL));\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1369:\thdr-\u003ert_tsft = __mac80211_hwsim_get_tsf(data);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1370-\thdr-\u003ert_flags = 0;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1389-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1390:static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1391-\t\t\t\t       const u8 *addr)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1431-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1432:struct mac80211_hwsim_addr_match_data {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1433-\tu8 addr[ETH_ALEN];\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1436-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1437:static void mac80211_hwsim_addr_iter(void *data, u8 *mac,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1438-\t\t\t\t     struct ieee80211_vif *vif)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1440-\tint i;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1441:\tstruct mac80211_hwsim_addr_match_data *md = data;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1442-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1462-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1463:static bool mac80211_hwsim_addr_match(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1464-\t\t\t\t      const u8 *addr)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1465-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1466:\tstruct mac80211_hwsim_addr_match_data md = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1467-\t\t.ret = false,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1476-\t\t\t\t\t\t   IEEE80211_IFACE_ITER_NORMAL,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1477:\t\t\t\t\t\t   mac80211_hwsim_addr_iter,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1478-\t\t\t\t\t\t   \u0026md);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1482-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1483:static bool hwsim_ps_rx_ok(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1484-\t\t\t   struct sk_buff *skb)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1498-\t\tif (data-\u003eps_poll_pending \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1499:\t\t    mac80211_hwsim_addr_match(data, skb-\u003edata + 4)) {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1500-\t\t\tdata-\u003eps_poll_pending = false;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1508-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1509:static int hwsim_unicast_netgroup(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1510-\t\t\t\t  struct sk_buff *skb, int portid)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1531-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1532:static void mac80211_hwsim_config_mac_nl(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1533-\t\t\t\t\t const u8 *addr, bool add)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1534-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1535:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1536-\tu32 _portid = READ_ONCE(data-\u003ewmediumd);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1552-\tif (!msg_head) {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1553:\t\tpr_debug(\"mac80211_hwsim: problem with msg_head\\n\");\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1554-\t\tgoto nla_put_failure;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1575=static inline u16 trans_tx_rate_flags_ieee2hwsim(struct ieee80211_tx_rate *rate)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1604-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1605:static void mac80211_hwsim_write_tsf(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1606-\t\t\t\t     struct sk_buff *skb, u64 sim_time)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1616-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1617:\ttxrate = mac80211_hwsim_get_tx_rate(data-\u003ehw, info);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1618-\tif (txrate)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1645-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1646:static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1647-\t\t\t\t       struct sk_buff *my_skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1651-\tstruct sk_buff *skb;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1652:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1653-\tstruct ieee80211_hdr *hdr = (struct ieee80211_hdr *) my_skb-\u003edata;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1673-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1674:\tsim_tsf = mac80211_hwsim_get_sim_tsf();\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1675:\tmac80211_hwsim_write_tsf(data, my_skb, sim_tsf);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1676-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1683-\tif (msg_head == NULL) {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1684:\t\tpr_debug(\"mac80211_hwsim: problem with msg_head\\n\");\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1685-\t\tgoto nla_put_failure;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1756-err_free_txskb:\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1757:\tpr_debug(\"mac80211_hwsim: error occurred in %s\\n\", __func__);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1758-\tieee80211_free_txskb(hw, my_skb);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1771=struct tx_iter_data {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1777-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1778:static void mac80211_hwsim_tx_iter(void *_data, u8 *addr,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1779-\t\t\t\t   struct ieee80211_vif *vif)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1785-\t    vif-\u003etype == NL80211_IFTYPE_NAN_DATA) {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1786:\t\tdata-\u003ereceive = mac80211_hwsim_nan_receive(data-\u003ehw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1787-\t\t\t\t\t\t\t   data-\u003echannel,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1811-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1812:static void mac80211_hwsim_add_vendor_rtap(struct sk_buff *skb)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1813-{\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1859-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1860:static void mac80211_hwsim_rx(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1861-\t\t\t      struct ieee80211_rx_status *rx_status,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1891-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1892:\tmac80211_hwsim_add_vendor_rtap(skb);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1893-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1894-\tif (data-\u003enan.device_vif)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1895:\t\tmac80211_hwsim_nan_rx(data-\u003ehw, skb);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1896-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1901-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1902:static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1903-\t\t\t\t\t  struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1905-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1906:\tstruct mac80211_hwsim_data *data = hw-\u003epriv, *data2;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1907-\tbool ack = false;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1910-\tstruct ieee80211_rx_status rx_status;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1911:\tu64 sim_tsf = mac80211_hwsim_get_sim_tsf();\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1912-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1913:\tmac80211_hwsim_write_tsf(data, skb, sim_tsf);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1914-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1915:\tmac80211_hwsim_monitor_rx(hw, skb, chan);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1916-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1995-\t\t\t\tdata2-\u003ehw, IEEE80211_IFACE_ITER_NORMAL,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1996:\t\t\t\tmac80211_hwsim_tx_iter, \u0026tx_iter_data);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1997-\t\t\tif (!tx_iter_data.receive)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2024-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2025:\t\tif (mac80211_hwsim_addr_match(data2, hdr-\u003eaddr1))\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2026-\t\t\tack = true;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2027-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2028:\t\tmac80211_hwsim_rx(data2, \u0026rx_status, nskb);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2029-\t}\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=2035=static struct ieee80211_bss_conf *\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2036:mac80211_hwsim_select_tx_link(struct mac80211_hwsim_data *data,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2037-\t\t\t      struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2084-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2085:static int mac80211_hwsim_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2086-\t\t\t\t  struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2103-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2104:static void mac80211_hwsim_tx(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2105-\t\t\t      struct ieee80211_tx_control *control,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2107-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2108:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2109-\tstruct ieee80211_tx_info *txi = IEEE80211_SKB_CB(skb);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2139-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2140:\t\tmac80211_hwsim_nan_get_tx_chandef(hw, \u0026chandef);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2141-\t\tif (WARN_ON(!chandef.chan)) {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2170-\t\t} else {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2171:\t\t\tbss_conf = mac80211_hwsim_select_tx_link(data, vif, sta,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2172-\t\t\t\t\t\t\t\t hdr, \u0026link_sta);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2270-\tif (_portid || hwsim_virtio_enabled)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2271:\t\treturn mac80211_hwsim_tx_frame_nl(hw, skb, _portid, channel);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2272-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2275-\tdata-\u003etx_bytes += skb-\u003elen;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2276:\tack = mac80211_hwsim_tx_frame_no_nl(hw, skb, channel);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2277-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2278-\tif (ack \u0026\u0026 skb-\u003elen \u003e= 16)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2279:\t\tmac80211_hwsim_monitor_ack(channel, hdr-\u003eaddr2);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2280-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=2298=void ieee80211_hwsim_wake_tx_queue(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2307-\t     txq-\u003evif-\u003etype == NL80211_IFTYPE_NAN_DATA) \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2308:\t    !mac80211_hwsim_nan_txq_transmitting(hw, txq))\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2309-\t\treturn;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2311-\twhile ((skb = ieee80211_tx_dequeue(hw, txq)))\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2312:\t\tmac80211_hwsim_tx(hw, \u0026control, skb);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2313-}\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2314-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2315:static int mac80211_hwsim_start(struct ieee80211_hw *hw)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2316-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2317:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2318-\twiphy_dbg(hw-\u003ewiphy, \"%s\\n\", __func__);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2323-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2324:static void mac80211_hwsim_stop(struct ieee80211_hw *hw, bool suspend)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2325-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2326:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2327-\tstruct sk_buff *skb;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2346-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2347:static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2348-\t\t\t\t\tstruct ieee80211_vif *vif)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2355-\tif (vif-\u003etype != NL80211_IFTYPE_MONITOR)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2356:\t\tmac80211_hwsim_config_mac_nl(hw, vif-\u003eaddr, true);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2357-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=2368=static void\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2369:mac80211_hwsim_link_add_debugfs(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2370-\t\t\t\tstruct ieee80211_vif *vif,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2380-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2381:static int mac80211_hwsim_change_interface(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2382-\t\t\t\t\t   struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2401-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2402:static void mac80211_hwsim_remove_interface(\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2403-\tstruct ieee80211_hw *hw, struct ieee80211_vif *vif)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2410-\tif (vif-\u003etype != NL80211_IFTYPE_MONITOR)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2411:\t\tmac80211_hwsim_config_mac_nl(hw, vif-\u003eaddr, false);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2412-}\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2413-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2414:void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2415-\t\t\t     struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2417-{\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2418:\tstruct mac80211_hwsim_data *data = hw-\u003epriv;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2419-\tu32 _portid = READ_ONCE(data-\u003ewmediumd);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2428-\tif (_portid || hwsim_virtio_enabled)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2429:\t\treturn mac80211_hwsim_tx_frame_nl(hw, skb, _portid, chan);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2430-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2432-\tdata-\u003etx_bytes += skb-\u003elen;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:2433:\tmac80211_hwsim_tx_frame_no_nl(hw, skb, chan);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2434-\tdev_kfree_skb(skb);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-2436-\n\n"
}

21/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 29492
							output: 31
							thoughts: 120
						

Thoughts:
**Investigating Encapsulation Offload Support in Virtualized Environments**

Okay, let's see, I need to figure out if there are any accessible network drivers, specifically within a QEMU environment or through USB gadget emulation. I need to understand what's reachable. Now, a critical question arises: which drivers are actively using `SUPPORTS_TX_ENCAP_OFFLOAD`? Time to consult the `grep` output from that recent search. Hmm, looks like we have ath10k, ath11k, ath12k, and the mt76 family (specifically mt7915, mt792x, and mt7996) showing up. Interesting. Now, a crucial detail – is the mt7921u a USB device? I'm pretty sure that is important, so I need to verify that and if so I should prioritize that device for further investigation, Let me run another `grep` for mt7921u to confirm.



22/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "mt7921u",
  "PathPrefix": "drivers/net/wireless"
}

Results:
{
  "Output": "drivers/net/wireless/mediatek/mt76/mt7921/Makefile=5=obj-$(CONFIG_MT7921S) += mt7921s.o\ndrivers/net/wireless/mediatek/mt76/mt7921/Makefile:6:obj-$(CONFIG_MT7921U) += mt7921u.o\ndrivers/net/wireless/mediatek/mt76/mt7921/Makefile-7-\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/Makefile=11=mt7921s-y := sdio.o sdio_mac.o sdio_mcu.o\ndrivers/net/wireless/mediatek/mt76/mt7921/Makefile:12:mt7921u-y := usb.o\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-14-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:15:static const struct usb_device_id mt7921u_device_table[] = {\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-16-\t{ USB_DEVICE_AND_INTERFACE_INFO(0x0e8d, 0x7902, 0xff, 0xff, 0xff),\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c=35=static int\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:36:mt7921u_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-37-\t\t\t int cmd, int *seq)\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-64-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:65:static int mt7921u_mcu_init(struct mt792x_dev *dev)\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-66-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-70-\t\t.tailroom = MT_USB_TAIL_SIZE,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:71:\t\t.mcu_skb_send_msg = mt7921u_mcu_send_message,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-72-\t\t.mcu_parse_response = mt7921_mcu_parse_response,\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-88-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:89:static int mt7921u_mac_reset(struct mt792x_dev *dev)\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-90-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-149-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:150:static int mt7921u_probe(struct usb_interface *usb_intf,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-151-\t\t\t const struct usb_device_id *id)\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-171-\tstatic const struct mt792x_hif_ops hif_ops = {\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:172:\t\t.mcu_init = mt7921u_mcu_init,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-173-\t\t.init_reset = mt792xu_init_reset,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:174:\t\t.reset = mt7921u_mac_reset,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-175-\t};\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-263-#ifdef CONFIG_PM\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:264:static int mt7921u_suspend(struct usb_interface *intf, pm_message_t state)\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-265-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-290-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:291:static int mt7921u_resume(struct usb_interface *intf)\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-292-{\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-333-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:334:MODULE_DEVICE_TABLE(usb, mt7921u_device_table);\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-335-MODULE_FIRMWARE(MT7921_FIRMWARE_WM);\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c=336=MODULE_FIRMWARE(MT7921_ROM_PATCH);\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-337-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:338:static struct usb_driver mt7921u_driver = {\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-339-\t.name\t\t= KBUILD_MODNAME,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:340:\t.id_table\t= mt7921u_device_table,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:341:\t.probe\t\t= mt7921u_probe,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-342-\t.disconnect\t= mt792xu_disconnect,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-343-#ifdef CONFIG_PM\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:344:\t.suspend\t= mt7921u_suspend,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:345:\t.resume\t\t= mt7921u_resume,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:346:\t.reset_resume\t= mt7921u_resume,\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-347-#endif /* CONFIG_PM */\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-350-};\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:351:module_usb_driver(mt7921u_driver);\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-352-\n"
}

23/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 31956
							output: 30
							thoughts: 935
						

Thoughts:
**Fuzzing Potential: MT7921U and mac80211 with syzkaller**

Okay, so the `mt7921u` is a USB driver, and that's a key starting point.  Syzkaller has USB raw gadget emulation (`syz_usb_connect`, etc.), and I see that the `mt792x` driver calls `mt792x_init_wiphy`, which *potentially* sets `SUPPORTS_TX_ENCAP_OFFLOAD`. But wait, this goes deeper, `mac80211` itself is a *core* wireless networking subsystem, that's crucial.

Let's ground this in triage principles. The goal is to find crashes, regressions, exposed bugs. And remember, *reachability is the key*. We're only going to find bugs in code that *can* actually run in virtual environments.  Syzkaller is the perfect tool here.  The positive criteria is also in our favour, with logic modifications, refactorings, assertions, and drivers accessible via virtual buses all in play.

Now, the critical question: is `mac80211` reachable in virtual environments? Yes!  I know it is; `mac80211` is heavily fuzzed by syzkaller.  We have `mac80211_hwsim` and USB wifi dongle emulation, along with syzlang descriptions for nl80211 and wifi frames! That is gold.

So, can we reach `ieee80211_8023_xmit` via `mac80211_hwsim`?  That's the next step. I need to figure out how `SUPPORTS_TX_ENCAP_OFFLOAD` is set.  Does `mac80211_hwsim` have an option, a vendor command, can it set it? Or is this set by some virtual device?

Okay, time to dig deeper. I need to focus on `mac80211_hwsim`, specifically checking for TX encapsulation capabilities or if it can enable it. Let me check `net/mac80211/tx.c` and trace the execution path.

Right, `ieee80211_8023_xmit` is only called by `__ieee80211_subif_start_xmit_8023`.  That, in turn, is called by `ieee80211_subif_start_xmit_8023`. This function sets `ndo_start_xmit = ieee80211_subif_start_xmit_8023`.  `ieee80211_dataif_8023_ops` is the key. `ieee80211_set_vif_encap_ops` sets the `netdev_ops`, based on whether `IEEE80211_OFFLOAD_ENCAP_ENABLED` is set. And there is a crucial check `if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) ... ) return;`.

So, does `mac80211_hwsim` set `SUPPORTS_TX_ENCAP_OFFLOAD`? Time to examine `drivers/net/wireless/virtual/mac80211_hwsim_main.c`, focusing on anything related to `SUPPORTS_TX_ENCAP_OFFLOAD`, `hw_set`, `hw_flags`, or `offload`. That is where the money is at.



24/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "hw_set",
  "PathPrefix": "drivers/net/wireless/virtual"
}

Results:
{
  "Output": "drivers/net/wireless/virtual/mac80211_hwsim_main.c=5679=static int mac80211_hwsim_new_radio(struct genl_info *info,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5844-\t\t */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5845:\t\tieee80211_hw_set(hw, HAS_RATE_CONTROL);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5846-\t}\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5909-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5910:\tieee80211_hw_set(hw, SUPPORT_FAST_XMIT);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5911:\tieee80211_hw_set(hw, CHANCTX_STA_CSA);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5912:\tieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5913:\tieee80211_hw_set(hw, QUEUE_CONTROL);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5914:\tieee80211_hw_set(hw, WANT_MONITOR_VIF);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5915:\tieee80211_hw_set(hw, AMPDU_AGGREGATION);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5916:\tieee80211_hw_set(hw, MFP_CAPABLE);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5917:\tieee80211_hw_set(hw, SIGNAL_DBM);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5918:\tieee80211_hw_set(hw, SUPPORTS_PS);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5919:\tieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5920:\tieee80211_hw_set(hw, TDLS_WIDER_BW);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5921:\tieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5922:\tieee80211_hw_set(hw, STRICT);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5923:\tieee80211_hw_set(hw, BUFF_MMPDU_TXQ);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5924:\tieee80211_hw_set(hw, STA_MMPDU_TXQ);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5925-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5927-\t\thw-\u003ewiphy-\u003eflags |= WIPHY_FLAG_SUPPORTS_MLO;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5928:\t\tieee80211_hw_set(hw, HAS_RATE_CONTROL);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5929:\t\tieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5930:\t\tieee80211_hw_set(hw, CONNECTION_MONITOR);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5931:\t\tieee80211_hw_set(hw, AP_LINK_PS);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5932-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5936-\t} else {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5937:\t\tieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5938:\t\tieee80211_hw_set(hw, PS_NULLFUNC_STACK);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5939-\t\tif (rctbl)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5940:\t\t\tieee80211_hw_set(hw, SUPPORTS_RC_TABLE);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5941-\t}\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6130-\tif (param-\u003eno_vif)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6131:\t\tieee80211_hw_set(hw, NO_AUTO_VIF);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6132-\n"
}

25/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 35353
							output: 42
							thoughts: 148
						

Thoughts:
**Investigating Encapsulation Offload Support**

Okay, let's dive into this. My goal is to pinpoint which drivers implement the `SUPPORTS_TX_ENCAP_OFFLOAD` feature. I recall from my previous analysis that we've identified a few candidates already. Specifically, I've got my eye on `ath10k` across its various hardware interfaces (PCI, SDIO, SNOC), `ath11k` for PCI and AHB, `ath12k` for PCI, `mt7915` (PCI), and the `mt792x_core` module which supports both `mt7921` and `mt7925`.

Ah, but hold on... I remember `mt792x_core` is also involved with `mt7921u`. That’s right, it supports USB as well! This means I need to make sure I am accounting for that too. Since it uses `mt792x_core` I need to be certain to account for that particular USB implementation. This also means I should check `mt7921u` directly. To do this I should check the code for `mt792x_init_wiphy`. That's where I need to look to find where the wiphy is initialized.



26/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "mt792x_init_wiphy",
  "PathPrefix": "drivers/net/wireless/mediatek/mt76"
}

Results:
{
  "Output": "drivers/net/wireless/mediatek/mt76/mt7921/init.c=170=int mt7921_register_device(struct mt792x_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/init.c-226-\ndrivers/net/wireless/mediatek/mt76/mt7921/init.c:227:\tret = mt792x_init_wiphy(hw);\ndrivers/net/wireless/mediatek/mt76/mt7921/init.c-228-\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/init.c=243=int mt7925_register_device(struct mt792x_dev *dev)\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/init.c-297-\ndrivers/net/wireless/mediatek/mt76/mt7925/init.c:298:\tret = mt792x_init_wiphy(hw);\ndrivers/net/wireless/mediatek/mt76/mt7925/init.c-299-\tif (ret)\n--\ndrivers/net/wireless/mediatek/mt76/mt792x.h=521=int mt792x_pm_idle_timeout_get(void *data, u64 *val);\ndrivers/net/wireless/mediatek/mt76/mt792x.h:522:int mt792x_init_wiphy(struct ieee80211_hw *hw);\ndrivers/net/wireless/mediatek/mt76/mt792x.h-523-struct ieee80211_ops *\n--\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c=748=EXPORT_SYMBOL_GPL(mt792x_set_coverage_class);\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c-749-\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c:750:int mt792x_init_wiphy(struct ieee80211_hw *hw)\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c-751-{\n--\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c-857-}\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c:858:EXPORT_SYMBOL_GPL(mt792x_init_wiphy);\ndrivers/net/wireless/mediatek/mt76/mt792x_core.c-859-\n"
}

27/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 36558
							output: 50
							thoughts: 45
						

Thoughts:
Here's my take on those thoughts:

**Dissecting the MT7921U Probe Function**

Okay, so I'm digging into this `mt7921u_probe` function. The first thing I need to figure out is where it goes from here. Based on the name, it seems like `mt7921_register_device` or something analogous within the `mt7921` ecosystem is going to be the next logical step. I'll need to confirm that suspicion and see what arguments it passes. The likely source code for that is going to be `mt7921/usb.c`. Let me pull that up.



28/2 2026/09/28 00:25 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/mediatek/mt76/mt7921/usb.c",
  "FirstLine": 150,
  "LineCount": 80
}

Results:
{
  "Contents": " 150:\tstatic int mt7921u_probe(struct usb_interface *usb_intf,\n 151:\t\t\t\t const struct usb_device_id *id)\n 152:\t{\n 153:\t\tstatic const struct mt76_driver_ops drv_ops = {\n 154:\t\t\t.txwi_size = MT_SDIO_TXD_SIZE,\n 155:\t\t\t.drv_flags = MT_DRV_RX_DMA_HDR | MT_DRV_HW_MGMT_TXQ |\n 156:\t\t\t\t     MT_DRV_AMSDU_OFFLOAD,\n 157:\t\t\t.survey_flags = SURVEY_INFO_TIME_TX |\n 158:\t\t\t\t\tSURVEY_INFO_TIME_RX |\n 159:\t\t\t\t\tSURVEY_INFO_TIME_BSS_RX,\n 160:\t\t\t.tx_prepare_skb = mt7921_usb_sdio_tx_prepare_skb,\n 161:\t\t\t.tx_complete_skb = mt7921_usb_sdio_tx_complete_skb,\n 162:\t\t\t.tx_status_data = mt7921_usb_sdio_tx_status_data,\n 163:\t\t\t.rx_skb = mt7921_queue_rx_skb,\n 164:\t\t\t.rx_check = mt7921_rx_check,\n 165:\t\t\t.sta_add = mt7921_mac_sta_add,\n 166:\t\t\t.sta_event = mt7921_mac_sta_event,\n 167:\t\t\t.sta_remove = mt7921_mac_sta_remove,\n 168:\t\t\t.update_survey = mt792x_update_channel,\n 169:\t\t\t.set_channel = mt7921_set_channel,\n 170:\t\t};\n 171:\t\tstatic const struct mt792x_hif_ops hif_ops = {\n 172:\t\t\t.mcu_init = mt7921u_mcu_init,\n 173:\t\t\t.init_reset = mt792xu_init_reset,\n 174:\t\t\t.reset = mt7921u_mac_reset,\n 175:\t\t};\n 176:\t\tstatic struct mt76_bus_ops bus_ops = {\n 177:\t\t\t.rr = mt792xu_rr,\n 178:\t\t\t.wr = mt792xu_wr,\n 179:\t\t\t.rmw = mt792xu_rmw,\n 180:\t\t\t.read_copy = mt76u_read_copy,\n 181:\t\t\t.write_copy = mt792xu_copy,\n 182:\t\t\t.type = MT76_BUS_USB,\n 183:\t\t};\n 184:\t\tstruct usb_device *udev = interface_to_usbdev(usb_intf);\n 185:\t\tstruct ieee80211_ops *ops;\n 186:\t\tstruct ieee80211_hw *hw;\n 187:\t\tstruct mt792x_dev *dev;\n 188:\t\tstruct mt76_dev *mdev;\n 189:\t\tu8 features;\n 190:\t\tint ret;\n 191:\t\n 192:\t\tops = mt792x_get_mac80211_ops(\u0026usb_intf-\u003edev, \u0026mt7921_ops,\n 193:\t\t\t\t\t      (void *)id-\u003edriver_info, \u0026features);\n 194:\t\tif (!ops)\n 195:\t\t\treturn -ENOMEM;\n 196:\t\n 197:\t\tops-\u003estop = mt792xu_stop;\n 198:\t\tmdev = mt76_alloc_device(\u0026usb_intf-\u003edev, sizeof(*dev), ops, \u0026drv_ops);\n 199:\t\tif (!mdev)\n 200:\t\t\treturn -ENOMEM;\n 201:\t\n 202:\t\tdev = container_of(mdev, struct mt792x_dev, mt76);\n 203:\t\tdev-\u003efw_features = features;\n 204:\t\tdev-\u003ehif_ops = \u0026hif_ops;\n 205:\t\tatomic_set(\u0026dev-\u003emt76.bus_hung, false);\n 206:\t\tmt792xu_reset_work_init(dev);\n 207:\t\n 208:\t\tusb_reset_device(udev);\n 209:\t\n 210:\t\tusb_set_intfdata(usb_intf, dev);\n 211:\t\n 212:\t\tret = __mt76u_init(mdev, usb_intf, \u0026bus_ops);\n 213:\t\tif (ret \u003c 0)\n 214:\t\t\tgoto error;\n 215:\t\n 216:\t\tmdev-\u003erev = (mt76_rr(dev, MT_HW_CHIPID) \u003c\u003c 16) |\n 217:\t\t\t    (mt76_rr(dev, MT_HW_REV) \u0026 0xff);\n 218:\t\tdev_dbg(mdev-\u003edev, \"ASIC revision: %04x\\n\", mdev-\u003erev);\n 219:\t\n 220:\t\tif (mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY)) {\n 221:\t\t\tret = mt792xu_wfsys_reset(dev);\n 222:\t\t\tif (ret)\n 223:\t\t\t\tgoto error;\n 224:\t\t}\n 225:\t\n 226:\t\tret = mt792xu_mcu_power_on(dev);\n 227:\t\tif (ret)\n 228:\t\t\tgoto error;\n 229:\t\n"
}

29/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 38329
							output: 50
							thoughts: 16
						

Thoughts:
Okay, here's my interpretation of that prompt, and my response:

**Initial Thoughts on `mt7921u_probe`**

Alright, let's dive in. I need to get a better handle on this `mt7921u_probe` function. I'm already familiar with this driver, but I want to make sure I understand it at the deepest level. I'm thinking about the hardware interaction, the initialization sequence, the resource allocation... what are the key steps it takes to bring up this specific WiFi chip? I need to think about the typical probe flow, error handling, and the common failure points. Time to really focus.



30/2 2026/09/28 00:25 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/mediatek/mt76/mt7921/usb.c",
  "FirstLine": 230,
  "LineCount": 40
}

Results:
{
  "Contents": " 230:\t\tret = mt76u_alloc_mcu_queue(\u0026dev-\u003emt76);\n 231:\t\tif (ret)\n 232:\t\t\tgoto error;\n 233:\t\n 234:\t\tret = mt76u_alloc_queues(\u0026dev-\u003emt76);\n 235:\t\tif (ret)\n 236:\t\t\tgoto error;\n 237:\t\n 238:\t\tret = mt792xu_dma_init(dev, false);\n 239:\t\tif (ret)\n 240:\t\t\tgoto error;\n 241:\t\n 242:\t\thw = mt76_hw(dev);\n 243:\t\t/* check hw sg support in order to enable AMSDU */\n 244:\t\thw-\u003emax_tx_fragments = mdev-\u003eusb.sg_en ? MT_HW_TXP_MAX_BUF_NUM : 1;\n 245:\t\n 246:\t\tret = mt7921_register_device(dev);\n 247:\t\tif (ret)\n 248:\t\t\tgoto error;\n 249:\t\n 250:\t\treturn 0;\n 251:\t\n 252:\terror:\n 253:\t\tmt76u_queues_deinit(\u0026dev-\u003emt76);\n 254:\t\tmt792xu_reset_work_cleanup(dev);\n 255:\t\n 256:\t\tusb_set_intfdata(usb_intf, NULL);\n 257:\t\n 258:\t\tmt76_free_device(\u0026dev-\u003emt76);\n 259:\t\n 260:\t\treturn ret;\n 261:\t}\n 262:\t\n 263:\t#ifdef CONFIG_PM\n 264:\tstatic int mt7921u_suspend(struct usb_interface *intf, pm_message_t state)\n 265:\t{\n 266:\t\tstruct mt792x_dev *dev = usb_get_intfdata(intf);\n 267:\t\tstruct mt76_connac_pm *pm = \u0026dev-\u003epm;\n 268:\t\tint err;\n 269:\t\n"
}

31/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 39124
							output: 35
							thoughts: 34
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Considering the mt7925 and its USB capabilities**

Right, so, the mt7925... let's see, I recall reading something about it potentially having a USB interface. Now, if that's the case, I need to verify its USB capabilities by checking the relevant driver directory. To confirm whether USB is supported I need to go spelunking in the kernel source. More specifically, I should focus on the `drivers/net/wireless/mediatek/mt76/mt7925` directory. That's the logical place to start digging. Time to see what the code reveals.



32/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "usb_driver",
  "PathPrefix": "drivers/net/wireless/mediatek/mt76"
}

Results:
{
  "Output": "drivers/net/wireless/mediatek/mt76/mt7615/usb.c=263=MODULE_FIRMWARE(MT7663_ROM_PATCH);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-264-\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:265:static struct usb_driver mt7663u_driver = {\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-266-\t.name\t\t= KBUILD_MODNAME,\n--\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-277-};\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c:278:module_usb_driver(mt7663u_driver);\ndrivers/net/wireless/mediatek/mt76/mt7615/usb.c-279-\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c=343=MODULE_LICENSE(\"GPL\");\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-344-\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:345:static struct usb_driver mt76x0_driver = {\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-346-\t.name\t\t= KBUILD_MODNAME,\n--\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c-355-};\ndrivers/net/wireless/mediatek/mt76/mt76x0/usb.c:356:module_usb_driver(mt76x0_driver);\n--\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c=135=MODULE_FIRMWARE(MT7662_ROM_PATCH);\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c-136-\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c:137:static struct usb_driver mt76x2u_driver = {\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c-138-\t.name\t\t= KBUILD_MODNAME,\n--\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c-149-};\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c:150:module_usb_driver(mt76x2u_driver);\ndrivers/net/wireless/mediatek/mt76/mt76x2/usb.c-151-\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c=336=MODULE_FIRMWARE(MT7921_ROM_PATCH);\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-337-\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:338:static struct usb_driver mt7921u_driver = {\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-339-\t.name\t\t= KBUILD_MODNAME,\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-350-};\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c:351:module_usb_driver(mt7921u_driver);\ndrivers/net/wireless/mediatek/mt76/mt7921/usb.c-352-\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c=353=MODULE_FIRMWARE(MT7925_ROM_PATCH);\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c-354-\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c:355:static struct usb_driver mt7925u_driver = {\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c-356-\t.name\t\t= KBUILD_MODNAME,\n--\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c-367-};\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c:368:module_usb_driver(mt7925u_driver);\ndrivers/net/wireless/mediatek/mt76/mt7925/usb.c-369-\n"
}

33/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 40604
							output: 31
							thoughts: 409
						

Thoughts:
**Analyzing the USB Driver Enhancement**

Okay, so I'm looking at these USB drivers, specifically `mt7921u` and `mt7925u`, and they both set `SUPPORTS_TX_ENCAP_OFFLOAD`. This suggests they're involved in offloading some sort of transmission encapsulation. Now, I need to understand what's happening at the core level, so I'm diving into `net/mac80211/`, which is the heart of the mac80211 networking subsystem.

My first thought is to understand the context and rationale behind the patch. I'm focusing on `net/mac80211/tx.c` since it's most likely involved with transmission. Let's see...

Ah, right. Looking at the changes in `ieee80211_8023_xmit`, there's a new check related to MLD transmissions and how `info->band` is handled. It seems that MLD transmissions shouldn't rely on the band, presumably because of their nature or function. If it *isn't* an MLD transmission, then `chanctx_conf` is dereferenced and the `info->band` value is set. It seems this check has been added to prevent a potential crash.

My next step is to understand the implications of setting `info->band`. Where else is this variable used in `ieee80211_tx_info`? I need to know the potential impact of these changes across the wireless stack. Knowing this will help me understand why this change was made and to determine the impact.



34/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "info-\u003eband",
  "PathPrefix": "net/mac80211"
}

Results:
{
  "Output": "net/mac80211/airtime.c=733=u32 ieee80211_calc_tx_airtime(struct ieee80211_hw *hw,\n--\nnet/mac80211/airtime.c-744-\t\tcur_duration = ieee80211_calc_tx_airtime_rate(hw, rate, NULL,\nnet/mac80211/airtime.c:745:\t\t\t\t\t\t\t      info-\u003eband, len);\nnet/mac80211/airtime.c-746-\t\tif (!cur_duration)\n--\nnet/mac80211/cfg.c=4956=static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,\n--\nnet/mac80211/cfg.c-5055-\t\t       IEEE80211_TX_INTFL_NL80211_FRAME_TX;\nnet/mac80211/cfg.c:5056:\tinfo-\u003eband = band;\nnet/mac80211/cfg.c-5057-\tinfo-\u003econtrol.flags |= u32_encode_bits(link_id,\n--\nnet/mac80211/mesh_pathtbl.c=463=void mesh_fast_tx_cache(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/mesh_pathtbl.c-558-\tbuild.timestamp = jiffies;\nnet/mac80211/mesh_pathtbl.c:559:\tbuild.fast_tx.band = info-\u003eband;\nnet/mac80211/mesh_pathtbl.c-560-\tbuild.fast_tx.da_offs = offsetof(struct ieee80211_hdr, addr3);\n--\nnet/mac80211/rate.c=88=void rate_control_tx_status(struct ieee80211_local *local,\n--\nnet/mac80211/rate.c-98-\nnet/mac80211/rate.c:99:\tif (st-\u003einfo-\u003eband \u003e= NUM_NL80211_BANDS)\nnet/mac80211/rate.c-100-\t\treturn;\nnet/mac80211/rate.c-101-\nnet/mac80211/rate.c:102:\tsband = local-\u003ehw.wiphy-\u003ebands[st-\u003einfo-\u003eband];\nnet/mac80211/rate.c-103-\n--\nnet/mac80211/rate.c=890=void ieee80211_get_tx_rates(struct ieee80211_vif *vif,\n--\nnet/mac80211/rate.c-906-\tsdata = vif_to_sdata(vif);\nnet/mac80211/rate.c:907:\tif (info-\u003eband \u003e= NUM_NL80211_BANDS)\nnet/mac80211/rate.c-908-\t\treturn;\nnet/mac80211/rate.c-909-\nnet/mac80211/rate.c:910:\tsband = sdata-\u003elocal-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/rate.c-911-\n--\nnet/mac80211/rate.c-915-\tif (!(info-\u003econtrol.flags \u0026 IEEE80211_TX_CTRL_DONT_USE_RATE_MASK))\nnet/mac80211/rate.c:916:\t\tmask = sdata-\u003erc_rateidx_mask[info-\u003eband];\nnet/mac80211/rate.c-917-\n--\nnet/mac80211/sta_info.c=1912=static void ieee80211_send_null_response(struct sta_info *sta, int tid,\n--\nnet/mac80211/sta_info.c-1992-\nnet/mac80211/sta_info.c:1993:\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/sta_info.c-1994-\tieee80211_xmit(sdata, sta, skb);\n--\nnet/mac80211/status.c=257=ieee80211_add_tx_radiotap_header(struct ieee80211_local *local,\n--\nnet/mac80211/status.c-297-\t\t\tlegacy_rate = status_rate-\u003erate_idx.legacy;\nnet/mac80211/status.c:298:\t} else if (info-\u003eband \u003c NUM_NL80211_BANDS \u0026\u0026\nnet/mac80211/status.c-299-\t\t   info-\u003estatus.rates[0].idx \u003e= 0 \u0026\u0026\n--\nnet/mac80211/status.c-303-\nnet/mac80211/status.c:304:\t\tsband = local-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/status.c-305-\t\tlegacy_rate =\n--\nnet/mac80211/tx.c=43=static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,\n--\nnet/mac80211/tx.c-61-\nnet/mac80211/tx.c:62:\tif (info-\u003eband \u003e= NUM_NL80211_BANDS)\nnet/mac80211/tx.c-63-\t\treturn 0;\nnet/mac80211/tx.c-64-\nnet/mac80211/tx.c:65:\tsband = local-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/tx.c-66-\ttxrate = \u0026sband-\u003ebitrates[tx-\u003erate.idx];\n--\nnet/mac80211/tx.c=675=ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)\n--\nnet/mac80211/tx.c-687-\nnet/mac80211/tx.c:688:\tif (info-\u003eband \u003c NUM_NL80211_BANDS)\nnet/mac80211/tx.c:689:\t\tsband = tx-\u003elocal-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/tx.c-690-\telse\n--\nnet/mac80211/tx.c-705-\t} else {\nnet/mac80211/tx.c:706:\t\ttxrc.rate_idx_mask = tx-\u003esdata-\u003erc_rateidx_mask[info-\u003eband];\nnet/mac80211/tx.c-707-\nnet/mac80211/tx.c:708:\t\tif (tx-\u003esdata-\u003erc_has_mcs_mask[info-\u003eband])\nnet/mac80211/tx.c-709-\t\t\ttxrc.rate_idx_mcs_mask =\nnet/mac80211/tx.c:710:\t\t\t\ttx-\u003esdata-\u003erc_rateidx_mcs_mask[info-\u003eband];\nnet/mac80211/tx.c-711-\t}\n--\nnet/mac80211/tx.c-758-\t\t encap ? ((struct ethhdr *)hdr)-\u003eh_dest : hdr-\u003eaddr1,\nnet/mac80211/tx.c:759:\t\t info-\u003eband ? 5 : 2))\nnet/mac80211/tx.c-760-\t\treturn TX_DROP;\n--\nnet/mac80211/tx.c=1911=bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,\n--\nnet/mac80211/tx.c-1924-\nnet/mac80211/tx.c:1925:\tinfo-\u003eband = band;\nnet/mac80211/tx.c-1926-\tinfo-\u003econtrol.vif = vif;\n--\nnet/mac80211/tx.c=2128=bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,\n--\nnet/mac80211/tx.c-2301-\t\tstruct ieee80211_supported_band *sband =\nnet/mac80211/tx.c:2302:\t\t\tlocal-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/tx.c-2303-\n--\nnet/mac80211/tx.c=2350=netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,\n--\nnet/mac80211/tx.c-2489-\nnet/mac80211/tx.c:2490:\tinfo-\u003eband = chandef-\u003echan-\u003eband;\nnet/mac80211/tx.c-2491-\n--\nnet/mac80211/tx.c=2677=static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-3001-\t}\nnet/mac80211/tx.c:3002:\tinfo-\u003eband = band;\nnet/mac80211/tx.c-3003-\n--\nnet/mac80211/tx.c=3770=void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-3808-\tmemset(info, 0, sizeof(*info));\nnet/mac80211/tx.c:3809:\tinfo-\u003eband = fast_tx-\u003eband;\nnet/mac80211/tx.c-3810-\tinfo-\u003econtrol.vif = \u0026sdata-\u003evif;\n--\nnet/mac80211/tx.c=4732=static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-4794-\t\t}\nnet/mac80211/tx.c:4795:\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/tx.c-4796-\t}\n--\nnet/mac80211/tx.c=4997=static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,\n--\nnet/mac80211/tx.c-5017-\t\t\t}\nnet/mac80211/tx.c:5018:\t\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/tx.c-5019-\t\t}\n--\nnet/mac80211/tx.c=5558=ieee80211_beacon_get_finish(struct ieee80211_hw *hw,\n--\nnet/mac80211/tx.c-5590-\tinfo-\u003eflags |= IEEE80211_TX_CTL_NO_ACK;\nnet/mac80211/tx.c:5591:\tinfo-\u003eband = band;\nnet/mac80211/tx.c-5592-\n--\nnet/mac80211/tx.c=6322=ieee80211_get_buffered_bc(struct ieee80211_hw *hw,\n--\nnet/mac80211/tx.c-6383-\ttx.flags |= IEEE80211_TX_PS_BUFFERED;\nnet/mac80211/tx.c:6384:\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/tx.c-6385-\n"
}

35/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 44664
							output: 41
							thoughts: 50
						

Thoughts:
Here's my analysis of the provided thought process, tailored for an expert audience:

**Diving Deep into the MAC80211 TX Path**

Alright, let's get down to brass tacks. I'm focusing on the `net/mac80211/tx.c` file – that's where the critical 802.11 transmit functions reside. My immediate point of interest is lines 5017 through 5019, because something there has caught my attention. I need to understand what's happening at that precise point within the transmission process. This means I'm going to drill down and analyze `ieee80211_tx_pending_skb`. I'm going to have to carefully deconstruct the function call and assess its variables and parameters. Ultimately, my goal is to get to the root of the problem that led me to this area of code.



36/2 2026/09/28 00:25 tool read-file
0m Args:
{
  "File": "net/mac80211/tx.c",
  "FirstLine": 5000,
  "LineCount": 40
}

Results:
{
  "Contents": "5000:\t\tstruct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);\n5001:\t\tstruct ieee80211_sub_if_data *sdata;\n5002:\t\tstruct sta_info *sta;\n5003:\t\tstruct ieee80211_hdr *hdr;\n5004:\t\tbool result;\n5005:\t\tstruct ieee80211_chanctx_conf *chanctx_conf;\n5006:\t\n5007:\t\tsdata = vif_to_sdata(info-\u003econtrol.vif);\n5008:\t\n5009:\t\tif (info-\u003econtrol.flags \u0026 IEEE80211_TX_INTCFL_NEED_TXPROCESSING) {\n5010:\t\t\t/* update band only for non-MLD */\n5011:\t\t\tif (!ieee80211_vif_is_mld(\u0026sdata-\u003evif)) {\n5012:\t\t\t\tchanctx_conf =\n5013:\t\t\t\t\trcu_dereference(sdata-\u003evif.bss_conf.chanctx_conf);\n5014:\t\t\t\tif (unlikely(!chanctx_conf)) {\n5015:\t\t\t\t\tdev_kfree_skb(skb);\n5016:\t\t\t\t\treturn true;\n5017:\t\t\t\t}\n5018:\t\t\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\n5019:\t\t\t}\n5020:\t\t\tresult = ieee80211_tx(sdata, NULL, skb, true);\n5021:\t\t} else if (info-\u003eflags \u0026 IEEE80211_TX_CTL_HW_80211_ENCAP) {\n5022:\t\t\tif (ieee80211_lookup_ra_sta(sdata, skb, \u0026sta, true)) {\n5023:\t\t\t\tdev_kfree_skb(skb);\n5024:\t\t\t\treturn true;\n5025:\t\t\t}\n5026:\t\n5027:\t\t\tif (IS_ERR(sta) || (sta \u0026\u0026 !sta-\u003euploaded))\n5028:\t\t\t\tsta = NULL;\n5029:\t\n5030:\t\t\tresult = ieee80211_tx_8023(sdata, skb, sta, true);\n5031:\t\t} else {\n5032:\t\t\tstruct sk_buff_head skbs;\n5033:\t\n5034:\t\t\t__skb_queue_head_init(\u0026skbs);\n5035:\t\t\t__skb_queue_tail(\u0026skbs, skb);\n5036:\t\n5037:\t\t\thdr = (struct ieee80211_hdr *)skb-\u003edata;\n5038:\t\t\tsta = sta_info_get(sdata, hdr-\u003eaddr1);\n5039:\t\n"
}

37/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 45702
							output: 41
							thoughts: 673
						

Thoughts:
**Analyzing Potential Band Information Issues in 802.3 Transmissions**

Okay, let's break this down. I'm looking at `ieee80211_tx_pending_skb` and `ieee80211_8023_xmit`, specifically the handling of `info->band`. In `ieee80211_tx_pending_skb`, we see a check for MLD interfaces. If it's *not* an MLD, we dereference `sdata->vif.bss_conf.chanctx_conf` using `rcu_dereference` to get the channel context.  Crucially, there's an early exit via `dev_kfree_skb(skb)` if `chanctx_conf` is null. If it exists, `info->band` gets set to `chanctx_conf->def.chan->band`.

Now, moving to `ieee80211_8023_xmit`, the code is similar. The patch adds a similar check for MLD interfaces; if it's *not* an MLD, we attempt to retrieve the channel context and set the `info->band`.  However, before this patch,  `memset(info, 0, sizeof(*info))` would zero out this variable. If this `info->band` isn't correctly set in the 802.3 transmit path, it could be unintentionally zeroed, uninitialized, or relying on prior operations to set it which is not guaranteed.  I need to ensure rate control or other relevant functions correctly set `info->band`. The early exit condition with `kfree_skb_list(skb)` is also important.

The use of `rcu_dereference` here is significant. I need to be absolutely certain that RCU read locks are being held correctly in the context of `ieee80211_8023_xmit` when this channel context is being read. I will need to check `__ieee80211_subif_start_xmit_8023` to be sure.  Any potential issues here could lead to data corruption or crashes due to reading stale data. I need to verify the locking strategy.



38/2 2026/09/28 00:25 tool read-file
0m Args:
{
  "File": "net/mac80211/tx.c",
  "FirstLine": 4855,
  "LineCount": 55
}

Results:
{
  "Contents": "4855:\tstatic void __ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\n4856:\t\t\t\t\t\t      struct net_device *dev)\n4857:\t{\n4858:\t\tstruct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);\n4859:\t\tstruct ethhdr *ehdr = (struct ethhdr *)skb-\u003edata;\n4860:\t\tstruct ieee80211_link_data *link;\n4861:\t\tstruct ieee80211_key *key;\n4862:\t\tstruct sta_info *sta;\n4863:\t\n4864:\t\trcu_read_lock();\n4865:\t\n4866:\t\tif (unlikely(sdata-\u003econtrol_port_protocol == ehdr-\u003eh_proto))\n4867:\t\t\tgoto skip_offload;\n4868:\t\n4869:\t\tif (ieee80211_lookup_ra_sta(sdata, skb, \u0026sta, false)) {\n4870:\t\t\tkfree_skb(skb);\n4871:\t\t\tgoto out;\n4872:\t\t}\n4873:\t\n4874:\t\t/*\n4875:\t\t * If STA is invalid, use the multicast offload path when applicable.\n4876:\t\t * In AP mode, drop the frame if there are no associated stations;\n4877:\t\t * otherwise use the default link and multicast key for transmission.\n4878:\t\t */\n4879:\t\tif (unlikely(IS_ERR_OR_NULL(sta) \u0026\u0026\n4880:\t\t\t     ieee80211_check_mcast_offload(sdata, skb))) {\n4881:\t\t\tsta = NULL;\n4882:\t\t\tif (ieee80211_vif_get_num_mcast_if(sdata) \u003c= 0) {\n4883:\t\t\t\t/* No associated STAs - no need to send multicast frames. */\n4884:\t\t\t\tkfree_skb(skb);\n4885:\t\t\t\tgoto out;\n4886:\t\t\t}\n4887:\t\t\tlink = \u0026sdata-\u003edeflink;\n4888:\t\t\tkey = rcu_dereference(link-\u003edefault_multicast_key);\n4889:\t\t} else if (unlikely(IS_ERR_OR_NULL(sta) || !sta-\u003euploaded ||\n4890:\t\t\t   !test_sta_flag(sta, WLAN_STA_AUTHORIZED))) {\n4891:\t\t\tgoto skip_offload;\n4892:\t\t} else {\n4893:\t\t\tkey = rcu_dereference(sta-\u003eptk[sta-\u003eptk_idx]);\n4894:\t\t\tif (!key)\n4895:\t\t\t\tkey = rcu_dereference(sdata-\u003edefault_unicast_key);\n4896:\t\t}\n4897:\t\n4898:\t\tif (key \u0026\u0026 (!(key-\u003eflags \u0026 KEY_FLAG_UPLOADED_TO_HARDWARE) ||\n4899:\t\t\t    key-\u003econf.cipher == WLAN_CIPHER_SUITE_TKIP))\n4900:\t\t\tgoto skip_offload;\n4901:\t\n4902:\t\tsk_pacing_shift_update(skb-\u003esk, sdata-\u003elocal-\u003ehw.tx_sk_pacing_shift);\n4903:\t\tieee80211_8023_xmit(sdata, dev, sta, key, skb);\n4904:\t\tgoto out;\n4905:\t\n4906:\tskip_offload:\n4907:\t\tieee80211_subif_start_xmit(skb, dev);\n4908:\tout:\n4909:\t\trcu_read_unlock();\n"
}

39/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 47916
							output: 31
							thoughts: 673
						

Thoughts:
**Fuzzing Decision for net/mac80211/tx.c**

Okay, the RCU read lock is definitely held. Now the crucial question: is this code *reachable* and therefore worth the fuzzing effort? Time to apply the guidelines.

First, I recall the core triage philosophy. Reachability is paramount. We can only discover bugs in code that executes in standard virtualized environments. Unreachable code is a no-go, regardless of complexity. I need to be skeptical of claims of "no functional change" or refactoring. Modified or new assertions in reachable code are definitely worth fuzzing.

Looking at the negative criteria, this doesn't fall into any of those categories. It's not non-kernel or non-executable, it's not specific hardware, and it's not an unreachable execution path.

Now, let's examine the positive criteria. This code, specifically `net/mac80211/tx.c`, touches reachable executable code. It’s part of the core wireless networking subsystem, a core networking protocol. Encapsulation offload is enabled. That qualifies it for WorthFuzzing = true.

Moreover, the mt7921u/mt7925u USB wireless drivers *support* this path, and can be emulated. But can `mac80211_hwsim` also reach this if offload is enabled, or can offload be enabled on any mac80211 interface? Time to verify with `ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD)`.

The crucial confirmation: mt7921u (emulated via USB gadget) *does* set `SUPPORTS_TX_ENCAP_OFFLOAD`. Since `net/mac80211` is part of core networking and offload *can* be enabled on the interface, this is definitely WorthFuzzing = true!

Now I need to determine the required configs to build and reach this code. I'll check `net/mac80211/Makefile` and `net/mac80211/Kconfig`.



40/2 2026/09/28 00:25 tool grepper
0m Args:
{
  "Expression": "tx\\.o",
  "PathPrefix": "net/mac80211"
}

Results:
{
  "Output": "net/mac80211/Makefile=5=mac80211-y := \\\n--\nnet/mac80211/Makefile-12-\tscan.o offchannel.o \\\nnet/mac80211/Makefile:13:\tht.o agg-tx.o agg-rx.o \\\nnet/mac80211/Makefile-14-\tvht.o \\\n--\nnet/mac80211/Makefile-28-\tspectmgmt.o \\\nnet/mac80211/Makefile:29:\ttx.o \\\nnet/mac80211/Makefile-30-\tkey.o \\\n"
}

41/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 49263
							output: 36
							thoughts: 23
						

Thoughts:
Here's my analysis of the provided text, rendered in the first person, assuming I'm an expert in the field:

**Diving into the net/mac80211/Makefile**

Alright, let's get down to brass tacks. My initial thought is to zero in on the `net/mac80211/Makefile`. It's a fundamental file within the mac80211 wireless stack, and the first ten lines are often key to understanding the overall build process, dependencies, and perhaps some initial configuration options related to how the module gets compiled and integrated. I'm especially keen to look for variables defining source directories, flags for the compiler, and any conditional logic that might affect which parts of the stack are compiled based on the overall kernel build configuration. I'm expecting this section to provide the baseline for other files within the directory.



42/2 2026/09/28 00:25 tool read-file
0m Args:
{
  "File": "net/mac80211/Makefile",
  "FirstLine": 1,
  "LineCount": 20
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: GPL-2.0\n   2:\tobj-$(CONFIG_MAC80211) += mac80211.o\n   3:\t\n   4:\t# mac80211 objects\n   5:\tmac80211-y := \\\n   6:\t\tmain.o status.o \\\n   7:\t\tdriver-ops.o \\\n   8:\t\tsta_info.o \\\n   9:\t\twep.o \\\n  10:\t\taead_api.o \\\n  11:\t\twpa.o \\\n  12:\t\tscan.o offchannel.o \\\n  13:\t\tht.o agg-tx.o agg-rx.o \\\n  14:\t\tvht.o \\\n  15:\t\the.o \\\n  16:\t\ts1g.o \\\n  17:\t\tibss.o \\\n  18:\t\tiface.o \\\n  19:\t\tlink.o \\\n  20:\t\trate.o \\\n"
}

43/2 2026/09/28 00:25 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 49773
							output: 37
							thoughts: 44
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating the mac80211 Module Build Condition**

Right, so `mac80211.o` is being built. Makes sense, that's the core of the 802.11 stack. I need to figure out the exact configuration that triggers its compilation. The logical place to start is the configuration file. My immediate thought is, "Let's check `net/mac80211/Kconfig`." That's where all the compile-time configuration options related to mac80211 are defined. I'm betting that `CONFIG_MAC80211` is the key, the main switch, so to speak. If that's set, then we'd expect the driver and related code to be compiled.



44/2 2026/09/28 00:26 tool read-file
0m Args:
{
  "File": "net/mac80211/Kconfig",
  "FirstLine": 1,
  "LineCount": 40
}

Results:
{
  "Contents": "   1:\t# SPDX-License-Identifier: GPL-2.0-only\n   2:\tconfig MAC80211\n   3:\t\ttristate \"Generic IEEE 802.11 Networking Stack (mac80211)\"\n   4:\t\tdepends on CFG80211\n   5:\t\tselect CRYPTO\n   6:\t\tselect CRYPTO_LIB_AES_CBC_MACS\n   7:\t\tselect CRYPTO_LIB_ARC4\n   8:\t\tselect CRYPTO_AES\n   9:\t\tselect CRYPTO_CCM\n  10:\t\tselect CRYPTO_GCM\n  11:\t\tselect CRC32\n  12:\t\thelp\n  13:\t\t  This option enables the hardware independent IEEE 802.11\n  14:\t\t  networking stack.\n  15:\t\n  16:\tcomment \"CFG80211 needs to be enabled for MAC80211\"\n  17:\t\tdepends on CFG80211=n\n  18:\t\n  19:\tif MAC80211 != n\n  20:\t\n  21:\tconfig MAC80211_HAS_RC\n  22:\t\tbool\n  23:\t\n  24:\tconfig MAC80211_RC_MINSTREL\n  25:\t\tbool \"Minstrel\" if EXPERT\n  26:\t\tselect MAC80211_HAS_RC\n  27:\t\tdefault y\n  28:\t\thelp\n  29:\t\t  This option enables the 'minstrel' TX rate control algorithm\n  30:\t\n  31:\tchoice\n  32:\t\tprompt \"Default rate control algorithm\"\n  33:\t\tdepends on MAC80211_HAS_RC\n  34:\t\tdefault MAC80211_RC_DEFAULT_MINSTREL\n  35:\t\thelp\n  36:\t\t  This option selects the default rate control algorithm\n  37:\t\t  mac80211 will use. Note that this default can still be\n  38:\t\t  overridden through the ieee80211_default_rc_algo module\n  39:\t\t  parameter if different algorithms are available.\n  40:\t\n"
}

45/2 2026/09/28 00:26 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 50595
							output: 35
							thoughts: 47
						

Thoughts:
Okay, let's see what's going on here. I need to make sure I haven't missed any configurations related to the mt7921u. It's easy to get caught up in the main driver structure and forget the subtle nuances of specific hardware variants.

So, I should really check the `drivers/net/wireless/mediatek/mt76/mt7921/Kconfig` file. That's the logical place to start – it's where the kernel configuration options for this family of devices should reside. Let me dig into that Kconfig file and see what conditional compilation options are defined. This is going to be quick work, as I'm familiar with this directory structure and what to look for, but it's always a good habit to verify.



46/2 2026/09/28 00:26 tool grepper
0m Args:
{
  "Expression": "config MT7921U",
  "PathPrefix": "drivers/net/wireless/mediatek"
}

Results:
{
  "Output": "drivers/net/wireless/mediatek/mt76/mt7921/Kconfig=17=config MT7921S\n--\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig-27-\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig:28:config MT7921U\ndrivers/net/wireless/mediatek/mt76/mt7921/Kconfig-29-\ttristate \"MediaTek MT7921U (USB) support\"\n"
}

47/2 2026/09/28 00:26 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 50995
							output: 48
							thoughts: 27
						

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

**Diving into the MT7921 Kconfig**

Okay, time to get into the nitty-gritty of the MT7921 driver configuration. Let's start by looking at `drivers/net/wireless/mediatek/mt76/mt7921/Kconfig`. I know this driver, so I'm expecting to see the typical structure: feature enabling, dependencies, maybe some hardware-specific overrides... the usual suspects for a kernel driver.

I'll be looking for the fundamental configuration options that allow the user to enable or disable the MT7921 support in the kernel. I'll need to understand how things are structured so I can see what features or options are conditionally compiled or what the prerequisites are to enable this driver. I'm especially interested in dependencies on other kernel subsystems or features. Are there any specific hardware features that are enabled as a consequence, or any optional capabilities that are configurable. I need to be able to advise on all that, and I can't start too soon on that process. I need to see the dependencies, options, and how everything is structured.



48/2 2026/09/28 00:26 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/mediatek/mt76/mt7921/Kconfig",
  "FirstLine": 25,
  "LineCount": 20
}

Results:
{
  "Contents": "  25:\t\n  26:\t\t  To compile this driver as a module, choose M here.\n  27:\t\n  28:\tconfig MT7921U\n  29:\t\ttristate \"MediaTek MT7921U (USB) support\"\n  30:\t\tselect MT792x_USB\n  31:\t\tselect MT7921_COMMON\n  32:\t\tdepends on MAC80211\n  33:\t\tdepends on USB\n  34:\t\thelp\n  35:\t\t  This adds support for MT7921U 802.11ax 2x2:2SS wireless devices.\n  36:\t\n  37:\t\t  To compile this driver as a module, choose M here.\n"
}

49/2 2026/09/28 00:26 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 51522
							output: 36
							thoughts: 29
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience and presented in the first person:

**Diving into the MAC80211_HWSIM Configuration**

Alright, so I'm thinking, before we go any further down this rabbit hole, it's absolutely crucial to double-check the `MAC80211_HWSIM` configuration within the `drivers/net/wireless/virtual/Kconfig` file. I need to make sure I have a solid understanding of how it's currently set up. This is a crucial area to verify and confirm any assumptions before we proceed with deeper analysis. This is something I've checked before, but I need to do a fresh check of the current configuration. Gotta dot the i's and cross the t's with this.



50/2 2026/09/28 00:26 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/virtual/Kconfig",
  "FirstLine": 1,
  "LineCount": 20
}

Results:
{
  "Contents": "   1:\tconfig MAC80211_HWSIM\n   2:\t\ttristate \"Simulated radio testing tool for mac80211\"\n   3:\t\tdepends on MAC80211\n   4:\t\thelp\n   5:\t\t  This driver is a developer testing tool that can be used to test\n   6:\t\t  IEEE 802.11 networking stack (mac80211) functionality. This is not\n   7:\t\t  needed for normal wireless LAN usage and is only for testing. See\n   8:\t\t  Documentation/networking/mac80211_hwsim for more information on how\n   9:\t\t  to use this tool.\n  10:\t\n  11:\t\t  To compile this driver as a module, choose M here: the module will be\n  12:\t\t  called mac80211_hwsim.  If unsure, say N.\n  13:\t\n  14:\tconfig VIRT_WIFI\n  15:\t\ttristate \"Wifi wrapper for ethernet drivers\"\n  16:\t\tdepends on CFG80211\n  17:\t\thelp\n  18:\t\t  This option adds support for ethernet connections to appear as if they\n  19:\t\t  are wifi connections through a special rtnetlink device.\n  20:\t\n"
}

51/2 2026/09/28 00:26 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 52086
							output: 41
							thoughts: 883
						

Thoughts:
**Analyzing Symbol Coverage for MAC80211 and MT7921U**

Okay, so I'm thinking about how to set up the configs here, and it looks like MAC80211 relies on CFG80211. The MT7921U, of course, depends on MAC80211 and the USB stack. So, the base configs I need are "CFG80211" and "MAC80211," then I'll add in the driver specific config, which could be either "MT7921U" or perhaps "MAC80211_HWSIM," depending on the testing needs. I think it makes the most sense to have "MAC80211", "CFG80211" and "MT7921U" (or "MAC80211_HWSIM") included.

Now, let's get into the *FocusSymbols* part. The key is to identify the functions that have been modified. It looks like the change is related to `ieee80211_8023_xmit`. Hang on, is that function static? I need to double-check. Okay, I'm checking line 4732 in `net/mac80211/tx.c`, and yup, it is declared `static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata, ...)`!

Now, the important question is: is it inlined by the compiler? Let's check the callers of `ieee80211_8023_xmit` now. It looks like there's only one: `__ieee80211_subif_start_xmit_8023` in `net/mac80211/tx.c`. Damn, that function is also static! The caller of *that* is `ieee80211_subif_start_xmit_8023`. Alright, let's check `ieee80211_subif_start_xmit_8023`. Okay, it's defined as `netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb, struct net_device *dev)`. It's exported, or at least declared, in `net/mac80211/ieee80211_i.h` and *not* static, so that's the key.

This brings me to the point of handling static inline functions. The compiler is probably inlining the `static` functions, so their symbol addresses are likely lost in vmlinux. This means they can't be directly targeted by the filters. The documentation says to identify non-static callers in `.c` files. Since `ieee80211_8023_xmit` is in a .c file, but is `static`, the compiler is likely inlining it into `__ieee80211_subif_start_xmit_8023`, which may be in turn be inlined into `ieee80211_subif_start_xmit_8023`.

Therefore, I need to include *both* `ieee80211_8023_xmit` and `ieee80211_subif_start_xmit_8023` in `FocusSymbols`. I *could* also include `__ieee80211_subif_start_xmit_8023` for good measure. Or, it could be `ieee80211_subif_start_xmit_8023` and `ieee80211_8023_xmit`.

Let's do a quick double check for any other relevant entrypoints or callers in that area of `tx.c`, just to be certain. I'll check lines 4910-4940 now.



52/2 2026/09/28 00:26 tool read-file
0m Args:
{
  "File": "net/mac80211/tx.c",
  "FirstLine": 4910,
  "LineCount": 35
}

Results:
{
  "Contents": "4910:\t}\n4911:\t\n4912:\tnetdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,\n4913:\t\t\t\t\t\t    struct net_device *dev)\n4914:\t{\n4915:\t\tstruct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);\n4916:\t\tstruct ethhdr *ehdr = (struct ethhdr *)skb-\u003edata;\n4917:\t\n4918:\t\tif (unlikely(!ieee80211_sdata_running(sdata) || skb-\u003elen \u003c ETH_HLEN)) {\n4919:\t\t\tkfree_skb(skb);\n4920:\t\t\treturn NETDEV_TX_OK;\n4921:\t\t}\n4922:\t\n4923:\t\tif (unlikely(is_multicast_ether_addr(ehdr-\u003eh_dest) \u0026\u0026\n4924:\t\t\t     ieee80211_multicast_to_unicast(skb, dev))) {\n4925:\t\t\tstruct sk_buff_head queue;\n4926:\t\n4927:\t\t\t__skb_queue_head_init(\u0026queue);\n4928:\t\t\tieee80211_convert_to_unicast(skb, dev, \u0026queue);\n4929:\t\t\twhile ((skb = __skb_dequeue(\u0026queue)))\n4930:\t\t\t\t__ieee80211_subif_start_xmit_8023(skb, dev);\n4931:\t\t} else {\n4932:\t\t\t__ieee80211_subif_start_xmit_8023(skb, dev);\n4933:\t\t}\n4934:\t\n4935:\t\treturn NETDEV_TX_OK;\n4936:\t}\n4937:\t\n4938:\tstruct sk_buff *\n4939:\tieee80211_build_data_template(struct ieee80211_sub_if_data *sdata,\n4940:\t\t\t\t      struct sk_buff *skb, u32 info_flags)\n4941:\t{\n4942:\t\tstruct ieee80211_hdr *hdr;\n4943:\t\tstruct ieee80211_tx_data tx = {\n4944:\t\t\t.local = sdata-\u003elocal,\n"
}

53/2 2026/09/28 00:26 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 54605
							output: 224
							thoughts: 298
						

Thoughts:
**Analyzing the Target for Fuzzing**

Okay, so `ieee80211_subif_start_xmit_8023` is the main entry point we're dealing with, the direct link to `ndo_start_xmit`. And the specific function being modified is `ieee80211_8023_xmit`. Right, that's the core.

Now, let's see, the patch alters `ieee80211_8023_xmit` in `net/mac80211/tx.c`. The modification involves pulling `info->band` from the channel context configuration (`chanctx_conf->def.chan->band`), but *only* for non-MLD interfaces in the 802.3 transmit offload path. It also adds a check to drop packets if `chanctx_conf` is NULL. Makes sense. This impacts potentially reachable code within the mac80211 core, especially with drivers that support hardware encapsulation offload, and the MT7921U through USB gadget emulation is specifically mentioned.

Therefore, because this touches reachable executable code in the mac80211 subsystem and there is a direct way to trigger this code, `WorthFuzzing=true`.

Relevant configurations include: MAC80211, CFG80211, and MT7921U.

The key symbols identified are `ieee80211_8023_xmit` and `ieee80211_subif_start_xmit_8023`.

Seems like everything is verified and the logic checks out. Time to `set-results`.



54/2 2026/09/28 00:26 tool set-results
0m Args:
{
  "EnableConfigs": [
    "MAC80211",
    "CFG80211",
    "MT7921U"
  ],
  "FocusSymbols": [
    "ieee80211_8023_xmit",
    "ieee80211_subif_start_xmit_8023"
  ],
  "Reasoning": "The patch modifies net/mac80211/tx.c in ieee80211_8023_xmit() to set info-\u003eband from the channel context configuration for non-MLD interfaces and drop packets if the channel context configuration is NULL. This is part of the 802.3 transmit encapsulation offload path in the mac80211 wireless networking subsystem, reachable when hardware encapsulation offload is supported (such as via MT7921U USB emulated devices). Fuzzing is warranted to test this transmit path and null-check handling.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "MAC80211",
    "CFG80211",
    "MT7921U"
  ],
  "FocusSymbols": [
    "ieee80211_8023_xmit",
    "ieee80211_subif_start_xmit_8023"
  ],
  "Reasoning": "The patch modifies net/mac80211/tx.c in ieee80211_8023_xmit() to set info-\u003eband from the channel context configuration for non-MLD interfaces and drop packets if the channel context configuration is NULL. This is part of the 802.3 transmit encapsulation offload path in the mac80211 wireless networking subsystem, reachable when hardware encapsulation offload is supported (such as via MT7921U USB emulated devices). Fuzzing is warranted to test this transmit path and null-check handling.",
  "WorthFuzzing": true
}

55/1 2026/09/28 00:26 action If
0m Args:
{
  "WorthFuzzing": true
}

Results:
null

56/2 2026/09/28 00:26 agent kmsan-evaluator
0m Model:
core

Args:
null

Results:
{
  "KMSANReasoning": "The patch sets the `info-\u003eband` field in `ieee80211_8023_xmit()` for non-MLD interfaces based on the channel context configuration. The `info` structure (`IEEE80211_SKB_CB(skb)`) is explicitly cleared via `memset(info, 0, sizeof(*info))` prior to this assignment. There are no allocations of uninitialized memory, no structures copied to user space, and no reads from uninitialized stack or heap variables. Potential failure modes (such as NULL dereference or RCU locking issues) are covered by standard kernel bug detectors and KASAN/LOCKDEP. Therefore, dedicated KMSAN fuzzing is not justified.",
  "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 a3e8879f3880d379aa4d2701135635f522db8787
Author: syz-cluster <triage@syzkaller.com>
Date:   Mon Sep 28 00:24:16 2026 +0000

    syz-cluster: applied patch under review

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c8217f6d146e7..b88acb18e04d8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4735,6 +4735,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 {
 	struct ieee80211_tx_info *info;
 	struct ieee80211_local *local = sdata->local;
+	struct ieee80211_chanctx_conf *chanctx_conf;
 	struct tid_ampdu_tx *tid_tx = NULL;
 	struct sk_buff *seg, *next;
 	unsigned int skbs = 0, len = 0;
@@ -4784,6 +4785,16 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 		sdata = container_of(sdata->bss,
 				     struct ieee80211_sub_if_data, u.ap);
 
+	/* MLD transmissions must not rely on the band */
+	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+		chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+		if (unlikely(!chanctx_conf)) {
+			kfree_skb_list(skb);
+			return;
+		}
+		info->band = chanctx_conf->def.chan->band;
+	}
+
 	info->flags |= IEEE80211_TX_CTL_HW_80211_ENCAP;
 	info->control.vif = &sdata->vif;
 

57/3 2026/09/28 00:26 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 2410
							output: 41
							thoughts: 704
						

Thoughts:
**KMSAN Fuzzing Session Evaluation**

Okay, so I need to decide if this kernel patch series warrants a dedicated KMSAN fuzzing session. First, let's run a quick safety check. The user is asking for a security review to see if KMSAN is necessary for a specific patch. This doesn't involve any exploit code, malware, or any kind of weaponization – it's a defensive configuration analysis task. So, from a safety perspective, I can proceed directly.

Now, let's dive into the patch itself and see what's changed. Here's the diff: it looks like they've added a `struct ieee80211_chanctx_conf *chanctx_conf;` variable and some logic inside the `ieee80211_8023_xmit` function. Specifically, they're checking if the vif is an MLD vif. If not, they dereference `sdata->vif.bss_conf.chanctx_conf` to get the channel context and determine the band for transmission. There's an `unlikely` check for a null `chanctx_conf`, and if it's null, the SKB list is freed. This logic seems to prevent transmissions from MLD vifs, or if the `chanctx_conf` isn't properly set.

I should probably look closely at the surrounding context of `ieee80211_8023_xmit` in `net/mac80211/tx.c` to understand exactly how this function is used and what other data might be manipulated.



58/3 2026/09/28 00:26 tool read-file
0m Args:
{
  "File": "net/mac80211/tx.c",
  "FirstLine": 4730,
  "LineCount": 80
}

Results:
{
  "Contents": "4730:\t}\n4731:\t\n4732:\tstatic void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n4733:\t\t\t\t\tstruct net_device *dev, struct sta_info *sta,\n4734:\t\t\t\t\tstruct ieee80211_key *key, struct sk_buff *skb)\n4735:\t{\n4736:\t\tstruct ieee80211_tx_info *info;\n4737:\t\tstruct ieee80211_local *local = sdata-\u003elocal;\n4738:\t\tstruct ieee80211_chanctx_conf *chanctx_conf;\n4739:\t\tstruct tid_ampdu_tx *tid_tx = NULL;\n4740:\t\tstruct sk_buff *seg, *next;\n4741:\t\tunsigned int skbs = 0, len = 0;\n4742:\t\tu16 queue;\n4743:\t\tu8 tid;\n4744:\t\n4745:\t\tqueue = ieee80211_select_queue(sdata, sta, skb);\n4746:\t\tskb_set_queue_mapping(skb, queue);\n4747:\t\n4748:\t\tif (unlikely(test_bit(SCAN_SW_SCANNING, \u0026local-\u003escanning)) \u0026\u0026\n4749:\t\t    test_bit(SDATA_STATE_OFFCHANNEL, \u0026sdata-\u003estate))\n4750:\t\t\tgoto out_free;\n4751:\t\n4752:\t\tskb = skb_share_check(skb, GFP_ATOMIC);\n4753:\t\tif (unlikely(!skb))\n4754:\t\t\treturn;\n4755:\t\n4756:\t\tieee80211_aggr_check(sdata, sta, skb);\n4757:\t\n4758:\t\ttid = skb-\u003epriority \u0026 IEEE80211_QOS_CTL_TAG1D_MASK;\n4759:\t\n4760:\t\tif (sta)\n4761:\t\t\ttid_tx = rcu_dereference(sta-\u003eampdu_mlme.tid_tx[tid]);\n4762:\t\tif (tid_tx) {\n4763:\t\t\tif (!test_bit(HT_AGG_STATE_OPERATIONAL, \u0026tid_tx-\u003estate)) {\n4764:\t\t\t\t/* fall back to non-offload slow path */\n4765:\t\t\t\t__ieee80211_subif_start_xmit(skb, dev, 0,\n4766:\t\t\t\t\t\t\t     IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,\n4767:\t\t\t\t\t\t\t     0);\n4768:\t\t\t\treturn;\n4769:\t\t\t}\n4770:\t\n4771:\t\t\tif (tid_tx-\u003etimeout)\n4772:\t\t\t\ttid_tx-\u003elast_tx = jiffies;\n4773:\t\t}\n4774:\t\n4775:\t\tskb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata));\n4776:\t\tif (!skb)\n4777:\t\t\treturn;\n4778:\t\n4779:\t\tinfo = IEEE80211_SKB_CB(skb);\n4780:\t\tmemset(info, 0, sizeof(*info));\n4781:\t\n4782:\t\tinfo-\u003ehw_queue = sdata-\u003evif.hw_queue[queue];\n4783:\t\n4784:\t\tif (sdata-\u003evif.type == NL80211_IFTYPE_AP_VLAN)\n4785:\t\t\tsdata = container_of(sdata-\u003ebss,\n4786:\t\t\t\t\t     struct ieee80211_sub_if_data, u.ap);\n4787:\t\n4788:\t\t/* MLD transmissions must not rely on the band */\n4789:\t\tif (!ieee80211_vif_is_mld(\u0026sdata-\u003evif)) {\n4790:\t\t\tchanctx_conf = rcu_dereference(sdata-\u003evif.bss_conf.chanctx_conf);\n4791:\t\t\tif (unlikely(!chanctx_conf)) {\n4792:\t\t\t\tkfree_skb_list(skb);\n4793:\t\t\t\treturn;\n4794:\t\t\t}\n4795:\t\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\n4796:\t\t}\n4797:\t\n4798:\t\tinfo-\u003eflags |= IEEE80211_TX_CTL_HW_80211_ENCAP;\n4799:\t\tinfo-\u003econtrol.vif = \u0026sdata-\u003evif;\n4800:\t\n4801:\t\tif (key)\n4802:\t\t\tinfo-\u003econtrol.hw_key = \u0026key-\u003econf;\n4803:\t\n4804:\t\tskb_list_walk_safe(skb, seg, next) {\n4805:\t\t\tskbs++;\n4806:\t\t\tlen += seg-\u003elen;\n4807:\t\t\tif (seg != skb)\n4808:\t\t\t\tmemcpy(IEEE80211_SKB_CB(seg), info, sizeof(*info));\n4809:\t\t}\n"
}

59/3 2026/09/28 00:26 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 4911
							output: 32
							thoughts: 525
						

Thoughts:
**Analyzing the TX Path in mac80211**

Okay, let's break this down. Line 4779-4780, right, we're grabbing the skb control buffer, `info`, using `IEEE80211_SKB_CB(skb)`. Standard stuff. And then *boom*, it's wiped clean with `memset`. Makes sense – clear out the old data, ensure a clean slate for the current transmission. Good practice.

Now, we move on. `info->hw_queue` is set. Then, there's a check for AP_VLAN, and potentially `sdata` gets adjusted, which is fine, we've seen this before.

Here's where it gets interesting. We check if the virtual interface is an MLD interface, which is determined by the `ieee80211_vif_is_mld()` macro. *If* it's *not* an MLD interface, we pull the channel context configuration and set `info->band` to `chanctx_conf->def.chan->band`. Easy enough – typical channel assignment.

But... if it *is* an MLD interface? The `info->band` remains at 0, which was set by `memset()`. The comment explicitly states: "MLD transmissions must not rely on the band". Okay, that's the key. So MLD traffic doesn't need or use a band identifier. But why?

This is where my curiosity peaks. This kind of conditional logic usually indicates a specific reason or optimization. Is it a performance thing? Is it related to the specifics of MLD multicast or VLAN handling? I need to understand the *why*. Was this a bugfix? a feature? an optimization?

Time to dig into the commit history. I'm going to run a `git blame`, look at the git commit log, or, at a minimum, grep for `ieee80211_8023_xmit` or `band` in `net/mac80211/tx.c` to see when and why this code path was introduced. I need the context.



60/3 2026/09/28 00:26 tool grepper
0m Args:
{
  "Expression": "info-\u003eband",
  "PathPrefix": "net/mac80211/"
}

Results:
{
  "Output": "net/mac80211/airtime.c=733=u32 ieee80211_calc_tx_airtime(struct ieee80211_hw *hw,\n--\nnet/mac80211/airtime.c-744-\t\tcur_duration = ieee80211_calc_tx_airtime_rate(hw, rate, NULL,\nnet/mac80211/airtime.c:745:\t\t\t\t\t\t\t      info-\u003eband, len);\nnet/mac80211/airtime.c-746-\t\tif (!cur_duration)\n--\nnet/mac80211/cfg.c=4956=static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,\n--\nnet/mac80211/cfg.c-5055-\t\t       IEEE80211_TX_INTFL_NL80211_FRAME_TX;\nnet/mac80211/cfg.c:5056:\tinfo-\u003eband = band;\nnet/mac80211/cfg.c-5057-\tinfo-\u003econtrol.flags |= u32_encode_bits(link_id,\n--\nnet/mac80211/mesh_pathtbl.c=463=void mesh_fast_tx_cache(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/mesh_pathtbl.c-558-\tbuild.timestamp = jiffies;\nnet/mac80211/mesh_pathtbl.c:559:\tbuild.fast_tx.band = info-\u003eband;\nnet/mac80211/mesh_pathtbl.c-560-\tbuild.fast_tx.da_offs = offsetof(struct ieee80211_hdr, addr3);\n--\nnet/mac80211/rate.c=88=void rate_control_tx_status(struct ieee80211_local *local,\n--\nnet/mac80211/rate.c-98-\nnet/mac80211/rate.c:99:\tif (st-\u003einfo-\u003eband \u003e= NUM_NL80211_BANDS)\nnet/mac80211/rate.c-100-\t\treturn;\nnet/mac80211/rate.c-101-\nnet/mac80211/rate.c:102:\tsband = local-\u003ehw.wiphy-\u003ebands[st-\u003einfo-\u003eband];\nnet/mac80211/rate.c-103-\n--\nnet/mac80211/rate.c=890=void ieee80211_get_tx_rates(struct ieee80211_vif *vif,\n--\nnet/mac80211/rate.c-906-\tsdata = vif_to_sdata(vif);\nnet/mac80211/rate.c:907:\tif (info-\u003eband \u003e= NUM_NL80211_BANDS)\nnet/mac80211/rate.c-908-\t\treturn;\nnet/mac80211/rate.c-909-\nnet/mac80211/rate.c:910:\tsband = sdata-\u003elocal-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/rate.c-911-\n--\nnet/mac80211/rate.c-915-\tif (!(info-\u003econtrol.flags \u0026 IEEE80211_TX_CTRL_DONT_USE_RATE_MASK))\nnet/mac80211/rate.c:916:\t\tmask = sdata-\u003erc_rateidx_mask[info-\u003eband];\nnet/mac80211/rate.c-917-\n--\nnet/mac80211/sta_info.c=1912=static void ieee80211_send_null_response(struct sta_info *sta, int tid,\n--\nnet/mac80211/sta_info.c-1992-\nnet/mac80211/sta_info.c:1993:\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/sta_info.c-1994-\tieee80211_xmit(sdata, sta, skb);\n--\nnet/mac80211/status.c=257=ieee80211_add_tx_radiotap_header(struct ieee80211_local *local,\n--\nnet/mac80211/status.c-297-\t\t\tlegacy_rate = status_rate-\u003erate_idx.legacy;\nnet/mac80211/status.c:298:\t} else if (info-\u003eband \u003c NUM_NL80211_BANDS \u0026\u0026\nnet/mac80211/status.c-299-\t\t   info-\u003estatus.rates[0].idx \u003e= 0 \u0026\u0026\n--\nnet/mac80211/status.c-303-\nnet/mac80211/status.c:304:\t\tsband = local-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/status.c-305-\t\tlegacy_rate =\n--\nnet/mac80211/tx.c=43=static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,\n--\nnet/mac80211/tx.c-61-\nnet/mac80211/tx.c:62:\tif (info-\u003eband \u003e= NUM_NL80211_BANDS)\nnet/mac80211/tx.c-63-\t\treturn 0;\nnet/mac80211/tx.c-64-\nnet/mac80211/tx.c:65:\tsband = local-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/tx.c-66-\ttxrate = \u0026sband-\u003ebitrates[tx-\u003erate.idx];\n--\nnet/mac80211/tx.c=675=ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)\n--\nnet/mac80211/tx.c-687-\nnet/mac80211/tx.c:688:\tif (info-\u003eband \u003c NUM_NL80211_BANDS)\nnet/mac80211/tx.c:689:\t\tsband = tx-\u003elocal-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/tx.c-690-\telse\n--\nnet/mac80211/tx.c-705-\t} else {\nnet/mac80211/tx.c:706:\t\ttxrc.rate_idx_mask = tx-\u003esdata-\u003erc_rateidx_mask[info-\u003eband];\nnet/mac80211/tx.c-707-\nnet/mac80211/tx.c:708:\t\tif (tx-\u003esdata-\u003erc_has_mcs_mask[info-\u003eband])\nnet/mac80211/tx.c-709-\t\t\ttxrc.rate_idx_mcs_mask =\nnet/mac80211/tx.c:710:\t\t\t\ttx-\u003esdata-\u003erc_rateidx_mcs_mask[info-\u003eband];\nnet/mac80211/tx.c-711-\t}\n--\nnet/mac80211/tx.c-758-\t\t encap ? ((struct ethhdr *)hdr)-\u003eh_dest : hdr-\u003eaddr1,\nnet/mac80211/tx.c:759:\t\t info-\u003eband ? 5 : 2))\nnet/mac80211/tx.c-760-\t\treturn TX_DROP;\n--\nnet/mac80211/tx.c=1911=bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,\n--\nnet/mac80211/tx.c-1924-\nnet/mac80211/tx.c:1925:\tinfo-\u003eband = band;\nnet/mac80211/tx.c-1926-\tinfo-\u003econtrol.vif = vif;\n--\nnet/mac80211/tx.c=2128=bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,\n--\nnet/mac80211/tx.c-2301-\t\tstruct ieee80211_supported_band *sband =\nnet/mac80211/tx.c:2302:\t\t\tlocal-\u003ehw.wiphy-\u003ebands[info-\u003eband];\nnet/mac80211/tx.c-2303-\n--\nnet/mac80211/tx.c=2350=netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,\n--\nnet/mac80211/tx.c-2489-\nnet/mac80211/tx.c:2490:\tinfo-\u003eband = chandef-\u003echan-\u003eband;\nnet/mac80211/tx.c-2491-\n--\nnet/mac80211/tx.c=2677=static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-3001-\t}\nnet/mac80211/tx.c:3002:\tinfo-\u003eband = band;\nnet/mac80211/tx.c-3003-\n--\nnet/mac80211/tx.c=3770=void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-3808-\tmemset(info, 0, sizeof(*info));\nnet/mac80211/tx.c:3809:\tinfo-\u003eband = fast_tx-\u003eband;\nnet/mac80211/tx.c-3810-\tinfo-\u003econtrol.vif = \u0026sdata-\u003evif;\n--\nnet/mac80211/tx.c=4732=static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n--\nnet/mac80211/tx.c-4794-\t\t}\nnet/mac80211/tx.c:4795:\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/tx.c-4796-\t}\n--\nnet/mac80211/tx.c=4997=static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,\n--\nnet/mac80211/tx.c-5017-\t\t\t}\nnet/mac80211/tx.c:5018:\t\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/tx.c-5019-\t\t}\n--\nnet/mac80211/tx.c=5558=ieee80211_beacon_get_finish(struct ieee80211_hw *hw,\n--\nnet/mac80211/tx.c-5590-\tinfo-\u003eflags |= IEEE80211_TX_CTL_NO_ACK;\nnet/mac80211/tx.c:5591:\tinfo-\u003eband = band;\nnet/mac80211/tx.c-5592-\n--\nnet/mac80211/tx.c=6322=ieee80211_get_buffered_bc(struct ieee80211_hw *hw,\n--\nnet/mac80211/tx.c-6383-\ttx.flags |= IEEE80211_TX_PS_BUFFERED;\nnet/mac80211/tx.c:6384:\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\nnet/mac80211/tx.c-6385-\n"
}

61/3 2026/09/28 00:26 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 9206
							output: 41
							thoughts: 374
						

Thoughts:
**Analyzing the Band Initialization in `ieee80211_8023_xmit`**

Okay, let's break this down. In reviewing the `ieee80211_8023_xmit` function, the `info->band` variable caught my eye. It seems that, previously, `info->band` wasn't explicitly initialized within that particular function. Diving deeper into `net/mac80211/tx.c`, specifically line 4780, reveals: `info = IEEE80211_SKB_CB(skb);` followed immediately by `memset(info, 0, sizeof(*info));`.

Ah, there it is! Before this patch, even though `ieee80211_8023_xmit` didn't set `info->band` directly, the `memset` call would have effectively initialized it to zero. And a value of zero corresponds to `NL80211_BAND_2GHZ`. That's the crux of the issue.

This implies that for 5GHz or 6GHz transmissions, when HW 802.11 encapsulation was in play, `info->band` was incorrectly set to zero. Thus, the actual band being used for transmission wasn't what was being set in the configuration. It was always being forced to 2GHz, which would cause significant issues when trying to use higher frequency bands.

Now, with this patch, there's a new block of code:
```c
	/* MLD transmissions must not rely on the band */
	if (!ieee80211_vif_is_mld(&sdata->vif)) {
		chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
		if (unlikely(!chanctx_conf)) {
			kfree_skb_list(skb);
			return;
		}
		info->band = chanctx_conf->def.chan->band;
	}
```

This section is clearly meant to correct the behavior. It first checks if the transmission is related to MLD and only attempts to correct the behavior if it isn't. The channel context configuration is retrieved. It then dereferences this context to obtain the band from the channel itself. I can see what this is attempting to accomplish. Specifically, to make sure the band used for transmissions matches the actual operating channel.

I'll also take a look at `ieee80211_tx_pending_skb` around line 5017 to understand how it's handled there too, just to be thorough and ensure the fix is consistent throughout the relevant code paths.



62/3 2026/09/28 00:26 tool read-file
0m Args:
{
  "File": "net/mac80211/tx.c",
  "FirstLine": 5005,
  "LineCount": 25
}

Results:
{
  "Contents": "5005:\t\tstruct ieee80211_chanctx_conf *chanctx_conf;\n5006:\t\n5007:\t\tsdata = vif_to_sdata(info-\u003econtrol.vif);\n5008:\t\n5009:\t\tif (info-\u003econtrol.flags \u0026 IEEE80211_TX_INTCFL_NEED_TXPROCESSING) {\n5010:\t\t\t/* update band only for non-MLD */\n5011:\t\t\tif (!ieee80211_vif_is_mld(\u0026sdata-\u003evif)) {\n5012:\t\t\t\tchanctx_conf =\n5013:\t\t\t\t\trcu_dereference(sdata-\u003evif.bss_conf.chanctx_conf);\n5014:\t\t\t\tif (unlikely(!chanctx_conf)) {\n5015:\t\t\t\t\tdev_kfree_skb(skb);\n5016:\t\t\t\t\treturn true;\n5017:\t\t\t\t}\n5018:\t\t\t\tinfo-\u003eband = chanctx_conf-\u003edef.chan-\u003eband;\n5019:\t\t\t}\n5020:\t\t\tresult = ieee80211_tx(sdata, NULL, skb, true);\n5021:\t\t} else if (info-\u003eflags \u0026 IEEE80211_TX_CTL_HW_80211_ENCAP) {\n5022:\t\t\tif (ieee80211_lookup_ra_sta(sdata, skb, \u0026sta, true)) {\n5023:\t\t\t\tdev_kfree_skb(skb);\n5024:\t\t\t\treturn true;\n5025:\t\t\t}\n5026:\t\n5027:\t\t\tif (IS_ERR(sta) || (sta \u0026\u0026 !sta-\u003euploaded))\n5028:\t\t\t\tsta = NULL;\n5029:\t\n"
}

63/3 2026/09/28 00:26 llm kmsan-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 10692
							output: 178
							thoughts: 791
						

Thoughts:
**KMSAN Assessment: This Patch is a No-Go**

Alright, let's break this down. First, I see `info` is located within `IEEE80211_SKB_CB(skb)`, and crucially, it's immediately zeroed out with `memset`. That's a good start. The patch itself seems to initialize `info->band` in `ieee80211_8023_xmit` when the Wi-Fi interface isn't in MLD mode, and it includes a check for a null `chanctx_conf`, preventing a NULL pointer dereference.

Now, the important part: KMSAN. We're talking about uninitialized memory reads, not your garden-variety memory corruption. Standard kernel builds already have KASAN, LOCKDEP, and all sorts of checks to catch things like out-of-bounds access and use-after-free bugs. A dedicated KMSAN session is costly; it's a resource hog. The rule is clear: *only* use KMSAN if the patch introduces risks that KASAN *can't* detect.

So, let's examine the criteria for KMSAN usage: does the patch introduce any new risks of uninitialized memory being exposed? Let's check:

*   `chanctx_conf`: It's a pointer obtained via `rcu_dereference`, and it's checked for NULL. Good.
*   `info`: It's a pointer to `IEEE80211_SKB_CB(skb)`, which we confirmed is *explicitly* zeroed with `memset`.
*   Crucially, `info->band` is *always* initialized: it's either left at 0 (from the memset) in MLD mode or explicitly set to `chanctx_conf->def.chan->band` when not in MLD mode. So it's always initialized.
*   There's no kernel-to-user copy happening here, so no potential for info leaks.
*   No uninitialized memory reads or allocations happening.

The primary risks here are a NULL pointer dereference or potential RCU-related issues. But KASAN, LOCKDEP, and general kernel assertions should catch those issues. In fact, standard build checks will catch a number of issues. So, based on the requirements of uninitialized memory, it's a no.

Therefore, this patch doesn't introduce or expose any new uninitialized memory risks. NeedKMSAN should absolutely be `false`. Time to call `set-results` and provide the reasoning.



64/3 2026/09/28 00:26 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch sets the `info-\u003eband` field in `ieee80211_8023_xmit()` for non-MLD interfaces based on the channel context configuration. The `info` structure (`IEEE80211_SKB_CB(skb)`) is explicitly cleared via `memset(info, 0, sizeof(*info))` prior to this assignment. There are no allocations of uninitialized memory, no structures copied to user space, and no reads from uninitialized stack or heap variables. Potential failure modes (such as NULL dereference or RCU locking issues) are covered by standard kernel bug detectors and KASAN/LOCKDEP. Therefore, dedicated KMSAN fuzzing is not justified.",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch sets the `info-\u003eband` field in `ieee80211_8023_xmit()` for non-MLD interfaces based on the channel context configuration. The `info` structure (`IEEE80211_SKB_CB(skb)`) is explicitly cleared via `memset(info, 0, sizeof(*info))` prior to this assignment. There are no allocations of uninitialized memory, no structures copied to user space, and no reads from uninitialized stack or heap variables. Potential failure modes (such as NULL dereference or RCU locking issues) are covered by standard kernel bug detectors and KASAN/LOCKDEP. Therefore, dedicated KMSAN fuzzing is not justified.",
  "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)