Skip to content

Repository files navigation

MT7902 WiFi Driver for Linux

This package provides driver support for the MediaTek MT7902 802.11ax (WiFi 6E) PCIe Wireless Network Adapter (also known as Filogic 330/310).

About

The MT7902 is a WiFi 6E chipset from MediaTek. This driver adds MT7902 support by patching the existing mt7921e driver to recognize the MT7902 PCI device ID (14c3:7902).

Status (February 2026): Official MT7902 firmware is now available in linux-firmware. This package automatically configures your system to work with the official firmware.

Compatibility

  • Chipset: MediaTek MT7902 (PCI ID: 14c3:7902)
  • Common Devices:
    • ASUS Vivobook E1404FA
    • Various laptops with MediaTek WiFi cards
  • Linux Kernel: 5.15+ (tested on 6.17.10)
  • Distributions: Tested on Kali Linux, should work on Ubuntu, Debian, Fedora, Arch, etc.

Problem (Resolved)

Historically, the MT7902 WiFi card wasn't supported because:

  1. The mt7921e driver didn't include the MT7902 PCI device ID
  2. MT7902-specific firmware wasn't available

As of February 2026: Both the driver support and official firmware are now available. This package ensures smooth installation.

Solution

This package provides:

  1. Driver patch: DKMS-based driver module that adds MT7902 PCI ID support
  2. Official firmware configuration: Automatically configures official MT7902 firmware
  3. Installation scripts: One-command automated setup for easy installation
  4. Diagnostic tools: Check status and troubleshoot issues

Installation

Quick Install

sudo ./install.sh

From-Source Kernel Build (MT7902)

If you want a from-scratch kernel module build (not DKMS), use:

cd mt7902-driver
sudo ./build.sh

This copies the kernel’s mt76 driver source, applies the MT7902 PCI ID patch, and builds the module against your running kernel. Reboot after building.

Manual Installation

  1. Install prerequisites:
sudo apt-get install dkms build-essential linux-headers-$(uname -r)
# Or for Fedora/RHEL:
sudo dnf install dkms kernel-devel-$(uname -r)
# Or for Arch:
sudo pacman -S dkms linux-headers
  1. Install firmware links:
sudo ./setup-firmware.sh
  1. Install driver module:
sudo ./build-driver.sh
sudo ./load-driver.sh
  1. Reboot (recommended):
sudo reboot

Verification

After installation and reboot, verify the WiFi interface:

# Check if wlan0 appears
ip link show

# Check if driver is loaded
lsmod | grep mt7921e

# Check WiFi networks
sudo iw dev wlan0 scan | grep SSID

# Or use NetworkManager
nmcli device wifi list

Troubleshooting

WiFi interface not appearing

# Check if card is detected
lspci -nnk | grep -iA3 network

# Check driver messages
dmesg | grep mt7

# Manually load driver
sudo modprobe mt7921e

Firmware errors

# Check firmware files
ls -la /lib/firmware/mediatek/mt7902/
ls -la /lib/firmware/mediatek/WIFI_MT7922*

# Reinstall firmware links
sudo ./setup-firmware.sh

"Failed to get patch semaphore" / "hardware init failed"

If you see errors like:

mt7921e 0000:02:00.0: Failed to get patch semaphore
mt7921e 0000:02:00.0: hardware init failed

This means the firmware does not match MT7902. The MT7922/MT7925 firmware symlinks are a best-effort fallback and may not initialize the chip. You will need official MT7902 firmware from the linux-firmware project once it becomes available.

Driver not loading

# Check if DKMS module is installed
dkms status

# Rebuild driver
sudo dkms remove mt7921e-mt7902/1.0 --all
sudo ./build-driver.sh

Uninstallation

sudo ./uninstall.sh

This will:

  • Remove the DKMS module
  • Remove firmware symlinks
  • Restore original driver configuration

Technical Details

How it works

  1. Firmware Compatibility: MT7902 and MT7922 are part of the same Filogic 3xx chipset family and share compatible firmware. We create symlinks so when the driver requests MT7902 firmware, it gets MT7922 firmware instead.

  2. Driver Patching: The mt7921e driver already supports similar chipsets (MT7921, MT7922). We add the MT7902 PCI device ID (0x7902) to the driver's PCI ID table using DKMS to automatically rebuild the driver for your kernel.

  3. DKMS Integration: Using DKMS (Dynamic Kernel Module Support) ensures the driver is automatically rebuilt when you update your kernel.

Files Modified

  • /lib/firmware/mediatek/mt7902/ - Firmware symlinks created
  • /etc/modprobe.d/mt7902.conf - Module configuration
  • /usr/src/mt7921e-mt7902-1.0/ - DKMS driver source

Contributing

If this driver works for you or you have improvements, please contribute back:

  1. Fork this repository
  2. Test on your hardware
  3. Submit issues or pull requests
  4. Share your experience

Known Issues & Limitations

  • MT7902 firmware missing: Official MT7902 firmware has not been released to linux-firmware yet
  • Firmware mismatch: MT7922/MT7925 firmware symlinks are fallbacks and may cause "Failed to get patch semaphore" errors
  • Partial support: This driver package adds kernel support but requires official MT7902 firmware
  • Timeline: Official support expected Q1-Q2 2026

For detailed open source status and timeline, see OPEN_SOURCE_STATUS.md

Resources

Credits

  • Based on the upstream mt76 driver by Felix Fietkau and community contributors
  • MediaTek for the mt7921/mt7922 driver code
  • Community testing and feedback
  • Linux Wireless community for driver development

License

This package follows the licensing of the original mt76 driver:

  • Driver code: ISC License (SPDX: ISC)
  • Installation scripts: MIT License

Support

For issues, questions, or contributions:

  • Open an issue on GitHub
  • Check kernel logs: dmesg | grep mt7
  • Verify PCI ID: lspci -nnk | grep 14c3:7902

Last Updated: February 2026
Version: 1.0
Tested On: Kali Linux 6.17.10, ASUS Vivobook E1404FA

About

MediaTek MT7902 WiFi 6E driver support for Linux

Resources

Contributing

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages