From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis R. Rodriguez Date: Mon, 13 Sep 2010 10:53:40 -0700 Subject: [ath9k-devel] Atheros 5008 and changing CRDA In-Reply-To: <20100913082258.44170bbwai9l1w0g@webmail.netcom.co.uk> References: <20100913082258.44170bbwai9l1w0g@webmail.netcom.co.uk> Message-ID: <20100913175340.GJ1824@tux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Mon, Sep 13, 2010 at 12:22:58AM -0700, cwr at netcom.co.uk wrote: > Luis, thank you very much for the information; it made things much, much > clearer. > > "iw reg get" still gives: > 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 > > and the "iw list" output is: > > Wiphy phy0 > Band 1: > HT capabilities: 0x104e > * 20/40 MHz operation > * SM PS disabled > * 40 MHz short GI > * max A-MSDU len 3839 > * DSSS/CCK 40 MHz > HT A-MPDU factor: 0x0003 (65535 bytes) > HT A-MPDU density: 0x0006 (8 usec) > HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00 > HT TX/RX MCS rate indexes supported: > MCS index 0 > MCS index 1 > MCS index 2 > MCS index 3 > MCS index 4 > MCS index 5 > MCS index 6 > MCS index 7 > MCS index 8 > MCS index 9 > MCS index 10 > MCS index 11 > MCS index 12 > MCS index 13 > MCS index 14 > MCS index 15 > Frequencies: > * 2412 MHz [1] (20.0 dBm) > * 2417 MHz [2] (20.0 dBm) > * 2422 MHz [3] (20.0 dBm) > * 2427 MHz [4] (20.0 dBm) > * 2432 MHz [5] (20.0 dBm) > * 2437 MHz [6] (20.0 dBm) > * 2442 MHz [7] (20.0 dBm) > * 2447 MHz [8] (20.0 dBm) > * 2452 MHz [9] (20.0 dBm) > * 2457 MHz [10] (20.0 dBm) > * 2462 MHz [11] (20.0 dBm) > * 2467 MHz [12] (disabled) > * 2472 MHz [13] (disabled) > * 2484 MHz [14] (disabled) > Bitrates (non-HT): > * 1.0 Mbps > * 2.0 Mbps (short preamble supported) > * 5.5 Mbps (short preamble supported) > * 11.0 Mbps (short preamble supported) > * 6.0 Mbps > * 9.0 Mbps > * 12.0 Mbps > * 18.0 Mbps > * 24.0 Mbps > * 36.0 Mbps > * 48.0 Mbps > * 54.0 Mbps > max # scan SSIDs: 4 > Fragmentation threshold: 2346 > RTS threshold: 2347 > Supported interface modes: > * IBSS > * managed > * AP > * AP/VLAN > * monitor > * mesh point > > "iw reg set GB" still gives no error message, but the result of Alexander's > "iw reg set GB ; sleep 1 ; COUNTRY=GB crda" is: > Failed to set regulatory domain: -22 > > It looked to me like some sort of udev problem, so I started by checking that. > The output of "udevadm trigger --verbose" included the string: > /sys/devices/platform/regulatory.0 > which seemed to imply that the kernel had some regulatory knowledge, > and the 85-regulatory.rules file has the standard contents (on one line): > KERNEL=="regulatory*", ACTION=="change", > SUBSYSTEM=="platform", RUN+="/sbin/crda" > and "udevadm info --export-db" gives: > P: /devices/platform/regulatory.0 > E: UDEV_LOG=3 > E: DEVPATH=/devices/platform/regulatory.0 > E: MODALIAS=platform:regulatory > E: SUBSYSTEM=platform > > I built a kernel with every sort of CFG80211 config set, _apart_ from > CFG80211_INTERNAL_REGDB, since I wanted to use the external CRDA. > I then cranked up udev's message level, and pulled the following lines > out of the message log (they aren't consecutive): > Sep 10 19:17:22 farthing kernel: cfg80211: > Calling CRDA to update world regulatory domain > Sep 10 19:17:25 farthing udevadm[7159]: > device 0x80861b0 has devpath '/devices/platform/regulatory.0' > Sep 10 19:17:28 farthing udevd[3029]: > reading '/lib/udev/rules.d/85-regulatory.rules' as rules file > > So far so good, but running crda then showed no apparent reaction from > udev. The only related udev entries in the messages file came early > in the boot process: > Sep 10 20:22:40 farthing udevd-work[7938]: > '/sbin/modprobe -b platform:regulatory' started > Sep 10 20:22:40 farthing udevd-work[7938]: > '/sbin/modprobe' (stderr) 'FATAL: Module platform:regulatory not found.' > Sep 10 20:22:40 farthing udevd-work[7938]: > '/sbin/modprobe -b platform:regulatory' returned with exitcode 1 modprobe? WTF > > FWIW, running "iw event -t" in a terminal also showed nothing, as did > "udevadm monitor --kernel" > > Checking the file /sys/devices/platform/regulatory.0/modalias shows that it > contains only the string "platform:regulatory", which is probably not a > coincidence. However, udev doesn't seem to recognise this module alias. > > Somehow I've messed up the kernel or udev setup. Do you know how I can > trigger udev correctly, or how I can re-configure the /sys filesystem? > > Thanks again for your help - Will Your udev scripts seem off... mcgrof at tux ~ $ dpkg -L wireless-crda /. /sbin /sbin/crda /sbin/regdbdump /lib /lib/udev /lib/udev/rules.d /lib/udev/rules.d/85-regulatory.rules /usr /usr/share /usr/share/man /usr/share/man/man8 /usr/share/man/man8/crda.8.gz /usr/share/man/man8/regdbdump.8.gz /usr/share/doc /usr/share/doc/wireless-crda /usr/share/doc/wireless-crda/README /usr/share/doc/wireless-crda/LICENSE /usr/share/doc/wireless-crda/copyright /usr/share/doc/wireless-crda/changelog.gz /usr/lib /usr/lib/crda /usr/lib/crda/regulatory.bin mcgrof at tux ~ $ cat /lib/udev/rules.d/85-regulatory.rules # Runs CRDA for kernel wireless regulatory events. # For more information see: # http://wireless.kernel.org/en/developers/Regulatory/CRDA KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda" LUis