* [ath9k-devel] Atheros 5008 and changing CRDA
@ 2010-09-09 7:21 cwr at netcom.co.uk
2010-09-09 13:30 ` Luis R. Rodriguez
2010-09-09 14:07 ` Alexander Simon
0 siblings, 2 replies; 5+ messages in thread
From: cwr at netcom.co.uk @ 2010-09-09 7:21 UTC (permalink / raw)
To: ath9k-devel
I've been trying to get an Atheros card to accept the GB regulatory domain;
this is on a 2.6.34 kernel, with the latest crda and regulatory database.
I'm using the card in Master mode via hostapd, and it works, that is, I can
connect to it from another 802.11g machine. As far as setting up the
regulatory domain is concerned, I get the following results:
lspci gives me:
01:0e.0 Network controller: Atheros Communications Inc. AR5008
Wireless Network Adapter (rev 01)
In dmesg, I get:
...
cfg80211: Calling CRDA to update world regulatory domain
...
ath: EEPROM regdomain: 0x809c
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x52
ath: Country alpha2 being used: CN
ath: Regpair used: 0x52
phy0: Selected rate control algorithm 'ath9k_rate_control'
cfg80211: Calling CRDA for country: CN
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR5416 MAC/BB Rev:2 AR2122 RF Rev:81: mem=0xf8060000, irq=17
...
where CN is apparently China.
Running "iw reg get" then gives:
country 00:
(2402 - 2472 @ 40), (6, 20)
(2457 - 2482 @ 20), (6, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (6, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
ie. probably not China. Where was that changed?
Running "iw reg set GB" then gives nothing, ie. no error message, after
which the results for "iw reg get" are unchanged, the same as those above.
Can the 00 domain be changed to GB, or is it some sort of default?
Running "iwlist channel" gives:
wlan0 11 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Frequency=2.457 GHz (Channel 10)
mon.wlan0 11 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Current Frequency=2.457 GHz (Channel 10)
I can't tell which regulatory domain I'm in, or indeed why. or if it's
possible to change the regulatory domain at all on this card. 00 seems
to be some sort of world domain; does it now include GB?
Thanks for any help - Will
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] Atheros 5008 and changing CRDA
2010-09-09 7:21 [ath9k-devel] Atheros 5008 and changing CRDA cwr at netcom.co.uk
@ 2010-09-09 13:30 ` Luis R. Rodriguez
2010-09-09 14:07 ` Alexander Simon
1 sibling, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-09-09 13:30 UTC (permalink / raw)
To: ath9k-devel
On Thu, Sep 9, 2010 at 12:21 AM, <cwr@netcom.co.uk> wrote:
>
> I've been trying to get an Atheros card to accept the GB regulatory domain;
> this is on a 2.6.34 kernel, with the latest crda and regulatory database.
> I'm using the card in Master mode via hostapd, and it works, that is, I can
> connect to it from another 802.11g machine. ?As far as setting up the
> regulatory domain is concerned, I get the following results:
>
> lspci gives me:
> 01:0e.0 Network controller: Atheros Communications Inc. AR5008
> Wireless Network Adapter (rev 01)
>
> In dmesg, I get:
> ...
> cfg80211: Calling CRDA to update world regulatory domain
> ...
> ath: EEPROM regdomain: 0x809c
> ath: EEPROM indicates we should expect a country code
> ath: doing EEPROM country->regdmn map search
> ath: country maps to regdmn code: 0x52
> ath: Country alpha2 being used: CN
> ath: Regpair used: 0x52
> phy0: Selected rate control algorithm 'ath9k_rate_control'
> cfg80211: Calling CRDA for country: CN
Notice CRDA gets called through udev here, but yet there is no message
you pasted which indicates CRDA sent a message back to the kernel. Are
you sure you have CRDA installed?
Luis
> Registered led device: ath9k-phy0::radio
> Registered led device: ath9k-phy0::assoc
> Registered led device: ath9k-phy0::tx
> Registered led device: ath9k-phy0::rx
> phy0: Atheros AR5416 MAC/BB Rev:2 AR2122 RF Rev:81: mem=0xf8060000, irq=17
> ...
>
> where CN is apparently China.
>
> Running "iw reg get" then gives:
> country 00:
> ? ? ? ?(2402 - 2472 @ 40), (6, 20)
> ? ? ? ?(2457 - 2482 @ 20), (6, 20), PASSIVE-SCAN, NO-IBSS
> ? ? ? ?(2474 - 2494 @ 20), (6, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
> ? ? ? ?(5170 - 5250 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
> ? ? ? ?(5735 - 5835 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
>
> ie. probably not China. Where was that changed?
>
> Running "iw reg set GB" then gives nothing, ie. no error message, after
> which the results for "iw reg get" are unchanged, the same as those above.
> Can the 00 domain be changed to GB, or is it some sort of default?
>
> Running "iwlist channel" gives:
Please avoid using wireless-extensions at all costs these days.
Instead use iw, and for this case 'iw list'.
http://wireless.kernel.org/en/users/Documentation/iw
> wlan0 ? ? 11 channels in total; available frequencies :
> ? ? ? ? ? Channel 01 : 2.412 GHz
> ? ? ? ? ? Channel 02 : 2.417 GHz
> ? ? ? ? ? Channel 03 : 2.422 GHz
> ? ? ? ? ? Channel 04 : 2.427 GHz
> ? ? ? ? ? Channel 05 : 2.432 GHz
> ? ? ? ? ? Channel 06 : 2.437 GHz
> ? ? ? ? ? Channel 07 : 2.442 GHz
> ? ? ? ? ? Channel 08 : 2.447 GHz
> ? ? ? ? ? Channel 09 : 2.452 GHz
> ? ? ? ? ? Channel 10 : 2.457 GHz
> ? ? ? ? ? Channel 11 : 2.462 GHz
> ? ? ? ? ? Current Frequency=2.457 GHz (Channel 10)
>
> mon.wlan0 ?11 channels in total; available frequencies :
> ? ? ? ? ? Channel 01 : 2.412 GHz
> ? ? ? ? ? Channel 02 : 2.417 GHz
> ? ? ? ? ? Channel 03 : 2.422 GHz
> ? ? ? ? ? Channel 04 : 2.427 GHz
> ? ? ? ? ? Channel 05 : 2.432 GHz
> ? ? ? ? ? Channel 06 : 2.437 GHz
> ? ? ? ? ? Channel 07 : 2.442 GHz
> ? ? ? ? ? Channel 08 : 2.447 GHz
> ? ? ? ? ? Channel 09 : 2.452 GHz
> ? ? ? ? ? Channel 10 : 2.457 GHz
> ? ? ? ? ? Channel 11 : 2.462 GHz
> ? ? ? ? ? Current Frequency=2.457 GHz (Channel 10)
You see this output has nothing on the flags of each channel, this is
useful when debugging.
> I can't tell which regulatory domain I'm in, or indeed why.
You are in a world regulatory domain by default in the absense of CRDA
unless you built the regulatory database as part of the kernel as well
(CONFIG_CFG80211_INTERNAL_REGDB), but if you do that you still will
need updates unless you just want to upgrade your kernel every time
there is a regulatory update. For details on Atheros' driver's
preferences on regulatory initialization pleased read:
http://wireless.kernel.org/en/users/Drivers/ath#Regulatory
> or if it's
> possible to change the regulatory domain at all on this card.
Due to current regulatory rules which have been clarified in certain
contries (US, JP) we cannot allow simply changing the country by a
user to whatever they wish. For details see:
http://wireless.kernel.org/en/developers/Regulatory/CRDA#Helping_compliance_by_allowing_to_change_regulatory_domains
We can however help compliance by letting us apply the interesection
of your program's card's regulatory domain and what the user sets and
that is what we support, so we can restrict the card further, but not
give it new channels. This is until legislation changes.
>?00 seems
> to be some sort of world domain; does it now include GB?
The world regulatory domain is the intersection of all regulatory
domains. It is computed mathematically.
Luis
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] Atheros 5008 and changing CRDA
2010-09-09 7:21 [ath9k-devel] Atheros 5008 and changing CRDA cwr at netcom.co.uk
2010-09-09 13:30 ` Luis R. Rodriguez
@ 2010-09-09 14:07 ` Alexander Simon
1 sibling, 0 replies; 5+ messages in thread
From: Alexander Simon @ 2010-09-09 14:07 UTC (permalink / raw)
To: ath9k-devel
Hi Will,
usually when the domain is being changed, the kernel should request the
settings from the userspace tool "crda" via a udev call.
If
iw reg set GB; sleep .1; COUNTRY=GB crda
works for you, the kernel could not call crda itself, most probably because
the udev entry is missing.
Make sure you have the udev entry according to
http://linuxwireless.org/en/developers/Regulatory/CRDA
Chapter "Letting the kernel call CRDA"
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] Atheros 5008 and changing CRDA
@ 2010-09-13 7:22 cwr at netcom.co.uk
2010-09-13 17:53 ` Luis R. Rodriguez
0 siblings, 1 reply; 5+ messages in thread
From: cwr at netcom.co.uk @ 2010-09-13 7:22 UTC (permalink / raw)
To: ath9k-devel
Luis, thank you very much for the information; it made things much, much
clearer.
"iw reg get" still gives:
country 00:
(2402 - 2472 @ 40), (6, 20)
(2457 - 2482 @ 20), (6, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (6, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
and the "iw list" output is:
Wiphy phy0
Band 1:
HT capabilities: 0x104e
* 20/40 MHz operation
* SM PS disabled
* 40 MHz short GI
* max A-MSDU len 3839
* DSSS/CCK 40 MHz
HT A-MPDU factor: 0x0003 (65535 bytes)
HT A-MPDU density: 0x0006 (8 usec)
HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00
HT TX/RX MCS rate indexes supported:
MCS index 0
MCS index 1
MCS index 2
MCS index 3
MCS index 4
MCS index 5
MCS index 6
MCS index 7
MCS index 8
MCS index 9
MCS index 10
MCS index 11
MCS index 12
MCS index 13
MCS index 14
MCS index 15
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
Fragmentation threshold: 2346
RTS threshold: 2347
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
"iw reg set GB" still gives no error message, but the result of Alexander's
"iw reg set GB ; sleep 1 ; COUNTRY=GB crda" is:
Failed to set regulatory domain: -22
It looked to me like some sort of udev problem, so I started by checking that.
The output of "udevadm trigger --verbose" included the string:
/sys/devices/platform/regulatory.0
which seemed to imply that the kernel had some regulatory knowledge,
and the 85-regulatory.rules file has the standard contents (on one line):
KERNEL=="regulatory*", ACTION=="change",
SUBSYSTEM=="platform", RUN+="/sbin/crda"
and "udevadm info --export-db" gives:
P: /devices/platform/regulatory.0
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/regulatory.0
E: MODALIAS=platform:regulatory
E: SUBSYSTEM=platform
I built a kernel with every sort of CFG80211 config set, _apart_ from
CFG80211_INTERNAL_REGDB, since I wanted to use the external CRDA.
I then cranked up udev's message level, and pulled the following lines
out of the message log (they aren't consecutive):
Sep 10 19:17:22 farthing kernel: cfg80211:
Calling CRDA to update world regulatory domain
Sep 10 19:17:25 farthing udevadm[7159]:
device 0x80861b0 has devpath '/devices/platform/regulatory.0'
Sep 10 19:17:28 farthing udevd[3029]:
reading '/lib/udev/rules.d/85-regulatory.rules' as rules file
So far so good, but running crda then showed no apparent reaction from
udev. The only related udev entries in the messages file came early
in the boot process:
Sep 10 20:22:40 farthing udevd-work[7938]:
'/sbin/modprobe -b platform:regulatory' started
Sep 10 20:22:40 farthing udevd-work[7938]:
'/sbin/modprobe' (stderr) 'FATAL: Module platform:regulatory not found.'
Sep 10 20:22:40 farthing udevd-work[7938]:
'/sbin/modprobe -b platform:regulatory' returned with exitcode 1
FWIW, running "iw event -t" in a terminal also showed nothing, as did
"udevadm monitor --kernel"
Checking the file /sys/devices/platform/regulatory.0/modalias shows that it
contains only the string "platform:regulatory", which is probably not a
coincidence. However, udev doesn't seem to recognise this module alias.
Somehow I've messed up the kernel or udev setup. Do you know how I can
trigger udev correctly, or how I can re-configure the /sys filesystem?
Thanks again for your help - Will
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] Atheros 5008 and changing CRDA
2010-09-13 7:22 cwr at netcom.co.uk
@ 2010-09-13 17:53 ` Luis R. Rodriguez
0 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2010-09-13 17:53 UTC (permalink / raw)
To: ath9k-devel
On Mon, Sep 13, 2010 at 12:22:58AM -0700, cwr at netcom.co.uk wrote:
> Luis, thank you very much for the information; it made things much, much
> clearer.
>
> "iw reg get" still gives:
> country 00:
> (2402 - 2472 @ 40), (6, 20)
> (2457 - 2482 @ 20), (6, 20), PASSIVE-SCAN, NO-IBSS
> (2474 - 2494 @ 20), (6, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
> (5170 - 5250 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
> (5735 - 5835 @ 40), (6, 20), PASSIVE-SCAN, NO-IBSS
>
> and the "iw list" output is:
>
> Wiphy phy0
> Band 1:
> HT capabilities: 0x104e
> * 20/40 MHz operation
> * SM PS disabled
> * 40 MHz short GI
> * max A-MSDU len 3839
> * DSSS/CCK 40 MHz
> HT A-MPDU factor: 0x0003 (65535 bytes)
> HT A-MPDU density: 0x0006 (8 usec)
> HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00
> HT TX/RX MCS rate indexes supported:
> MCS index 0
> MCS index 1
> MCS index 2
> MCS index 3
> MCS index 4
> MCS index 5
> MCS index 6
> MCS index 7
> MCS index 8
> MCS index 9
> MCS index 10
> MCS index 11
> MCS index 12
> MCS index 13
> MCS index 14
> MCS index 15
> 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
> Fragmentation threshold: 2346
> RTS threshold: 2347
> Supported interface modes:
> * IBSS
> * managed
> * AP
> * AP/VLAN
> * monitor
> * mesh point
>
> "iw reg set GB" still gives no error message, but the result of Alexander's
> "iw reg set GB ; sleep 1 ; COUNTRY=GB crda" is:
> Failed to set regulatory domain: -22
>
> It looked to me like some sort of udev problem, so I started by checking that.
> The output of "udevadm trigger --verbose" included the string:
> /sys/devices/platform/regulatory.0
> which seemed to imply that the kernel had some regulatory knowledge,
> and the 85-regulatory.rules file has the standard contents (on one line):
> KERNEL=="regulatory*", ACTION=="change",
> SUBSYSTEM=="platform", RUN+="/sbin/crda"
> and "udevadm info --export-db" gives:
> P: /devices/platform/regulatory.0
> E: UDEV_LOG=3
> E: DEVPATH=/devices/platform/regulatory.0
> E: MODALIAS=platform:regulatory
> E: SUBSYSTEM=platform
>
> I built a kernel with every sort of CFG80211 config set, _apart_ from
> CFG80211_INTERNAL_REGDB, since I wanted to use the external CRDA.
> I then cranked up udev's message level, and pulled the following lines
> out of the message log (they aren't consecutive):
> Sep 10 19:17:22 farthing kernel: cfg80211:
> Calling CRDA to update world regulatory domain
> Sep 10 19:17:25 farthing udevadm[7159]:
> device 0x80861b0 has devpath '/devices/platform/regulatory.0'
> Sep 10 19:17:28 farthing udevd[3029]:
> reading '/lib/udev/rules.d/85-regulatory.rules' as rules file
>
> So far so good, but running crda then showed no apparent reaction from
> udev. The only related udev entries in the messages file came early
> in the boot process:
> Sep 10 20:22:40 farthing udevd-work[7938]:
> '/sbin/modprobe -b platform:regulatory' started
> Sep 10 20:22:40 farthing udevd-work[7938]:
> '/sbin/modprobe' (stderr) 'FATAL: Module platform:regulatory not found.'
> Sep 10 20:22:40 farthing udevd-work[7938]:
> '/sbin/modprobe -b platform:regulatory' returned with exitcode 1
modprobe? WTF
>
> FWIW, running "iw event -t" in a terminal also showed nothing, as did
> "udevadm monitor --kernel"
>
> Checking the file /sys/devices/platform/regulatory.0/modalias shows that it
> contains only the string "platform:regulatory", which is probably not a
> coincidence. However, udev doesn't seem to recognise this module alias.
>
> Somehow I've messed up the kernel or udev setup. Do you know how I can
> trigger udev correctly, or how I can re-configure the /sys filesystem?
>
> Thanks again for your help - Will
Your udev scripts seem off...
mcgrof at tux ~ $ dpkg -L wireless-crda
/.
/sbin
/sbin/crda
/sbin/regdbdump
/lib
/lib/udev
/lib/udev/rules.d
/lib/udev/rules.d/85-regulatory.rules
/usr
/usr/share
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/crda.8.gz
/usr/share/man/man8/regdbdump.8.gz
/usr/share/doc
/usr/share/doc/wireless-crda
/usr/share/doc/wireless-crda/README
/usr/share/doc/wireless-crda/LICENSE
/usr/share/doc/wireless-crda/copyright
/usr/share/doc/wireless-crda/changelog.gz
/usr/lib
/usr/lib/crda
/usr/lib/crda/regulatory.bin
mcgrof at tux ~ $ cat /lib/udev/rules.d/85-regulatory.rules
# Runs CRDA for kernel wireless regulatory events.
# For more information see:
# http://wireless.kernel.org/en/developers/Regulatory/CRDA
KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"
LUis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-13 17:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 7:21 [ath9k-devel] Atheros 5008 and changing CRDA cwr at netcom.co.uk
2010-09-09 13:30 ` Luis R. Rodriguez
2010-09-09 14:07 ` Alexander Simon
-- strict thread matches above, loose matches on Subject: below --
2010-09-13 7:22 cwr at netcom.co.uk
2010-09-13 17:53 ` Luis R. Rodriguez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.