Search Linux Wireless

Re: [BUG] rtl8187, cfg80211 - unable to handle kernel NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 23, 2009 at 6:52 PM, Martin Capitanio <martin@xxxxxxxxxxxxx> wrote:
> Am Montag, den 23.03.2009, 16:10 -0700 schrieb Luis R. Rodriguez:
>> On Mon, Mar 23, 2009 at 4:04 PM, Martin Capitanio <martin@xxxxxxxxxxxxx> wrote:
>> > Setting the EU or DE regulatory domain (cfg80211 ieee80211_regdom=EU)
>> > seems to be working, but afterwards inserting the rtl8187 driver causes crash:
>>
>> Please try with today's wireless-testing a set of fixes went in to
>
> Sure, I tried "DE" with the same result as well.
>
> Fortunately, wireless-testing doesn't crash during the rtl8187 driver load
> anymore, but changing the regulatory domain seems to be no-op (see below).
>
> Furthermore the current wireless-testing breaks the rtl8187 driver completely.
> If I try to connect to an AP (with or without changing the domain),
> it hard-freezes the kernel without any log entry.
>
>> address a bug with "EU". Mind you, "EU" is an invalid ISO3166-alpha2
>> so you may want to consider start using your own valid country alpha2
>> code. If you use "EU" now you'll world roam.
>
> I wonder why is there than the EU (confusing) code at all?

Its complete crap, in fact stop using the module parameter. "EU" is
part of the 3 static regulatory domains left from the old regulatory
implementation. It should have been removed eons ago but old habits
are hard to kill. Fortunately distributions are now shipping and with
OLD_REG disabled on 2.6.28 (both FC11 and Ubuntu Jaunty). The "EU"
option and even the ieee80211_regdom module parameter are simply not
an option in 2.6.28 and 2.6.29 if OLD_REG is disabled, we have a
suitable replacement -- a userspace call.

Unfortunately I just added the module parameter when OLD_REG is
disabled to try to remove OLD_REG completely but that didn't seem to
work yet.

> Actually I would expect a "smallest common intersection" of the 27 European
> Union member states.

Heh, well its easier than that you get a ISO / IEC 3166 alpha2 for
each country. So you just pick your country. "EU" is an ancient
regulatory concoction, it should be ignored and forgotten.

> Martin
>
> ----
> 2.6.29-rc8-wl at commit 8fe80c672051978895d0c3ef7be1dc7bcaa8621e
>
> [   14.724111] cfg80211: Using static regulatory domain info
> [   14.724154] cfg80211: Regulatory domain: US

So, not all of my patches were applied... Specifically the one that
removed OLD_REG was not applied. This is why you are getting "US"
still as your default. You probably have OLD_REG enabled in your
kernel.

