Skip to content

mt76 patch: RX bitrate reporting for MT7921/MT7922/MT7925, looking for testers #708

Description

@Lucid-Duck

Hey Nick and crew,

I've got a small mt76 patch I'd like community eyes on before I send it to linux-wireless.

Quick background: if you run iw dev wlan0 station dump on any MediaTek MT7921, MT7922, or MT7925 adapter, you get a tx bitrate: line but no rx bitrate: line. Never populated. The mt7921 driver landed in the kernel in early 2021 and mt7925 in late 2023, and this field has been missing on both of them the whole time. There's a function prototype sitting in each driver's header file (mt7921_mcu_get_rx_rate / mt7925_mcu_get_rx_rate) that never had a body written for it. The mt7915 sibling does populate the field, but it uses an MCU query that turns out to return an error on mt792x firmware, so the mt7915 approach can't just be ported over.

The patch takes a different angle: the rate info from each RX frame is already being decoded by the driver for radiotap / monitor mode, so it just caches the last-seen rate per station and returns it from sta_statistics. No new MCU calls, no firmware changes, minimal overhead on the RX path. Nothing about throughput, nothing about power, nothing flashy, just a field that should have been there all along.

Patch, README, and step-by-step test instructions are here:
https://github.com/Lucid-Duck/mt76-rxrate

I've tested it on my Alfa AWUS036AXML (MT7921AU USB) across all three bands, 2.4 GHz channel 1, 5 GHz channel 100 DFS, and 6 GHz channel 5, against a tri-band Wi-Fi 6 AP. Peak rx bitrate tracks correctly: 286.7 Mbit/s HE-MCS 11 NSS 2 on 2.4 GHz (20 MHz), 1200.9 Mbit/s on the 5 and 6 GHz 80 MHz channels. Legacy basic rates (1.0 Mbit/s CCK at 2.4, 6.0 Mbit/s OFDM at 5/6) show up correctly at idle when only beacons are arriving. Ran a 60-second iperf3 downlink at ~715 Mbit/s with 300 rapid station-dump samples to confirm the cache keeps up with frame-by-frame rate adaptation; it caught five distinct rate values in that window including real-time HE-MCS 9/10/11 transitions.

What I'd love is testing on hardware I don't have:

  • MT7921 PCIe cards (Framework, ThinkPad, HP ProBook, whatever laptop has them embedded)
  • MT7922 on any bus
  • MT7925 on any bus (the Wi-Fi 7 sibling)
  • Weirder SKUs at non-standard VID:PIDs
  • Any setup where rate control is actually backing off. I can't hit the HT or VHT paths with this AP because it always negotiates HE.

Test instructions are in TESTING.md on the repo. About 15 minutes of work, no reboot, fully reversible with rmmod + modprobe. Fedora, Debian/Ubuntu, and Arch steps are all in there.

Once there are a couple of independent confirmations I'll send the patch to linux-wireless with Tested-by: tags for whoever reports in. Thanks in advance if anyone has the time and the hardware.

Lucid-Duck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions