After booting, "iw reg get" reports the country is set to 00 and I'm unable to connect to my access point (on channel 13). After unloading and reloading ath5k, the country changes to GB and channel 13 is available. I suspect the problem is that the /usr filesytem (with regulatory.bin) is not available until later in the boot sequence. Here are the relevant parts from dmesg: cfg80211: Calling CRDA to update world regulatory domain ... ath5k 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 ath5k 0000:02:00.0: setting latency timer to 64 ath5k 0000:02:00.0: registered as 'phy0' ... ath5k phy0: Atheros AR5414 chip found (MAC: 0xa3, PHY: 0x61) ... XFS mounting filesystem dm-1 Ending clean XFS mount for filesystem: dm-1 (dm-1 contains my /usr filesystem). After an unload/reload of ath5k, I get the following: ath5k 0000:02:00.0: PCI INT A disabled cfg80211: Calling CRDA to update world regulatory domain cfg80211: World regulatory domain updated: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) ath5k 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 ath5k 0000:02:00.0: setting latency timer to 64 ath5k 0000:02:00.0: registered as 'phy0' phy0: Selected rate control algorithm 'minstrel' ath5k phy0: Atheros AR5414 chip found (MAC: 0xa3, PHY: 0x61) ADDRCONF(NETDEV_UP): wlan0: link is not ready cfg80211: Calling CRDA for country: GB cfg80211: Regulatory domain changed to country: GB (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm) (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm) (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm) (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm) ADDRCONF(NETDEV_UP): wlan0: link is not ready There's some discussion of this possibility in #480870 but no conclusion there. Installed packages are: crda-1.1.0_2009.04.17-11.fc11.i586 kernel-2.6.30.5-43.fc11.i586 initscripts-8.95-1.i586 udev-141-4.fc11.i586 iw-0.9.15-1.fc11.i586 libnl-1.1-6.fc11.i586
First, does a manual 'iw reg set GB' (after /usr is mounted) make things work? After that, lets make sure that /usr is the problem. Please execute the following commands (as root): mkdir /lib/crda cp /usr/lib/crda/regulatory.bin /lib/crda Then reboot. Does that change the situation?
A manual "iw reg set GB" is successful (after booting has finished), but copying regulatory.bin into /lib/crda doesn't help. Would crda look for it there? "strings /sbin/crda | grep regulatory.bin" suggests only /usr/lib/crda or /lusr/local/lib/crda are checked. If I "mount --bind" / and copy the following files in: /usr/lib/crda/* /usr/lib/libnl.so.1 /usr/bin/iw so they are all available before /usr is mounted, then the regulatory domain is set on boot - provided that COUNTRY is set in /etc/sysconfig/regdomain (without COUNTRY, setregdomain needs /usr/share/zoneinfo/zone.tab as well). I guess this means there are really two separate problems: crda is failing without regulatory.bin & libnl, but also setregdomain is failing without iw & libnl (& zone.tab). Maybe having setregdomain block until iw is available would help there? I should also say: I was wrong about not being able to connect on channel 13 with the country set to 00. It actually works fine with the world regulatory domain, which is pretty impressive.
Re: strings -- I see the same thing you do, but I was going by the source: const char *regdb_paths[] = { "/usr/local/lib/crda/regulatory.bin", /* Users/preloads can override */ "/usr/lib/crda/regulatory.bin", /* General distribution package usage */ "/lib/crda/regulatory.bin", /* alternative for distributions */ NULL }; I'm not sure setregdomain can block when called by udev. Anyway, I don't know what mechanism it would use to know that iw is ready. Good to hear you can access channel 13 -- "world" regulatory domain and "world roaming" is reasonably functional for lots of cases. Given the dependencies on libnl (which might could be moved) and zone.tab (which would be more difficult to move), I'm not sure what a good solution is here. In the short run, adding "iw reg set GB" to /etc/rc.local seems like an option for you...?
Created attachment 361384 [details] Patch to /sbin/setregdomain so it works on boot. Odd about "/lib/crda/regulatory.bin" - I wonder if gcc is clever enough to optimise the binary by pointing at the fifth character in "/usr/lib/crda/regulatory.bin" instead. I see what you mean about udev not liking it when the script blocks. I've done a quick proof-of-concept patch to setregdomain which forks and waits for iw & zone.tab to become available. It's a bit rough, but enough to get the regulatory domain set at boot. The initial call to crda still fails without libnl & regulatory.bin but the second succeeds (after setregdomain finishes). Since the world regdom Just Works (at least for me), it's not so important if crda fails, but it might help someone else looking at this.
iw-0.9.17-3.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/iw-0.9.17-3.fc11
crda-1.1.0_2009.09.08-3.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/crda-1.1.0_2009.09.08-3.fc11
Hmmm...forgot about the setregdomain bit...leave open while I ponder the proposed solution and/or alternatives...
iw-0.9.17-3.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update iw'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10168
crda-1.1.0_2009.09.08-3.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update crda'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10228
Just installed the new crda & iw packages from testing and they look good but, apart from setregdomain, I think we also need libnl relocated to /lib as crda & iw need it.
iw-0.9.17-3.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
crda-1.1.0_2009.09.08-3.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
Arghhh...once again, disregard comment 11 and comment 12...
http://koji.fedoraproject.org/koji/taskinfo?taskID=1886315 Ok, finally... :-) Could you try the libnl package here? Is installs the libnl binary to /lib{,64}.
Yep, it works now with COUNTRY=GB in /etc/sysconfig/regdomain and the following packages: crda-1.1.0_2009.11.25-2.fc11.i586 kernel-2.6.30.9-102.fc11.i586 initscripts-8.95.1-1.i586 udev-141-7.fc11.i586 iw-0.9.17-3.fc11.i586 libnl-1.1-9.fc11.i586 Doesn't work yet without /etc/sysconfig/regdomain because of /usr/share/zoneinfo/zone.tab. Have a good Christmas!
Well, this is probably the best I can do -- I don't think we can move the zoneinfo. But at least you do have a solution if you have to boot w/o /usr. Happy Christmas to you! :-)