mt7615: external-PA TX power clamped at 9 dBm (DIR-853 A3) — fix exPA target power & honor txpower override
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 888
- Forks
- 436
- PR merge metrics
- No merged PRs in 30d
Description
Tagging @nbd168 — and referencing @DragonBluep's earlier analysis in this repo (issue #804).
Summary
On a D-Link DIR-853 A3 (ramips/mt7621, DBDC MT7615E) running stock OpenWrt 25.12.4 (kernel 6.12.87), the 5GHz radio is capped at 9.0 dBm on every channel. Regulatory is fine (iw reg get: country 00 allows 20 dBm on UNII-1 and UNII-3). iw dev set txpower fixed 2300 succeeds but is ignored (radio stays 9 dBm). 2.4GHz on the same chip correctly runs 20 dBm.
Measured ~5 m / one wall: 5GHz 30.3 down / 122 up (asymmetry = AP-side TX cap). Stock D-Link/Etisalat firmware delivered ~20 dBm from the same EEPROM.
Evidence (run on this unit)
ubus call system board # D-Link DIR-853 A3, OpenWrt 25.12.4, kernel 6.12.87
iw phy phy1 info | grep dBm # every 5G channel (36-165) = 9.0 dBm
iw reg get # country 00: UNII-1 20 dBm, UNII-3 20 dBm
iw dev phy1-ap0 set txpower fixed 2300 # no error, radio stays 9 dBm
mt76 debugfs EEPROM (/sys/kernel/debug/ieee80211/phy0/mt76/eeprom, byte-identical to factory MTD):
0x0F3 = 0x04 MT_EE_EXT_PA_5G_TARGET_POWER <- drives 5GHz to ~9 dBm
0x0D5 = 0xC5 MT_EE_RATE_POWER (delta 0x05)
0x058 = 0x24 per-chain 2.4GHz target <- runs 20 dBm (works)
Why it happens
Per mt7615_init_txpower(): for boards where mt7615_ext_pa_enabled() is true (external PA, TSSI disabled on 5G), mt7615_eeprom_get_target_power_index() returns MT_EE_EXT_PA_5G_TARGET_POWER (the single byte above) instead of the per-chain table — so 5GHz power is computed from eep[0x0F3] + path_delta + rate_delta, landing at ~9 dBm. 2.4GHz uses the per-chain table and is correct.
Consistent with prior reports here:
- #531: MT7615DN Phicomm K2P (external PA) capped at 9 dBm; JCG Y2 (internal PA) reaches 23 dBm.
- #633, #657: mt76 TX power below OEM firmware across multiple MT76 parts.
Proposed fix (community-posted in #804 / forum thread 107392) — please review for master
--- a/mt7615/eeprom.c
+++ b/mt7615/eeprom.c
@@ -204,15 +204,6 @@ int mt7615_eeprom_get_target_power_index(struct mt7615_dev *dev,
if (chain_idx > 3)
return -EINVAL;
- /* TSSI disabled */
- if (mt7615_ext_pa_enabled(dev, chan->band)) {
- if (chan->band == NL80211_BAND_2GHZ)
- return MT_EE_EXT_PA_2G_TARGET_POWER;
- else
- return MT_EE_EXT_PA_5G_TARGET_POWER;
- }
-
- /* TSSI enabled */
if (chan->band == NL80211_BAND_2GHZ) {
index = MT_EE_TX0_2G_TARGET_POWER + chain_idx * 6;
} else {
--- a/mt7615/init.c
+++ b/mt7615/init.c
@@ -285,7 +285,7 @@ void mt7615_init_txpower(struct mt7615_dev *dev,
(MT_EE_RATE_POWER_EN | MT_EE_RATE_POWER_SIGN))
delta += rate_val & MT_EE_RATE_POWER_MASK;
- if (!is_mt7663(&dev->mt76) && mt7615_ext_pa_enabled(dev, band))
+ if (!is_mt7663(&dev->mt76) && !mt7615_ext_pa_enabled(dev, band))
target_chains = 1;
else
target_chains = n_chains;
Reported effect (community): external-PA MT7615 boards reach ~18–20 dBm with stock-like throughput. Not independently compiled/tested by me yet — happy to test a build if a build env is provided, or to verify a candidate commit on the hardware.
Feature request (separate)
For external-PA devices, honor a user-set option txpower / iw dev set txpower ceiling bounded by min(regulatory_max, 20 dBm), instead of always clamping to the ext-PA byte. 20 dBm is within design on this board (same die runs it on 2.4GHz). Values >20 dBm should be treated as advanced/risky and default off.
References (all verified live)
- https://github.com/openwrt/mt76/issues/531
- https://github.com/openwrt/mt76/issues/633
- https://github.com/openwrt/mt76/issues/657
- https://github.com/openwrt/mt76/issues/804
- https://github.com/openwrt/openwrt/issues/10385
- https://forum.openwrt.org/t/solved-openwrt-on-mt7621-mt7615n-devices-with-5ghz-problems/107392
Contributor guide
No contributing guide indexed for this repository
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 mt7615/eeprom.c and mt7615/init.c, especially mt7615_eeprom_get_target_power_index() and mt7615_init_txpower(), and compare the proposed changes with the surrounding EEPROM and rate-delta handling. Build and test on the DIR-853 A3 or equivalent external-PA MT7615 hardware. Done means 5GHz is no longer limited to the external-PA byte and the requested txpower ceiling behavior is addressed and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100