[FS#1289] TX-Power too high as it does not read antenna gain from drivers

LEDE Bugs lede-bugs at lists.infradead.org
Tue Jan 23 03:44:36 PST 2018


A new Flyspray task has been opened.  Details are below. 

User who did this - Adrian Schmutzler (adridolf) 

Attached to Project - OpenWrt/LEDE Project
Summary - TX-Power too high as it does not read antenna gain from drivers
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - High
Priority - Very Low
Reported Version - lede-17.01
Due in Version - Undecided
Due Date - Undecided
Details - Since commit a9728799bc41e68de4d50995bb4ad689784ef55e (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
TP-Link CPE210

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.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=1289



More information about the lede-bugs mailing list