Developer Guide¶
Resources for developers working with the MT7925 driver or contributing to this project.
Pages in This Section¶
-
Debugging
Techniques for debugging driver issues
-
Debugfs Reference
Complete debugfs interface documentation
-
Sysfs Reference
Sysfs interface for temperature and power management
Quick Links¶
Getting Started¶
- Clone the repository:
git clone https://github.com/zbowling/mt7925.git - Install DKMS package:
cd dkms && sudo ./install.sh - Test your changes
- Submit a PR
Development Setup¶
# Clone the kernel fork with patches applied
git clone https://github.com/zbowling/linux-wifi.git
cd linux-wifi
git checkout mt7925-upstream-v2-6.18
# Make changes following kernel coding style
# Use tabs, follow existing patterns
# Export patch
git format-patch -1
Useful Commands¶
# Check DKMS status
dkms status | grep mt76
# Rebuild DKMS module
sudo dkms build mt76-mt7925/1.5.0
sudo dkms install mt76-mt7925/1.5.0
# View driver messages
dmesg | grep mt7925
# Check debugfs
ls /sys/kernel/debug/ieee80211/phy0/mt76/
Code Organization¶
Driver Source Tree¶
drivers/net/wireless/mediatek/mt76/
├── mt76.h # Core structures
├── mac80211.c # mac80211 integration
├── dma.c # DMA management
├── mcu.c # MCU base
├── mt792x_core.c # Shared MT792x code
├── mt792x_mac.c # Shared MAC layer
├── mt7925/
│ ├── main.c # mac80211 ops
│ ├── mac.c # MAC processing
│ ├── mcu.c # MCU commands
│ └── pci.c # PCI probe/remove
└── mt7921/
└── ... # MT7921 specific
Key Files for Patches¶
| File | Contains |
|---|---|
mt7925/main.c |
mac80211 operations |
mt7925/mcu.c |
MCU command handlers |
mt792x_core.c |
Shared core functions |
mt76/mac80211.c |
Station/VIF management |
Testing Changes¶
Unit Testing¶
# Build kernel with CONFIG_MT76_DEBUG=y
# Enable lockdep for deadlock detection
CONFIG_PROVE_LOCKING=y
CONFIG_DEBUG_LOCK_ALLOC=y
Stress Testing¶
# Roaming test
nmcli device wifi connect "SSID" password "pass"
# Move between APs
# Suspend/resume test
systemctl suspend
# Wake and check dmesg