Skip to contentSkip to conversation

iwl3945 regression: WARNING: at net/wireless/core.c:291

PATCH In review Kalle Valo 5 participants 8 messages Apr 9, 2009 – Apr 10, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

Hi Reinette,

I updated to latest wireless-testing and iwl3945 didn't load. I'm using Lenovo x60s with 32 bit kernel and debian unstable.

The error message:

[   17.484147] ------------[ cut here ]------------
[   17.489314] WARNING: at net/wireless/core.c:291 wiphy_register+0xa7/0x1bf [cfg80211]()
[   17.494687] Hardware name: 1703Y1F
[   17.499921] Modules linked in: snd_seq snd_timer iwl3945(+) snd_seq_device iwlcore pcmcia(+) thinkpad_acpi snd rfkill mac80211 btusb soundcore video backlight yenta_socket rsrc_nonstatic lib80211 bluetooth snd_page_alloc processor battery ac output pcmcia_core rng_core psmouse pcspkr cfg80211 evdev i2c_i801 nvram button ext3 jbd mbcache sha256_generic aes_i586 aes_generic cbc dm_crypt dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sd_mod ata_generic ata_piix uhci_hcd libata scsi_mod sdhci_pci sdhci mmc_core led_class e1000e ide_pci_generic ide_core ehci_hcd usbcore thermal fan
[   17.529567] Pid: 1924, comm: modprobe Not tainted 2.6.30-rc1 #152
[   17.535677] Call Trace:
[   17.541699]  [<c0123415>] warn_slowpath+0x71/0xa8
[   17.547679]  [<c011beb8>] ? enqueue_task_fair+0x131/0x17f
[   17.553539]  [<c01100e7>] ? native_smp_send_reschedule+0x45/0x47
[   17.559499]  [<c011a114>] ? resched_task+0x5d/0x60
[   17.565318]  [<f898438e>] wiphy_register+0xa7/0x1bf [cfg80211]
[   17.571152]  [<f85c6271>] ieee80211_register_hw+0xd8/0x354 [mac80211]
[   17.577000]  [<f871018f>] ? iwl_enable_interrupts+0xca/0xd2 [iwlcore]
[   17.582789]  [<f876b4ac>] iwl3945_pci_probe+0xa9b/0xbb7 [iwl3945]
[   17.588529]  [<c01e70b4>] local_pci_probe+0xe/0x10
[   17.594313]  [<c01e7ad1>] pci_device_probe+0x43/0x66
[   17.600163]  [<c0246e45>] driver_probe_device+0x80/0x10c
[   17.606094]  [<c0246f14>] __driver_attach+0x43/0x5f
[   17.612075]  [<c0246884>] bus_for_each_dev+0x3d/0x67
[   17.617988]  [<c0246d17>] driver_attach+0x14/0x16
[   17.623902]  [<c0246ed1>] ? __driver_attach+0x0/0x5f
[   17.629781]  [<c02462d2>] bus_add_driver+0xd2/0x1e9
[   17.635605]  [<c0247131>] driver_register+0x8b/0xe8
[   17.641438]  [<c01e7df3>] __pci_register_driver+0x38/0x91
[   17.647263]  [<f86c9048>] iwl3945_init+0x48/0x65 [iwl3945]
[   17.653060]  [<c0101137>] do_one_initcall+0x4a/0x10c
[   17.658825]  [<f86c9000>] ? iwl3945_init+0x0/0x65 [iwl3945]
[   17.664628]  [<c0136a52>] ? __blocking_notifier_call_chain+0x40/0x4c
[   17.670478]  [<c0143946>] sys_init_module+0x87/0x186
[   17.676382]  [<c0102948>] sysenter_do_call+0x12/0x26
[   17.682219] ---[ end trace 6325ce0ce8671ee8 ]---
[   17.687950] iwl3945 0000:03:00.0: Failed to register hw (error -22)
[   17.693817] iwl3945 0000:03:00.0: PCI INT A disabled
[   17.699462] iwl3945: probe of 0000:03:00.0 failed with error -22