> [   14.724186]  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
> [   14.724233]  (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
> [   14.724267]  (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [   14.724300]  (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [   14.724334]  (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [   14.724367]  (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [   14.724402]  (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
> [   14.724453] cfg80211: Calling CRDA for country: US
> [   14.731855] usbcore: registered new interface driver hiddev
> [   14.734528] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.0/input/input6
> [   14.744220] generic-usb 0003:046D:C526.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1d.0-1/input0
> [   14.749224] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1:1.1/input/input7
> [   14.760185] generic-usb 0003:046D:C526.0002: input,hiddev0,hidraw1: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:1d.0-1/input1
> [   14.761508] usbcore: registered new interface driver usbhid
> [   14.762406] usbhid: v2.6:USB HID core driver
> [   14.785424] uvcvideo: Found UVC 1.00 device CNF7051 (04f2:b070)
> [   14.787514] input: CNF7051 as /devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/input/input8
> [   14.795375] Bluetooth: Generic Bluetooth USB driver ver 0.4
> [   14.795520] usbcore: registered new interface driver btusb
> [   14.874378] usbcore: registered new interface driver uvcvideo
> [   14.874417] USB Video Class driver (v0.1.0)
> [   15.384073] Synaptics Touchpad, model: 1, fw: 6.3, id: 0x9280b1, caps: 0xa04711/0xa04000
> [   15.406636] rtl8187: 8187B chip detected.
> [   15.407152] phy0: Selected rate control algorithm 'minstrel'
>
>
> modprobe -r rtl8187
> modprobe -r cfg80211
> modprobe cfg80211 ieee80211_regdom=DE
> [  570.676064] usbcore: deregistering interface driver rtl8187
> [  570.944071] usb 2-6: reset high speed USB device using ehci_hcd and address 4
> [  687.552176] cfg80211: Using static regulatory domain info
> [  687.552182] cfg80211: Regulatory domain: US
> [  687.552186]  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
> [  687.552191]  (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
> [  687.552196]  (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [  687.552201]  (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [  687.552206]  (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [  687.552210]  (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
> [  687.552215]  (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)

So.. this still happens because within OLD_REG "DE" is not a valid
static regulatory domain, so first you get by default the "US" static
regulatory domain. That is -- if you want to use OLD_REG and get a
static regulatory domain applied by default first you only have 3
options:

"US"
"EU"
"JP"

Now this is pure garbage and which is why people should stop using
OLD_REG and forget about it.

> [  687.552501] cfg80211: Calling CRDA for country: DE

Strange well I just tested with OLD_REG and I get the same "US" crap
as above but then immediately after that I got "DE" as follows:

[15895.175144] cfg80211: Regulatory domain changed to country: DE
[15895.175189] 	(start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[15895.175241] 	(2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[15895.175274] 	(5150000 KHz - 5255000 KHz @ 40000 KHz), (N/A, 2301 mBm)
[15895.175312] 	(5470000 KHz - 5650000 KHz @ 40000 KHz), (N/A, 3000 mBm)

You probably don't have the wireless-regdb and crda installed. We have
offloaded all this regulatory information to userspace, you know get a
decent world roaming regulatory domain by default instead of assuming
everyone lives the United States. Then you can set the regulatory
domain.

http://wireless.kernel.org/download/wireless-regdb/
sudo make install

http://wireless.kernel.org/download/crda/
make
sudo make install

Then you should get your "DE".

> modprobe rtl8187
> [  731.873109] rtl8187: 8187B chip detected.
> [  731.877283] phy0: Selected rate control algorithm 'minstrel'
> [  731.877990] phy0: hwaddr , RTL8187BvE V0 + rtl8225z2
> [  731.878047] usbcore: registered new interface driver rtl8187
>
> iw reg get
> country US:
>        (2402 - 2472 @ 40), (6, 27)
>        (5170 - 5190 @ 40), (6, 23)
>        (5190 - 5210 @ 40), (6, 23)
>        (5210 - 5230 @ 40), (6, 23)
>        (5230 - 5330 @ 40), (6, 23)
>        (5735 - 5835 @ 40), (6, 30)
>
> iw reg set DE
> iw reg get
> country US:
>        (2402 - 2472 @ 40), (6, 27)
>        (5170 - 5190 @ 40), (6, 23)
>        (5190 - 5210 @ 40), (6, 23)
>        (5210 - 5230 @ 40), (6, 23)
>        (5230 - 5330 @ 40), (6, 23)
>        (5735 - 5835 @ 40), (6, 30)
>
>
> iw list
> Wiphy phy0
>        Band 1:
>                Frequencies:
>                        * 2412 MHz [1] (27.0 dBm)
>                        * 2417 MHz [2] (27.0 dBm)
>                        * 2422 MHz [3] (27.0 dBm)
>                        * 2427 MHz [4] (27.0 dBm)
>                        * 2432 MHz [5] (27.0 dBm)
>                        * 2437 MHz [6] (27.0 dBm)
>                        * 2442 MHz [7] (27.0 dBm)
>                        * 2447 MHz [8] (27.0 dBm)
>                        * 2452 MHz [9] (27.0 dBm)
>                        * 2457 MHz [10] (27.0 dBm)
>                        * 2462 MHz [11] (27.0 dBm)
>                        * 2467 MHz [12] (disabled)
>                        * 2472 MHz [13] (disabled)
>                        * 2484 MHz [14] (disabled)
>                Bitrates:
>                        * 1.0 Mbps
>                        * 2.0 Mbps
>                        * 5.5 Mbps
>                        * 11.0 Mbps
>                        * 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
>        Supported interface modes:
>                 * Station
>                 * Monitor

I don't see any panics, everything is as expected --except my removal
of OLD_REG patch was not applied.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux