Bug 548103

Summary: iwlagn wireless driver using wrong regulatory domain
Product: [Fedora] Fedora Reporter: Suzanne Hillman <shillman>
Component: crdaAssignee: John W. Linville <linville>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: anton, cmeadors, dougsland, gansalmon, itamar, kernel-maint, linville
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.0_2009.11.25-2.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 548845 (view as bug list) Environment:
Last Closed: 2009-12-22 04:56:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 529341, 548845    
Attachments:
Description Flags
dmesg outpyt
none
shillman dmesg output
none
contents of /etc/sysconfig/clock none

Description Suzanne Hillman 2009-12-16 16:05:23 UTC
Description of problem:
iwlagn wireless driver using wrong regulatory domain. We are located in the US and using US hardware, but dmesg says:

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)

lspci -nn says:

03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection [8086:4237]

Version-Release number of selected component (if applicable):
kernel-PAE-2.6.31.6-166.fc12.i686

How reproducible:
Always

Steps to Reproduce:
1. Load the driver
2. Look at dmesg
  
Actual results:
Uses World regulatory domain.

Expected results:
Use US regulatory domain!

Additional info:

Comment 1 John W. Linville 2009-12-16 18:34:48 UTC
Did you set your system time using system-config-date?

Comment 2 Suzanne Hillman 2009-12-16 18:50:03 UTC
I did not myself do so, no. I just did an install (with F11, then updated to f12).

Comment 3 Cameron Meadors 2009-12-16 18:57:01 UTC
I also see in dmesg that the driver is using the world domain.  I have not specifically used system-config-date to change the time.  This is a fresh install of F12.

Comment 4 John W. Linville 2009-12-16 19:06:55 UTC
Please post your complete dmesg output -- everything starts with the world domain, most things get updated by udev and/or the driver later.

Also, run "setregdomain" and post the difference in dmesg output.

Comment 5 Cameron Meadors 2009-12-16 19:38:09 UTC
Forgot that `dmesg` has more information than /var/log/dmesg.  Attaching `dmesg` output.  Looks like cfg80211 does finally set domain to US.

Comment 6 Cameron Meadors 2009-12-16 19:38:37 UTC
Created attachment 378825 [details]
dmesg outpyt

Comment 7 Suzanne Hillman 2009-12-16 19:48:13 UTC
Ok. Attaching dmesg output. The difference between the two after I ran setregdomain was:

[root@firefly ~]# diff dmesg.output dmesg.output.afterset 
1095a1096,1104
> cfg80211: Calling CRDA for country: US
> cfg80211: Regulatory domain changed to country: US
> 	(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
> 	(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
> 	(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
> 	(5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> 	(5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> 	(5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> 	(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)

Comment 8 Suzanne Hillman 2009-12-16 19:49:10 UTC
Created attachment 378827 [details]
shillman dmesg output

Comment 9 John W. Linville 2009-12-16 20:43:53 UTC
Suzanne, please attach the contents of /etc/sysconfig/regdomain and
/etc/sysconfig/clock (or note it if one or both do not exist).

Comment 10 Suzanne Hillman 2009-12-16 21:18:13 UTC
Created attachment 378852 [details]
contents of /etc/sysconfig/clock

FWIW, /etc/sysconfig/regdomain does not exist.

Comment 11 John W. Linville 2009-12-16 21:48:39 UTC
Well, I'm not sure what is happening.  It looks like /etc/sysconfig/clock has what is needed and running setregdomain manually seems to work for you.  Does 'modprobe -r iwlagn ; modprobe iwlagn' produce fresh CRDA-related output in dmesg for you?

Comment 12 Suzanne Hillman 2009-12-17 19:40:58 UTC
Diffing dmesg and dmesg after the modprobe gives:

< wlan0: deauthenticating by local choice (reason=3)
< iwlagn 0000:03: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)
< iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, 1.3.27kds
< iwlagn: Copyright(c) 2003-2009 Intel Corporation
< iwlagn 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
< iwlagn 0000:03:00.0: setting latency timer to 64
< iwlagn 0000:03:00.0: Detected Intel Wireless WiFi Link 5100AGN REV=0x54
< iwlagn 0000:03:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels
< iwlagn 0000:03:00.0: irq 29 for MSI/MSI-X
< phy0: Selected rate control algorithm 'iwl-agn-rs'
< iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode
< iwlagn 0000:03:00.0: loaded firmware version 8.24.2.12
< Registered led device: iwl-phy0::radio
< Registered led device: iwl-phy0::assoc
< Registered led device: iwl-phy0::RX
< Registered led device: iwl-phy0::TX
< ADDRCONF(NETDEV_UP): wlan0: link is not ready
< wlan0: authenticate with AP 00:1d:7e:dc:3c:2c
< wlan0: authenticated
< wlan0: associate with AP 00:1d:7e:dc:3c:2c
< wlan0: RX AssocResp from 00:1d:7e:dc:3c:2c (capab=0x401 status=0 aid=1)
< wlan0: associated
< ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
< wlan0: no IPv6 routers present
< tun0: Disabled Privacy Extensions

Comment 13 John W. Linville 2009-12-18 16:52:04 UTC
Alright, just for completeness please confirm that
/lib/udev/rules.d/85-regulatory.rules looks like this:

# Runs CRDA for kernel wireless regulatory events.
# For more information see:
# http://wireless.kernel.org/en/developers/Regulatory/CRDA

SUBSYSTEM=="ieee80211", ACTION=="add", RUN+="/sbin/setregdomain"

KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin//crda"

It looks like the first of those rules isn't getting run for some reason...

Comment 14 John W. Linville 2009-12-18 18:36:42 UTC
OK, looks like it _is_ getting run, but setregdomain is silently failing due to not being able to find iw in its path.  I suspect this may have been broken for a while (i.e. since I moved iw from /usr/bin to /sbin).

Unfortunately, it looks like Fedora CVS is still not cooperating.  I'll get to this shortly after it becomes usable again.  In the meantime, you can either deal with the constrained set of wireless settings, call setregdomain manually, or hack /sbin/setregdomain to change "iw" to "/sbin/iw".

Thanks!

Comment 15 Suzanne Hillman 2009-12-18 19:05:19 UTC
That file is as you put it above, although I suspect you knew this already.

And since this was being tested as part of trying to write testing for firmware in 5.5, I'll just keep working on that test plan and those cases in the meantime. :)

Comment 16 John W. Linville 2009-12-18 19:38:09 UTC
Hey, I'm glad to have the bug report.  But FWIW, the udev stuff isn't in rhel5.5. :-)  The only method there for the _user_ (i.e. not the driver and not the AP) to specify a regdomain is to use the ieee80211_regdom option to the cfg80211 module -- FYI!

Comment 17 Fedora Update System 2009-12-18 19:53:02 UTC
crda-1.1.0_2009.11.25-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/crda-1.1.0_2009.11.25-2.fc12

Comment 19 Fedora Update System 2009-12-22 04:56:38 UTC
crda-1.1.0_2009.11.25-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.