WSL2 Kernel with 802.11 Stack + MediaTek mt76 USB WiFi
`scripts/fetch-firmware.sh` downloads the two files from the linux-firmware repository on kernel.org and verifies their SHA-256 before the build.
$29
Works with the AI Agents you already use
WSL2 Kernel with 802.11 Stack + MediaTek mt76 USB WiFi
Example session with this skill installed
I want to use my Alfa AWUS036ACM USB WiFi adapter inside WSL2 for monitor-mode captures. The stock kernel has no wireless stack and the driver can't load its firmware. Make it work.
- Read your context and instructions
- Compiled the wsl2 kernel
Summary
Built a WSL2 kernel from Microsoft's 6.18.33.2 tag with cfg80211, mac80211, the mt76 family and the USB/IP client, with the MT7662 firmware embedded so the driver never touches /lib/firmware. Installed it without admin rights and verified it inside WSL.
Steps
bash scripts/fetch-firmware.sh /lib/firmware: both MediaTek files downloaded from kernel.org and verified (SHA-256 f7e52492... and 6f0e8712...).- Clone at
linux-msft-wsl-6.18.33.2,cp reference/kernel.config.txt .config,make olddefconfig,make -j16 bzImage modules,sudo make modules_install: 27 minutes. pwsh -File scripts\install-kernel.ps1 -Source D:\build\bzImage: image copied to%USERPROFILE%\wsl-kernel-mt76,.wslconfigbacked up,kernel=set inside[wsl2], the existingmemory=8GBline kept.wsl --shutdown, reopened Ubuntu.
Verification (bash scripts/verify-kernel.sh)
ok kernel version 6.18.33.2-microsoft-standard-WSL2
ok CONFIG_CFG80211 built
ok CONFIG_MAC80211 built
ok CONFIG_MT76_CORE built
ok CONFIG_MT76x2U built
ok CONFIG_USBIP_VHCI_HCD built
ok mt7662 firmware embedded (CONFIG_EXTRA_FIRMWARE)
ok modprobe mt76x2u
ok modprobe vhci-hcd
ok /sys/class/ieee80211 exists (wireless stack registered)
all kernel checks passed
The caveat, in practice
usbipd attach --wsl --busid 2-3 handed the adapter over; the driver loaded and wlan0 appeared. On one laptop the adapter's control transfers timed out (vendor request ... failed:-110) and it wedged until re-plugged: that is USB/IP, not the kernel. reference/rebuild.md says what to use instead when USB/IP will not carry your adapter (a VM with native USB passthrough, or native Linux).
Connects securely to your tools. The creator never sees your data.
About this skill
The stock WSL2 kernel has no 802.11 stack, so a USB WiFi adapter handed to WSL does nothing, and the WSL2 firmware loader cannot read /lib/firmware from kernel context, so even a kernel with the driver fails at firmware load. This kit is the configuration that fixes both, the rebuild steps, a safe installer and a verifier.
Config (reference/kernel.config.txt, GPL source configuration on Microsoft's WSL2-Linux-Kernel tag 6.18.33.2, same version string as stock so other distros stay module-compatible): cfg80211 and mac80211 (monitor mode capable), the whole mt76 family through MT76x2U for MT7612U adapters (Alfa AWUS036ACM and generic dongles), the USB/IP client (vhci-hcd), and CONFIG_EXTRA_FIRMWARE embedding mt7662_rom_patch.bin and mt7662.bin into the image. scripts/fetch-firmware.sh downloads the two files from the linux-firmware repository on kernel.org and verifies their SHA-256 before the build.
Rebuild (reference/rebuild.md): packages, clone at the tag, copy the config, fetch the firmware for the embed step, make olddefconfig, build, modules_install, copy bzImage to Windows. 20 to 40 minutes.
Installer (scripts/install-kernel.ps1, no admin): copies the image to a stable folder, backs up .wslconfig, sets kernel= inside [wsl2] while keeping your other settings, refuses a missing or implausibly small image, -DryRun prints the resulting file. Revert by restoring the backup.
Verifier (scripts/verify-kernel.sh, inside WSL): running version, options in /proc/config.gz, modprobe mt76x2u and vhci-hcd, embedded firmware, /sys/class/ieee80211; exit 0 or 1.
The honest caveat: USB/IP is unreliable for many WiFi adapters (vendor request ... failed:-110); that is the transport, not the kernel. What to use instead is spelled out. No prebuilt bzImage is shipped; you build it from the config.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
USB/IP transport can be unreliable for certain adapters. Targets kernel 6.18.33.2 and the MT7612U chipset family only. Requires manual build of the kernel image.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 19 days ago
Windows only
- Accounts
Kernel
- Software
- PowerShell 7
GitLinux kernel build toolchaincurlusbipd-win
The toolchain is build-essential, flex, bison, libssl-dev, libelf-dev, bc and dwarves. usbipd-win handles USB passthrough.
Permissions
Allowed Hosts
Shell to run the installer, the verifier and the build; read/write files for bzImage, .wslconfig (with backup) and /lib/firmware. Network access only in fetch-firmware.sh (kernel.org) and the kernel clone (github.com). No environment variables.