Bug 11082

Summary: options cfg80211 ieee80211_regdom= doesn't work
Product: Drivers Reporter: Cijoml Cijomlovic Cijomlov (cijoml)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: REJECTED DOCUMENTED    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: vanilla 2.6.26 Subsystem:
Regression: --- Bisected commit-id:

Description Cijoml Cijomlovic Cijomlov 2008-07-14 03:05:46 UTC
Latest working kernel version:
Earliest failing kernel version: unknown
Distribution: Debian testin
Hardware Environment:

01:05.0 Ethernet controller: Atheros Communications Inc. AR5413 802.11abg NIC (rev 01)
        Subsystem: Atheros Communications Inc. EnGenius EMP-8602 (400mw) or Compex WLM54AG (SuperAG)
        Flags: bus master, medium devsel, latency 168, IRQ 11
        Memory at e0200000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: ath5k_pci
        Kernel modules: ath5k

Software Environment: vanilla 2.6.26


Problem Description:



Steps to reproduce:

notas:~# cat /etc/modprobe.d/atheros
options ath_pci xchanmode=1 countrycode=203
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wanna have same function like this - allow channel 13


options cfg80211 ieee80211_regdom=CZ
notas:~# ifconfig  ath0 down
notas:~# rmmod cfg80211
ERROR: Module cfg80211 is in use by ath5k,mac80211
notas:~# rmmod ath5k mac80211 cfg80211
notas:~# modprobe cfg80211 ieee80211_regdom=203
notas:~# modprobe ath5k
notas:~# iwlist ath0 freq
ath0      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.412 GHz (Channel 1)

notas:~# rmmod ath5k mac80211 cfg80211
notas:~# modprobe cfg80211 ieee80211_regdom=CZ
notas:~# modprobe ath5k
notas:~# iwlist ath0 freq
ath0      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.412 GHz (Channel 1)
Comment 1 John W. Linville 2008-07-14 07:07:39 UTC
You will need to use a value that the cfg80211 module understands.  Current options are "US", "JP", and "EU".  So for example:

   options cfg80211 ieee80211_regdom="EU"
Comment 2 Cijoml Cijomlovic Cijomlov 2008-07-14 08:34:58 UTC
YES it works, but there are still two little bugs - 

1) when module is reloaded with different option, it doesn't work. When system restarted and option is taken from modprobe.d conf, it works:

notas:/home/cijoml# rmmod ath5k mac80211 cfg80211
notas:/home/cijoml# modprobe cfg80211 ieee80211_regdom=EU
notas:/home/cijoml# modprobe ath5k
notas:/home/cijoml# iwlist ath0 freq
ath0      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.412 GHz (Channel 1)

notas:/home/cijoml# rmmod ath5k mac80211 cfg80211
notas:/home/cijoml# modprobe cfg80211 ieee80211_regdom=JP
notas:/home/cijoml# modprobe ath5k
notas:/home/cijoml# iwlist ath0 freq
ath0      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.412 GHz (Channel 1)

After reboot I see all channels:

ath0      32 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
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 14 : 2.484 GHz
          Channel 34 : 5.17 GHz
          Channel 35 : 5.175 GHz
          Channel 36 : 5.18 GHz
          Channel 37 : 5.185 GHz
          Channel 38 : 5.19 GHz
          Channel 39 : 5.195 GHz
          Channel 40 : 5.2 GHz
          Channel 41 : 5.205 GHz
          Channel 42 : 5.21 GHz
          Channel 43 : 5.215 GHz
          Channel 44 : 5.22 GHz
          Channel 45 : 5.225 GHz
          Channel 46 : 5.23 GHz
          Channel 47 : 5.235 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 53 : 5.265 GHz
          Channel 54 : 5.27 GHz
          Current Frequency:2.462 GHz (Channel 11)

2) module should rise warning when unsupported option is passed into it...
maybe these 3 possible options should be added to modinfo?
Comment 3 John W. Linville 2008-09-05 08:29:43 UTC
That really doesn't seem right.  You didn't show the output of lsmod after your rmmod.  I suspect that for some reason cfg80211 didn't really get unloaded -- the 'modprobe cfg80211 ieee80211_regdom=EU' line would not give an error, so it would be unnoticed.