OpenWrt Forum Archive

Topic: WLAN TXpower settings on Atheros AR9100 | Regulatory domain

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Used hardware TL-Link TL-WR1034ND, (WLAN: Atheros AR9100) - ath9k.

I notised that in one of the previous build that I used, has the possibility to set a txpower of the wireless device up to 27dBm (as listed in the regulatroy domain of the hardcoded US reg)

ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a2 mem=0xb80c0000, irq=2
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)

Here is a log from my previous Backfire r24198

root@OpenWrt:~# iwconfig wlan0
wlan0     IEEE 802.11bgn  Mode:Master  Frequency:2.412 GHz  Tx-Power=20 dBm
          RTS thr:off   Fragment thr:off
          Power Management:on

root@OpenWrt:~# iw dev wlan0 set txpower fixed 2700
root@OpenWrt:~# iwconfig wlan0
wlan0     IEEE 802.11bgn  Mode:Master  Frequency:2.412 GHz  Tx-Power=27 dBm
          RTS thr:off   Fragment thr:off
          Power Management:on

root@OpenWrt:~# iwconfig wlan0
wlan0     IEEE 802.11bgn  Mode:Master  Frequency:2.412 GHz  Tx-Power=27 dBm
          RTS thr:off   Fragment thr:off
          Power Management:on

root@OpenWrt:~# iw dev wlan0 set txpower fixed 2800
command failed: Invalid argument (-22)

Here is the situation now (r29275), but this is also observed since earlier released (at least since r27794)

root@Core-Sf:~# iwlist wlan0 txpower
wlan0     unknown transmit-power information.

          Current Tx-Power=21 dBm      (125 mW)

root@Core-Sf:~# iw dev wlan0 set txpower fixed 2700
root@Core-Sf:~# iwlist wlan0 txpower
wlan0     unknown transmit-power information.

          Current Tx-Power=23 dBm      (199 mW)

root@Core-Sf:~# iw dev wlan0 set txpower fixed 2500
root@Core-Sf:~# iwlist wlan0 txpower
wlan0     unknown transmit-power information.

          Current Tx-Power=23 dBm      (199 mW)

root@Core-Sf:~# iw dev wlan0 set txpower auto      
root@Core-Sf:~# iwlist wlan0 txpower
wlan0     unknown transmit-power information.

          Current Tx-Power=23 dBm      (199 mW)

23 dBm seems to be the upper limit of the tx power that could be currently set.
Has someone else faced this issue?
Probably the regulatory domain patch will let us tweak the txpower option above this value?
https://dev.openwrt.org/browser/trunk/p … onal.patch

Here cames another question. Will this patch let us use (user specified) all of the 14 channels (t.e JP reg domain) and set an appropriate value for the txpower as well, or we should use the regulatory.bin method?


Thanks in advance.

(Last edited by dir2cas on 31 Dec 2011, 14:42)

Actually I tried.
Previously the 27dbm is an error.
The limit is actually 24dbm in Wireless N Mode Fat Channel, the country needs to be US or CA.

As I mentioned this could be tweaked via reconfigured regulatory.bin. However since the athk9 patch included in OpenWrt's source tree enables user defined options/settings of the regulatory domain, I wondered if it will be possible to set values above 23dBm after applying this.
I am currently going to build such image and test this. Simply need more oppinions..... wink

AFAIK the old builds didn't report the correct Tx power with ath9k. You could set it all the way to regulatory limit, but the real Tx power didn't go above the hardware limit programmed in EEPROM. In your case 23 dBm is the hardware limit (it can be channel dependent, though), and you cannot go above it.

You can confirm this by monitoring the signal level with the old build, and noticing that the level doesn't change anymore when going above 23 dBm.

The discussion might have continued from here.