WSL2 Kernel with 802.11 Stack + MediaTek mt76 USB WiFi

    1

    `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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    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, .wslconfig backed up, kernel= set inside [wsl2], the existing memory=8GB line 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.

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    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

    Requires

    Kernel
    WSL2
    Windows 10
    Windows 11
    PowerShell 7
    Git
    Linux kernel build toolchain
    curl
    usbipd-win

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files

    Allowed Hosts

    git.kernel.org

    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.

    Listed19 days ago

    What's inside

    Frequently Asked Questions

    Standard WSL2 kernels lack the IEEE 802.11 stack and often fail to load external firmware; this skill provides a custom-configured kernel and automation scripts to enable full WiFi functionality for MT7612U adapters.

    This skill includes a specific kernel configuration file, firmware-embedding scripts, a PowerShell installer for Windows, and a Bash verification tool to ensure the environment is correctly configured.

    While optimized for the MT7612U chipset (like the Alfa AWUS036ACM), the included 802.11 stack configuration can serve as a foundation for other MediaTek-based wireless devices with minor adjustments.

    Yes, you will need the 'usbipd-win' tool installed on your Windows host to pass the physical USB WiFi adapter through to the WSL2 environment where the custom kernel is running.

    The skill is built against Microsoft’s WSL2-Linux-Kernel tag 6.18.33.2, ensuring compatibility with modern Windows 10 and 11 WSL2 distributions.

    Yes, by embedding the 802.11 stack and necessary drivers, this configuration enables advanced wireless modes like monitor mode and packet injection that are typically unavailable in virtualized environments.

    New in LLM Ops