AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/07/22 07:22 flow patch-triage
1m Args:
null

Results:
{
  "EnableConfigs": [
    "MAC80211_HWSIM"
  ],
  "FocusSymbols": [
    "hwsim_tx_info_frame_received_nl",
    "hwsim_virtio_handle_cmd"
  ],
  "Reasoning": "The patch changes the Netlink policy for HWSIM_ATTR_TX_INFO from a maximum length (NLA_BINARY with .len) to an exact length (NLA_POLICY_EXACT_LEN). This is a functional change that alters how the kernel validates incoming Netlink messages for the MAC80211_HWSIM family, specifically affecting the HWSIM_CMD_TX_INFO_FRAME command.",
  "WorthFuzzing": true
}

1/1 2026/07/22 07:22 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit a20af3abebf8a019ede3ad74e9523d2980e0f195\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Wed Jul 22 07:22:48 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c\nindex 0dd8a6c8595344..836dd25e5c6148 100644\n--- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c\n+++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c\n@@ -870,9 +870,9 @@ static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {\n \t[HWSIM_ATTR_FLAGS] = { .type = NLA_U32 },\n \t[HWSIM_ATTR_RX_RATE] = { .type = NLA_U32 },\n \t[HWSIM_ATTR_SIGNAL] = { .type = NLA_U32 },\n-\t[HWSIM_ATTR_TX_INFO] = { .type = NLA_BINARY,\n-\t\t\t\t .len = IEEE80211_TX_MAX_RATES *\n-\t\t\t\t\tsizeof(struct hwsim_tx_rate)},\n+\t[HWSIM_ATTR_TX_INFO] =\n+\t\tNLA_POLICY_EXACT_LEN(IEEE80211_TX_MAX_RATES *\n+\t\t\t\t     sizeof(struct hwsim_tx_rate)),\n \t[HWSIM_ATTR_COOKIE] = { .type = NLA_U64 },\n \t[HWSIM_ATTR_CHANNELS] = { .type = NLA_U32 },\n \t[HWSIM_ATTR_RADIO_ID] = { .type = NLA_U32 },\n"
}

2/1 2026/07/22 07:22 agent patch-evaluator
1m Model:
best-expensive

Args:
null

Results:
{
  "EnableConfigs": [
    "MAC80211_HWSIM"
  ],
  "FocusSymbols": [
    "hwsim_tx_info_frame_received_nl",
    "hwsim_virtio_handle_cmd"
  ],
  "Reasoning": "The patch changes the Netlink policy for HWSIM_ATTR_TX_INFO from a maximum length (NLA_BINARY with .len) to an exact length (NLA_POLICY_EXACT_LEN). This is a functional change that alters how the kernel validates incoming Netlink messages for the MAC80211_HWSIM family, specifically affecting the HWSIM_CMD_TX_INFO_FRAME command.",
  "WorthFuzzing": true
}

Instruction:
You are an expert Linux kernel maintainer.
Your job is to review a provided patch series and determine
if it makes functional changes to the kernel that should be fuzzed.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively
use your code access tools to examine the actual source code and confirm any assumptions.

Return WorthFuzzing=false if the patch only contains:
- Modifications to Documentation/, Kconfig files, or code comments.
- Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints.
- Changes to numeric constants or macros that do not functionally alter execution flow.
- Code paths that are impossible to reach in virtualized environments like GCE or QEMU,
even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim).

If it modifies reachable core kernel logic, drivers, or architectures, use your code search
tools to verify the code can be executed, then return WorthFuzzing=true.

When returning WorthFuzzing=true, you MUST ALSO:
1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols.
   Avoid listing generic hot-path functions to prevent skewed test distributions.
2. Identify any specific CONFIG_ options required to properly test this new/modified feature.
   Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions.
   Do not list too generic configs (we already have them enabled). Only list those that
   specifically cover the modified code. List them in the EnableConfigs output array,
   and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


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

Prompt:
For your convenience, here is the diff of the changes:
commit a20af3abebf8a019ede3ad74e9523d2980e0f195
Author: syz-cluster <triage@syzkaller.com>
Date:   Wed Jul 22 07:22:48 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
index 0dd8a6c8595344..836dd25e5c6148 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c
@@ -870,9 +870,9 @@ static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {
 	[HWSIM_ATTR_FLAGS] = { .type = NLA_U32 },
 	[HWSIM_ATTR_RX_RATE] = { .type = NLA_U32 },
 	[HWSIM_ATTR_SIGNAL] = { .type = NLA_U32 },
-	[HWSIM_ATTR_TX_INFO] = { .type = NLA_BINARY,
-				 .len = IEEE80211_TX_MAX_RATES *
-					sizeof(struct hwsim_tx_rate)},
+	[HWSIM_ATTR_TX_INFO] =
+		NLA_POLICY_EXACT_LEN(IEEE80211_TX_MAX_RATES *
+				     sizeof(struct hwsim_tx_rate)),
 	[HWSIM_ATTR_COOKIE] = { .type = NLA_U64 },
 	[HWSIM_ATTR_CHANNELS] = { .type = NLA_U32 },
 	[HWSIM_ATTR_RADIO_ID] = { .type = NLA_U32 },

3/2 2026/07/22 07:22 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 2127
							output: 48
							thoughts: 138
						

Thoughts:
**Analyzing the Hardware Simulation Driver Patch**

Okay, so this patch is touching `drivers/net/wireless/virtual/mac80211_hwsim_main.c`. It looks like it's making a significant Netlink policy change. Specifically, it's modifying the `HWSIM_ATTR_TX_INFO` attribute. Previously, the policy for this attribute used `.type = NLA_BINARY` with `.len = ...`. Now, it's switching to `NLA_POLICY_EXACT_LEN(...)`.

Hold on... This is actually more interesting than a simple tweak. The critical difference here is the *enforcement*. Using `.len` with `NLA_BINARY` defines a *maximum* length, right? But `NLA_POLICY_EXACT_LEN`... that means it enforces an *exact* length. This isn't just a minor style adjustment; it's a functional change. It implies a specific expectation about the size of the `TX_INFO` data that's being sent through Netlink. We're going from accepting anything up to a certain size to requiring a *precise* size.

Before I jump to any conclusions, I need to understand the implications of this change. It's time to check the usage of `hwsim_genl_policy` to see how this `TX_INFO` attribute is being handled and where this exact length requirement comes from.



4/2 2026/07/22 07:22 tool grepper
0m Args:
{
  "Expression": "hwsim_genl_policy",
  "PathPrefix": "drivers/net/wireless/virtual/mac80211_hwsim_main.c"
}

Results:
{
  "Output": "drivers/net/wireless/virtual/mac80211_hwsim_main.c=857=hwsim_pmsr_capa_policy[NL80211_PMSR_ATTR_MAX + 1] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-864-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:865:static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-866-\t[HWSIM_ATTR_ADDR_RECEIVER] = NLA_POLICY_ETH_ADDR_COMPAT,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7083=static struct genl_family hwsim_genl_family __ro_after_init = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7086-\t.maxattr = HWSIM_ATTR_MAX,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7087:\t.policy = hwsim_genl_policy,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7088-\t.netnsok = true,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7232=static int hwsim_virtio_handle_cmd(struct sk_buff *skb)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7246-\terr = genlmsg_parse(nlh, \u0026hwsim_genl_family, tb, HWSIM_ATTR_MAX,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7247:\t\t\t    hwsim_genl_policy, NULL);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7248-\tif (err) {\n"
}

5/2 2026/07/22 07:22 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 3177
							output: 48
							thoughts: 131
						

Thoughts:
**Analyzing the Netlink Attribute Parsing Change**

Okay, so I'm looking at this Netlink change related to attribute parsing, specifically within the `hwsim` context. It looks like this policy is being used in `hwsim_genl_family` and `hwsim_virtio_handle_cmd`, which is a pretty common pattern for this type of functionality. This seems to be a functional change, not just a bug fix, which means I need to dig a little deeper. Given the `MAC80211_HWSIM` config option, I'm guessing this relates to hardware simulation in mac80211, probably for testing. Let's see... the core of the change seems to be within `hwsim_genl_policy`.  That means I should focus my attention on where `hwsim_genl_policy` is *used*. Looks like it feeds into both `hwsim_virtio_handle_cmd` and the generic Netlink parsing within `hwsim_genl_family`. Understanding how those two interact with the new policy is key. I'll need to remember to check the commands that are defined in `hwsim_genl_family`. Those are probably the places where this new parsing will actually make its presence known.



6/2 2026/07/22 07:23 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "hwsim_genl_ops",
  "PathPrefix": "drivers/net/wireless/virtual/mac80211_hwsim_main.c"
}

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

7/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 3641
							output: 48
							thoughts: 15
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into the `hwsim_genl_family` Definition**

Okay, so I'm looking at something related to hardware simulation, specifically the `genl` family used within it. The first thing that pops into my head is to verify the exact definition of `hwsim_genl_family`. I need to ensure I'm operating with a correct understanding of this fundamental structure. Any inconsistencies or overlooked details there could lead me down a very wrong path during analysis. This is a critical building block I'm dealing with. Let me see where that's defined, and what's in the underlying data structure.



8/2 2026/07/22 07:23 tool grepper
0m Args:
{
  "Expression": "hwsim_genl_family",
  "PathPrefix": "drivers/net/wireless/virtual/mac80211_hwsim_main.c"
}

Results:
{
  "Output": "drivers/net/wireless/virtual/mac80211_hwsim_main.c=712=static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-717-/* MAC80211_HWSIM netlink family */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:718:static struct genl_family hwsim_genl_family;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-719-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1521=static void mac80211_hwsim_config_mac_nl(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1537-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1538:\tmsg_head = genlmsg_put(skb, 0, 0, \u0026hwsim_genl_family, 0,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1539-\t\t\t       add ? HWSIM_CMD_ADD_MAC_ADDR :\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1635=static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1669-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1670:\tmsg_head = genlmsg_put(skb, 0, 0, \u0026hwsim_genl_family, 0,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1671-\t\t\t       HWSIM_CMD_FRAME);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=3754=static int mac80211_hwsim_start_pmsr(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3783-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:3784:\tmsg_head = genlmsg_put(skb, 0, 0, \u0026hwsim_genl_family, 0, HWSIM_CMD_START_PMSR);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3785-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=3821=static void mac80211_hwsim_abort_pmsr(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3849-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:3850:\tmsg_head = genlmsg_put(skb, 0, 0, \u0026hwsim_genl_family, 0, HWSIM_CMD_ABORT_PMSR);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3851-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=4364=static void hwsim_mcast_config_msg(struct sk_buff *mcast_skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4367-\tif (info)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:4368:\t\tgenl_notify(\u0026hwsim_genl_family, mcast_skb, info,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4369-\t\t\t    HWSIM_MCGRP_CONFIG, GFP_KERNEL);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4370-\telse\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:4371:\t\tgenlmsg_multicast(\u0026hwsim_genl_family, mcast_skb, 0,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4372-\t\t\t\t  HWSIM_MCGRP_CONFIG, GFP_KERNEL);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=4456=static void hwsim_mcast_new_radio(int id, struct genl_info *info,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4465-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:4466:\tdata = genlmsg_put(mcast_skb, 0, 0, \u0026hwsim_genl_family, 0,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4467-\t\t\t   HWSIM_CMD_NEW_RADIO);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=6174=static void hwsim_mcast_del_radio(int id, const char *hwname,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6184-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6185:\tdata = genlmsg_put(skb, 0, 0, \u0026hwsim_genl_family, 0,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6186-\t\t\t   HWSIM_CMD_DEL_RADIO);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=6221=static int mac80211_hwsim_get_radio(struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6229-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6230:\thdr = genlmsg_put(skb, portid, seq, \u0026hwsim_genl_family, flags,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6231-\t\t\t  HWSIM_CMD_GET_RADIO);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=6989=static int hwsim_dump_radio_nl(struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7024-\t\thdr = genlmsg_put(skb, NETLINK_CB(cb-\u003eskb).portid,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7025:\t\t\t\t  cb-\u003enlh-\u003enlmsg_seq, \u0026hwsim_genl_family,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7026-\t\t\t\t  NLM_F_MULTI, HWSIM_CMD_GET_RADIO);\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7041=static const struct genl_small_ops hwsim_ops[] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7082-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7083:static struct genl_family hwsim_genl_family __ro_after_init = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7084-\t.name = \"MAC80211_HWSIM\",\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7145=static int __init hwsim_init_netlink(void)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7150-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7151:\trc = genl_register_family(\u0026hwsim_genl_family);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7152-\tif (rc)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7156-\tif (rc) {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7157:\t\tgenl_unregister_family(\u0026hwsim_genl_family);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7158-\t\tgoto failure;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7211=static void hwsim_exit_netlink(void)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7215-\t/* unregister the family */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7216:\tgenl_unregister_family(\u0026hwsim_genl_family);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7217-}\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7232=static int hwsim_virtio_handle_cmd(struct sk_buff *skb)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7245-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7246:\terr = genlmsg_parse(nlh, \u0026hwsim_genl_family, tb, HWSIM_ATTR_MAX,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7247-\t\t\t    hwsim_genl_policy, NULL);\n"
}

