Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ath9k] how to change country code via crda?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Bialy
Guru
Guru


Joined: 20 Mar 2006
Posts: 486

PostPosted: Thu May 16, 2013 2:03 pm    Post subject: [ath9k] how to change country code via crda? Reply with quote

I using Atheros AR9280 card (in AP mode):
Code:
ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xffffc90010ea0000, irq=16
 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)
With kernel driver:
Code:
linux-3.8.6-hardened

 CONFIG_WLAN=y
 CONFIG_ATH9K_HW=y
 CONFIG_ATH9K_COMMON=y
 # CONFIG_ATH9K_BTCOEX_SUPPORT is not set
 CONFIG_ATH9K=y
 CONFIG_ATH9K_PCI=y
 CONFIG_ATH9K_AHB=y
 # CONFIG_ATH9K_DEBUGFS is not set
 CONFIG_ATH9K_RATE_CONTROL=y
 # CONFIG_ATH9K_HTC is not set

 CONFIG_FIB_RULES=y
 CONFIG_WIRELESS=y
 CONFIG_WEXT_CORE=y
 CONFIG_WEXT_PROC=y
 CONFIG_CFG80211=y
 # CONFIG_NL80211_TESTMODE is not set
 # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
 # CONFIG_CFG80211_REG_DEBUG is not set
 CONFIG_CFG80211_DEFAULT_PS=y
 # CONFIG_CFG80211_DEBUGFS is not set
 # CONFIG_CFG80211_INTERNAL_REGDB is not set
 CONFIG_CFG80211_WEXT=y
 # CONFIG_LIB80211 is not set
 CONFIG_MAC80211=y
 CONFIG_MAC80211_HAS_RC=y
 CONFIG_MAC80211_RC_MINSTREL=y
 CONFIG_MAC80211_RC_MINSTREL_HT=y
 CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
 CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
 # CONFIG_MAC80211_MESH is not set
 CONFIG_MAC80211_LEDS=y


And I can't change country code:
Code:
country 00:
        (2402 - 2472 @ 40), (6, 20)
        (2457 - 2482 @ 40), (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
        (57240 - 63720 @ 2160), (N/A, 0)
I have installed all requirements:
Code:
net-wireless/crda-1.1.2-r3
net-wireless/wireless-regdb-20130213

virtual/libc-0
dev-libs/libnl-3.2.14:3  USE="-doc -static-libs -utils"
sys-fs/udev-200  USE="acl firmware-loader kmod openrc -doc -gudev -hwdb -introspection -keymap (-selinux) -static-libs"
regulatory.bin file

regulatory.bin have entry about PL:
Code:
country PL:
<------>(2402.000 - 2482.000 @ 40.000), (N/A, 20.00)
<------>(5170.000 - 5250.000 @ 40.000), (N/A, 20.00)
<------>(5250.000 - 5330.000 @ 40.000), (N/A, 20.00), DFS
<------>(5490.000 - 5710.000 @ 40.000), (N/A, 27.00), DFS
<------>(57240.000 - 65880.000 @ 2160.000), (N/A, 40.00), NO-OUTDOOR
When I trying change country code via crda, I got:
Code:
COUNTRY="PL" crda
Failed to set regulatory domain: -7
Using "iw reg set PL" I don't get any error (country code doesn't change).
Driver also have information about PL:
Code:
cat /usr/src/linux/drivers/net/wireless/ath/regd.h | grep 616
        CTRY_POLAND = 616,


I thing this is error between crda <--> udev, because monitoring don't give me any messages:
Code:
udevadm monitor --environment kernel
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 992

PostPosted: Thu May 16, 2013 4:05 pm    Post subject: Reply with quote

Hello,

here it works fine when wpa_supplicant sets the country. In wpa_supplicant.conf I got:

Code:
country=DE
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Thu May 16, 2013 4:19 pm    Post subject: Reply with quote

[too much coffee rant] Now if you for any reason get a hosed udev networking quits working.
The regulatory compliance stuff is unneeded nanny cruft that broke ath9k.[/end too much coffee rant]

I never got ath9k to work correctly with mismatched wireless gear after the crda thing came out.
Roll back to pre regulatory 2.35 kernels with old live usb and it works fine.


I had a old post here that might be of help.
I ended up patching the kernel commenting out all the regulatory domain stuff.
See this discussion here:
http://www.mail-archive.com/ath9k-devel@lists.ath9k.org/msg08880.html
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Bialy
Guru
Guru


Joined: 20 Mar 2006
Posts: 486

PostPosted: Thu May 16, 2013 5:32 pm    Post subject: Reply with quote

micmac wrote:
Hello,

here it works fine when wpa_supplicant sets the country. In wpa_supplicant.conf I got:

Code:
country=DE
wpa_supplicant and AP mode?
Never heard. I using hostapd to create AP.
Code:
cat /etc/hostapd/hostapd.conf | grep PL
country_code=PL


turtles wrote:
[too much coffee rant] Now if you for any reason get a hosed udev networking quits working.
The regulatory compliance stuff is unneeded nanny cruft that broke ath9k.[/end too much coffee rant]
This is fault ath9k or crda?

turtles wrote:
I never got ath9k to work correctly with mismatched wireless gear after the crda thing came out.
Roll back to pre regulatory 2.35 kernels with old live usb and it works fine.
Eeee... NO! :wink:

turtles wrote:
I had a old post here that might be of help.
I ended up patching the kernel commenting out all the regulatory domain stuff.
See this discussion here:
http://www.mail-archive.com/ath9k-devel@lists.ath9k.org/msg08880.html
I saw manually way, but it is so dirty! :evil:
I thought that exist some better way...
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Thu May 16, 2013 11:54 pm    Post subject: Reply with quote

Bialy wrote:

turtles wrote:
[too much coffee rant] Now if you for any reason get a hosed udev networking quits working.
The regulatory compliance stuff is unneeded nanny cruft that broke ath9k.[/end too much coffee rant]
This is fault ath9k or crda?

cdra I believe.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum