| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/06 22:35 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"P54_COMMON",
"P54_USB",
"MAC80211",
"USB"
],
"FocusSymbols": [
"p54_parse_firmware",
"p54u_start_ops"
],
"KMSANReasoning": "The patch adds input validation and bounds checking for firmware boot record descriptors in p54_parse_firmware(). Specifically, it validates that the boot record length is sufficient to cover struct bootrec_desc fields (preventing out-of-bounds reads on truncated firmware buffers, detectable by KASAN) and ensures that rx_end \u003e= 0x3500 and rx_end - 0x3500 \u003e rx_start to prevent integer underflow and invalid buffer ranges.\n\nNo uninitialized memory is allocated, read, or exposed. Local variables (rx_start, rx_end) are explicitly initialized from the firmware descriptor before being checked and stored. No data is copied to userspace without initialization. Therefore, standard KASAN builds are sufficient and KMSAN fuzzing is not needed.",
"NeedsKMSAN": false,
"Reasoning": "The patch adds bounds and range validation checks for firmware descriptors in p54_parse_firmware(). This function is reachable via the p54usb driver which can be fuzzed using USB emulation (e.g. Raw Gadget). Fuzzing is warranted to verify that malformed firmware images and edge cases are handled safely.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/06 22:35 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit e703c0346bcfd9fd5f1e44e93998f1befdb13263\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Sep 6 22:35:09 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/intersil/p54/fwio.c b/drivers/net/wireless/intersil/p54/fwio.c\nindex a3d9053f043c6..5d82e0a438358 100644\n--- a/drivers/net/wireless/intersil/p54/fwio.c\n+++ b/drivers/net/wireless/intersil/p54/fwio.c\n@@ -79,9 +79,26 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)\n \t\tcase BR_CODE_DESCR: {\n \t\t\tstruct bootrec_desc *desc =\n \t\t\t\t(struct bootrec_desc *)bootrec-\u003edata;\n-\t\t\tpriv-\u003erx_start = le32_to_cpu(desc-\u003erx_start);\n-\t\t\t/* FIXME add sanity checking */\n-\t\t\tpriv-\u003erx_end = le32_to_cpu(desc-\u003erx_end) - 0x3500;\n+\t\t\tu32 rx_start, rx_end;\n+\n+\t\t\tif (len \u003c DIV_ROUND_UP(offsetofend(struct bootrec_desc,\n+\t\t\t\t\t\t\t rx_keycache_size),\n+\t\t\t\t\t\t sizeof(*bootrec-\u003edata))) {\n+\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n+\t\t\t\t\t \"firmware descriptor is too short\\n\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\n+\t\t\trx_start = le32_to_cpu(desc-\u003erx_start);\n+\t\t\trx_end = le32_to_cpu(desc-\u003erx_end);\n+\t\t\tif (rx_end \u003c 0x3500 || rx_end - 0x3500 \u003c= rx_start) {\n+\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n+\t\t\t\t\t \"firmware descriptor has invalid RX range\\n\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\n+\t\t\tpriv-\u003erx_start = rx_start;\n+\t\t\tpriv-\u003erx_end = rx_end - 0x3500;\n \t\t\tpriv-\u003eheadroom = desc-\u003eheadroom;\n \t\t\tpriv-\u003etailroom = desc-\u003etailroom;\n \t\t\tpriv-\u003eprivacy_caps = desc-\u003eprivacy_caps;\n"
} |
| 2/1 | 2026/09/06 22:35 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": [
"P54_COMMON",
"P54_USB",
"MAC80211",
"USB"
],
"FocusSymbols": [
"p54_parse_firmware",
"p54u_start_ops"
],
"Reasoning": "The patch adds bounds and range validation checks for firmware descriptors in p54_parse_firmware(). This function is reachable via the p54usb driver which can be fuzzed using USB emulation (e.g. Raw Gadget). Fuzzing is warranted to verify that malformed firmware images and edge cases are handled safely.",
"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 e703c0346bcfd9fd5f1e44e93998f1befdb13263
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Sep 6 22:35:09 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/intersil/p54/fwio.c b/drivers/net/wireless/intersil/p54/fwio.c
index a3d9053f043c6..5d82e0a438358 100644
--- a/drivers/net/wireless/intersil/p54/fwio.c
+++ b/drivers/net/wireless/intersil/p54/fwio.c
@@ -79,9 +79,26 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
case BR_CODE_DESCR: {
struct bootrec_desc *desc =
(struct bootrec_desc *)bootrec->data;
- priv->rx_start = le32_to_cpu(desc->rx_start);
- /* FIXME add sanity checking */
- priv->rx_end = le32_to_cpu(desc->rx_end) - 0x3500;
+ u32 rx_start, rx_end;
+
+ if (len < DIV_ROUND_UP(offsetofend(struct bootrec_desc,
+ rx_keycache_size),
+ sizeof(*bootrec->data))) {
+ wiphy_err(priv->hw->wiphy,
+ "firmware descriptor is too short\n");
+ return -EINVAL;
+ }
+
+ rx_start = le32_to_cpu(desc->rx_start);
+ rx_end = le32_to_cpu(desc->rx_end);
+ if (rx_end < 0x3500 || rx_end - 0x3500 <= rx_start) {
+ wiphy_err(priv->hw->wiphy,
+ "firmware descriptor has invalid RX range\n");
+ return -EINVAL;
+ }
+
+ priv->rx_start = rx_start;
+ priv->rx_end = rx_end - 0x3500;
priv->headroom = desc->headroom;
priv->tailroom = desc->tailroom;
priv->privacy_caps = desc->privacy_caps;
|
| 3/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3223 output: 30 thoughts: 150 Thoughts: **Analyzing the Patch for Fuzzing Potential** Okay, let's dive in. My initial thought is to figure out if this patch is even worth our fuzzing efforts, and if so, how to approach it strategically. Specifically, I need to understand the relevant configurations and pinpoint the most impactful symbols. The target is `drivers/net/wireless/intersil/p54/fwio.c`, and the function of interest is `p54_parse_firmware`. My first instinct is to get the lay of the land. I'll use `grepper` (or my trusty file reader) to get the broader context of `drivers/net/wireless/intersil/p54/fwio.c`. Understanding how this file fits into the larger picture of the `p54` module is crucial. Next, I need to know how the `p54` module is used. Is this a USB, PCI, or SPI device? The hardware interface significantly impacts potential attack surfaces and fuzzing strategies. I'll need to dig into the relevant Kconfig and the source files in `drivers/net/wireless/intersil/p54/` to determine that. This information will help me determine which interactions could lead to interesting and complex state changes. |
| 4/2 | 2026/09/06 22:35 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/net/wireless/intersil/p54"
}Results: {
"Files": [
"eeprom.c",
"eeprom.h",
"fwio.c",
"led.c",
"lmac.h",
"main.c",
"p54.h",
"p54pci.c",
"p54pci.h",
"p54spi.c",
"p54spi.h",
"p54spi_eeprom.h",
"p54usb.c",
"p54usb.h",
"txrx.c"
],
"Subdirs": null
} |
| 5/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3808 output: 31 thoughts: 91 Thoughts: **Analyzing the p54usb Driver and Emulation Possibilities** Okay, so I'm looking at `p54usb.c`, which, as expected, resides within `drivers/net/wireless/intersil/p54/`. My interest is piqued because I'm thinking about USB device emulation and how this driver might interact with it. The USB Raw Gadget and syzkaller's USB emulation are particularly relevant here. That's where the interesting possibilities lie. I need to understand the configuration options for this driver to figure out the best way to interact with it, so I'll go digging into either `drivers/net/wireless/intersil/p54/Kconfig` or, if that's not specific enough, the more general `drivers/net/wireless/intersil/Kconfig` file. I'll need to check the Kconfig files for configuration options. That's the logical next step. |
| 6/2 | 2026/09/06 22:35 | tool | grepper |
0mArgs:{
"Expression": "P54",
"PathPrefix": "drivers/net/wireless/intersil"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1307 lines.\nUse more precise expression if possible.\n\ndrivers/net/wireless/intersil/Makefile-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/wireless/intersil/Makefile:2:obj-$(CONFIG_P54_COMMON)\t+= p54/\n--\ndrivers/net/wireless/intersil/p54/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/wireless/intersil/p54/Kconfig:2:config P54_COMMON\ndrivers/net/wireless/intersil/p54/Kconfig-3-\ttristate \"Softmac Prism54 support\"\n--\ndrivers/net/wireless/intersil/p54/Kconfig-16-\ndrivers/net/wireless/intersil/p54/Kconfig:17:config P54_USB\ndrivers/net/wireless/intersil/p54/Kconfig-18-\ttristate \"Prism54 USB support\"\ndrivers/net/wireless/intersil/p54/Kconfig:19:\tdepends on P54_COMMON \u0026\u0026 USB\ndrivers/net/wireless/intersil/p54/Kconfig-20-\tselect CRC32\n--\ndrivers/net/wireless/intersil/p54/Kconfig-28-\ndrivers/net/wireless/intersil/p54/Kconfig:29:config P54_PCI\ndrivers/net/wireless/intersil/p54/Kconfig-30-\ttristate \"Prism54 PCI support\"\ndrivers/net/wireless/intersil/p54/Kconfig:31:\tdepends on P54_COMMON \u0026\u0026 PCI\ndrivers/net/wireless/intersil/p54/Kconfig-32-\thelp\n--\ndrivers/net/wireless/intersil/p54/Kconfig-42-\ndrivers/net/wireless/intersil/p54/Kconfig:43:config P54_SPI\ndrivers/net/wireless/intersil/p54/Kconfig-44-\ttristate \"Prism54 SPI (stlc45xx) support\"\ndrivers/net/wireless/intersil/p54/Kconfig:45:\tdepends on P54_COMMON \u0026\u0026 SPI_MASTER\ndrivers/net/wireless/intersil/p54/Kconfig-46-\thelp\n--\ndrivers/net/wireless/intersil/p54/Kconfig-51-\ndrivers/net/wireless/intersil/p54/Kconfig:52:config P54_SPI_DEFAULT_EEPROM\ndrivers/net/wireless/intersil/p54/Kconfig-53-\tbool \"Include fallback EEPROM blob\"\ndrivers/net/wireless/intersil/p54/Kconfig:54:\tdepends on P54_SPI\ndrivers/net/wireless/intersil/p54/Kconfig-55-\tdefault n\n--\ndrivers/net/wireless/intersil/p54/Kconfig-68-\ndrivers/net/wireless/intersil/p54/Kconfig:69:config P54_LEDS\ndrivers/net/wireless/intersil/p54/Kconfig-70-\tbool\ndrivers/net/wireless/intersil/p54/Kconfig:71:\tdepends on P54_COMMON \u0026\u0026 MAC80211_LEDS \u0026\u0026 (LEDS_CLASS = y || LEDS_CLASS = P54_COMMON)\ndrivers/net/wireless/intersil/p54/Kconfig-72-\tdefault y\n--\ndrivers/net/wireless/intersil/p54/Makefile=2=p54common-objs\t\t\t:= eeprom.o fwio.o txrx.o main.o\ndrivers/net/wireless/intersil/p54/Makefile:3:p54common-$(CONFIG_P54_LEDS)\t+= led.o\ndrivers/net/wireless/intersil/p54/Makefile-4-\ndrivers/net/wireless/intersil/p54/Makefile:5:obj-$(CONFIG_P54_COMMON)\t+= p54common.o\ndrivers/net/wireless/intersil/p54/Makefile:6:obj-$(CONFIG_P54_USB)\t\t+= p54usb.o\ndrivers/net/wireless/intersil/p54/Makefile:7:obj-$(CONFIG_P54_PCI)\t\t+= p54pci.o\ndrivers/net/wireless/intersil/p54/Makefile:8:obj-$(CONFIG_P54_SPI)\t\t+= p54spi.o\n--\ndrivers/net/wireless/intersil/p54/fwio.c=27=int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-156-\t\tif (priv-\u003efw_var \u003e= 0x500) {\ndrivers/net/wireless/intersil/p54/fwio.c:157:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_VO].limit = 16;\ndrivers/net/wireless/intersil/p54/fwio.c:158:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_VI].limit = 16;\ndrivers/net/wireless/intersil/p54/fwio.c:159:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_BE].limit = 16;\ndrivers/net/wireless/intersil/p54/fwio.c:160:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_BK].limit = 16;\ndrivers/net/wireless/intersil/p54/fwio.c-161-\t\t} else {\ndrivers/net/wireless/intersil/p54/fwio.c:162:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_VO].limit = 3;\ndrivers/net/wireless/intersil/p54/fwio.c:163:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_VI].limit = 4;\ndrivers/net/wireless/intersil/p54/fwio.c:164:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_BE].limit = 3;\ndrivers/net/wireless/intersil/p54/fwio.c:165:\t\t\tpriv-\u003etx_stats[P54_QUEUE_AC_BK].limit = 2;\ndrivers/net/wireless/intersil/p54/fwio.c-166-\t\t}\ndrivers/net/wireless/intersil/p54/fwio.c:167:\t\tpriv-\u003ehw-\u003equeues = P54_QUEUE_AC_NUM;\ndrivers/net/wireless/intersil/p54/fwio.c-168-\t}\n--\ndrivers/net/wireless/intersil/p54/fwio.c=201=static struct sk_buff *p54_alloc_skb(struct p54_common *priv, u16 hdr_flags,\n--\ndrivers/net/wireless/intersil/p54/fwio.c-207-\ndrivers/net/wireless/intersil/p54/fwio.c:208:\tif (frame_len \u003e P54_MAX_CTRL_FRAME_LEN)\ndrivers/net/wireless/intersil/p54/fwio.c-209-\t\treturn NULL;\n--\ndrivers/net/wireless/intersil/p54/fwio.c=227=int p54_download_eeprom(struct p54_common *priv, void *buf,\n--\ndrivers/net/wireless/intersil/p54/fwio.c-240-\ndrivers/net/wireless/intersil/p54/fwio.c:241:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL, eeprom_hdr_size +\ndrivers/net/wireless/intersil/p54/fwio.c:242:\t\t\t len, P54_CONTROL_TYPE_EEPROM_READBACK,\ndrivers/net/wireless/intersil/p54/fwio.c-243-\t\t\t GFP_KERNEL);\n--\ndrivers/net/wireless/intersil/p54/fwio.c=277=int p54_update_beacon_tim(struct p54_common *priv, u16 aid, bool set)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-281-\ndrivers/net/wireless/intersil/p54/fwio.c:282:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*tim),\ndrivers/net/wireless/intersil/p54/fwio.c:283:\t\t\t P54_CONTROL_TYPE_TIM, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-284-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c=294=int p54_sta_unlock(struct p54_common *priv, u8 *addr)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-298-\ndrivers/net/wireless/intersil/p54/fwio.c:299:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*sta),\ndrivers/net/wireless/intersil/p54/fwio.c:300:\t\t\t P54_CONTROL_TYPE_PSM_STA_UNLOCK, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-301-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c=310=int p54_tx_cancel(struct p54_common *priv, __le32 req_id)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-318-\ndrivers/net/wireless/intersil/p54/fwio.c:319:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*cancel),\ndrivers/net/wireless/intersil/p54/fwio.c:320:\t\t\t P54_CONTROL_TYPE_TXCANCEL, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-321-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c=330=int p54_setup_mac(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-335-\ndrivers/net/wireless/intersil/p54/fwio.c:336:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*setup),\ndrivers/net/wireless/intersil/p54/fwio.c:337:\t\t\t P54_CONTROL_TYPE_SETUP, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-338-\tif (!skb)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-344-\t\tcase NL80211_IFTYPE_STATION:\ndrivers/net/wireless/intersil/p54/fwio.c:345:\t\t\tmode = P54_FILTER_TYPE_STATION;\ndrivers/net/wireless/intersil/p54/fwio.c-346-\t\t\tbreak;\ndrivers/net/wireless/intersil/p54/fwio.c-347-\t\tcase NL80211_IFTYPE_AP:\ndrivers/net/wireless/intersil/p54/fwio.c:348:\t\t\tmode = P54_FILTER_TYPE_AP;\ndrivers/net/wireless/intersil/p54/fwio.c-349-\t\t\tbreak;\n--\ndrivers/net/wireless/intersil/p54/fwio.c-351-\t\tcase NL80211_IFTYPE_MESH_POINT:\ndrivers/net/wireless/intersil/p54/fwio.c:352:\t\t\tmode = P54_FILTER_TYPE_IBSS;\ndrivers/net/wireless/intersil/p54/fwio.c-353-\t\t\tbreak;\ndrivers/net/wireless/intersil/p54/fwio.c-354-\t\tcase NL80211_IFTYPE_MONITOR:\ndrivers/net/wireless/intersil/p54/fwio.c:355:\t\t\tmode = P54_FILTER_TYPE_PROMISCUOUS;\ndrivers/net/wireless/intersil/p54/fwio.c-356-\t\t\tbreak;\ndrivers/net/wireless/intersil/p54/fwio.c-357-\t\tdefault:\ndrivers/net/wireless/intersil/p54/fwio.c:358:\t\t\tmode = P54_FILTER_TYPE_HIBERNATE;\ndrivers/net/wireless/intersil/p54/fwio.c-359-\t\t\tbreak;\n--\ndrivers/net/wireless/intersil/p54/fwio.c-366-\t\tif (priv-\u003efilter_flags \u0026 FIF_OTHER_BSS \u0026\u0026\ndrivers/net/wireless/intersil/p54/fwio.c:367:\t\t (mode != P54_FILTER_TYPE_PROMISCUOUS))\ndrivers/net/wireless/intersil/p54/fwio.c:368:\t\t\tmode |= P54_FILTER_TYPE_TRANSPARENT;\ndrivers/net/wireless/intersil/p54/fwio.c-369-\t} else {\ndrivers/net/wireless/intersil/p54/fwio.c:370:\t\tmode = P54_FILTER_TYPE_HIBERNATE;\ndrivers/net/wireless/intersil/p54/fwio.c-371-\t}\n--\ndrivers/net/wireless/intersil/p54/fwio.c-401-\tp54_tx(priv, skb);\ndrivers/net/wireless/intersil/p54/fwio.c:402:\tpriv-\u003ephy_idle = mode == P54_FILTER_TYPE_HIBERNATE;\ndrivers/net/wireless/intersil/p54/fwio.c-403-\treturn 0;\n--\ndrivers/net/wireless/intersil/p54/fwio.c=406=int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-419-\ndrivers/net/wireless/intersil/p54/fwio.c:420:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*head) +\ndrivers/net/wireless/intersil/p54/fwio.c-421-\t\t\t 2 + sizeof(*iq_autocal) + sizeof(*body) +\ndrivers/net/wireless/intersil/p54/fwio.c-422-\t\t\t sizeof(*rate) + 2 * sizeof(*rssi),\ndrivers/net/wireless/intersil/p54/fwio.c:423:\t\t\t P54_CONTROL_TYPE_SCAN, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-424-\tif (!skb)\n--\ndrivers/net/wireless/intersil/p54/fwio.c=554=int p54_set_leds(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-558-\ndrivers/net/wireless/intersil/p54/fwio.c:559:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*led),\ndrivers/net/wireless/intersil/p54/fwio.c:560:\t\t\t P54_CONTROL_TYPE_LED, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-561-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c=573=int p54_set_edcf(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-578-\ndrivers/net/wireless/intersil/p54/fwio.c:579:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*edcf),\ndrivers/net/wireless/intersil/p54/fwio.c:580:\t\t\t P54_CONTROL_TYPE_DCFINIT, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-581-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c=610=int p54_set_ps(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-618-\t !priv-\u003epowersave_override)\ndrivers/net/wireless/intersil/p54/fwio.c:619:\t\tmode = P54_PSM | P54_PSM_BEACON_TIMEOUT | P54_PSM_DTIM |\ndrivers/net/wireless/intersil/p54/fwio.c:620:\t\t P54_PSM_CHECKSUM | P54_PSM_MCBC;\ndrivers/net/wireless/intersil/p54/fwio.c-621-\telse\ndrivers/net/wireless/intersil/p54/fwio.c:622:\t\tmode = P54_PSM_CAM;\ndrivers/net/wireless/intersil/p54/fwio.c-623-\ndrivers/net/wireless/intersil/p54/fwio.c:624:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*psm),\ndrivers/net/wireless/intersil/p54/fwio.c:625:\t\t\t P54_CONTROL_TYPE_PSM, GFP_ATOMIC);\ndrivers/net/wireless/intersil/p54/fwio.c-626-\tif (!skb)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-643-\tp54_tx(priv, skb);\ndrivers/net/wireless/intersil/p54/fwio.c:644:\tpriv-\u003ephy_ps = mode != P54_PSM_CAM;\ndrivers/net/wireless/intersil/p54/fwio.c-645-\treturn 0;\n--\ndrivers/net/wireless/intersil/p54/fwio.c=648=int p54_init_xbow_synth(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-652-\ndrivers/net/wireless/intersil/p54/fwio.c:653:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*xbow),\ndrivers/net/wireless/intersil/p54/fwio.c:654:\t\t\t P54_CONTROL_TYPE_XBOW_SYNTH_CFG, GFP_KERNEL);\ndrivers/net/wireless/intersil/p54/fwio.c-655-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c=667=int p54_upload_key(struct p54_common *priv, u8 algo, int slot, u8 idx, u8 len,\n--\ndrivers/net/wireless/intersil/p54/fwio.c-672-\ndrivers/net/wireless/intersil/p54/fwio.c:673:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*rxkey),\ndrivers/net/wireless/intersil/p54/fwio.c:674:\t\t\t P54_CONTROL_TYPE_RX_KEYCACHE, GFP_KERNEL);\ndrivers/net/wireless/intersil/p54/fwio.c-675-\tif (unlikely(!skb))\n--\ndrivers/net/wireless/intersil/p54/fwio.c-687-\tswitch (algo) {\ndrivers/net/wireless/intersil/p54/fwio.c:688:\tcase P54_CRYPTO_WEP:\ndrivers/net/wireless/intersil/p54/fwio.c:689:\tcase P54_CRYPTO_AESCCMP:\ndrivers/net/wireless/intersil/p54/fwio.c-690-\t\trxkey-\u003ekey_len = min_t(u8, 16, len);\n--\ndrivers/net/wireless/intersil/p54/fwio.c-693-\ndrivers/net/wireless/intersil/p54/fwio.c:694:\tcase P54_CRYPTO_TKIPMICHAEL:\ndrivers/net/wireless/intersil/p54/fwio.c-695-\t\trxkey-\u003ekey_len = 24;\n--\ndrivers/net/wireless/intersil/p54/fwio.c-700-\ndrivers/net/wireless/intersil/p54/fwio.c:701:\tcase P54_CRYPTO_NONE:\ndrivers/net/wireless/intersil/p54/fwio.c-702-\t\trxkey-\u003ekey_len = 0;\n--\ndrivers/net/wireless/intersil/p54/fwio.c=717=int p54_fetch_statistics(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-722-\ndrivers/net/wireless/intersil/p54/fwio.c:723:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL,\ndrivers/net/wireless/intersil/p54/fwio.c-724-\t\t\t sizeof(struct p54_statistics),\ndrivers/net/wireless/intersil/p54/fwio.c:725:\t\t\t P54_CONTROL_TYPE_STAT_READBACK, GFP_KERNEL);\ndrivers/net/wireless/intersil/p54/fwio.c-726-\tif (!skb)\n--\ndrivers/net/wireless/intersil/p54/fwio.c=747=int p54_set_groupfilter(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/fwio.c-752-\ndrivers/net/wireless/intersil/p54/fwio.c:753:\tskb = p54_alloc_skb(priv, P54_HDR_FLAG_CONTROL_OPSET, sizeof(*grp),\ndrivers/net/wireless/intersil/p54/fwio.c:754:\t\t\t P54_CONTROL_TYPE_GROUP_ADDRESS_TABLE, GFP_KERNEL);\ndrivers/net/wireless/intersil/p54/fwio.c-755-\tif (!skb)\n--\ndrivers/net/wireless/intersil/p54/led.c-19-#include \u003cnet/mac80211.h\u003e\ndrivers/net/wireless/intersil/p54/led.c:20:#ifdef CONFIG_P54_LEDS\ndrivers/net/wireless/intersil/p54/led.c-21-#include \u003clinux/leds.h\u003e\ndrivers/net/wireless/intersil/p54/led.c:22:#endif /* CONFIG_P54_LEDS */\ndrivers/net/wireless/intersil/p54/led.c-23-\n--\ndrivers/net/wireless/intersil/p54/lmac.h=19=enum p54_control_frame_types {\ndrivers/net/wireless/intersil/p54/lmac.h:20:\tP54_CONTROL_TYPE_SETUP = 0,\ndrivers/net/wireless/intersil/p54/lmac.h:21:\tP54_CONTROL_TYPE_SCAN,\ndrivers/net/wireless/intersil/p54/lmac.h:22:\tP54_CONTROL_TYPE_TRAP,\ndrivers/net/wireless/intersil/p54/lmac.h:23:\tP54_CONTROL_TYPE_DCFINIT,\ndrivers/net/wireless/intersil/p54/lmac.h:24:\tP54_CONTROL_TYPE_RX_KEYCACHE,\ndrivers/net/wireless/intersil/p54/lmac.h:25:\tP54_CONTROL_TYPE_TIM,\ndrivers/net/wireless/intersil/p54/lmac.h:26:\tP54_CONTROL_TYPE_PSM,\ndrivers/net/wireless/intersil/p54/lmac.h:27:\tP54_CONTROL_TYPE_TXCANCEL,\ndrivers/net/wireless/intersil/p54/lmac.h:28:\tP54_CONTROL_TYPE_TXDONE,\ndrivers/net/wireless/intersil/p54/lmac.h:29:\tP54_CONTROL_TYPE_BURST,\ndrivers/net/wireless/intersil/p54/lmac.h:30:\tP54_CONTROL_TYPE_STAT_READBACK,\ndrivers/net/wireless/intersil/p54/lmac.h:31:\tP54_CONTROL_TYPE_BBP,\ndrivers/net/wireless/intersil/p54/lmac.h:32:\tP54_CONTROL_TYPE_EEPROM_READBACK,\ndrivers/net/wireless/intersil/p54/lmac.h:33:\tP54_CONTROL_TYPE_LED,\ndrivers/net/wireless/intersil/p54/lmac.h:34:\tP54_CONTROL_TYPE_GPIO,\ndrivers/net/wireless/intersil/p54/lmac.h:35:\tP54_CONTROL_TYPE_TIMER,\ndrivers/net/wireless/intersil/p54/lmac.h:36:\tP54_CONTROL_TYPE_MODULATION,\ndrivers/net/wireless/intersil/p54/lmac.h:37:\tP54_CONTROL_TYPE_SYNTH_CONFIG,\ndrivers/net/wireless/intersil/p54/lmac.h:38:\tP54_CONTROL_TYPE_DETECTOR_VALUE,\ndrivers/net/wireless/intersil/p54/lmac.h:39:\tP54_CONTROL_TYPE_XBOW_SYNTH_CFG,\ndrivers/net/wireless/intersil/p54/lmac.h:40:\tP54_CONTROL_TYPE_CCE_QUIET,\ndrivers/net/wireless/intersil/p54/lmac.h:41:\tP54_CONTROL_TYPE_PSM_STA_UNLOCK,\ndrivers/net/wireless/intersil/p54/lmac.h:42:\tP54_CONTROL_TYPE_PCS,\ndrivers/net/wireless/intersil/p54/lmac.h:43:\tP54_CONTROL_TYPE_BT_BALANCER = 28,\ndrivers/net/wireless/intersil/p54/lmac.h:44:\tP54_CONTROL_TYPE_GROUP_ADDRESS_TABLE = 30,\ndrivers/net/wireless/intersil/p54/lmac.h:45:\tP54_CONTROL_TYPE_ARPTABLE = 31,\ndrivers/net/wireless/intersil/p54/lmac.h:46:\tP54_CONTROL_TYPE_BT_OPTIONS = 35,\ndrivers/net/wireless/intersil/p54/lmac.h-47-};\ndrivers/net/wireless/intersil/p54/lmac.h-48-\ndrivers/net/wireless/intersil/p54/lmac.h:49:#define P54_HDR_FLAG_CONTROL\t\tBIT(15)\ndrivers/net/wireless/intersil/p54/lmac.h:50:#define P54_HDR_FLAG_CONTROL_OPSET\t(BIT(15) + BIT(0))\ndrivers/net/wireless/intersil/p54/lmac.h:51:#define P54_HDR_FLAG_DATA_ALIGN\t\tBIT(14)\ndrivers/net/wireless/intersil/p54/lmac.h-52-\ndrivers/net/wireless/intersil/p54/lmac.h:53:#define P54_HDR_FLAG_DATA_OUT_PROMISC\t\tBIT(0)\ndrivers/net/wireless/intersil/p54/lmac.h:54:#define P54_HDR_FLAG_DATA_OUT_TIMESTAMP\t\tBIT(1)\ndrivers/net/wireless/intersil/p54/lmac.h:55:#define P54_HDR_FLAG_DATA_OUT_SEQNR\t\tBIT(2)\ndrivers/net/wireless/intersil/p54/lmac.h:56:#define P54_HDR_FLAG_DATA_OUT_BIT3\t\tBIT(3)\ndrivers/net/wireless/intersil/p54/lmac.h:57:#define P54_HDR_FLAG_DATA_OUT_BURST\t\tBIT(4)\ndrivers/net/wireless/intersil/p54/lmac.h:58:#define P54_HDR_FLAG_DATA_OUT_NOCANCEL\t\tBIT(5)\ndrivers/net/wireless/intersil/p54/lmac.h:59:#define P54_HDR_FLAG_DATA_OUT_CLEARTIM\t\tBIT(6)\ndrivers/net/wireless/intersil/p54/lmac.h:60:#define P54_HDR_FLAG_DATA_OUT_HITCHHIKE\t\tBIT(7)\ndrivers/net/wireless/intersil/p54/lmac.h:61:#define P54_HDR_FLAG_DATA_OUT_COMPRESS\t\tBIT(8)\ndrivers/net/wireless/intersil/p54/lmac.h:62:#define P54_HDR_FLAG_DATA_OUT_CONCAT\t\tBIT(9)\ndrivers/net/wireless/intersil/p54/lmac.h:63:#define P54_HDR_FLAG_DATA_OUT_PCS_ACCEPT\tBIT(10)\ndrivers/net/wireless/intersil/p54/lmac.h:64:#define P54_HDR_FLAG_DATA_OUT_WAITEOSP\t\tBIT(11)\ndrivers/net/wireless/intersil/p54/lmac.h-65-\ndrivers/net/wireless/intersil/p54/lmac.h:66:#define P54_HDR_FLAG_DATA_IN_FCS_GOOD\t\tBIT(0)\ndrivers/net/wireless/intersil/p54/lmac.h:67:#define P54_HDR_FLAG_DATA_IN_MATCH_MAC\t\tBIT(1)\ndrivers/net/wireless/intersil/p54/lmac.h:68:#define P54_HDR_FLAG_DATA_IN_MCBC\t\tBIT(2)\ndrivers/net/wireless/intersil/p54/lmac.h:69:#define P54_HDR_FLAG_DATA_IN_BEACON\t\tBIT(3)\ndrivers/net/wireless/intersil/p54/lmac.h:70:#define P54_HDR_FLAG_DATA_IN_MATCH_BSS\t\tBIT(4)\ndrivers/net/wireless/intersil/p54/lmac.h:71:#define P54_HDR_FLAG_DATA_IN_BCAST_BSS\t\tBIT(5)\ndrivers/net/wireless/intersil/p54/lmac.h:72:#define P54_HDR_FLAG_DATA_IN_DATA\t\tBIT(6)\ndrivers/net/wireless/intersil/p54/lmac.h:73:#define P54_HDR_FLAG_DATA_IN_TRUNCATED\t\tBIT(7)\ndrivers/net/wireless/intersil/p54/lmac.h:74:#define P54_HDR_FLAG_DATA_IN_BIT8\t\tBIT(8)\ndrivers/net/wireless/intersil/p54/lmac.h:75:#define P54_HDR_FLAG_DATA_IN_TRANSPARENT\tBIT(9)\ndrivers/net/wireless/intersil/p54/lmac.h-76-\ndrivers/net/wireless/intersil/p54/lmac.h=77=struct p54_hdr {\n--\ndrivers/net/wireless/intersil/p54/lmac.h-91-\t((((struct p54_hdr *) ((struct sk_buff *) skb)-\u003edata)-\u003e\t\t\\\ndrivers/net/wireless/intersil/p54/lmac.h:92:\tflags) == cpu_to_le16(P54_HDR_FLAG_CONTROL_OPSET))\ndrivers/net/wireless/intersil/p54/lmac.h-93-\n--\ndrivers/net/wireless/intersil/p54/lmac.h-95-\t(!((((struct p54_hdr *) ((struct sk_buff *) skb)-\u003edata)-\u003e\t\\\ndrivers/net/wireless/intersil/p54/lmac.h:96:\tflags) \u0026 cpu_to_le16(P54_HDR_FLAG_CONTROL)))\ndrivers/net/wireless/intersil/p54/lmac.h-97-\n--\ndrivers/net/wireless/intersil/p54/lmac.h=153=enum p54_rx_decrypt_status {\ndrivers/net/wireless/intersil/p54/lmac.h:154:\tP54_DECRYPT_NONE = 0,\ndrivers/net/wireless/intersil/p54/lmac.h:155:\tP54_DECRYPT_OK,\ndrivers/net/wireless/intersil/p54/lmac.h:156:\tP54_DECRYPT_NOKEY,\ndrivers/net/wireless/intersil/p54/lmac.h:157:\tP54_DECRYPT_NOMICHAEL,\ndrivers/net/wireless/intersil/p54/lmac.h:158:\tP54_DECRYPT_NOCKIPMIC,\ndrivers/net/wireless/intersil/p54/lmac.h:159:\tP54_DECRYPT_FAIL_WEP,\ndrivers/net/wireless/intersil/p54/lmac.h:160:\tP54_DECRYPT_FAIL_TKIP,\ndrivers/net/wireless/intersil/p54/lmac.h:161:\tP54_DECRYPT_FAIL_MICHAEL,\ndrivers/net/wireless/intersil/p54/lmac.h:162:\tP54_DECRYPT_FAIL_CKIPKP,\ndrivers/net/wireless/intersil/p54/lmac.h:163:\tP54_DECRYPT_FAIL_CKIPMIC,\ndrivers/net/wireless/intersil/p54/lmac.h:164:\tP54_DECRYPT_FAIL_AESCCMP\ndrivers/net/wireless/intersil/p54/lmac.h-165-};\n--\ndrivers/net/wireless/intersil/p54/lmac.h=182=enum p54_trap_type {\ndrivers/net/wireless/intersil/p54/lmac.h:183:\tP54_TRAP_SCAN = 0,\ndrivers/net/wireless/intersil/p54/lmac.h:184:\tP54_TRAP_TIMER,\ndrivers/net/wireless/intersil/p54/lmac.h:185:\tP54_TRAP_BEACON_TX,\ndrivers/net/wireless/intersil/p54/lmac.h:186:\tP54_TRAP_FAA_RADIO_ON,\ndrivers/net/wireless/intersil/p54/lmac.h:187:\tP54_TRAP_FAA_RADIO_OFF,\ndrivers/net/wireless/intersil/p54/lmac.h:188:\tP54_TRAP_RADAR,\ndrivers/net/wireless/intersil/p54/lmac.h:189:\tP54_TRAP_NO_BEACON,\ndrivers/net/wireless/intersil/p54/lmac.h:190:\tP54_TRAP_TBTT,\ndrivers/net/wireless/intersil/p54/lmac.h:191:\tP54_TRAP_SCO_ENTER,\ndrivers/net/wireless/intersil/p54/lmac.h:192:\tP54_TRAP_SCO_EXIT\ndrivers/net/wireless/intersil/p54/lmac.h-193-};\n--\ndrivers/net/wireless/intersil/p54/lmac.h=200=enum p54_frame_sent_status {\ndrivers/net/wireless/intersil/p54/lmac.h:201:\tP54_TX_OK = 0,\ndrivers/net/wireless/intersil/p54/lmac.h:202:\tP54_TX_FAILED,\ndrivers/net/wireless/intersil/p54/lmac.h:203:\tP54_TX_PSM,\ndrivers/net/wireless/intersil/p54/lmac.h:204:\tP54_TX_PSM_CANCELLED = 4\ndrivers/net/wireless/intersil/p54/lmac.h-205-};\n--\ndrivers/net/wireless/intersil/p54/lmac.h=217=enum p54_tx_data_crypt {\ndrivers/net/wireless/intersil/p54/lmac.h:218:\tP54_CRYPTO_NONE = 0,\ndrivers/net/wireless/intersil/p54/lmac.h:219:\tP54_CRYPTO_WEP,\ndrivers/net/wireless/intersil/p54/lmac.h:220:\tP54_CRYPTO_TKIP,\ndrivers/net/wireless/intersil/p54/lmac.h:221:\tP54_CRYPTO_TKIPMICHAEL,\ndrivers/net/wireless/intersil/p54/lmac.h:222:\tP54_CRYPTO_CCX_WEPMIC,\ndrivers/net/wireless/intersil/p54/lmac.h:223:\tP54_CRYPTO_CCX_KPMIC,\ndrivers/net/wireless/intersil/p54/lmac.h:224:\tP54_CRYPTO_CCX_KP,\ndrivers/net/wireless/intersil/p54/lmac.h:225:\tP54_CRYPTO_AESCCMP\ndrivers/net/wireless/intersil/p54/lmac.h-226-};\n--\ndrivers/net/wireless/intersil/p54/lmac.h=228=enum p54_tx_data_queue {\ndrivers/net/wireless/intersil/p54/lmac.h:229:\tP54_QUEUE_BEACON\t= 0,\ndrivers/net/wireless/intersil/p54/lmac.h:230:\tP54_QUEUE_FWSCAN\t= 1,\ndrivers/net/wireless/intersil/p54/lmac.h:231:\tP54_QUEUE_MGMT\t\t= 2,\ndrivers/net/wireless/intersil/p54/lmac.h:232:\tP54_QUEUE_CAB\t\t= 3,\ndrivers/net/wireless/intersil/p54/lmac.h:233:\tP54_QUEUE_DATA\t\t= 4,\ndrivers/net/wireless/intersil/p54/lmac.h-234-\ndrivers/net/wireless/intersil/p54/lmac.h:235:\tP54_QUEUE_AC_NUM\t= 4,\ndrivers/net/wireless/intersil/p54/lmac.h:236:\tP54_QUEUE_AC_VO\t\t= 4,\ndrivers/net/wireless/intersil/p54/lmac.h:237:\tP54_QUEUE_AC_VI\t\t= 5,\ndrivers/net/wireless/intersil/p54/lmac.h:238:\tP54_QUEUE_AC_BE\t\t= 6,\ndrivers/net/wireless/intersil/p54/lmac.h:239:\tP54_QUEUE_AC_BK\t\t= 7,\ndrivers/net/wireless/intersil/p54/lmac.h-240-\ndrivers/net/wireless/intersil/p54/lmac.h-241-\t/* keep last */\ndrivers/net/wireless/intersil/p54/lmac.h:242:\tP54_QUEUE_NUM\t\t= 8,\ndrivers/net/wireless/intersil/p54/lmac.h-243-};\ndrivers/net/wireless/intersil/p54/lmac.h-244-\ndrivers/net/wireless/intersil/p54/lmac.h:245:#define IS_QOS_QUEUE(n)\t(n \u003e= P54_QUEUE_DATA)\ndrivers/net/wireless/intersil/p54/lmac.h-246-\ndrivers/net/wireless/intersil/p54/lmac.h=247=struct p54_tx_data {\n--\ndrivers/net/wireless/intersil/p54/lmac.h-273-/* unit is ms */\ndrivers/net/wireless/intersil/p54/lmac.h:274:#define P54_TX_FRAME_LIFETIME 2000\ndrivers/net/wireless/intersil/p54/lmac.h:275:#define P54_TX_TIMEOUT 4000\ndrivers/net/wireless/intersil/p54/lmac.h:276:#define P54_STATISTICS_UPDATE 5000\ndrivers/net/wireless/intersil/p54/lmac.h-277-\ndrivers/net/wireless/intersil/p54/lmac.h:278:#define P54_FILTER_TYPE_NONE\t\t0\ndrivers/net/wireless/intersil/p54/lmac.h:279:#define P54_FILTER_TYPE_STATION\t\tBIT(0)\ndrivers/net/wireless/intersil/p54/lmac.h:280:#define P54_FILTER_TYPE_IBSS\t\tBIT(1)\ndrivers/net/wireless/intersil/p54/lmac.h:281:#define P54_FILTER_TYPE_AP\t\tBIT(2)\ndrivers/net/wireless/intersil/p54/lmac.h:282:#define P54_FILTER_TYPE_TRANSPARENT\tBIT(3)\ndrivers/net/wireless/intersil/p54/lmac.h:283:#define P54_FILTER_TYPE_PROMISCUOUS\tBIT(4)\ndrivers/net/wireless/intersil/p54/lmac.h:284:#define P54_FILTER_TYPE_HIBERNATE\tBIT(5)\ndrivers/net/wireless/intersil/p54/lmac.h:285:#define P54_FILTER_TYPE_NOACK\t\tBIT(6)\ndrivers/net/wireless/intersil/p54/lmac.h:286:#define P54_FILTER_TYPE_RX_DISABLED\tBIT(7)\ndrivers/net/wireless/intersil/p54/lmac.h-287-\ndrivers/net/wireless/intersil/p54/lmac.h=288=struct p54_setup_mac {\n--\ndrivers/net/wireless/intersil/p54/lmac.h-321-\ndrivers/net/wireless/intersil/p54/lmac.h:322:#define P54_SETUP_V1_LEN 40\ndrivers/net/wireless/intersil/p54/lmac.h:323:#define P54_SETUP_V2_LEN (sizeof(struct p54_setup_mac))\ndrivers/net/wireless/intersil/p54/lmac.h-324-\ndrivers/net/wireless/intersil/p54/lmac.h:325:#define P54_SCAN_EXIT\tBIT(0)\ndrivers/net/wireless/intersil/p54/lmac.h:326:#define P54_SCAN_TRAP\tBIT(1)\ndrivers/net/wireless/intersil/p54/lmac.h:327:#define P54_SCAN_ACTIVE BIT(2)\ndrivers/net/wireless/intersil/p54/lmac.h:328:#define P54_SCAN_FILTER BIT(3)\ndrivers/net/wireless/intersil/p54/lmac.h-329-\n--\ndrivers/net/wireless/intersil/p54/lmac.h=454=struct p54_psm_interval {\n--\ndrivers/net/wireless/intersil/p54/lmac.h-458-\ndrivers/net/wireless/intersil/p54/lmac.h:459:#define P54_PSM_CAM\t\t\t0\ndrivers/net/wireless/intersil/p54/lmac.h:460:#define P54_PSM\t\t\t\tBIT(0)\ndrivers/net/wireless/intersil/p54/lmac.h:461:#define P54_PSM_DTIM\t\t\tBIT(1)\ndrivers/net/wireless/intersil/p54/lmac.h:462:#define P54_PSM_MCBC\t\t\tBIT(2)\ndrivers/net/wireless/intersil/p54/lmac.h:463:#define P54_PSM_CHECKSUM\t\tBIT(3)\ndrivers/net/wireless/intersil/p54/lmac.h:464:#define P54_PSM_SKIP_MORE_DATA\t\tBIT(4)\ndrivers/net/wireless/intersil/p54/lmac.h:465:#define P54_PSM_BEACON_TIMEOUT\t\tBIT(5)\ndrivers/net/wireless/intersil/p54/lmac.h:466:#define P54_PSM_HFOSLEEP\t\tBIT(6)\ndrivers/net/wireless/intersil/p54/lmac.h:467:#define P54_PSM_AUTOSWITCH_SLEEP\tBIT(7)\ndrivers/net/wireless/intersil/p54/lmac.h:468:#define P54_PSM_LPIT\t\t\tBIT(8)\ndrivers/net/wireless/intersil/p54/lmac.h:469:#define P54_PSM_BF_UCAST_SKIP\t\tBIT(9)\ndrivers/net/wireless/intersil/p54/lmac.h:470:#define P54_PSM_BF_MCAST_SKIP\t\tBIT(10)\ndrivers/net/wireless/intersil/p54/lmac.h-471-\n--\ndrivers/net/wireless/intersil/p54/lmac.h=494=struct p54_sta_unlock {\n--\ndrivers/net/wireless/intersil/p54/lmac.h-498-\ndrivers/net/wireless/intersil/p54/lmac.h:499:#define P54_TIM_CLEAR BIT(15)\ndrivers/net/wireless/intersil/p54/lmac.h-500-struct p54_tim {\n--\ndrivers/net/wireless/intersil/p54/main.c=167=static int p54_start(struct ieee80211_hw *dev)\n--\ndrivers/net/wireless/intersil/p54/main.c-175-\t\tgoto out;\ndrivers/net/wireless/intersil/p54/main.c:176:\tP54_SET_QUEUE(priv-\u003eqos_params[0], 0x0002, 0x0003, 0x0007, 47);\ndrivers/net/wireless/intersil/p54/main.c:177:\tP54_SET_QUEUE(priv-\u003eqos_params[1], 0x0002, 0x0007, 0x000f, 94);\ndrivers/net/wireless/intersil/p54/main.c:178:\tP54_SET_QUEUE(priv-\u003eqos_params[2], 0x0003, 0x000f, 0x03ff, 0);\ndrivers/net/wireless/intersil/p54/main.c:179:\tP54_SET_QUEUE(priv-\u003eqos_params[3], 0x0007, 0x000f, 0x03ff, 0);\ndrivers/net/wireless/intersil/p54/main.c-180-\terr = p54_set_edcf(priv);\n--\ndrivers/net/wireless/intersil/p54/main.c=202=static void p54_stop(struct ieee80211_hw *dev, bool suspend)\n--\ndrivers/net/wireless/intersil/p54/main.c-214-\tskb_queue_purge(\u0026priv-\u003etx_queue);\ndrivers/net/wireless/intersil/p54/main.c:215:\tfor (i = 0; i \u003c P54_QUEUE_NUM; i++) {\ndrivers/net/wireless/intersil/p54/main.c-216-\t\tpriv-\u003etx_stats[i].count = 0;\n--\ndrivers/net/wireless/intersil/p54/main.c=318=static int p54_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)\n--\ndrivers/net/wireless/intersil/p54/main.c-331-\t\tpriv-\u003ecurchan = NULL;\ndrivers/net/wireless/intersil/p54/main.c:332:\t\tret = p54_scan(priv, P54_SCAN_EXIT, 0);\ndrivers/net/wireless/intersil/p54/main.c-333-\t\tif (ret) {\n--\ndrivers/net/wireless/intersil/p54/main.c=408=static int p54_conf_tx(struct ieee80211_hw *dev,\n--\ndrivers/net/wireless/intersil/p54/main.c-416-\tmutex_lock(\u0026priv-\u003econf_mutex);\ndrivers/net/wireless/intersil/p54/main.c:417:\tP54_SET_QUEUE(priv-\u003eqos_params[queue], params-\u003eaifs,\ndrivers/net/wireless/intersil/p54/main.c-418-\t\t params-\u003ecw_min, params-\u003ecw_max, params-\u003etxop);\n--\ndrivers/net/wireless/intersil/p54/main.c=452=static void p54_bss_info_changed(struct ieee80211_hw *dev,\n--\ndrivers/net/wireless/intersil/p54/main.c-465-\tif (changed \u0026 BSS_CHANGED_BEACON) {\ndrivers/net/wireless/intersil/p54/main.c:466:\t\tp54_scan(priv, P54_SCAN_EXIT, 0);\ndrivers/net/wireless/intersil/p54/main.c-467-\t\tp54_setup_mac(priv);\n--\ndrivers/net/wireless/intersil/p54/main.c-482-\t\tif (priv-\u003efw_var \u003e= 0x500)\ndrivers/net/wireless/intersil/p54/main.c:483:\t\t\tp54_scan(priv, P54_SCAN_EXIT, 0);\ndrivers/net/wireless/intersil/p54/main.c-484-\t}\n--\ndrivers/net/wireless/intersil/p54/main.c=500=static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,\n--\ndrivers/net/wireless/intersil/p54/main.c-532-\t\t\tkey-\u003eflags |= IEEE80211_KEY_FLAG_GENERATE_IV;\ndrivers/net/wireless/intersil/p54/main.c:533:\t\t\talgo = P54_CRYPTO_TKIPMICHAEL;\ndrivers/net/wireless/intersil/p54/main.c-534-\t\t\tbreak;\n--\ndrivers/net/wireless/intersil/p54/main.c-541-\t\t\tkey-\u003eflags |= IEEE80211_KEY_FLAG_GENERATE_IV;\ndrivers/net/wireless/intersil/p54/main.c:542:\t\t\talgo = P54_CRYPTO_WEP;\ndrivers/net/wireless/intersil/p54/main.c-543-\t\t\tbreak;\n--\ndrivers/net/wireless/intersil/p54/main.c-549-\t\t\tkey-\u003eflags |= IEEE80211_KEY_FLAG_GENERATE_IV;\ndrivers/net/wireless/intersil/p54/main.c:550:\t\t\talgo = P54_CRYPTO_AESCCMP;\ndrivers/net/wireless/intersil/p54/main.c-551-\t\t\tbreak;\n--\ndrivers/net/wireless/intersil/p54/main.c=653=static unsigned int p54_flush_count(struct p54_common *priv)\n--\ndrivers/net/wireless/intersil/p54/main.c-656-\ndrivers/net/wireless/intersil/p54/main.c:657:\tBUILD_BUG_ON(P54_QUEUE_NUM \u003e ARRAY_SIZE(priv-\u003etx_stats));\ndrivers/net/wireless/intersil/p54/main.c-658-\n--\ndrivers/net/wireless/intersil/p54/main.c-660-\t * Because the firmware has the sole control over any frames\ndrivers/net/wireless/intersil/p54/main.c:661:\t * in the P54_QUEUE_BEACON or P54_QUEUE_SCAN queues, they\ndrivers/net/wireless/intersil/p54/main.c-662-\t * don't really count as pending or active.\ndrivers/net/wireless/intersil/p54/main.c-663-\t */\ndrivers/net/wireless/intersil/p54/main.c:664:\tfor (i = P54_QUEUE_MGMT; i \u003c P54_QUEUE_NUM; i++)\ndrivers/net/wireless/intersil/p54/main.c-665-\t\ttotal += priv-\u003etx_stats[i].len;\n--\ndrivers/net/wireless/intersil/p54/main.c=669=static void p54_flush(struct ieee80211_hw *dev, struct ieee80211_vif *vif,\n--\ndrivers/net/wireless/intersil/p54/main.c-680-\t */\ndrivers/net/wireless/intersil/p54/main.c:681:\ti = P54_STATISTICS_UPDATE * 2 / 20;\ndrivers/net/wireless/intersil/p54/main.c-682-\n--\ndrivers/net/wireless/intersil/p54/main.c=736=struct ieee80211_hw *p54_init_common(size_t priv_data_len)\n--\ndrivers/net/wireless/intersil/p54/main.c-764-\tpriv-\u003ebeacon_req_id = cpu_to_le32(0);\ndrivers/net/wireless/intersil/p54/main.c:765:\tpriv-\u003etx_stats[P54_QUEUE_BEACON].limit = 1;\ndrivers/net/wireless/intersil/p54/main.c:766:\tpriv-\u003etx_stats[P54_QUEUE_FWSCAN].limit = 1;\ndrivers/net/wireless/intersil/p54/main.c:767:\tpriv-\u003etx_stats[P54_QUEUE_MGMT].limit = 3;\ndrivers/net/wireless/intersil/p54/main.c:768:\tpriv-\u003etx_stats[P54_QUEUE_CAB].limit = 3;\ndrivers/net/wireless/intersil/p54/main.c:769:\tpriv-\u003etx_stats[P54_QUEUE_DATA].limit = 5;\ndrivers/net/wireless/intersil/p54/main.c-770-\tdev-\u003equeues = 1;\n--\ndrivers/net/wireless/intersil/p54/main.c=805=int p54_register_common(struct ieee80211_hw *dev, struct device *pdev)\n--\ndrivers/net/wireless/intersil/p54/main.c-816-\ndrivers/net/wireless/intersil/p54/main.c:817:#ifdef CONFIG_P54_LEDS\ndrivers/net/wireless/intersil/p54/main.c-818-\terr = p54_init_leds(priv);\n--\ndrivers/net/wireless/intersil/p54/main.c-822-\t}\ndrivers/net/wireless/intersil/p54/main.c:823:#endif /* CONFIG_P54_LEDS */\ndrivers/net/wireless/intersil/p54/main.c-824-\n--\ndrivers/net/wireless/intersil/p54/main.c=854=void p54_unregister_common(struct ieee80211_hw *dev)\n--\ndrivers/net/wireless/intersil/p54/main.c-859-\t\tpriv-\u003eregistered = false;\ndrivers/net/wireless/intersil/p54/main.c:860:#ifdef CONFIG_P54_LEDS\ndrivers/net/wireless/intersil/p54/main.c-861-\t\tp54_unregister_leds(priv);\ndrivers/net/wireless/intersil/p54/main.c:862:#endif /* CONFIG_P54_LEDS */\ndrivers/net/wireless/intersil/p54/main.c-863-\t\tieee80211_unregister_hw(dev);\n--\ndrivers/net/wireless/intersil/p54/p54.h-10-\n\n"
} |
| 7/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 19164 output: 40 thoughts: 19 Thoughts: Here's my take on those thoughts: **Tracing the Firmware Parsing Function** Okay, so I need to understand the call structure of `p54_parse_firmware`. This is usually the first step when I'm diving into a firmware analysis or reverse engineering task. I need to figure out the entry points to that function. Where is it being *used*? Finding the callers will give me critical context: what's feeding data into this function, under what conditions does it execute, and what other components are involved in this critical process? With this, I can begin to grasp the bigger picture – which is essential for any deep dive or debugging effort in this firmware space. Finding the callsites for this particular function is the first, necessary step. |
| 8/2 | 2026/09/06 22:35 | tool | grepper |
0mArgs:{
"Expression": "p54_parse_firmware",
"PathPrefix": "drivers/net/wireless/intersil/p54"
}Results: {
"Output": "drivers/net/wireless/intersil/p54/fwio.c-26-\ndrivers/net/wireless/intersil/p54/fwio.c:27:int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)\ndrivers/net/wireless/intersil/p54/fwio.c-28-{\n--\ndrivers/net/wireless/intersil/p54/fwio.c-198-}\ndrivers/net/wireless/intersil/p54/fwio.c:199:EXPORT_SYMBOL_GPL(p54_parse_firmware);\ndrivers/net/wireless/intersil/p54/fwio.c-200-\n--\ndrivers/net/wireless/intersil/p54/p54.h=268=void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb);\ndrivers/net/wireless/intersil/p54/p54.h:269:int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw);\ndrivers/net/wireless/intersil/p54/p54.h-270-int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len);\n--\ndrivers/net/wireless/intersil/p54/p54pci.c=48=static int p54p_upload_firmware(struct ieee80211_hw *dev)\n--\ndrivers/net/wireless/intersil/p54/p54pci.c-78-\ndrivers/net/wireless/intersil/p54/p54pci.c:79:\terr = p54_parse_firmware(dev, priv-\u003efirmware);\ndrivers/net/wireless/intersil/p54/p54pci.c-80-\tif (err)\n--\ndrivers/net/wireless/intersil/p54/p54spi.c=140=static int p54spi_request_firmware(struct ieee80211_hw *dev)\n--\ndrivers/net/wireless/intersil/p54/p54spi.c-152-\ndrivers/net/wireless/intersil/p54/p54spi.c:153:\tret = p54_parse_firmware(dev, priv-\u003efirmware);\ndrivers/net/wireless/intersil/p54/p54spi.c-154-\tif (ret) {\n--\ndrivers/net/wireless/intersil/p54/p54usb.c=867=static int p54u_start_ops(struct p54u_priv *priv)\n--\ndrivers/net/wireless/intersil/p54/p54usb.c-871-\ndrivers/net/wireless/intersil/p54/p54usb.c:872:\tret = p54_parse_firmware(dev, priv-\u003efw);\ndrivers/net/wireless/intersil/p54/p54usb.c-873-\tif (ret)\n"
} |
| 9/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 20195 output: 40 thoughts: 31 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the p54usb Driver** Okay, so I need to understand the initiation of the p54usb device and how the firmware loading gets kicked off. The logical place to start digging is `p54usb.c`. I'm specifically looking for where `p54u_start_ops` gets called, or more generally, how the firmware image gets loaded into the device. That function call will be key to understanding the control flow. It has to be in this driver somewhere. Time to get to work. |
| 10/2 | 2026/09/06 22:35 | tool | grepper |
0mArgs:{
"Expression": "p54u_start_ops",
"PathPrefix": "drivers/net/wireless/intersil/p54"
}Results: {
"Output": "drivers/net/wireless/intersil/p54/p54usb.c=854=static int p54_find_type(struct p54u_priv *priv)\n--\ndrivers/net/wireless/intersil/p54/p54usb.c-866-\ndrivers/net/wireless/intersil/p54/p54usb.c:867:static int p54u_start_ops(struct p54u_priv *priv)\ndrivers/net/wireless/intersil/p54/p54usb.c-868-{\n--\ndrivers/net/wireless/intersil/p54/p54usb.c=919=static void p54u_load_firmware_cb(const struct firmware *firmware,\n--\ndrivers/net/wireless/intersil/p54/p54usb.c-928-\t\tpriv-\u003efw = firmware;\ndrivers/net/wireless/intersil/p54/p54usb.c:929:\t\terr = p54u_start_ops(priv);\ndrivers/net/wireless/intersil/p54/p54usb.c-930-\t} else {\n"
} |
| 11/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 20703 output: 47 thoughts: 74 Thoughts: Here's my take on those thoughts: **Analyzing the Firmware Loading Callback** Okay, so I'm looking at `p54u_load_firmware_cb`, and I know right away that it's an asynchronous callback specifically for handling firmware requests. Now, I need to understand its context within the broader `p54` USB driver. To do that effectively, I'm going to dive into the source code, specifically `drivers/net/wireless/intersil/p54/p54usb.c`. I'll want to focus on the area around `p54u_probe`, as that's where the device initialization typically happens, and then trace the flow into `p54u_load_firmware_cb`. By understanding how the probe function interfaces with the firmware loading callback, I can more clearly understand how the firmware is loaded and handled by the driver. This approach will give me a solid grasp of the overall firmware loading sequence within this wireless driver. |
| 12/2 | 2026/09/06 22:35 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/intersil/p54/p54usb.c",
"FirstLine": 910,
"LineCount": 90
}Results: {
"Contents": " 910:\t\n 911:\terr_out:\n 912:\t\t/*\n 913:\t\t * p54u_disconnect will do the rest of the\n 914:\t\t * cleanup\n 915:\t\t */\n 916:\t\treturn ret;\n 917:\t}\n 918:\t\n 919:\tstatic void p54u_load_firmware_cb(const struct firmware *firmware,\n 920:\t\t\t\t\t void *context)\n 921:\t{\n 922:\t\tstruct p54u_priv *priv = context;\n 923:\t\tstruct usb_device *udev = priv-\u003eudev;\n 924:\t\tstruct usb_interface *intf = priv-\u003eintf;\n 925:\t\tint err;\n 926:\t\n 927:\t\tif (firmware) {\n 928:\t\t\tpriv-\u003efw = firmware;\n 929:\t\t\terr = p54u_start_ops(priv);\n 930:\t\t} else {\n 931:\t\t\terr = -ENOENT;\n 932:\t\t\tdev_err(\u0026udev-\u003edev, \"Firmware not found.\\n\");\n 933:\t\t}\n 934:\t\n 935:\t\tcomplete(\u0026priv-\u003efw_wait_load);\n 936:\t\t/*\n 937:\t\t * At this point p54u_disconnect may have already freed\n 938:\t\t * the \"priv\" context. Do not use it anymore!\n 939:\t\t */\n 940:\t\tpriv = NULL;\n 941:\t\n 942:\t\tif (err) {\n 943:\t\t\tdev_err(\u0026intf-\u003edev, \"failed to initialize device (%d)\\n\", err);\n 944:\t\n 945:\t\t\tusb_lock_device(udev);\n 946:\t\t\tusb_driver_release_interface(\u0026p54u_driver, intf);\n 947:\t\t\tusb_unlock_device(udev);\n 948:\t\t}\n 949:\t\n 950:\t\tusb_put_intf(intf);\n 951:\t}\n 952:\t\n 953:\tstatic int p54u_load_firmware(struct ieee80211_hw *dev,\n 954:\t\t\t\t struct usb_interface *intf)\n 955:\t{\n 956:\t\tstruct usb_device *udev = interface_to_usbdev(intf);\n 957:\t\tstruct p54u_priv *priv = dev-\u003epriv;\n 958:\t\tstruct device *device = \u0026udev-\u003edev;\n 959:\t\tint err, i;\n 960:\t\n 961:\t\tBUILD_BUG_ON(ARRAY_SIZE(p54u_fwlist) != __NUM_P54U_HWTYPES);\n 962:\t\n 963:\t\tinit_completion(\u0026priv-\u003efw_wait_load);\n 964:\t\ti = p54_find_type(priv);\n 965:\t\tif (i \u003c 0)\n 966:\t\t\treturn i;\n 967:\t\n 968:\t\tdev_info(\u0026priv-\u003eudev-\u003edev, \"Loading firmware file %s\\n\",\n 969:\t\t p54u_fwlist[i].fw);\n 970:\t\n 971:\t\tusb_get_intf(intf);\n 972:\t\terr = request_firmware_nowait(THIS_MODULE, 1, p54u_fwlist[i].fw,\n 973:\t\t\t\t\t device, GFP_KERNEL, priv,\n 974:\t\t\t\t\t p54u_load_firmware_cb);\n 975:\t\tif (err) {\n 976:\t\t\tdev_err(\u0026priv-\u003eudev-\u003edev, \"(p54usb) cannot load firmware %s \"\n 977:\t\t\t\t\t\t \"(%d)!\\n\", p54u_fwlist[i].fw, err);\n 978:\t\t\tusb_put_intf(intf);\n 979:\t\t}\n 980:\t\n 981:\t\treturn err;\n 982:\t}\n 983:\t\n 984:\tstatic int p54u_probe(struct usb_interface *intf,\n 985:\t\t\t\t\tconst struct usb_device_id *id)\n 986:\t{\n 987:\t\tstruct usb_device *udev = interface_to_usbdev(intf);\n 988:\t\tstruct ieee80211_hw *dev;\n 989:\t\tstruct p54u_priv *priv;\n 990:\t\tint err;\n 991:\t\tunsigned int i, recognized_pipes;\n 992:\t\n 993:\t\tdev = p54_init_common(sizeof(*priv));\n 994:\t\n 995:\t\tif (!dev) {\n 996:\t\t\tdev_err(\u0026udev-\u003edev, \"(p54usb) ieee80211 alloc failed\\n\");\n 997:\t\t\treturn -ENOMEM;\n 998:\t\t}\n 999:\t\n"
} |
| 13/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 22368 output: 44 thoughts: 59 Thoughts: **Analyzing `fwio.c` in the Intersil P54 Wireless Driver** Okay, let's dive into the `drivers/net/wireless/intersil/p54/fwio.c` file. I need to get a handle on what's changed and how it impacts the overall driver functionality. Specifically, I'm going to start by reviewing lines 1 through 120. This section is likely the initialization and setup, or perhaps some key function definitions related to firmware interaction – that's my hunch, given the "fwio" in the filename. Understanding the initial context is critical before digging deeper into any specific modifications. Let's see what gems are hidden in this initial section. I'll be looking for data structures, function prototypes, macro definitions, and any global variables that seem important for firmware communication. |
| 14/2 | 2026/09/06 22:35 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/intersil/p54/fwio.c",
"FirstLine": 1,
"LineCount": 120
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-only\n 2:\t/*\n 3:\t * Firmware I/O code for mac80211 Prism54 drivers\n 4:\t *\n 5:\t * Copyright (c) 2006, Michael Wu \u003cflamingice@sourmilk.net\u003e\n 6:\t * Copyright (c) 2007-2009, Christian Lamparter \u003cchunkeey@web.de\u003e\n 7:\t * Copyright 2008, Johannes Berg \u003cjohannes@sipsolutions.net\u003e\n 8:\t *\n 9:\t * Based on:\n 10:\t * - the islsm (softmac prism54) driver, which is:\n 11:\t * Copyright 2004-2006 Jean-Baptiste Note \u003cjbnote@gmail.com\u003e, et al.\n 12:\t * - stlc45xx driver\n 13:\t * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).\n 14:\t */\n 15:\t\n 16:\t#include \u003clinux/slab.h\u003e\n 17:\t#include \u003clinux/firmware.h\u003e\n 18:\t#include \u003clinux/etherdevice.h\u003e\n 19:\t#include \u003clinux/export.h\u003e\n 20:\t\n 21:\t#include \u003cnet/mac80211.h\u003e\n 22:\t\n 23:\t#include \"p54.h\"\n 24:\t#include \"eeprom.h\"\n 25:\t#include \"lmac.h\"\n 26:\t\n 27:\tint p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)\n 28:\t{\n 29:\t\tstruct p54_common *priv = dev-\u003epriv;\n 30:\t\tstruct exp_if *exp_if;\n 31:\t\tstruct bootrec *bootrec;\n 32:\t\tu32 *data = (u32 *)fw-\u003edata;\n 33:\t\tu32 *end_data = (u32 *)fw-\u003edata + (fw-\u003esize \u003e\u003e 2);\n 34:\t\tu8 *fw_version = NULL;\n 35:\t\tsize_t len;\n 36:\t\tint i;\n 37:\t\tint maxlen;\n 38:\t\n 39:\t\tif (priv-\u003erx_start)\n 40:\t\t\treturn 0;\n 41:\t\n 42:\t\twhile (data \u003c end_data \u0026\u0026 *data)\n 43:\t\t\tdata++;\n 44:\t\n 45:\t\twhile (data \u003c end_data \u0026\u0026 !*data)\n 46:\t\t\tdata++;\n 47:\t\n 48:\t\tbootrec = (struct bootrec *) data;\n 49:\t\n 50:\t\twhile (bootrec-\u003edata \u003c= end_data \u0026\u0026 (bootrec-\u003edata +\n 51:\t\t (len = le32_to_cpu(bootrec-\u003elen))) \u003c= end_data) {\n 52:\t\t\tu32 code = le32_to_cpu(bootrec-\u003ecode);\n 53:\t\t\tswitch (code) {\n 54:\t\t\tcase BR_CODE_COMPONENT_ID:\n 55:\t\t\t\tpriv-\u003efw_interface = be32_to_cpup((__be32 *)\n 56:\t\t\t\t\t\t bootrec-\u003edata);\n 57:\t\t\t\tswitch (priv-\u003efw_interface) {\n 58:\t\t\t\tcase FW_LM86:\n 59:\t\t\t\tcase FW_LM20:\n 60:\t\t\t\tcase FW_LM87: {\n 61:\t\t\t\t\tchar *iftype = (char *)bootrec-\u003edata;\n 62:\t\t\t\t\twiphy_info(priv-\u003ehw-\u003ewiphy,\n 63:\t\t\t\t\t\t \"p54 detected a LM%c%c firmware\\n\",\n 64:\t\t\t\t\t\t iftype[2], iftype[3]);\n 65:\t\t\t\t\tbreak;\n 66:\t\t\t\t\t}\n 67:\t\t\t\tcase FW_FMAC:\n 68:\t\t\t\tdefault:\n 69:\t\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n 70:\t\t\t\t\t\t \"unsupported firmware\\n\");\n 71:\t\t\t\t\treturn -ENODEV;\n 72:\t\t\t\t}\n 73:\t\t\t\tbreak;\n 74:\t\t\tcase BR_CODE_COMPONENT_VERSION:\n 75:\t\t\t\t/* 24 bytes should be enough for all firmwares */\n 76:\t\t\t\tif (strnlen((unsigned char *) bootrec-\u003edata, 24) \u003c 24)\n 77:\t\t\t\t\tfw_version = (unsigned char *) bootrec-\u003edata;\n 78:\t\t\t\tbreak;\n 79:\t\t\tcase BR_CODE_DESCR: {\n 80:\t\t\t\tstruct bootrec_desc *desc =\n 81:\t\t\t\t\t(struct bootrec_desc *)bootrec-\u003edata;\n 82:\t\t\t\tu32 rx_start, rx_end;\n 83:\t\n 84:\t\t\t\tif (len \u003c DIV_ROUND_UP(offsetofend(struct bootrec_desc,\n 85:\t\t\t\t\t\t\t\t rx_keycache_size),\n 86:\t\t\t\t\t\t\t sizeof(*bootrec-\u003edata))) {\n 87:\t\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n 88:\t\t\t\t\t\t \"firmware descriptor is too short\\n\");\n 89:\t\t\t\t\treturn -EINVAL;\n 90:\t\t\t\t}\n 91:\t\n 92:\t\t\t\trx_start = le32_to_cpu(desc-\u003erx_start);\n 93:\t\t\t\trx_end = le32_to_cpu(desc-\u003erx_end);\n 94:\t\t\t\tif (rx_end \u003c 0x3500 || rx_end - 0x3500 \u003c= rx_start) {\n 95:\t\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n 96:\t\t\t\t\t\t \"firmware descriptor has invalid RX range\\n\");\n 97:\t\t\t\t\treturn -EINVAL;\n 98:\t\t\t\t}\n 99:\t\n 100:\t\t\t\tpriv-\u003erx_start = rx_start;\n"
} |
| 15/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 24180 output: 36 thoughts: 99 Thoughts: **Examining the p54 Driver's Configuration Options** Okay, so I'm looking into the `p54` driver. I need to understand its USB support, and that's tied to `CONFIG_P54_USB`. Right, makes sense. But I know better than to just look at one option in isolation. I need to trace the dependencies. This means I need to dig into the Kconfig files for `CONFIG_P54_COMMON`, `CONFIG_P54_USB`, `CONFIG_P54_PCI`, and `CONFIG_P54_SPI` to fully grasp the requirements and potential conflicts. Time to see what conditions need to be met for these to be enabled correctly. This is where the devil is in the details. I have to make sure everything is properly set. This is not the whole picture, but it's a start. |
| 16/2 | 2026/09/06 22:35 | tool | grepper |
0mArgs:{
"Expression": "config P54",
"PathPrefix": "drivers/net/wireless/intersil/p54"
}Results: {
"Output": "drivers/net/wireless/intersil/p54/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/wireless/intersil/p54/Kconfig:2:config P54_COMMON\ndrivers/net/wireless/intersil/p54/Kconfig-3-\ttristate \"Softmac Prism54 support\"\n--\ndrivers/net/wireless/intersil/p54/Kconfig-16-\ndrivers/net/wireless/intersil/p54/Kconfig:17:config P54_USB\ndrivers/net/wireless/intersil/p54/Kconfig-18-\ttristate \"Prism54 USB support\"\n--\ndrivers/net/wireless/intersil/p54/Kconfig-28-\ndrivers/net/wireless/intersil/p54/Kconfig:29:config P54_PCI\ndrivers/net/wireless/intersil/p54/Kconfig-30-\ttristate \"Prism54 PCI support\"\n--\ndrivers/net/wireless/intersil/p54/Kconfig-42-\ndrivers/net/wireless/intersil/p54/Kconfig:43:config P54_SPI\ndrivers/net/wireless/intersil/p54/Kconfig-44-\ttristate \"Prism54 SPI (stlc45xx) support\"\n--\ndrivers/net/wireless/intersil/p54/Kconfig-51-\ndrivers/net/wireless/intersil/p54/Kconfig:52:config P54_SPI_DEFAULT_EEPROM\ndrivers/net/wireless/intersil/p54/Kconfig-53-\tbool \"Include fallback EEPROM blob\"\n--\ndrivers/net/wireless/intersil/p54/Kconfig-68-\ndrivers/net/wireless/intersil/p54/Kconfig:69:config P54_LEDS\ndrivers/net/wireless/intersil/p54/Kconfig-70-\tbool\n"
} |
| 17/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 25003 output: 41 thoughts: 26 Thoughts: Okay, here's my interpretation of reading the Kconfig, assuming I'm well-versed in kernel configuration: **Diving into the P54 Kconfig** Alright, let's get down to brass tacks and dissect the Kconfig file for the Intersil p54 wireless driver, specifically under `drivers/net/wireless/intersil/p54/Kconfig`. This is where the core configuration decisions for this driver are made, and understanding it is crucial for proper integration. I'll be looking for several things: the overall structure, any dependencies on other kernel subsystems, what features are exposed for the user, and any potential caveats or warnings. I expect to see the usual suspects: module vs. built-in options, hardware variants, power management considerations, perhaps even debugging flags. I'll pay close attention to the defaults, as these are what the system will try to use if the user doesn't specify otherwise. A well-written Kconfig will have clear help text to guide the user and explain the implications of each option. Let's see if this one holds up to my expectations. |
| 18/2 | 2026/09/06 22:35 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/intersil/p54/Kconfig",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig P54_COMMON\n 3:\t\ttristate \"Softmac Prism54 support\"\n 4:\t\tdepends on MAC80211\n 5:\t\tselect FW_LOADER\n 6:\t\tselect CRC_CCITT\n 7:\t\thelp\n 8:\t\t This is common code for isl38xx/stlc45xx based modules.\n 9:\t\t This module does nothing by itself - the USB/PCI/SPI front-ends\n 10:\t\t also need to be enabled in order to support any devices.\n 11:\t\n 12:\t\t These devices require softmac firmware which can be found at\n 13:\t\t \u003chttps://wireless.docs.kernel.org/en/latest/en/users/drivers/p54.html\u003e\n 14:\t\n 15:\t\t If you choose to build a module, it'll be called p54common.\n 16:\t\n 17:\tconfig P54_USB\n 18:\t\ttristate \"Prism54 USB support\"\n 19:\t\tdepends on P54_COMMON \u0026\u0026 USB\n 20:\t\tselect CRC32\n 21:\t\thelp\n 22:\t\t This driver is for USB isl38xx based wireless cards.\n 23:\t\n 24:\t\t These devices require softmac firmware which can be found at\n 25:\t\t \u003chttps://wireless.docs.kernel.org/en/latest/en/users/drivers/p54.html\u003e\n 26:\t\n 27:\t\t If you choose to build a module, it'll be called p54usb.\n 28:\t\n 29:\tconfig P54_PCI\n 30:\t\ttristate \"Prism54 PCI support\"\n 31:\t\tdepends on P54_COMMON \u0026\u0026 PCI\n 32:\t\thelp\n 33:\t\t This driver is for PCI isl38xx based wireless cards.\n 34:\t\t This driver supports most devices that are supported by the\n 35:\t\t fullmac prism54 driver plus many devices which are not\n 36:\t\t supported by the fullmac driver/firmware.\n 37:\t\n 38:\t\t This driver requires softmac firmware which can be found at\n 39:\t\t \u003chttps://wireless.docs.kernel.org/en/latest/en/users/drivers/p54.html\u003e\n 40:\t\n 41:\t\t If you choose to build a module, it'll be called p54pci.\n 42:\t\n 43:\tconfig P54_SPI\n 44:\t\ttristate \"Prism54 SPI (stlc45xx) support\"\n 45:\t\tdepends on P54_COMMON \u0026\u0026 SPI_MASTER\n 46:\t\thelp\n 47:\t\t This driver is for stlc4550 or stlc4560 based wireless chips\n 48:\t\t such as Nokia's N800/N810 Portable Internet Tablet.\n 49:\t\n 50:\t\t If you choose to build a module, it'll be called p54spi.\n 51:\t\n 52:\tconfig P54_SPI_DEFAULT_EEPROM\n 53:\t\tbool \"Include fallback EEPROM blob\"\n 54:\t\tdepends on P54_SPI\n 55:\t\tdefault n\n 56:\t\thelp\n 57:\t\t Unlike the PCI or USB devices, the SPI variants don't have\n 58:\t\t a dedicated EEPROM chip to store all device specific values\n 59:\t\t for calibration, country and interface settings.\n 60:\t\n 61:\t\t The driver will try to load the image \"3826.eeprom\", if the\n 62:\t\t file is put at the right place. (usually /lib/firmware.)\n 63:\t\n 64:\t\t Only if this request fails, this option will provide a\n 65:\t\t backup set of generic values to get the device working.\n 66:\t\n 67:\t\t Enabling this option adds about 4k to p54spi.\n 68:\t\n 69:\tconfig P54_LEDS\n 70:\t\tbool\n 71:\t\tdepends on P54_COMMON \u0026\u0026 MAC80211_LEDS \u0026\u0026 (LEDS_CLASS = y || LEDS_CLASS = P54_COMMON)\n 72:\t\tdefault y\n"
} |
| 19/2 | 2026/09/06 22:35 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 26414 output: 149 thoughts: 1100 Thoughts: **Fuzzing Target Analysis: p54 Firmware Parsing** Okay, let's break this down. My initial thought is to analyze this patch targeting firmware parsing within the p54 wireless driver, specifically focusing on `p54_parse_firmware` in `fwio.c`. This function is pivotal as it's the core of parsing the firmware for p54 devices, and crucial for USB, PCI, and SPI. The connection to USB is particularly interesting because we have USB Raw Gadget and syzkaller emulation options, offering viable fuzzing pathways. Moreover, the flexibility to load firmware from userspace, sysfs, rootfs, or even via emulation means a wide attack surface. Now, let's dive into the patch's specifics. Before the patch, the code was a bit lax, calculating `rx_end` with a hardcoded offset. The updated code introduces a *critical* sanity check. It ensures the firmware descriptor has a sufficient length and rigorously validates the `rx_end` and `rx_start` values, preventing the potential for integer overflows and related vulnerabilities. This directly translates into fuzzing potential! This is executable code within a reachable driver. The patch modifies crucial input validation and sanity checking logic when parsing firmware for `p54`. Therefore, it's definitively WorthFuzzing=true. My primary `FocusSymbols` are clearly `p54_parse_firmware`. Also, I'll likely need to consider related functions as entry points, such as `p54u_start_ops`, `p54u_load_firmware_cb`, and `p54u_probe`. These are all related to firmware loading and device initialization. Regarding the required kernel configs, I need to enable `P54_COMMON`, `P54_USB`, `MAC80211`, and `USB`. These are essential for building the relevant drivers and supporting USB emulation. `P54_COMMON` is required, and `P54_USB` in turn depends on these. I've reviewed all instructions and guidelines and validated the analysis. This is a solid fuzzing target based on reachable driver code, with a high probability of finding bugs due to the changed input validation logic. |
| 20/2 | 2026/09/06 22:35 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"P54_COMMON",
"P54_USB",
"MAC80211",
"USB"
],
"FocusSymbols": [
"p54_parse_firmware",
"p54u_start_ops"
],
"Reasoning": "The patch adds bounds and range validation checks for firmware descriptors in p54_parse_firmware(). This function is reachable via the p54usb driver which can be fuzzed using USB emulation (e.g. Raw Gadget). Fuzzing is warranted to verify that malformed firmware images and edge cases are handled safely.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"P54_COMMON",
"P54_USB",
"MAC80211",
"USB"
],
"FocusSymbols": [
"p54_parse_firmware",
"p54u_start_ops"
],
"Reasoning": "The patch adds bounds and range validation checks for firmware descriptors in p54_parse_firmware(). This function is reachable via the p54usb driver which can be fuzzed using USB emulation (e.g. Raw Gadget). Fuzzing is warranted to verify that malformed firmware images and edge cases are handled safely.",
"WorthFuzzing": true
} |
| 21/1 | 2026/09/06 22:35 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 22/2 | 2026/09/06 22:35 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch adds input validation and bounds checking for firmware boot record descriptors in p54_parse_firmware(). Specifically, it validates that the boot record length is sufficient to cover struct bootrec_desc fields (preventing out-of-bounds reads on truncated firmware buffers, detectable by KASAN) and ensures that rx_end \u003e= 0x3500 and rx_end - 0x3500 \u003e rx_start to prevent integer underflow and invalid buffer ranges.\n\nNo uninitialized memory is allocated, read, or exposed. Local variables (rx_start, rx_end) are explicitly initialized from the firmware descriptor before being checked and stored. No data is copied to userspace without initialization. Therefore, standard KASAN builds are sufficient and KMSAN fuzzing is not needed.",
"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 e703c0346bcfd9fd5f1e44e93998f1befdb13263
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Sep 6 22:35:09 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/intersil/p54/fwio.c b/drivers/net/wireless/intersil/p54/fwio.c
index a3d9053f043c6..5d82e0a438358 100644
--- a/drivers/net/wireless/intersil/p54/fwio.c
+++ b/drivers/net/wireless/intersil/p54/fwio.c
@@ -79,9 +79,26 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
case BR_CODE_DESCR: {
struct bootrec_desc *desc =
(struct bootrec_desc *)bootrec->data;
- priv->rx_start = le32_to_cpu(desc->rx_start);
- /* FIXME add sanity checking */
- priv->rx_end = le32_to_cpu(desc->rx_end) - 0x3500;
+ u32 rx_start, rx_end;
+
+ if (len < DIV_ROUND_UP(offsetofend(struct bootrec_desc,
+ rx_keycache_size),
+ sizeof(*bootrec->data))) {
+ wiphy_err(priv->hw->wiphy,
+ "firmware descriptor is too short\n");
+ return -EINVAL;
+ }
+
+ rx_start = le32_to_cpu(desc->rx_start);
+ rx_end = le32_to_cpu(desc->rx_end);
+ if (rx_end < 0x3500 || rx_end - 0x3500 <= rx_start) {
+ wiphy_err(priv->hw->wiphy,
+ "firmware descriptor has invalid RX range\n");
+ return -EINVAL;
+ }
+
+ priv->rx_start = rx_start;
+ priv->rx_end = rx_end - 0x3500;
priv->headroom = desc->headroom;
priv->tailroom = desc->tailroom;
priv->privacy_caps = desc->privacy_caps;
|
| 23/3 | 2026/09/06 22:35 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2435 output: 44 thoughts: 64 Thoughts: Here's my summary, as if I were thinking these things: **Analyzing the Firmware I/O Code** Okay, time to dive into this. The diff points me towards `drivers/net/wireless/intersil/p54/fwio.c`, so that's where I need to focus. Let's start with a thorough examination of the changes. I'll need to read the surrounding code in that file, too, to get the complete picture. The best way to begin the investigation is using `read-file` to get the context in the file `drivers/net/wireless/intersil/p54/fwio.c`. This will give me everything I need to understand the change. |
| 24/3 | 2026/09/06 22:35 | tool | read-file |
0mArgs:{
"File": "drivers/net/wireless/intersil/p54/fwio.c",
"FirstLine": 50,
"LineCount": 80
}Results: {
"Contents": " 50:\t\twhile (bootrec-\u003edata \u003c= end_data \u0026\u0026 (bootrec-\u003edata +\n 51:\t\t (len = le32_to_cpu(bootrec-\u003elen))) \u003c= end_data) {\n 52:\t\t\tu32 code = le32_to_cpu(bootrec-\u003ecode);\n 53:\t\t\tswitch (code) {\n 54:\t\t\tcase BR_CODE_COMPONENT_ID:\n 55:\t\t\t\tpriv-\u003efw_interface = be32_to_cpup((__be32 *)\n 56:\t\t\t\t\t\t bootrec-\u003edata);\n 57:\t\t\t\tswitch (priv-\u003efw_interface) {\n 58:\t\t\t\tcase FW_LM86:\n 59:\t\t\t\tcase FW_LM20:\n 60:\t\t\t\tcase FW_LM87: {\n 61:\t\t\t\t\tchar *iftype = (char *)bootrec-\u003edata;\n 62:\t\t\t\t\twiphy_info(priv-\u003ehw-\u003ewiphy,\n 63:\t\t\t\t\t\t \"p54 detected a LM%c%c firmware\\n\",\n 64:\t\t\t\t\t\t iftype[2], iftype[3]);\n 65:\t\t\t\t\tbreak;\n 66:\t\t\t\t\t}\n 67:\t\t\t\tcase FW_FMAC:\n 68:\t\t\t\tdefault:\n 69:\t\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n 70:\t\t\t\t\t\t \"unsupported firmware\\n\");\n 71:\t\t\t\t\treturn -ENODEV;\n 72:\t\t\t\t}\n 73:\t\t\t\tbreak;\n 74:\t\t\tcase BR_CODE_COMPONENT_VERSION:\n 75:\t\t\t\t/* 24 bytes should be enough for all firmwares */\n 76:\t\t\t\tif (strnlen((unsigned char *) bootrec-\u003edata, 24) \u003c 24)\n 77:\t\t\t\t\tfw_version = (unsigned char *) bootrec-\u003edata;\n 78:\t\t\t\tbreak;\n 79:\t\t\tcase BR_CODE_DESCR: {\n 80:\t\t\t\tstruct bootrec_desc *desc =\n 81:\t\t\t\t\t(struct bootrec_desc *)bootrec-\u003edata;\n 82:\t\t\t\tu32 rx_start, rx_end;\n 83:\t\n 84:\t\t\t\tif (len \u003c DIV_ROUND_UP(offsetofend(struct bootrec_desc,\n 85:\t\t\t\t\t\t\t\t rx_keycache_size),\n 86:\t\t\t\t\t\t\t sizeof(*bootrec-\u003edata))) {\n 87:\t\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n 88:\t\t\t\t\t\t \"firmware descriptor is too short\\n\");\n 89:\t\t\t\t\treturn -EINVAL;\n 90:\t\t\t\t}\n 91:\t\n 92:\t\t\t\trx_start = le32_to_cpu(desc-\u003erx_start);\n 93:\t\t\t\trx_end = le32_to_cpu(desc-\u003erx_end);\n 94:\t\t\t\tif (rx_end \u003c 0x3500 || rx_end - 0x3500 \u003c= rx_start) {\n 95:\t\t\t\t\twiphy_err(priv-\u003ehw-\u003ewiphy,\n 96:\t\t\t\t\t\t \"firmware descriptor has invalid RX range\\n\");\n 97:\t\t\t\t\treturn -EINVAL;\n 98:\t\t\t\t}\n 99:\t\n 100:\t\t\t\tpriv-\u003erx_start = rx_start;\n 101:\t\t\t\tpriv-\u003erx_end = rx_end - 0x3500;\n 102:\t\t\t\tpriv-\u003eheadroom = desc-\u003eheadroom;\n 103:\t\t\t\tpriv-\u003etailroom = desc-\u003etailroom;\n 104:\t\t\t\tpriv-\u003eprivacy_caps = desc-\u003eprivacy_caps;\n 105:\t\t\t\tpriv-\u003erx_keycache_size = desc-\u003erx_keycache_size;\n 106:\t\t\t\tif (le32_to_cpu(bootrec-\u003elen) == 11)\n 107:\t\t\t\t\tpriv-\u003erx_mtu = le16_to_cpu(desc-\u003erx_mtu);\n 108:\t\t\t\telse\n 109:\t\t\t\t\tpriv-\u003erx_mtu = (size_t)\n 110:\t\t\t\t\t\t0x620 - priv-\u003etx_hdr_len;\n 111:\t\t\t\tmaxlen = priv-\u003etx_hdr_len + /* USB devices */\n 112:\t\t\t\t\t sizeof(struct p54_rx_data) +\n 113:\t\t\t\t\t 4 + /* rx alignment */\n 114:\t\t\t\t\t IEEE80211_MAX_FRAG_THRESHOLD;\n 115:\t\t\t\tif (priv-\u003erx_mtu \u003e maxlen \u0026\u0026 PAGE_SIZE == 4096) {\n 116:\t\t\t\t\tprintk(KERN_INFO \"p54: rx_mtu reduced from %d \"\n 117:\t\t\t\t\t \"to %d\\n\", priv-\u003erx_mtu, maxlen);\n 118:\t\t\t\t\tpriv-\u003erx_mtu = maxlen;\n 119:\t\t\t\t}\n 120:\t\t\t\tbreak;\n 121:\t\t\t\t}\n 122:\t\t\tcase BR_CODE_EXPOSED_IF:\n 123:\t\t\t\texp_if = (struct exp_if *) bootrec-\u003edata;\n 124:\t\t\t\tfor (i = 0; i \u003c (len * sizeof(*exp_if) / 4); i++)\n 125:\t\t\t\t\tif (exp_if[i].if_id == cpu_to_le16(IF_ID_LMAC))\n 126:\t\t\t\t\t\tpriv-\u003efw_var = le16_to_cpu(exp_if[i].variant);\n 127:\t\t\t\tbreak;\n 128:\t\t\tcase BR_CODE_DEPENDENT_IF:\n 129:\t\t\t\tbreak;\n"
} |
| 25/3 | 2026/09/06 22:35 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4082 output: 193 thoughts: 853 Thoughts: **KMSAN Assessment: Firmware Parsing Validation** Okay, let's break this down. My initial assessment of this patch, which modifies `p54_parse_firmware`, involves a critical review of its implications for memory safety, specifically focusing on the KMSAN angle. I've got to ensure there are no vulnerabilities related to uninitialized memory use within the kernel. Looking at the code, it's clear the patch is beefing up the input validation when handling the `BR_CODE_DESCR` case. Previously, the code was vulnerable because it was reading data from the `bootrec->data` buffer without sufficient bounds checking. Specifically, it lacked checks on the record length, potentially leading to out-of-bounds reads if the firmware data was truncated – a classic KASAN issue. The patch addresses this by adding a crucial check to ensure the record `len` is large enough to contain the `bootrec_desc` structure up to `rx_keycache_size`, as well as validating that `rx_end` is greater than or equal to `0x3500` and `rx_end - 0x3500` is greater than `rx_start`. This effectively prevents an integer underflow or an invalid RX buffer range calculation. Now, the important question: does this introduce or exacerbate any KMSAN concerns? To assess this, I've got to rigorously examine if the patch introduces any of the following KMSAN-relevant scenarios: 1. Kernel data structures passed to user space with uninitialized fields. 2. Conditional logic relying on potentially uninitialized variables. 3. Complex data structure allocation or initialization where uninitialized fields might be accessed later. 4. Bounds checks or length calculations that could enable access to uninitialized bytes in existing buffers. Going through the checklist, it's pretty clear that this patch does not fall into any of these categories. The patch **only** validates input from the firmware buffer. The variables `rx_start` and `rx_end` are always explicitly initialized from values read from `bootrec->data` before being used. No uninitialized memory is introduced, allocated, or copied to user space. It tightens the bounds checks and rejects invalid/short descriptors. Therefore, the fix is solely about standard input validation and sanitization, which are KASAN problems. The KMSAN fuzzing methodology doesn't provide any additional benefit here. The issue fixed is preventing out-of-bounds reads and integer underflow. These are standard KASAN and logic issues and not KMSAN-specific. So, in conclusion, the patch primarily addresses KASAN vulnerabilities by validating firmware data, making it safe to say that `NeedsKMSAN = false`. I'll call `set-results` with this assessment, confident in the reasoning. |
| 26/3 | 2026/09/06 22:35 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch adds input validation and bounds checking for firmware boot record descriptors in p54_parse_firmware(). Specifically, it validates that the boot record length is sufficient to cover struct bootrec_desc fields (preventing out-of-bounds reads on truncated firmware buffers, detectable by KASAN) and ensures that rx_end \u003e= 0x3500 and rx_end - 0x3500 \u003e rx_start to prevent integer underflow and invalid buffer ranges.\n\nNo uninitialized memory is allocated, read, or exposed. Local variables (rx_start, rx_end) are explicitly initialized from the firmware descriptor before being checked and stored. No data is copied to userspace without initialization. Therefore, standard KASAN builds are sufficient and KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch adds input validation and bounds checking for firmware boot record descriptors in p54_parse_firmware(). Specifically, it validates that the boot record length is sufficient to cover struct bootrec_desc fields (preventing out-of-bounds reads on truncated firmware buffers, detectable by KASAN) and ensures that rx_end \u003e= 0x3500 and rx_end - 0x3500 \u003e rx_start to prevent integer underflow and invalid buffer ranges.\n\nNo uninitialized memory is allocated, read, or exposed. Local variables (rx_start, rx_end) are explicitly initialized from the firmware descriptor before being checked and stored. No data is copied to userspace without initialization. Therefore, standard KASAN builds are sufficient and KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|