And the warning from code:

	if (WARN_ON(wiphy->max_scan_ssids < 1))
		return -EINVAL;

It should be easy to fix, I just don't have time to send a patch right now.

Signature · 1 line
Kalle Valo
maintainer
#1 lore raw

PATCH 1/1 fix iwl3945 registration regression

I forgot that iwl3945 registration is separate from iwlagn.

---
Hi Kalle, Reinette,

This looks like my mistake, sorry!

Quoted 6 lines
[   17.489314] WARNING: at net/wireless/core.c:291 wiphy_register+0xa7/0x1bf [cfg80211]()

And the warning from code:

	if (WARN_ON(wiphy->max_scan_ssids < 1))
		return -EINVAL;

I thought 3945 were already unified so that the setup code was common, but it turns out not to be. This patch will fix it.

Alternatively the scanning rework patches you (Reinette) have will also fix it -- do you just want to send those to John instead?

johannes

 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/iwlwifi/iwl3945-base.c +2 -0
@@ -4913,6 +4913,8 @@ static int iwl3945_setup_mac(struct iwl_
 
 	hw->wiphy->custom_regulatory = true;
 
+	hw->wiphy->max_scan_ssids = 1; /* WILL FIX */
+
 	/* Default value; 4 EDCA QOS priorities */
 	hw->queues = 4;
 
author Tested-by on v1 1/1
#2 lore raw

Re: [PATCH] fix iwl3945 registration regression

Quoted 3 lines · Johannes Berg

I forgot that iwl3945 registration is separate from iwlagn.

Thanks, this fixed the problem for me.

Although I wasn't able to get iwl3945 working yet:

Apr  9 17:06:57 tikku kernel: [   16.586612] iwl3945: Intel(R)
PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26kd
Apr  9 17:06:57 tikku kernel: [   16.591406] iwl3945: Copyright(c)
2003-2009 Intel Corporation
Apr  9 17:06:57 tikku kernel: [   16.596203] iwl3945 0000:03:00.0: PCI
INT A -> GSI 17 (level, low) -> IRQ 17
Apr  9 17:06:57 tikku kernel: [   16.600996] iwl3945 0000:03:00.0:
setting latency timer to 64
Apr  9 17:06:57 tikku kernel: [   16.660038] iwl3945 0000:03:00.0:
Tunable channels: 13 802.11bg, 23 802.11a channels
Apr  9 17:06:57 tikku kernel: [   16.664799] iwl3945 0000:03:00.0:
Detected Intel Wireless WiFi Link 3945ABG
Apr  9 17:06:57 tikku kernel: [   16.669786] iwl3945 0000:03:00.0: irq
29 for MSI/MSI-X
Apr  9 17:06:57 tikku kernel: [   16.675157] phy0: Selected rate
control algorithm 'iwl-3945-rs'
Apr  9 17:06:57 tikku kernel: [   16.681674] phy0: Failed to initialize wep: -2
Apr  9 17:06:57 tikku kernel: [   16.695543] iwl3945 0000:03:00.0:
Failed to register hw (error -2)
Apr  9 17:06:57 tikku kernel: [   16.700576] iwl3945 0000:03:00.0: PCI
INT A disabled
Apr  9 17:06:57 tikku kernel: [   16.705359] iwl3945: probe of

0000:03:00.0 failed with error -2

Maybe this is the infamous module loading bug I see people talking about? I'll investigate it later.

Quoted 1 line

This looks like my mistake, sorry!

No problem! That's why we are here, testing latest and greatest wireless code :)

Kalle

#3 lore raw

Re: [PATCH] fix iwl3945 registration regression

Quoted 34 lines · Kalle Valo
Quoted 3 lines · Johannes Berg

I forgot that iwl3945 registration is separate from iwlagn.

Thanks, this fixed the problem for me.

Although I wasn't able to get iwl3945 working yet:

Apr  9 17:06:57 tikku kernel: [   16.586612] iwl3945: Intel(R)
PRO/Wireless 3945ABG/BG Network Connection driver for Linux, 1.2.26kd
Apr  9 17:06:57 tikku kernel: [   16.591406] iwl3945: Copyright(c)
2003-2009 Intel Corporation
Apr  9 17:06:57 tikku kernel: [   16.596203] iwl3945 0000:03:00.0: PCI
INT A -> GSI 17 (level, low) -> IRQ 17
Apr  9 17:06:57 tikku kernel: [   16.600996] iwl3945 0000:03:00.0:
setting latency timer to 64
Apr  9 17:06:57 tikku kernel: [   16.660038] iwl3945 0000:03:00.0:
Tunable channels: 13 802.11bg, 23 802.11a channels
Apr  9 17:06:57 tikku kernel: [   16.664799] iwl3945 0000:03:00.0:
Detected Intel Wireless WiFi Link 3945ABG
Apr  9 17:06:57 tikku kernel: [   16.669786] iwl3945 0000:03:00.0: irq
29 for MSI/MSI-X
Apr  9 17:06:57 tikku kernel: [   16.675157] phy0: Selected rate
control algorithm 'iwl-3945-rs'
Apr  9 17:06:57 tikku kernel: [   16.681674] phy0: Failed to initialize wep: -2
Apr  9 17:06:57 tikku kernel: [   16.695543] iwl3945 0000:03:00.0:
Failed to register hw (error -2)
Apr  9 17:06:57 tikku kernel: [   16.700576] iwl3945 0000:03:00.0: PCI
INT A disabled
Apr  9 17:06:57 tikku kernel: [   16.705359] iwl3945: probe of
Quoted 4 lines

0000:03:00.0 failed with error -2

Maybe this is the infamous module loading bug I see people talking about? I'll investigate it later.

Yes it is. The key is the "Failed to initialize wep", which is caused by a failure to load modules ecb and arc4. Apply that patch and all will be well.

Larry

#4 lore raw

Re: [PATCH] fix iwl3945 registration regression

Quoted 7 lines · Larry Finger
Quoted 2 lines · Kalle Valo

Maybe this is the infamous module loading bug I see people talking about? I'll investigate it later.

Yes it is. The key is the "Failed to initialize wep", which is caused by a failure to load modules ecb and arc4. Apply that patch and all will be well.

FWIW, I reverted the problem causing commit in the master branch of wireless-testing. Hopefully the fix will be in -rc2 when wireless-testing gets there.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#5 lore raw

Re: [PATCH] fix iwl3945 registration regression

Quoted 4 lines · John W. Linville

FWIW, I reverted the problem causing commit in the master branch of wireless-testing. Hopefully the fix will be in -rc2 when wireless-testing gets there.

It should be. Rusty Russell has it in his tree already and the regression is well known on LKML and to Rafael Wysocki.

Larry

#7 lore raw

Re: [PATCH] fix iwl3945 registration regression

In reply to Johannes Berg

Johannes,

Quoted 2 lines · Johannes Berg

Alternatively the scanning rework patches you (Reinette) have will also fix it -- do you just want to send those to John instead?

I surely will send those patches. I was just waiting for wireless-testing to contain the patches on which they depend.

Reinette

author
#6 lore raw

Re: [PATCH] fix iwl3945 registration regression

In reply to John W. Linville
Quoted 11 lines · John W. Linville
Quoted 7 lines · Larry Finger
Quoted 2 lines · Kalle Valo

Maybe this is the infamous module loading bug I see people talking about? I'll investigate it later.

Yes it is. The key is the "Failed to initialize wep", which is caused by a failure to load modules ecb and arc4. Apply that patch and all will be well.

FWIW, I reverted the problem causing commit in the master branch of wireless-testing.

Nice, thanks. I have Johannes patch applied on top of latest wireless-testing and iwl3945 works again.

Signature · 1 line
Kalle Valo