9/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 6617
							output: 45
							thoughts: 21
						

Thoughts:
Here's my take on those thoughts:

**Analyzing Hardware Simulation Operations**

Okay, so the core of how this hardware simulation is run seems to be dictated within `hwsim_ops`. I need to get a clear picture of what's going on in there. It's the central point for the simulation's behavior. I need to dive into `hwsim_ops` and figure out precisely how things are defined – what are the basic operations, how are they structured, and what's the general design philosophy behind them? This seems like the gateway to understanding the simulation's inner workings.



10/2 2026/07/22 07:23 tool grepper
0m Args:
{
  "Expression": "hwsim_ops",
  "PathPrefix": "drivers/net/wireless/virtual/mac80211_hwsim_main.c"
}

Results:
{
  "Output": "drivers/net/wireless/virtual/mac80211_hwsim_main.c=4239=static int mac80211_hwsim_set_radar_background(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4304-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:4305:static const struct ieee80211_ops mac80211_hwsim_ops = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-4306-\tHWSIM_COMMON_OPS\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=5639=static int mac80211_hwsim_new_radio(struct genl_info *info,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5646-\tenum nl80211_band band;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5647:\tconst struct ieee80211_ops *ops = \u0026mac80211_hwsim_ops;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5648-\tstruct net *net;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=6989=static int hwsim_dump_radio_nl(struct sk_buff *skb,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7040-/* Generic Netlink operations array */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7041:static const struct genl_small_ops hwsim_ops[] = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7042-\t{\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7083=static struct genl_family hwsim_genl_family __ro_after_init = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7089-\t.module = THIS_MODULE,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7090:\t.small_ops = hwsim_ops,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7091:\t.n_small_ops = ARRAY_SIZE(hwsim_ops),\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7092-\t.resv_start_op = HWSIM_CMD_REPORT_PMSR + 1, // match with __HWSIM_CMD_MAX\n"
}

11/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 7580
							output: 50
							thoughts: 13
						

Thoughts:
Okay, let's dive into this. Here's my take on those thoughts, as if they're my own:

**Analyzing `hwsim_ops`**

Right, let's get down to brass tacks. I need to understand what's going on within this `hwsim_ops` structure. I'm assuming, given the context, this is related to hardware simulation operations. That's a good place to start, isn't it? I'm already mentally parsing its internal structure. What kind of operations are being defined here? Are they basic read/write functions, more complex instruction emulations, or something else entirely? The type definitions are key here. I need to quickly identify the function pointers and data structures within. What's the design philosophy? Is it a modular system, or more monolithic? I'm hoping it’s well-defined and documented. I’ll start by tracing the function calls and cross-referencing to the supporting definitions. My goal is to quickly ascertain the scope and functionality of these "operations," so I can determine how they can be applied and integrated with other simulation components. I am likely to use the function pointers and their arguments to ascertain their utility.



12/2 2026/07/22 07:23 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/virtual/mac80211_hwsim_main.c",
  "FirstLine": 7041,
  "LineCount": 40
}

Results:
{
  "Contents": "7041:\tstatic const struct genl_small_ops hwsim_ops[] = {\n7042:\t\t{\n7043:\t\t\t.cmd = HWSIM_CMD_REGISTER,\n7044:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7045:\t\t\t.doit = hwsim_register_received_nl,\n7046:\t\t\t.flags = GENL_UNS_ADMIN_PERM,\n7047:\t\t},\n7048:\t\t{\n7049:\t\t\t.cmd = HWSIM_CMD_FRAME,\n7050:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7051:\t\t\t.doit = hwsim_cloned_frame_received_nl,\n7052:\t\t},\n7053:\t\t{\n7054:\t\t\t.cmd = HWSIM_CMD_TX_INFO_FRAME,\n7055:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7056:\t\t\t.doit = hwsim_tx_info_frame_received_nl,\n7057:\t\t},\n7058:\t\t{\n7059:\t\t\t.cmd = HWSIM_CMD_NEW_RADIO,\n7060:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7061:\t\t\t.doit = hwsim_new_radio_nl,\n7062:\t\t\t.flags = GENL_UNS_ADMIN_PERM,\n7063:\t\t},\n7064:\t\t{\n7065:\t\t\t.cmd = HWSIM_CMD_DEL_RADIO,\n7066:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7067:\t\t\t.doit = hwsim_del_radio_nl,\n7068:\t\t\t.flags = GENL_UNS_ADMIN_PERM,\n7069:\t\t},\n7070:\t\t{\n7071:\t\t\t.cmd = HWSIM_CMD_GET_RADIO,\n7072:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7073:\t\t\t.doit = hwsim_get_radio_nl,\n7074:\t\t\t.dumpit = hwsim_dump_radio_nl,\n7075:\t\t},\n7076:\t\t{\n7077:\t\t\t.cmd = HWSIM_CMD_REPORT_PMSR,\n7078:\t\t\t.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,\n7079:\t\t\t.doit = hwsim_pmsr_report_nl,\n7080:\t\t},\n"
}

13/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 8640
							output: 50
							thoughts: 36
						

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

**Investigating `HWSIM_ATTR_TX_INFO` in `hwsim_tx_info_frame_received_nl`**

Alright, I see we're dealing with `HWSIM_ATTR_TX_INFO`. That rings a bell, I know I've encountered that attribute before, probably during debugging or when looking at how we're handling transmit information within the hardware simulation layer. My immediate thought is, "Where's it used? What's the context?" The text specifically mentions it within `hwsim_tx_info_frame_received_nl`. That's a good starting point, the `nl` suffix suggests network link stuff, so we're probably processing some kind of network packet or event related to frame reception. So, my next step is clear. Let's dig into `hwsim_tx_info_frame_received_nl` and confirm my hunch. Need to understand how `HWSIM_ATTR_TX_INFO` is being interpreted and used in that specific function. I'm already anticipating what to check for - is it being parsed correctly? Is the information being used downstream in a meaningful way? Any potential for buffer overflows or incorrect data interpretation? Let's get to work and find out.



14/2 2026/07/22 07:23 tool grepper
0m Args:
{
  "Expression": "HWSIM_ATTR_TX_INFO",
  "PathPrefix": "drivers/net/wireless/virtual/mac80211_hwsim_main.c"
}

Results:
{
  "Output": "drivers/net/wireless/virtual/mac80211_hwsim_main.c=865=static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-872-\t[HWSIM_ATTR_SIGNAL] = { .type = NLA_U32 },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:873:\t[HWSIM_ATTR_TX_INFO] =\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-874-\t\tNLA_POLICY_EXACT_LEN(IEEE80211_TX_MAX_RATES *\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-887-\t[HWSIM_ATTR_FREQ] = { .type = NLA_U32 },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:888:\t[HWSIM_ATTR_TX_INFO_FLAGS] = { .type = NLA_BINARY },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-889-\t[HWSIM_ATTR_PERM_ADDR] = NLA_POLICY_ETH_ADDR_COMPAT,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1635=static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1710-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1711:\tif (nla_put(skb, HWSIM_ATTR_TX_INFO,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1712-\t\t    sizeof(struct hwsim_tx_rate)*IEEE80211_TX_MAX_RATES,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1715-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1716:\tif (nla_put(skb, HWSIM_ATTR_TX_INFO_FLAGS,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1717-\t\t    sizeof(struct hwsim_tx_rate_flag) * IEEE80211_TX_MAX_RATES,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=6320=static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6339-\t    !info-\u003eattrs[HWSIM_ATTR_SIGNAL] ||\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6340:\t    !info-\u003eattrs[HWSIM_ATTR_TX_INFO])\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6341-\t\tgoto out;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6385-\ttx_attempts = (struct hwsim_tx_rate *)nla_data(\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6386:\t\t       info-\u003eattrs[HWSIM_ATTR_TX_INFO]);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6387-\n"
}

15/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 10008
							output: 50
							thoughts: 119
						

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

**Diving into the `hwsim_tx_info_frame_received_nl` Function**

Okay, so I see that `hwsim_tx_info_frame_received_nl` is utilizing `HWSIM_ATTR_TX_INFO`. This seems functional, specifically impacting the netlink parsing happening within the context of `HWSIM_CMD_TX_INFO_FRAME`. We're dealing with a `MAC80211_HWSIM` configuration here. Now, before I go further, let me just quickly scan for any related functions that this might touch. I'm going to start with a deeper look at `hwsim_tx_info_frame_received_nl` to verify my first assumptions.



16/2 2026/07/22 07:23 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/virtual/mac80211_hwsim_main.c",
  "FirstLine": 6320,
  "LineCount": 40
}

Results:
{
  "Contents": "6320:\tstatic int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,\n6321:\t\t\t\t\t\t   struct genl_info *info)\n6322:\t{\n6323:\t\n6324:\t\tstruct ieee80211_hdr *hdr;\n6325:\t\tstruct mac80211_hwsim_data *data2;\n6326:\t\tstruct ieee80211_tx_info *txi;\n6327:\t\tstruct hwsim_tx_rate *tx_attempts;\n6328:\t\tu64 ret_skb_cookie;\n6329:\t\tstruct sk_buff *skb, *tmp;\n6330:\t\tconst u8 *src;\n6331:\t\tunsigned int hwsim_flags;\n6332:\t\tint i;\n6333:\t\tunsigned long flags;\n6334:\t\tbool found = false;\n6335:\t\n6336:\t\tif (!info-\u003eattrs[HWSIM_ATTR_ADDR_TRANSMITTER] ||\n6337:\t\t    !info-\u003eattrs[HWSIM_ATTR_FLAGS] ||\n6338:\t\t    !info-\u003eattrs[HWSIM_ATTR_COOKIE] ||\n6339:\t\t    !info-\u003eattrs[HWSIM_ATTR_SIGNAL] ||\n6340:\t\t    !info-\u003eattrs[HWSIM_ATTR_TX_INFO])\n6341:\t\t\tgoto out;\n6342:\t\n6343:\t\tsrc = (void *)nla_data(info-\u003eattrs[HWSIM_ATTR_ADDR_TRANSMITTER]);\n6344:\t\thwsim_flags = nla_get_u32(info-\u003eattrs[HWSIM_ATTR_FLAGS]);\n6345:\t\tret_skb_cookie = nla_get_u64(info-\u003eattrs[HWSIM_ATTR_COOKIE]);\n6346:\t\n6347:\t\tdata2 = get_hwsim_data_ref_from_addr(src);\n6348:\t\tif (!data2)\n6349:\t\t\tgoto out;\n6350:\t\n6351:\t\tif (!hwsim_virtio_enabled) {\n6352:\t\t\tif (hwsim_net_get_netgroup(genl_info_net(info)) !=\n6353:\t\t\t    data2-\u003enetgroup)\n6354:\t\t\t\tgoto out;\n6355:\t\n6356:\t\t\tif (info-\u003esnd_portid != data2-\u003ewmediumd)\n6357:\t\t\t\tgoto out;\n6358:\t\t}\n6359:\t\n"
}

17/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 11034
							output: 31
							thoughts: 80
						

Thoughts:
Here's my understanding of the situation:

**Analyzing HWSIM TX Info Processing**

Okay, so looking at this code, it's pretty clear that `hwsim_tx_info_frame_received_nl` is the key function that's dealing with the command where we're parsing that `HWSIM_ATTR_TX_INFO` attribute. I should also check out `hwsim_virtio_handle_cmd` as well, since that's another place where the parsing might be happening. I'll need to confirm exactly how it's being done in those two.

Now, let me just double-check the configuration options… right, `MAC80211_HWSIM`. That's the primary one to look at, naturally. I need to make sure the build is configured correctly and understand the implications of that setting.



18/2 2026/07/22 07:23 tool grepper
0m Args:
{
  "Expression": "config MAC80211_HWSIM",
  "PathPrefix": ""
}

Results:
{
  "Output": "drivers/net/wireless/virtual/Kconfig:1:config MAC80211_HWSIM\ndrivers/net/wireless/virtual/Kconfig-2-\ttristate \"Simulated radio testing tool for mac80211\"\n"
}

19/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 11399
							output: 50
							thoughts: 216
						

Thoughts:
**Analyzing the Configuration and Policy Update**

Okay, first things first, I need to understand the scope of this change. Is this the only configuration being modified, or are there other related adjustments? Let's see... the patch itself is straightforward. It looks like the key update is within the `hwsim_genl_policy` for the `HWSIM_ATTR_TX_INFO` attribute. The code enforces an exact length for `HWSIM_ATTR_TX_INFO` now. Seems like a functional change to me.

Now, I need to check how this change interacts with the rest of the system. I should investigate the functions that handle this specific attribute. `hwsim_tx_info_frame_received_nl` immediately jumps out. Are there any *other* functions that deal with `HWSIM_ATTR_TX_INFO`? If so, I need to make sure this change doesn't introduce any incompatibilities or unexpected behavior elsewhere. I will need to track them down.



20/2 2026/07/22 07:23 tool grepper
0m Args:
{
  "Expression": "HWSIM_ATTR_TX_INFO",
  "PathPrefix": "drivers/net/wireless/virtual/mac80211_hwsim_main.c"
}

Results:
{
  "Output": "drivers/net/wireless/virtual/mac80211_hwsim_main.c=865=static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-872-\t[HWSIM_ATTR_SIGNAL] = { .type = NLA_U32 },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:873:\t[HWSIM_ATTR_TX_INFO] =\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-874-\t\tNLA_POLICY_EXACT_LEN(IEEE80211_TX_MAX_RATES *\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-887-\t[HWSIM_ATTR_FREQ] = { .type = NLA_U32 },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:888:\t[HWSIM_ATTR_TX_INFO_FLAGS] = { .type = NLA_BINARY },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-889-\t[HWSIM_ATTR_PERM_ADDR] = NLA_POLICY_ETH_ADDR_COMPAT,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1635=static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1710-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1711:\tif (nla_put(skb, HWSIM_ATTR_TX_INFO,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1712-\t\t    sizeof(struct hwsim_tx_rate)*IEEE80211_TX_MAX_RATES,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1715-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1716:\tif (nla_put(skb, HWSIM_ATTR_TX_INFO_FLAGS,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1717-\t\t    sizeof(struct hwsim_tx_rate_flag) * IEEE80211_TX_MAX_RATES,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=6320=static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6339-\t    !info-\u003eattrs[HWSIM_ATTR_SIGNAL] ||\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6340:\t    !info-\u003eattrs[HWSIM_ATTR_TX_INFO])\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6341-\t\tgoto out;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6385-\ttx_attempts = (struct hwsim_tx_rate *)nla_data(\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:6386:\t\t       info-\u003eattrs[HWSIM_ATTR_TX_INFO]);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-6387-\n"
}

21/2 2026/07/22 07:23 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 12873
							output: 50
							thoughts: 165
						

Thoughts:
**Analyzing the Netlink Frame Transmission in mac80211_hwsim**

Okay, so I need to understand how these netlink frames are being handled within the mac80211_hwsim module. My initial thought process is to trace the journey of the `HWSIM_ATTR_TX_INFO` attribute through the system. I know that `mac80211_hwsim_tx_frame_nl` is responsible for injecting this attribute into an `skb` (socket buffer). Then, `hwsim_tx_info_frame_received_nl` has the job of parsing that information.

This strongly suggests the core change revolves around how this attribute is defined and handled within the Netlink framework. My immediate attention is drawn to `hwsim_genl_policy`, which appears to be the policy used by both `genlmsg_parse` within `hwsim_virtio_handle_cmd` and the overall `hwsim_genl_family`. The connection to `hwsim_genl_policy` is key!

Therefore, the obvious starting points for my investigation are:

*   `hwsim_tx_info_frame_received_nl` - this seems crucial for the *receiving* and interpretation of this tx info.
*   `hwsim_virtio_handle_cmd` - since this function is parsing the command using the genl policy, it must be the handling entrypoint for commands using this policy.

I'll start by taking a closer look at `hwsim_virtio_handle_cmd`. I need to confirm if it truly is the primary command handler, and thus, if it's a good place to focus my efforts.



22/2 2026/07/22 07:24 tool read-file
0m Args:
{
  "File": "drivers/net/wireless/virtual/mac80211_hwsim_main.c",
  "FirstLine": 7232,
  "LineCount": 40
}

Results:
{
  "Contents": "7232:\tstatic int hwsim_virtio_handle_cmd(struct sk_buff *skb)\n7233:\t{\n7234:\t\tstruct nlmsghdr *nlh;\n7235:\t\tstruct genlmsghdr *gnlh;\n7236:\t\tstruct nlattr *tb[HWSIM_ATTR_MAX + 1];\n7237:\t\tstruct genl_info info = {};\n7238:\t\tint err;\n7239:\t\n7240:\t\tnlh = nlmsg_hdr(skb);\n7241:\t\tgnlh = nlmsg_data(nlh);\n7242:\t\n7243:\t\tif (skb-\u003elen \u003c nlh-\u003enlmsg_len)\n7244:\t\t\treturn -EINVAL;\n7245:\t\n7246:\t\terr = genlmsg_parse(nlh, \u0026hwsim_genl_family, tb, HWSIM_ATTR_MAX,\n7247:\t\t\t\t    hwsim_genl_policy, NULL);\n7248:\t\tif (err) {\n7249:\t\t\tpr_err_ratelimited(\"hwsim: genlmsg_parse returned %d\\n\", err);\n7250:\t\t\treturn err;\n7251:\t\t}\n7252:\t\n7253:\t\tinfo.attrs = tb;\n7254:\t\n7255:\t\tswitch (gnlh-\u003ecmd) {\n7256:\t\tcase HWSIM_CMD_FRAME:\n7257:\t\t\thwsim_cloned_frame_received_nl(skb, \u0026info);\n7258:\t\t\tbreak;\n7259:\t\tcase HWSIM_CMD_TX_INFO_FRAME:\n7260:\t\t\thwsim_tx_info_frame_received_nl(skb, \u0026info);\n7261:\t\t\tbreak;\n7262:\t\tcase HWSIM_CMD_REPORT_PMSR:\n7263:\t\t\thwsim_pmsr_report_nl(skb, \u0026info);\n7264:\t\t\tbreak;\n7265:\t\tdefault:\n7266:\t\t\tpr_err_ratelimited(\"hwsim: invalid cmd: %d\\n\", gnlh-\u003ecmd);\n7267:\t\t\treturn -EPROTO;\n7268:\t\t}\n7269:\t\treturn 0;\n7270:\t}\n7271:\t\n"
}

23/2 2026/07/22 07:24 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 14074
							output: 30
							thoughts: 115
						

Thoughts:
**My Analysis of HWSIM's Configuration and Data Handling**

Alright, let's break this down. My initial observation confirms what I suspected: `hwsim_virtio_handle_cmd` is indeed leveraging `hwsim_genl_policy` for message parsing. And, as expected, the generic netlink code also leans on `hwsim_genl_policy` for the `hwsim_genl_family`. So, that confirms the core relationship.

My focus now is definitely on `hwsim_tx_info_frame_received_nl` and, especially, `hwsim_virtio_handle_cmd`, which are the primary functions for data handling, as suspected.

The enabling config is, of course, `MAC80211_HWSIM`. I need to ensure there are no other configurations that play a role. I need to cross-check this to be certain this isn't a partial picture. Let's see if any other configurations come into play here, just to be thorough.



