* [gentoo-user] Unable to set wireless regulatory domain
@ 2011-05-05 17:40 John Nielsen
2011-05-05 22:08 ` Mick
2011-05-05 22:52 ` Paul Hartman
0 siblings, 2 replies; 9+ messages in thread
From: John Nielsen @ 2011-05-05 17:40 UTC (permalink / raw
To: gentoo-user
I am trying to set up a 5GHz wireless access point on an Alix 3d2 board with an AR9220 (ath9k "Merlin") PCI card. I have done so successfully using Fedora 14 on identical hardware but I would greatly prefer to use Gentoo so I can use a more recent kernel and customize things appropriately for the platform.
I have an up-to-date ~x86 Gentoo build working and I am able to run hostapd as a 2.4GHz access point, but trying to run it on a 5 GHz channel in "a" mode fails complaining it is unable to set the channel. After some poking around I realized that this was due to the regulatory domain not being set correctly--the default ("world"?) regdomain doesn't allow IBSS on any 5GHz channels.
I made sure I had crda emerged and tried several different kernel settings but none of them resulted in any different behavior. I even tried statically compiling the regdb ("CONFIG_CFG80211_INTERNAL_REGDB=y") but didn't see any difference. I can run "iw reg set US" all day long but whenever I run "iw reg get" it always comes back with "country 00" on the Gentoo system.
Since I'm a relative newbie to both Gentoo and custom Linux kernel building I wanted to make sure I wasn't just missing a setting or kernel config flag somewhere before I started looking for things like driver regressions. Can anyone suggest different things to try to fix the problem or at least pinpoint it better?
Below is some info from both the Gentoo system (regdomain not working) and the Fedora system (regdomain working). Let me know what additional information would be helpful. Thanks!
JN
### Gentoo ~x86 ###
# uname -a
Linux alix2 2.6.38-gentoo-r3 #7 Mon May 2 12:51:18 EDT 2011 i586 Geode(TM) Integrated Processor by AMD PCS AuthenticAMD GNU/Linux
# relevant dmesg output
[ 0.107215] cfg80211: Calling CRDA to update world regulatory domain
[ 2.228041] ath: EEPROM regdomain: 0x0
[ 2.228056] ath: EEPROM indicates default country code should be used
[ 2.228072] ath: doing EEPROM country->regdmn map search
[ 2.228093] ath: country maps to regdmn code: 0x3a
[ 2.228108] ath: Country alpha2 being used: US
[ 2.228122] ath: Regpair used: 0x3a
# iw reg set US
# iw reg get
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
# iw list
...
Frequencies:
* 5180 MHz [36] (18.0 dBm) (passive scanning, no IBSS)
* 5200 MHz [40] (18.0 dBm) (passive scanning, no IBSS)
* 5220 MHz [44] (18.0 dBm) (passive scanning, no IBSS)
* 5240 MHz [48] (18.0 dBm) (passive scanning, no IBSS)
...
# relevant packages
net-wireless/crda-1.1.1
net-wireless/iw-0.9.22
net-wireless/wireless-regdb-20101124
net-wireless/wireless-tools-30_pre9
sys-kernel/gentoo-sources-2.6.38-r3
### Fedora 14 ###
$ uname -a
Linux alix.jnielsen.net 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC 2010 i586 i586 i386 GNU/Linux
# relevant dmesg output
[ 13.191924] cfg80211: Calling CRDA to update world regulatory domain
[ 13.433288] cfg80211: World regulatory domain updated:
[ 17.134923] ath: EEPROM regdomain: 0x0
[ 17.134943] ath: EEPROM indicates default country code should be used
[ 17.134961] ath: doing EEPROM country->regdmn map search
[ 17.134984] ath: country maps to regdmn code: 0x3a
[ 17.135001] ath: Country alpha2 being used: US
[ 17.135018] ath: Regpair used: 0x3a
[ 17.248674] cfg80211: Calling CRDA for country: US
[ 18.848206] cfg80211: Regulatory domain changed to country: US
$ iw reg get
country US:
(2402 - 2472 @ 40), (3, 27)
(5170 - 5250 @ 40), (3, 17)
(5250 - 5330 @ 40), (3, 20), DFS
(5490 - 5600 @ 40), (3, 20), DFS
(5650 - 5710 @ 40), (3, 20), DFS
(5735 - 5835 @ 40), (3, 30)
$ iw list
...
Frequencies:
* 5180 MHz [36] (17.0 dBm)
* 5200 MHz [40] (17.0 dBm)
* 5220 MHz [44] (17.0 dBm)
* 5240 MHz [48] (17.0 dBm)
...
# relevant packages
iw-0.9.22-1.fc14.1.i686
crda-1.1.1_2010.11.22-1.fc14.i686
wireless-tools-29-5.1.fc12.i686
kernel-2.6.35.6-45.fc14.i686
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Unable to set wireless regulatory domain
2011-05-05 17:40 [gentoo-user] Unable to set wireless regulatory domain John Nielsen
@ 2011-05-05 22:08 ` Mick
2011-05-05 22:52 ` Paul Hartman
1 sibling, 0 replies; 9+ messages in thread
From: Mick @ 2011-05-05 22:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 4857 bytes --]
On Thursday 05 May 2011 18:40:30 John Nielsen wrote:
> I am trying to set up a 5GHz wireless access point on an Alix 3d2 board
> with an AR9220 (ath9k "Merlin") PCI card. I have done so successfully
> using Fedora 14 on identical hardware but I would greatly prefer to use
> Gentoo so I can use a more recent kernel and customize things
> appropriately for the platform.
>
> I have an up-to-date ~x86 Gentoo build working and I am able to run hostapd
> as a 2.4GHz access point, but trying to run it on a 5 GHz channel in "a"
> mode fails complaining it is unable to set the channel. After some poking
> around I realized that this was due to the regulatory domain not being set
> correctly--the default ("world"?) regdomain doesn't allow IBSS on any 5GHz
> channels.
>
> I made sure I had crda emerged and tried several different kernel settings
> but none of them resulted in any different behavior. I even tried
> statically compiling the regdb ("CONFIG_CFG80211_INTERNAL_REGDB=y") but
> didn't see any difference. I can run "iw reg set US" all day long but
> whenever I run "iw reg get" it always comes back with "country 00" on the
> Gentoo system.
>
> Since I'm a relative newbie to both Gentoo and custom Linux kernel building
> I wanted to make sure I wasn't just missing a setting or kernel config
> flag somewhere before I started looking for things like driver
> regressions. Can anyone suggest different things to try to fix the problem
> or at least pinpoint it better?
>
> Below is some info from both the Gentoo system (regdomain not working) and
> the Fedora system (regdomain working). Let me know what additional
> information would be helpful. Thanks!
>
> JN
>
>
> ### Gentoo ~x86 ###
> # uname -a
> Linux alix2 2.6.38-gentoo-r3 #7 Mon May 2 12:51:18 EDT 2011 i586 Geode(TM)
> Integrated Processor by AMD PCS AuthenticAMD GNU/Linux
>
> # relevant dmesg output
> [ 0.107215] cfg80211: Calling CRDA to update world regulatory domain
> [ 2.228041] ath: EEPROM regdomain: 0x0
> [ 2.228056] ath: EEPROM indicates default country code should be used
> [ 2.228072] ath: doing EEPROM country->regdmn map search
> [ 2.228093] ath: country maps to regdmn code: 0x3a
> [ 2.228108] ath: Country alpha2 being used: US
> [ 2.228122] ath: Regpair used: 0x3a
>
> # iw reg set US
> # iw reg get
> 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
>
> # iw list
> ...
> Frequencies:
> * 5180 MHz [36] (18.0 dBm) (passive scanning, no IBSS)
> * 5200 MHz [40] (18.0 dBm) (passive scanning, no IBSS)
> * 5220 MHz [44] (18.0 dBm) (passive scanning, no IBSS)
> * 5240 MHz [48] (18.0 dBm) (passive scanning, no IBSS)
> ...
>
> # relevant packages
> net-wireless/crda-1.1.1
> net-wireless/iw-0.9.22
> net-wireless/wireless-regdb-20101124
> net-wireless/wireless-tools-30_pre9
> sys-kernel/gentoo-sources-2.6.38-r3
>
>
> ### Fedora 14 ###
> $ uname -a
> Linux alix.jnielsen.net 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17
> UTC 2010 i586 i586 i386 GNU/Linux
>
> # relevant dmesg output
> [ 13.191924] cfg80211: Calling CRDA to update world regulatory domain
> [ 13.433288] cfg80211: World regulatory domain updated:
> [ 17.134923] ath: EEPROM regdomain: 0x0
> [ 17.134943] ath: EEPROM indicates default country code should be used
> [ 17.134961] ath: doing EEPROM country->regdmn map search
> [ 17.134984] ath: country maps to regdmn code: 0x3a
> [ 17.135001] ath: Country alpha2 being used: US
> [ 17.135018] ath: Regpair used: 0x3a
> [ 17.248674] cfg80211: Calling CRDA for country: US
> [ 18.848206] cfg80211: Regulatory domain changed to country: US
>
> $ iw reg get
> country US:
> (2402 - 2472 @ 40), (3, 27)
> (5170 - 5250 @ 40), (3, 17)
> (5250 - 5330 @ 40), (3, 20), DFS
> (5490 - 5600 @ 40), (3, 20), DFS
> (5650 - 5710 @ 40), (3, 20), DFS
> (5735 - 5835 @ 40), (3, 30)
>
> $ iw list
> ...
> Frequencies:
> * 5180 MHz [36] (17.0 dBm)
> * 5200 MHz [40] (17.0 dBm)
> * 5220 MHz [44] (17.0 dBm)
> * 5240 MHz [48] (17.0 dBm)
> ...
>
> # relevant packages
> iw-0.9.22-1.fc14.1.i686
> crda-1.1.1_2010.11.22-1.fc14.i686
> wireless-tools-29-5.1.fc12.i686
> kernel-2.6.35.6-45.fc14.i686
Last time I had a problem like this (some time ago now) I discovered that it
was because of the driver - the version or the firmware was not developed
enough. A few weeks/months later the version was updated and the
functionality was suddenly there.
BTW, did you try wpa_supplicant in case it makes a difference?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Unable to set wireless regulatory domain
2011-05-05 17:40 [gentoo-user] Unable to set wireless regulatory domain John Nielsen
2011-05-05 22:08 ` Mick
@ 2011-05-05 22:52 ` Paul Hartman
2011-05-06 17:04 ` John Nielsen
1 sibling, 1 reply; 9+ messages in thread
From: Paul Hartman @ 2011-05-05 22:52 UTC (permalink / raw
To: gentoo-user
On Thu, May 5, 2011 at 12:40 PM, John Nielsen <lists@jnielsen.net> wrote:
> I am trying to set up a 5GHz wireless access point on an Alix 3d2 board with an AR9220 (ath9k "Merlin") PCI card. I have done so successfully using Fedora 14 on identical hardware but I would greatly prefer to use Gentoo so I can use a more recent kernel and customize things appropriately for the platform.
It seems like everything is pretty much the same, other than the
kernel (and presumably the ath9k driver). But I would look at the udev
rules for CRDA to be sure they match and are being applied the same on
both systems. You shouldn't ever need to "iw reg set" on a system with
CRDA, it should do it for you. So I wonder if you're setting it, and
then CRDA is immediately setting it back to 00...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Unable to set wireless regulatory domain
2011-05-05 22:52 ` Paul Hartman
@ 2011-05-06 17:04 ` John Nielsen
2011-05-06 20:14 ` Mick
0 siblings, 1 reply; 9+ messages in thread
From: John Nielsen @ 2011-05-06 17:04 UTC (permalink / raw
To: gentoo-user
Doesn't look like this went through the first time; re-sending without attachment.
On May 5, 2011, at 6:52 PM, Paul Hartman wrote:
> On Thu, May 5, 2011 at 12:40 PM, John Nielsen <lists@jnielsen.net> wrote:
>> I am trying to set up a 5GHz wireless access point on an Alix 3d2 board with an AR9220 (ath9k "Merlin") PCI card. I have done so successfully using Fedora 14 on identical hardware but I would greatly prefer to use Gentoo so I can use a more recent kernel and customize things appropriately for the platform.
>
> It seems like everything is pretty much the same, other than the
> kernel (and presumably the ath9k driver). But I would look at the udev
> rules for CRDA to be sure they match and are being applied the same on
> both systems. You shouldn't ever need to "iw reg set" on a system with
> CRDA, it should do it for you. So I wonder if you're setting it, and
> then CRDA is immediately setting it back to 00...
The udev rule for CRDA is the same on both systems, and matches what is shown on http://wireless.kernel.org/en/developers/Regulatory/CRDA. The Fedora box also has a magic rule to call /sbin/setregdomain when an 80211 interface is added, which is a shell script that infers the regdomain from the currently set timezone. The punch line of the script is simply a call to "iw reg set $COUNTRY"
However, I'm not sure crda is being called appropriately on the Gentoo box. On the Fedora machine I see this in dmesg:
>> [ 17.248674] cfg80211: Calling CRDA for country: US
>> [ 18.848206] cfg80211: Regulatory domain changed to country: US
and I don't ever see anything similar on the Gentoo machine, even when running "iw reg set" by hand. Further, I don't see anything in the output of "udevadm monitor --environment kernel".
I just dropped the kernel from the Fedora machine on to the Gentoo box and (somewhat surprisingly) it works just fine. The reg domain gets set no problem, hostapd starts, life is good--except that now I feel like I've sinned against nature and I'd like to get my own, smaller kernel back.
While it's possible the new kernel version is broken I rather suspect that I have configured it badly. I set out to configure a minimal kernel with just the features and drivers I want on this hardware and no need for modules or an initramfs. Does cfg80211 need to be a module to work properly? I wouldn't think so.
I'll do some more experimenting but in the mean time here's my kernel config in case anyone has ideas on what could be wrong. Thanks!
Config file here: http://pastebin.com/S68ye6Pz
JN
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Unable to set wireless regulatory domain
2011-05-06 17:04 ` John Nielsen
@ 2011-05-06 20:14 ` Mick
2011-05-09 16:20 ` John Nielsen
0 siblings, 1 reply; 9+ messages in thread
From: Mick @ 2011-05-06 20:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 3054 bytes --]
On Friday 06 May 2011 18:04:31 John Nielsen wrote:
> Doesn't look like this went through the first time; re-sending without
> attachment.
>
> On May 5, 2011, at 6:52 PM, Paul Hartman wrote:
> > On Thu, May 5, 2011 at 12:40 PM, John Nielsen <lists@jnielsen.net> wrote:
> >> I am trying to set up a 5GHz wireless access point on an Alix 3d2 board
> >> with an AR9220 (ath9k "Merlin") PCI card. I have done so successfully
> >> using Fedora 14 on identical hardware but I would greatly prefer to use
> >> Gentoo so I can use a more recent kernel and customize things
> >> appropriately for the platform.
> >
> > It seems like everything is pretty much the same, other than the
> > kernel (and presumably the ath9k driver). But I would look at the udev
> > rules for CRDA to be sure they match and are being applied the same on
> > both systems. You shouldn't ever need to "iw reg set" on a system with
> > CRDA, it should do it for you. So I wonder if you're setting it, and
> > then CRDA is immediately setting it back to 00...
>
> The udev rule for CRDA is the same on both systems, and matches what is
> shown on http://wireless.kernel.org/en/developers/Regulatory/CRDA. The
> Fedora box also has a magic rule to call /sbin/setregdomain when an 80211
> interface is added, which is a shell script that infers the regdomain from
> the currently set timezone. The punch line of the script is simply a call
> to "iw reg set $COUNTRY"
>
> However, I'm not sure crda is being called appropriately on the Gentoo box.
On the Fedora machine I see this in dmesg:
> >> [ 17.248674] cfg80211: Calling CRDA for country: US
> >> [ 18.848206] cfg80211: Regulatory domain changed to country: US
>
> and I don't ever see anything similar on the Gentoo machine, even when
> running "iw reg set" by hand. Further, I don't see anything in the output
> of "udevadm monitor --environment kernel".
>
> I just dropped the kernel from the Fedora machine on to the Gentoo box and
> (somewhat surprisingly) it works just fine. The reg domain gets set no
> problem, hostapd starts, life is good--except that now I feel like I've
> sinned against nature and I'd like to get my own, smaller kernel back.
>
> While it's possible the new kernel version is broken I rather suspect that
> I have configured it badly. I set out to configure a minimal kernel with
> just the features and drivers I want on this hardware and no need for
> modules or an initramfs. Does cfg80211 need to be a module to work
> properly? I wouldn't think so.
>
> I'll do some more experimenting but in the mean time here's my kernel
> config in case anyone has ideas on what could be wrong. Thanks!
>
> Config file here: http://pastebin.com/S68ye6Pz
I suggest that you run a diff --suppress-common-lines -y between the Fedora
and your own kernel to find out what's different between the two as far as
your driver is concerned.
The Fedora kernel may have kernel patches that the vanilla or gentoo kernels
don't.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Unable to set wireless regulatory domain
2011-05-06 20:14 ` Mick
@ 2011-05-09 16:20 ` John Nielsen
2011-05-09 18:51 ` Mick
2011-05-09 22:46 ` [gentoo-user] " walt
0 siblings, 2 replies; 9+ messages in thread
From: John Nielsen @ 2011-05-09 16:20 UTC (permalink / raw
To: gentoo-user
On May 6, 2011, at 4:14 PM, Mick wrote:
> On Friday 06 May 2011 18:04:31 John Nielsen wrote:
>> Doesn't look like this went through the first time; re-sending without
>> attachment.
>>
>> On May 5, 2011, at 6:52 PM, Paul Hartman wrote:
>>> On Thu, May 5, 2011 at 12:40 PM, John Nielsen <lists@jnielsen.net> wrote:
>>>> I am trying to set up a 5GHz wireless access point on an Alix 3d2 board
>>>> with an AR9220 (ath9k "Merlin") PCI card. I have done so successfully
>>>> using Fedora 14 on identical hardware but I would greatly prefer to use
>>>> Gentoo so I can use a more recent kernel and customize things
>>>> appropriately for the platform.
>>>
>>> It seems like everything is pretty much the same, other than the
>>> kernel (and presumably the ath9k driver). But I would look at the udev
>>> rules for CRDA to be sure they match and are being applied the same on
>>> both systems. You shouldn't ever need to "iw reg set" on a system with
>>> CRDA, it should do it for you. So I wonder if you're setting it, and
>>> then CRDA is immediately setting it back to 00...
>>
>> The udev rule for CRDA is the same on both systems, and matches what is
>> shown on http://wireless.kernel.org/en/developers/Regulatory/CRDA. The
>> Fedora box also has a magic rule to call /sbin/setregdomain when an 80211
>> interface is added, which is a shell script that infers the regdomain from
>> the currently set timezone. The punch line of the script is simply a call
>> to "iw reg set $COUNTRY"
>>
>> However, I'm not sure crda is being called appropriately on the Gentoo box.
> On the Fedora machine I see this in dmesg:
>>>> [ 17.248674] cfg80211: Calling CRDA for country: US
>>>> [ 18.848206] cfg80211: Regulatory domain changed to country: US
>>
>> and I don't ever see anything similar on the Gentoo machine, even when
>> running "iw reg set" by hand. Further, I don't see anything in the output
>> of "udevadm monitor --environment kernel".
>>
>> I just dropped the kernel from the Fedora machine on to the Gentoo box and
>> (somewhat surprisingly) it works just fine. The reg domain gets set no
>> problem, hostapd starts, life is good--except that now I feel like I've
>> sinned against nature and I'd like to get my own, smaller kernel back.
>>
>> While it's possible the new kernel version is broken I rather suspect that
>> I have configured it badly. I set out to configure a minimal kernel with
>> just the features and drivers I want on this hardware and no need for
>> modules or an initramfs. Does cfg80211 need to be a module to work
>> properly? I wouldn't think so.
>>
>> I'll do some more experimenting but in the mean time here's my kernel
>> config in case anyone has ideas on what could be wrong. Thanks!
>>
>> Config file here: http://pastebin.com/S68ye6Pz
>
> I suggest that you run a diff --suppress-common-lines -y between the Fedora
> and your own kernel to find out what's different between the two as far as
> your driver is concerned.
The outright diff was far too verbose to be useful, but looking at "lsmod" output when running the Fedora kernel was instructive. I recognized everything as being in by Gentoo kernel except for "rfkill", which was listed as a dependency of cfg80211. Long story short, I got it working like I want by:
1) Including RFKILL in my kernel config and
2) Building cfg80211, mac80211, rfkill, and all parts of the ath9k driver as modules
Just adding RFKILL to a static (module-less) kernel didn't fix it, and just building cfg80211 and friends as modules without RFKILL also didn't fix it; I had to do both.
Thanks all for your responses so far. I'll be happy to ditch Fedora. :)
For future reference, does anyone know why either of the above would be required? If I see the same behavior in the latest git kernel should I file a bug? If so, where (since I doubt this is a Gentoo issue)?
JN
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Unable to set wireless regulatory domain
2011-05-09 16:20 ` John Nielsen
@ 2011-05-09 18:51 ` Mick
2011-05-09 22:46 ` [gentoo-user] " walt
1 sibling, 0 replies; 9+ messages in thread
From: Mick @ 2011-05-09 18:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 4744 bytes --]
On Monday 09 May 2011 17:20:49 John Nielsen wrote:
> On May 6, 2011, at 4:14 PM, Mick wrote:
> > On Friday 06 May 2011 18:04:31 John Nielsen wrote:
> >> Doesn't look like this went through the first time; re-sending without
> >> attachment.
> >>
> >> On May 5, 2011, at 6:52 PM, Paul Hartman wrote:
> >>> On Thu, May 5, 2011 at 12:40 PM, John Nielsen <lists@jnielsen.net>
wrote:
> >>>> I am trying to set up a 5GHz wireless access point on an Alix 3d2
> >>>> board with an AR9220 (ath9k "Merlin") PCI card. I have done so
> >>>> successfully using Fedora 14 on identical hardware but I would
> >>>> greatly prefer to use Gentoo so I can use a more recent kernel and
> >>>> customize things appropriately for the platform.
> >>>
> >>> It seems like everything is pretty much the same, other than the
> >>> kernel (and presumably the ath9k driver). But I would look at the udev
> >>> rules for CRDA to be sure they match and are being applied the same on
> >>> both systems. You shouldn't ever need to "iw reg set" on a system with
> >>> CRDA, it should do it for you. So I wonder if you're setting it, and
> >>> then CRDA is immediately setting it back to 00...
> >>
> >> The udev rule for CRDA is the same on both systems, and matches what is
> >> shown on http://wireless.kernel.org/en/developers/Regulatory/CRDA. The
> >> Fedora box also has a magic rule to call /sbin/setregdomain when an
> >> 80211 interface is added, which is a shell script that infers the
> >> regdomain from the currently set timezone. The punch line of the script
> >> is simply a call to "iw reg set $COUNTRY"
> >>
> >> However, I'm not sure crda is being called appropriately on the Gentoo
> >> box.
> >
> > On the Fedora machine I see this in dmesg:
> >>>> [ 17.248674] cfg80211: Calling CRDA for country: US
> >>>> [ 18.848206] cfg80211: Regulatory domain changed to country: US
> >>
> >> and I don't ever see anything similar on the Gentoo machine, even when
> >> running "iw reg set" by hand. Further, I don't see anything in the
> >> output of "udevadm monitor --environment kernel".
> >>
> >> I just dropped the kernel from the Fedora machine on to the Gentoo box
> >> and (somewhat surprisingly) it works just fine. The reg domain gets set
> >> no problem, hostapd starts, life is good--except that now I feel like
> >> I've sinned against nature and I'd like to get my own, smaller kernel
> >> back.
> >>
> >> While it's possible the new kernel version is broken I rather suspect
> >> that I have configured it badly. I set out to configure a minimal
> >> kernel with just the features and drivers I want on this hardware and
> >> no need for modules or an initramfs. Does cfg80211 need to be a module
> >> to work properly? I wouldn't think so.
> >>
> >> I'll do some more experimenting but in the mean time here's my kernel
> >> config in case anyone has ideas on what could be wrong. Thanks!
> >>
> >> Config file here: http://pastebin.com/S68ye6Pz
> >
> > I suggest that you run a diff --suppress-common-lines -y between the
> > Fedora and your own kernel to find out what's different between the two
> > as far as your driver is concerned.
>
> The outright diff was far too verbose to be useful, but looking at "lsmod"
> output when running the Fedora kernel was instructive. I recognized
> everything as being in by Gentoo kernel except for "rfkill", which was
> listed as a dependency of cfg80211. Long story short, I got it working
> like I want by:
>
> 1) Including RFKILL in my kernel config and
> 2) Building cfg80211, mac80211, rfkill, and all parts of the ath9k driver
> as modules
>
> Just adding RFKILL to a static (module-less) kernel didn't fix it, and just
> building cfg80211 and friends as modules without RFKILL also didn't fix
> it; I had to do both.
>
> Thanks all for your responses so far. I'll be happy to ditch Fedora. :)
>
> For future reference, does anyone know why either of the above would be
> required? If I see the same behavior in the latest git kernel should I
> file a bug? If so, where (since I doubt this is a Gentoo issue)?
I wouldn't have thought that you *must* have rfkill built in as a module for
it to work.
However, I have my wireless drivers (inc. rfkill) built in as modules. I did
this because I need to pass some options to the wireless driver at some point.
The only time I had to build something as a module was alsa, because otherwise
I couldn't configure my sound card on a particular box (alsaconf/alsactl
expected it to be a module so that it can probe it). I ended up compiling it
as a module since.
Perhaps someone else can advise on this rfkill issue.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-user] Re: Unable to set wireless regulatory domain
2011-05-09 16:20 ` John Nielsen
2011-05-09 18:51 ` Mick
@ 2011-05-09 22:46 ` walt
2011-05-09 23:08 ` Mick
1 sibling, 1 reply; 9+ messages in thread
From: walt @ 2011-05-09 22:46 UTC (permalink / raw
To: gentoo-user
On 05/09/2011 09:20 AM, John Nielsen wrote:
> I got it working like I want by:
>
> 1) Including RFKILL in my kernel config and 2) Building cfg80211,
> mac80211, rfkill, and all parts of the ath9k driver as modules
>
> Just adding RFKILL to a static (module-less) kernel didn't fix it,
> and just building cfg80211 and friends as modules without RFKILL also
> didn't fix it; I had to do both.
Some drivers contains quite a few distinct subsystems, and I can
imagine a scenario where some section of code is executed only when
it gets loaded by another driver module.
If my SWAG is correct, then I think a bug report would be appropriate.
Unfortunately I have no idea if I'm guessing right or wrong :)
As Mick said, the same problem has been reported with alsa drivers,
and I would consider that to be buggy behavior as well and I would
file a bug report if I had the same problem. (But I don't.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Re: Unable to set wireless regulatory domain
2011-05-09 22:46 ` [gentoo-user] " walt
@ 2011-05-09 23:08 ` Mick
0 siblings, 0 replies; 9+ messages in thread
From: Mick @ 2011-05-09 23:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1373 bytes --]
On Monday 09 May 2011 23:46:06 walt wrote:
> On 05/09/2011 09:20 AM, John Nielsen wrote:
> > I got it working like I want by:
> > 1) Including RFKILL in my kernel config and 2) Building cfg80211,
> > mac80211, rfkill, and all parts of the ath9k driver as modules
> >
> > Just adding RFKILL to a static (module-less) kernel didn't fix it,
> > and just building cfg80211 and friends as modules without RFKILL also
> > didn't fix it; I had to do both.
>
> Some drivers contains quite a few distinct subsystems, and I can
> imagine a scenario where some section of code is executed only when
> it gets loaded by another driver module.
>
> If my SWAG is correct, then I think a bug report would be appropriate.
> Unfortunately I have no idea if I'm guessing right or wrong :)
>
> As Mick said, the same problem has been reported with alsa drivers,
> and I would consider that to be buggy behavior as well and I would
> file a bug report if I had the same problem. (But I don't.)
Funny you should say that ... I remember raising a bug at the time, only to be
told by a dev that this is what alsactl expects (i.e. alsa modules to probe in
a particular order). I was reluctant to engage in an argument with a dev
about the logic of all this, so I left happy knowing that I could hear sound
coming out of my machine again.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-05-09 23:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 17:40 [gentoo-user] Unable to set wireless regulatory domain John Nielsen
2011-05-05 22:08 ` Mick
2011-05-05 22:52 ` Paul Hartman
2011-05-06 17:04 ` John Nielsen
2011-05-06 20:14 ` Mick
2011-05-09 16:20 ` John Nielsen
2011-05-09 18:51 ` Mick
2011-05-09 22:46 ` [gentoo-user] " walt
2011-05-09 23:08 ` Mick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox