I have an AWUS036NHA (AR9271 based, ath9k-htc driver). The EEPROM seems to have been set with the region set to GB which is limiting me to 20dBm txpower. The adapter supports up to 27dBm, which is also legal in my country.
I've compiled the latest trunk with ATH_USER_REGD=y, however it doesn't seem to have had any effect. The GB regulations still seem to apply.
Output from iw reg get:
root@openwrt:~# iw reg get
country NZ:
(2402 - 2482 @ 40), (N/A, 30)
(5170 - 5250 @ 20), (3, 23)
(5250 - 5330 @ 20), (3, 23), DFS
(5735 - 5835 @ 20), (3, 30)
root@openwrt:~#
Trying to change the txpower:
root@openwrt:~# iwconfig wlan1 txpower 21
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device wlan1 ; Invalid argument.
root@openwrt:~# iwconfig wlan1 txpower 20
root@openwrt:~#
Output from dmesg:
[ 33.600000] usbcore: registered new interface driver ath9k_htc
[ 33.630000] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[ 33.980000] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
[ 34.220000] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
[ 34.430000] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
[ 34.440000] ath: EEPROM regdomain: 0x833a
[ 34.440000] ath: EEPROM indicates we should expect a country code
[ 34.440000] ath: doing EEPROM country->regdmn map search
[ 34.440000] ath: country maps to regdmn code: 0x37
[ 34.440000] ath: Country alpha2 being used: GB
[ 34.440000] ath: Regpair used: 0x37
[ 34.440000] ieee80211 phy1: Atheros AR9271 Rev:1
[ 34.450000] cfg80211: Calling CRDA for country: GB
[ 34.450000] cfg80211: Current regulatory domain intersected:
[ 34.460000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 34.470000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.470000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 1700 mBm)
[ 34.480000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.490000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.500000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 34.510000] Registered led device: ath9k_htc-phy1
... other stuff ...
[ 45.050000] cfg80211: Calling CRDA for country: NZ
[ 45.050000] cfg80211: Regulatory domain changed to country: NZ
[ 45.060000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 45.070000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[ 45.070000] cfg80211: (5170000 KHz - 5250000 KHz @ 20000 KHz), (300 mBi, 2300 mBm)
[ 45.080000] cfg80211: (5250000 KHz - 5330000 KHz @ 20000 KHz), (300 mBi, 2300 mBm)
[ 45.090000] cfg80211: (5735000 KHz - 5835000 KHz @ 20000 KHz), (300 mBi, 3000 mBm)
Does anyone have any suggestions? Why isn't ATH_USER_REGD letting me change the txpower?