I have encountered the following problem of not being able to set
regulatory settings according to country domain with the following routers:
- d-link dir 601a
- tp-link tl-wr740n
- tp-link tl wr-741nd
- tp-link tl wr-841nd
Even tho with : "country option (domain)" set on /etc/config/wireless
the router does not keep it in effect.
When the router boots the first country domain that is set by crda is US
which i believe it is set from eeprom (built in instructions).
Right after that it reads /etc/config/wireless and sets changes it to
the specified domain but it does not work as it should.
This is what happens.
If i set to US or leave it as default without specifying anything in
/etc/config/wireless the router stays at 16 dbm and iwinfo wlan0
txpowerlist displays capabilities up to 27dbm.
If i change the country domain to any European domain where 20dbm is
allowed by law and specify either manually or in /etc/config/wireless
"option txpower 20" the availability list that goes up to 27dbm will
only show a maximum of 20dbm available but sets the txpower at 15dbm only.
If i play with txpower settings by changing country domains i am able to
set txpower at 20dbm but after reboot; it default for 15 dbm.
I tested this with the latest backfire build, attitude adjustment build
and my own AA builds.
I also at some point tried to use the kernel option that forces atheros
driver to respect user's regdomain specifications but it did not work.
(with attitude adjustment)
In fact it reduced the dbm list available values to a max of 15 dbm
I also have a dir 615 E3 that uses the same firmware as the dir 601a and
it works at 20dbm as well as it gets blocked at 15 if i compile atheros
driver to respect user's regdomain option.
It was also noticed that the package CRDA was not installed and was then
manually (opkg) installed but also did not help.
Seems that in 2010 bugzilla.kernel.org reported a bug regarding txpower
being broken (bug 14642) is it back ?
Is the hardware incapable of higher values or are we having a software
issue ?
~# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Attitude Adjustment"
DISTRIB_REVISION="r35153"
DISTRIB_CODENAME="attitude_adjustment"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09-rc1"
wlan0 ESSID: "wireless-net"
Access Point: 1A:7E:E5:36:B1:24
Mode: Master Channel: 11 (2.462 GHz)
Tx-Power: 15 dBm Link Quality: 0/70
Signal: unknown Noise: -93 dBm
Bit Rate: unknown
Encryption: none
Type: nl80211 HW Mode(s): 802.11bgn
Hardware: 168C:002B 168C:A091 [Atheros AR9285]
TX power offset: none
Frequency offset: none
Supports VAPs: yes
~# iw phy0 info
Wiphy phy0
Band 1:
Capabilities: 0x11ce
HT20/HT40
SM Power Save disabled
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-7
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
* CMAC (00-0f-ac:6)
Available Antennas: TX 0x1 RX 0x1
Configured Antennas: TX 0x1 RX 0x1
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
* P2P-client
* P2P-GO
software interface modes (can always be added):
* AP/VLAN
* monitor
valid interface combinations:
* #{ managed, WDS, P2P-client } <= 2048, #{ IBSS, AP,
mesh point, P2P-GO } <= 8,
total <= 2048, #channels <= 1
Supported commands:
* new_interface
* set_interface
* new_key
* start_ap
* new_station
* new_mpath
* set_mesh_config
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* frame
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* tdls_mgmt
* tdls_oper
* probe_client
* set_noack_map
* register_beacons
* Unknown command (89)
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80
0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70
0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80
0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70
0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70
0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70
0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80
0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* (null): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80
0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* IBSS: 0xb0 0xc0 0xd0
* managed: 0x40 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* mesh point: 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* (null): 0x40 0xd0
Device supports RSN-IBSS.
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
Device supports TX status socket option.
Device supports HT-IBSS.
~# iwinfo wlan0 txpower
0 dBm ( 1 mW)
1 dBm ( 1 mW)
2 dBm ( 1 mW)
3 dBm ( 1 mW)
4 dBm ( 2 mW)
5 dBm ( 3 mW)
6 dBm ( 3 mW)
7 dBm ( 5 mW)
8 dBm ( 6 mW)
9 dBm ( 7 mW)
10 dBm ( 10 mW)
11 dBm ( 12 mW)
12 dBm ( 15 mW)
13 dBm ( 19 mW)
14 dBm ( 25 mW)
* 15 dBm ( 31 mW)
16 dBm ( 39 mW)
17 dBm ( 50 mW)
18 dBm ( 63 mW)
19 dBm ( 79 mW)
20 dBm ( 100 mW)
config wifi-device radio0
option type mac80211
option channel 11
option phy phy0
option hwmode 11ng
option country ES # PT, FR, etc
option noscan 1
option diversity 0
#option htmode HT20
option htmode HT40-
list ht_capab SHORT-GI-40
list ht_capab TX-STBC
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
option beacon_int 1000
option txpower 20
option disabled 0
#option distance 2000
# crda
COUNTRY environment variable not set.
# export COUNTRY=PT
Failed to set regulatory domain: -1
# export COUNTRY=UK
# crda
No country match in regulatory database.
I tried with a few other country domains and nothing changed.
[ 11.420000] cfg80211: Calling CRDA to update world regulatory domain
[ 11.430000] cfg80211: World regulatory domain updated:
[ 11.430000] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 11.440000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 11.450000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300
mBi, 2000 mBm)
[ 11.460000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300
mBi, 2000 mBm)
[ 11.470000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 11.470000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 12.070000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[ 12.080000] ath: EEPROM regdomain: 0x0
[ 12.080000] ath: EEPROM indicates default country code should be used
[ 12.080000] ath: doing EEPROM country->regdmn map search
[ 12.080000] ath: country maps to regdmn code: 0x3a
[ 12.080000] ath: Country alpha2 being used: US
[ 12.080000] ath: Regpair used: 0x3a
[ 12.090000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 12.090000] Registered led device: ath9k-phy0
[ 12.090000] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xb0000000, irq=40
[ 12.100000] cfg80211: Calling CRDA for country: US
[ 12.110000] cfg80211: Regulatory domain changed to country: US
[ 12.110000] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 12.120000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300
mBi, 2700 mBm)
[ 12.130000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300
mBi, 1700 mBm)
[ 12.140000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 12.140000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 12.150000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300
mBi, 2000 mBm)
[ 12.160000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300
mBi, 3000 mBm)
[ 12.450000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 12.590000] nf_conntrack version 0.5.0 (458 buckets, 1832 max)
[ 12.920000] batman_adv: B.A.T.M.A.N. advanced 2012.3.0 (compatibility
version 14) loaded
[ 18.210000] device eth0 entered promiscuous mode
[ 20.520000] eth1: link up (100Mbps/Full duplex)
[ 20.780000] cfg80211: Calling CRDA for country: PT
[ 20.780000] cfg80211: Regulatory domain changed to country: PT
[ 20.790000] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 20.800000] cfg80211: (2402000 KHz - 2482000 KHz @ 40000 KHz),
(N/A, 2000 mBm)
[ 20.800000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz),
(N/A, 2000 mBm)
[ 20.810000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz),
(N/A, 2000 mBm)
[ 20.820000] cfg80211: (5490000 KHz - 5710000 KHz @ 40000 KHz),
(N/A, 2700 mBm)
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel