Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
openwrt-bot opened this issue Jan 23, 2018 · 6 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jan 23, 2018

None:

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
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.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 23, 2018

None:

Tested today with a TP-Link CPE210 v1 and a build of the LEDE master from 2018-01-23.

Still broken.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 24, 2018

None:

Please change reported version to all!

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 16, 2019

CodeFetch:

This has likely been fixed in

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 17, 2019

None:

This has been fixed in master and openwrt-18.06, but not in lede-17.01.
lede-17.01 still uses illegal tx power on a vast number of devices.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 18, 2019

rotanid:

maybe, but lede-17.01 probably wont get a another release, so this bug is fixed if vincent is right

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 19, 2019

CodeFetch:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant