Since commit a972879 (ath: do not apply broken power limits with ATH_USER_REGD) in the lede-17.01 branch, TX-power values are always set to 20 dB (Germany allowed maximum) without considering antenna gain from the driver. If values are set manually using uci, the manually set antenna gain is used and TX-power is adjusted (i.e. with antenna 4 dB we get 16 dB TX-power).
For evaluation of the antenna gain we used "iw info".
We did tests with a series of different LEDE versions on a TP-Link WR1043ND v2 and found that versions after the named commit always show 20 dB and versions before show "correct" values.
Since we do not fully understand what the commit does, we then just selectively reverted only this single patch on a recent LEDE build and found that values are set correctly.
From that points, we implemented the reverted patch in our LEDE-based Freifunk distribution and found the following:
On the following devices, reverting the commit causes the TX-Power to be "correct" again (tested by us, only tested ones shown):
TP-Link WR1043N(D) v2-v5
TP-Link WR841N(D) v8-v12
TP-Link WDR3600/4300 v1
On the following devices, no antenna gain is read from the driver, it looks like they have been "broken" ever since:
Ubiquiti Nanostation M2, Loco M2, Unifi
TP-Link WR1043 v1
Despite those ar71xx devices, we also found no antenna gain is read for the WDR4900 v1 with mpc85xx board after the commit. In this case, we did not validate whether values were correct before the change.
Note that for devices with high dB antennas, the causes devices to send with many times the allowed power, i.e.
CPE 210: 9 dB antenna => 800 mW instead of allowed 100 mW
Nano M2: 11 dB antenna => some 1.2 W instead of allowed 100 mW
Despite fixing the issue, it would be nice to know whether it is a good idea to revert this commit and include this workaround in our firmware.
The text was updated successfully, but these errors were encountered:
You can use this tool to read the values of the ART-partition of TP-Link routers.
There is the Tx Gain field that is being used by TP-Link to specify the antenna gain (although there is a separate Antenna gain field, which should have been used for this purpose). I don't understand yet why nbd's patch made a difference. I assume that one of the ath9k functions needs to be fixed. I'll investigate this and submit a patch when I've found the issue.
BTW I am happy about all ART-dumps that you can provide me together with the board version (printed on the PCB) and the version/region on the sticker.