Skip to contentSkip to conversation

Atheros 5008 and changing CRDA

ath9k-devel cwr at netcom.co.uk 3 participants 3 messages Sep 9, 2010

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 11 lines · On Thu, Sep 9, 2010 at 12:21 AM, <[email protected]> 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)

Quoted 12 lines

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

Quoted 17 lines

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

Quoted 7 lines

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

Quoted 14 lines

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)

Quoted 13 lines

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.

Quoted 1 line

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

Quoted 2 lines

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.

Quoted 2 lines

?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

#2 lore raw
In reply to cwr at netcom.co.uk

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