config-wsl: enable CMAC, ZSTD firmware, and MediaTek USB Bluetooth
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
**Is your feature request related to a problem? Please describe.**
Yes. Using several USB Bluetooth dongles in WSL2 (attached via `usbipd`) is blocked by the default WSL2 kernel config in three ways:
- **MediaTek USB BT controllers have no driver.** `CONFIG_BT_HCIBTUSB_MTK` is not set, so `btusb` has no MediaTek support and the controller never initializes.
- **Compressed firmware can't be read.** Current `linux-firmware` ships blobs as `.zst`, but `CONFIG_FW_LOADER_COMPRESS_ZSTD` is not set, so the direct loader can't decompress them. `CONFIG_FW_LOADER_COMPRESS_XZ` is enabled, but `linux-firmware` has moved to zstd.
- **CMAC crypto fails to load on demand.** `CONFIG_CRYPTO_CMAC=m`. BT LE Secure Connections allocates `cmac(aes)`, which triggers a kernel-side `request_module()`. On WSL2 that runs through usermodehelper in the **init** namespace, which cannot reach the distro's `/sbin/modprobe` or `/lib/modules`, so the module never loads and the controller logs `Unable to create CMAC crypto context`.
**Describe the solution you'd like**
Three config-only changes to `arch/x86/configs/config-wsl` (diff: https://github.com/microsoft/WSL2-Linux-Kernel/compare/linux-msft-wsl-6.18.y...intercreate:upstream-config-cmac-zstd-mtkbt):
| Option | Change | Why |
| --- | --- | --- |
| `CONFIG_CRYPTO_CMAC` | `m` → `y` | build it in so LE Secure Connections crypto works without the init-namespace `request_module()`. `CONFIG_CRYPTO_AES=y` already set. |
| `CONFIG_FW_LOADER_COMPRESS_ZSTD` | unset → `y` | read `.zst` firmware. `CONFIG_ZSTD_DECOMPRESS=y` is already set, so this pulls in nothing new — it just enables the zstd path next to the existing xz one. |
| `CONFIG_BT_HCIBTUSB_MTK` | unset → `y` (selects `CONFIG_BT_MTK=m`) | MediaTek USB BT controllers. `CONFIG_BT_HCIBTUSB=m` already set. |
**Describe alternatives you've considered**
- **`CONFIG_EXTRA_FIRMWARE`**: must be listed per-file and stored uncompressed so it doesn't scale to arbitrary dongles.
- **Carrying a downstream fork** with these enabled: works as a stopgap and is what we're doing today, but the fix belongs in the shipped config so every WSL2 user benefits.
**Additional context**
- Diff / branch: https://github.com/microsoft/WSL2-Linux-Kernel/compare/linux-msft-wsl-6.18.y...intercreate:upstream-config-cmac-zstd-mtkbt
- Tested with Intel, Realtek (RTL8761BU), and MediaTek Bluetooth devices attached via `usbipd`.
- **Scope:** this only opens the config path. It does **not** fix WSL2's separate inability to load firmware from the distro's `/lib/firmware` while running in the init namespace.
- Same change applies to `arch/arm64/configs/config-wsl-arm64` for parity if wanted; this request covers x86.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with arch/x86/configs/config-wsl and compare it with the referenced diff or current linux-msft-wsl-6.18.y configuration. Confirm the three requested settings are changed as specified: built-in CMAC, ZSTD firmware compression, and MediaTek USB Bluetooth support. Done means the x86 WSL configuration contains those changes without expanding the request to firmware loading or the arm64 config.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100