[PATCH] wifi: mt76: mt7921: handle BSS_CHANGED_TXPOWER and update txpower_cur
Niels Lüttge
niels at luettge.info
Thu Nov 19 11:57:33 PST 2026
Hi!
Currently, mt7921 ignores BSS_CHANGED_TXPOWER in mt7921_bss_info_changed(),
so runtime TX power limits configured via nl80211/iw (e.g. "iw dev <if>
set txpower limit <mbm>") have no effect in AP or STA mode.
On hardware like MT7922, running at the full regulatory limit (e.g. 23 dBm)
pushes tmac values above the EEPROM calibration limits visible in
txpower_sku. This causes PA overdrive/saturation, severe throughput
degradation, and thermal overheatingwhich eventually wedges the firmware
and driver (MCU timeouts) so badly that only a hard reboot / power cycle
can recover the device, with no way for users or hostapd to reduce TX
power at runtime.
Furthermore, mt76_connac_mcu_rate_txpower_band() never updates
phy->txpower_cur, causing mt76_get_txpower() ("iw dev <if> info") to
always report a static 3.00 dBm regardless of the actual configured
TX power.
Fix both issues by:
1. Handling BSS_CHANGED_TXPOWER in mt7921_bss_info_changed(), refreshing
the CLC country power table via mt7921_mcu_set_clc() before calling
mt76_connac_mcu_set_rate_txpower() so both downward and upward runtime
TX power adjustments take effect immediately on MT7921/MT7922 firmware.
2. Updating phy->txpower_cur in mt76_connac_mcu_rate_txpower_band().
Tested on:
- Hardware: Compulab fitlet2 with MediaTek MT7922 (RZ616, PCIe 14c3:0616)
- Mode: 5 GHz 80 MHz AP mode (hostapd, regdom DE)
- Kernel: Linux 7.0.0 (also verified on 6.8.0)
- Firmware: WM Firmware Build 20250523103234 (and 20231120)
- OS: Linux Mint 22.3
Analyzed and fixed with AI support.
Tested on MT7922 (PCIe) in 5 GHz 80 MHz AP mode.
Best regards,
Niels
---------------------------------------------
Niels Luettge
mailto:niels at luettge.info
---------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mt7921-txpower-fix-upstream.patch
Type: application/octet-stream
Size: 853 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20261119/0c0c0e93/attachment-0001.obj>
More information about the Linux-mediatek
mailing list