24/2 2026/07/22 07:24 tool grepper
0m Args:
{
  "Expression": "MAC80211_HWSIM",
  "PathPrefix": ""
}

Results:
{
  "Output": "drivers/net/wireless/virtual/Kconfig:1:config MAC80211_HWSIM\ndrivers/net/wireless/virtual/Kconfig-2-\ttristate \"Simulated radio testing tool for mac80211\"\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\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-8-\ndrivers/net/wireless/virtual/mac80211_hwsim.h:9:#ifndef __MAC80211_HWSIM_H\ndrivers/net/wireless/virtual/mac80211_hwsim.h:10:#define __MAC80211_HWSIM_H\ndrivers/net/wireless/virtual/mac80211_hwsim.h-11-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h=217=struct hwsim_tx_rate {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-230- *\ndrivers/net/wireless/virtual/mac80211_hwsim.h:231: * @MAC80211_HWSIM_TX_RC_USE_RTS_CTS: Use RTS/CTS exchange for this rate.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:232: * @MAC80211_HWSIM_TX_RC_USE_CTS_PROTECT: CTS-to-self protection is required.\ndrivers/net/wireless/virtual/mac80211_hwsim.h-233- *\tThis is set if the current BSS requires ERP protection.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:234: * @MAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE: Use short preamble.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:235: * @MAC80211_HWSIM_TX_RC_MCS: HT rate.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:236: * @MAC80211_HWSIM_TX_RC_VHT_MCS: VHT MCS rate, in this case the idx field is\ndrivers/net/wireless/virtual/mac80211_hwsim.h-237- *\tsplit into a higher 4 bits (Nss) and lower 4 bits (MCS number)\ndrivers/net/wireless/virtual/mac80211_hwsim.h:238: * @MAC80211_HWSIM_TX_RC_GREEN_FIELD: Indicates whether this rate should be used\ndrivers/net/wireless/virtual/mac80211_hwsim.h-239- *\tin Greenfield mode.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:240: * @MAC80211_HWSIM_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be\ndrivers/net/wireless/virtual/mac80211_hwsim.h-241- *\t40 MHz.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:242: * @MAC80211_HWSIM_TX_RC_80_MHZ_WIDTH: Indicates 80 MHz transmission\ndrivers/net/wireless/virtual/mac80211_hwsim.h:243: * @MAC80211_HWSIM_TX_RC_160_MHZ_WIDTH: Indicates 160 MHz transmission\ndrivers/net/wireless/virtual/mac80211_hwsim.h-244- *\t(80+80 isn't supported yet)\ndrivers/net/wireless/virtual/mac80211_hwsim.h:245: * @MAC80211_HWSIM_TX_RC_DUP_DATA: The frame should be transmitted on both of\ndrivers/net/wireless/virtual/mac80211_hwsim.h-246- *\tthe adjacent 20 MHz channels, if the current channel type is\ndrivers/net/wireless/virtual/mac80211_hwsim.h-247- *\tNL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS.\ndrivers/net/wireless/virtual/mac80211_hwsim.h:248: * @MAC80211_HWSIM_TX_RC_SHORT_GI: Short Guard interval should be used for this\ndrivers/net/wireless/virtual/mac80211_hwsim.h-249- *\trate.\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h=251=enum hwsim_tx_rate_flags {\ndrivers/net/wireless/virtual/mac80211_hwsim.h:252:\tMAC80211_HWSIM_TX_RC_USE_RTS_CTS\t\t= BIT(0),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:253:\tMAC80211_HWSIM_TX_RC_USE_CTS_PROTECT\t\t= BIT(1),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:254:\tMAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE\t= BIT(2),\ndrivers/net/wireless/virtual/mac80211_hwsim.h-255-\ndrivers/net/wireless/virtual/mac80211_hwsim.h-256-\t/* rate index is an HT/VHT MCS instead of an index */\ndrivers/net/wireless/virtual/mac80211_hwsim.h:257:\tMAC80211_HWSIM_TX_RC_MCS\t\t\t= BIT(3),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:258:\tMAC80211_HWSIM_TX_RC_GREEN_FIELD\t\t= BIT(4),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:259:\tMAC80211_HWSIM_TX_RC_40_MHZ_WIDTH\t\t= BIT(5),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:260:\tMAC80211_HWSIM_TX_RC_DUP_DATA\t\t= BIT(6),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:261:\tMAC80211_HWSIM_TX_RC_SHORT_GI\t\t= BIT(7),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:262:\tMAC80211_HWSIM_TX_RC_VHT_MCS\t\t\t= BIT(8),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:263:\tMAC80211_HWSIM_TX_RC_80_MHZ_WIDTH\t\t= BIT(9),\ndrivers/net/wireless/virtual/mac80211_hwsim.h:264:\tMAC80211_HWSIM_TX_RC_160_MHZ_WIDTH\t\t= BIT(10),\ndrivers/net/wireless/virtual/mac80211_hwsim.h-265-};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h=328=enum hwsim_rate_info_attributes {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim.h-347-\ndrivers/net/wireless/virtual/mac80211_hwsim.h:348:#endif /* __MAC80211_HWSIM_H */\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-9-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:10:#ifndef __MAC80211_HWSIM_I_H\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:11:#define __MAC80211_HWSIM_I_H\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-12-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h=165=void ieee80211_hwsim_wake_tx_queue(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h-167-\ndrivers/net/wireless/virtual/mac80211_hwsim_i.h:168:#endif /* __MAC80211_HWSIM_I_H */\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=712=static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-716-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:717:/* MAC80211_HWSIM netlink family */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-718-static struct genl_family hwsim_genl_family;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=724=static const struct genl_multicast_group hwsim_mcgrps[] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-727-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:728:/* MAC80211_HWSIM netlink policy */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-729-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=865=static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-901-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:902:/* MAC80211_HWSIM virtio queues */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-903-static struct virtqueue *hwsim_vqs[HWSIM_NUM_VQS];\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=1564=static inline u16 trans_tx_rate_flags_ieee2hwsim(struct ieee80211_tx_rate *rate)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1568-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_USE_RTS_CTS)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1569:\t\tresult |= MAC80211_HWSIM_TX_RC_USE_RTS_CTS;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1570-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_USE_CTS_PROTECT)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1571:\t\tresult |= MAC80211_HWSIM_TX_RC_USE_CTS_PROTECT;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1572-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_USE_SHORT_PREAMBLE)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1573:\t\tresult |= MAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1574-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_MCS)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1575:\t\tresult |= MAC80211_HWSIM_TX_RC_MCS;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1576-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_GREEN_FIELD)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1577:\t\tresult |= MAC80211_HWSIM_TX_RC_GREEN_FIELD;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1578-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_40_MHZ_WIDTH)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1579:\t\tresult |= MAC80211_HWSIM_TX_RC_40_MHZ_WIDTH;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1580-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_DUP_DATA)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1581:\t\tresult |= MAC80211_HWSIM_TX_RC_DUP_DATA;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1582-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_SHORT_GI)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1583:\t\tresult |= MAC80211_HWSIM_TX_RC_SHORT_GI;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1584-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_VHT_MCS)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1585:\t\tresult |= MAC80211_HWSIM_TX_RC_VHT_MCS;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1586-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_80_MHZ_WIDTH)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1587:\t\tresult |= MAC80211_HWSIM_TX_RC_80_MHZ_WIDTH;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1588-\tif (rate-\u003eflags \u0026 IEEE80211_TX_RC_160_MHZ_WIDTH)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:1589:\t\tresult |= MAC80211_HWSIM_TX_RC_160_MHZ_WIDTH;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-1590-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=3462=static const char mac80211_hwsim_gstrings_stats[][ETH_GSTRING_LEN] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3472-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:3473:#define MAC80211_HWSIM_SSTATS_LEN ARRAY_SIZE(mac80211_hwsim_gstrings_stats)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3474-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=3484=static int mac80211_hwsim_get_et_sset_count(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3487-\tif (sset == ETH_SS_STATS)\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:3488:\t\treturn MAC80211_HWSIM_SSTATS_LEN;\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3489-\treturn 0;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=3492=static void mac80211_hwsim_get_et_stats(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3507-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:3508:\tWARN_ON(i != MAC80211_HWSIM_SSTATS_LEN);\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-3509-}\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=5612=static const u8 iftypes_ext_capa_ap[] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5620-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5621:#define MAC80211_HWSIM_MLD_CAPA_OPS\t\t\t\t\\\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5622-\tFIELD_PREP_CONST(IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP, \\\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=5627=static const struct wiphy_iftype_ext_capab mac80211_hwsim_iftypes_ext_capa[] = {\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5634-\t\t\t\t    IEEE80211_EML_CAP_EMLMR_SUPPORT,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:5635:\t\t.mld_capa_and_ops = MAC80211_HWSIM_MLD_CAPA_OPS,\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-5636-\t},\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7083=static struct genl_family hwsim_genl_family __ro_after_init = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7084:\t.name = \"MAC80211_HWSIM\",\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7085-\t.version = 1,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c=7402=static void hwsim_virtio_remove(struct virtio_device *vdev)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7410-\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7411:/* MAC80211_HWSIM virtio device id table */\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7412-static const struct virtio_device_id id_table[] = {\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c:7413:\t{ VIRTIO_ID_MAC80211_HWSIM, VIRTIO_DEV_ANY_ID },\ndrivers/net/wireless/virtual/mac80211_hwsim_main.c-7414-\t{ 0 }\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=78=static u64 hwsim_nan_get_master_rank(struct mac80211_hwsim_data *data)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-82-\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:83:\tif (data-\u003enan.phase == MAC80211_HWSIM_NAN_PHASE_UP) {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-84-\t\tmaster_pref = data-\u003enan.master_pref;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=216=void mac80211_hwsim_nan_rx(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-273-\tif ((slot != SLOT_24GHZ_DW \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:274:\t     data-\u003enan.phase != MAC80211_HWSIM_NAN_PHASE_SCAN) ||\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-275-\t    rx_status.freq != 2437)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-436-\t\t    (cg == own_cg \u0026\u0026 frame_amr \u003e curr_amr) ||\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:437:\t\t    data-\u003enan.phase == MAC80211_HWSIM_NAN_PHASE_SCAN) {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-438-\t\t\t/* Avoid a state transition */\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-468-\t\t\t */\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:469:\t\t\tdata-\u003enan.phase = MAC80211_HWSIM_NAN_PHASE_UP;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-470-\t\t\tdata-\u003enan.random_factor_valid_dwst = 0;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=612=mac80211_hwsim_nan_exec_state_transitions(struct mac80211_hwsim_data *data)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-625-\tif (data-\u003enan.master_transition_score \u003c 3)\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:626:\t\tdata-\u003enan.role = MAC80211_HWSIM_NAN_ROLE_MASTER;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:627:\telse if (data-\u003enan.role == MAC80211_HWSIM_NAN_ROLE_MASTER \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-628-\t\t data-\u003enan.master_transition_score \u003e= 3)\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:629:\t\tdata-\u003enan.role = MAC80211_HWSIM_NAN_ROLE_SYNC;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:630:\telse if (data-\u003enan.role == MAC80211_HWSIM_NAN_ROLE_SYNC \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-631-\t\t data-\u003enan.sync_transition_score \u003e= 3)\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:632:\t\tdata-\u003enan.role = MAC80211_HWSIM_NAN_ROLE_NON_SYNC;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:633:\telse if (data-\u003enan.role == MAC80211_HWSIM_NAN_ROLE_NON_SYNC \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-634-\t\t data-\u003enan.sync_transition_score \u003c 3)\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:635:\t\tdata-\u003enan.role = MAC80211_HWSIM_NAN_ROLE_SYNC;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-636-\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-641-\t */\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:642:\tif (data-\u003enan.role == MAC80211_HWSIM_NAN_ROLE_MASTER \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-643-\t    !hrtimer_active(\u0026data-\u003enan.discovery_beacon_timer))\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-653-\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:654:\t\tif (data-\u003enan.phase == MAC80211_HWSIM_NAN_PHASE_SCAN) {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:655:\t\t\tdata-\u003enan.phase = MAC80211_HWSIM_NAN_PHASE_WARMUP;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-656-\t\t\tdata-\u003enan.random_factor_valid_dwst = NAN_WARMUP_DWST;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-659-\t\t} else {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:660:\t\t\tdata-\u003enan.phase = MAC80211_HWSIM_NAN_PHASE_UP;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-661-\t\t\tdata-\u003enan.random_factor_valid_dwst =\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=695=mac80211_hwsim_nan_tx_beacon(struct mac80211_hwsim_data *data,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-750-\tnan_attr.length = cpu_to_le16(sizeof(master_indication));\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:751:\tif (data-\u003enan.phase == MAC80211_HWSIM_NAN_PHASE_UP) {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-752-\t\tmaster_indication.master_pref = data-\u003enan.master_pref;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=774=mac80211_hwsim_nan_slot_timer(struct hrtimer *timer)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-807-\t\ttx_sync_beacon =\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:808:\t\t\tdata-\u003enan.phase != MAC80211_HWSIM_NAN_PHASE_SCAN \u0026\u0026\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:809:\t\t\tdata-\u003enan.role != MAC80211_HWSIM_NAN_ROLE_NON_SYNC;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-810-\t}\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=867=mac80211_hwsim_nan_discovery_beacon_timer(struct hrtimer *timer)\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-879-\tscoped_guard(spinlock, \u0026data-\u003enan.state_lock) {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:880:\t\tif (data-\u003enan.phase == MAC80211_HWSIM_NAN_PHASE_SCAN ||\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:881:\t\t    data-\u003enan.role != MAC80211_HWSIM_NAN_ROLE_MASTER)\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-882-\t\t\treturn HRTIMER_NORESTART;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=909=int mac80211_hwsim_nan_start(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-926-\t\t/* Start in the \"scan\" phase and stay there for a little bit */\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:927:\t\tdata-\u003enan.phase = MAC80211_HWSIM_NAN_PHASE_SCAN;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-928-\t\tdata-\u003enan.random_factor_valid_dwst = 1;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-930-\t\tdata-\u003enan.master_pref = conf-\u003emaster_pref;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:931:\t\tdata-\u003enan.role = MAC80211_HWSIM_NAN_ROLE_MASTER;\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-932-\t\tmemset(\u0026data-\u003enan.current_ami, 0,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c=1226=bool mac80211_hwsim_nan_receive(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-1235-\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c:1236:\tif (data-\u003enan.phase == MAC80211_HWSIM_NAN_PHASE_SCAN)\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.c-1237-\t\treturn channel-\u003ecenter_freq == 2437;\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h-6-\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:7:#ifndef __MAC80211_HWSIM_NAN_H\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:8:#define __MAC80211_HWSIM_NAN_H\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h-9-\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h=10=enum mac80211_hwsim_nan_phase {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:11:\tMAC80211_HWSIM_NAN_PHASE_SCAN,\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:12:\tMAC80211_HWSIM_NAN_PHASE_WARMUP,\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:13:\tMAC80211_HWSIM_NAN_PHASE_UP,\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h-14-};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h=16=enum mac80211_hwsim_nan_role {\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:17:\tMAC80211_HWSIM_NAN_ROLE_MASTER,\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:18:\tMAC80211_HWSIM_NAN_ROLE_SYNC,\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:19:\tMAC80211_HWSIM_NAN_ROLE_NON_SYNC,\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h-20-};\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h=99=void mac80211_hwsim_nan_local_sched_changed(struct ieee80211_hw *hw,\n--\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h-101-\ndrivers/net/wireless/virtual/mac80211_hwsim_nan.h:102:#endif /* __MAC80211_HWSIM_NAN_H */\n--\ninclude/uapi/linux/virtio_ids.h-57-#define VIRTIO_ID_RPMB\t\t\t28 /* virtio rpmb */\ninclude/uapi/linux/virtio_ids.h:58:#define VIRTIO_ID_MAC80211_HWSIM\t29 /* virtio mac80211-hwsim */\ninclude/uapi/linux/virtio_ids.h-59-#define VIRTIO_ID_VIDEO_ENCODER\t\t30 /* virtio video encoder */\n"
}

25/2 2026/07/22 07:24 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 23525
							output: 159
							thoughts: 487
						

Thoughts:
**Analyzing the `MAC80211_HWSIM` Netlink Policy Change**

Okay, let's break this down. The core change revolves around the `MAC80211_HWSIM` configuration and how it interacts with Netlink messages, specifically the `HWSIM_CMD_TX_INFO_FRAME` command. My focus is on understanding the impact of this change.

First, I need to remind myself of the relevant functions. We're looking at `hwsim_tx_info_frame_received_nl` and `hwsim_virtio_handle_cmd`. I know `hwsim_tx_info_frame_received_nl` is a static function within `mac80211_hwsim_main.c`. *Is* `hwsim_virtio_handle_cmd` also static? Yes, it appears to be. I wonder if there are any other Netlink-related handlers I should be aware of. No, `hwsim_tx_info_frame_received_nl` is the one dealing with `HWSIM_ATTR_TX_INFO`.

So, the change is in the `hwsim_genl_policy` aspect. The patch modifies the Netlink policy for `HWSIM_ATTR_TX_INFO` by switching from a maximum length validation (`.len` with `NLA_BINARY`) to an exact length validation (`NLA_POLICY_EXACT_LEN`). This is a critical functional shift. It changes how the kernel validates incoming Netlink messages within the `MAC80211_HWSIM` family, specifically affecting the `HWSIM_CMD_TX_INFO_FRAME` command.

Now, let's verify reachability. I see that `hwsim_tx_info_frame_received_nl` is definitely reachable. It's called by `hwsim_virtio_handle_cmd` and also via the generic netlink interface through `hwsim_ops`. Specifically, the code snippet confirms the `HWSIM_CMD_TX_INFO_FRAME` command is handled by `hwsim_tx_info_frame_received_nl` via `hwsim_ops`.

```c
static const struct genl_small_ops hwsim_ops[] = {
...
	{
		.cmd = HWSIM_CMD_TX_INFO_FRAME,
		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
		.doit = hwsim_tx_info_frame_received_nl,
	},
...
}
```

Okay, it's reachable through both the generic netlink and virtio paths.

I'm confident in my understanding now. I'll record the result.



26/2 2026/07/22 07:24 tool set-results
0m Args:
{
  "EnableConfigs": [
    "MAC80211_HWSIM"
  ],
  "FocusSymbols": [
    "hwsim_tx_info_frame_received_nl",
    "hwsim_virtio_handle_cmd"
  ],
  "Reasoning": "The patch changes the Netlink policy for HWSIM_ATTR_TX_INFO from a maximum length (NLA_BINARY with .len) to an exact length (NLA_POLICY_EXACT_LEN). This is a functional change that alters how the kernel validates incoming Netlink messages for the MAC80211_HWSIM family, specifically affecting the HWSIM_CMD_TX_INFO_FRAME command.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "MAC80211_HWSIM"
  ],
  "FocusSymbols": [
    "hwsim_tx_info_frame_received_nl",
    "hwsim_virtio_handle_cmd"
  ],
  "Reasoning": "The patch changes the Netlink policy for HWSIM_ATTR_TX_INFO from a maximum length (NLA_BINARY with .len) to an exact length (NLA_POLICY_EXACT_LEN). This is a functional change that alters how the kernel validates incoming Netlink messages for the MAC80211_HWSIM family, specifically affecting the HWSIM_CMD_TX_INFO_FRAME command.",
  "WorthFuzzing": true
}

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)