Bug 49411 - iwl3945/iwlegacy ad-hoc mode crash after waking from hibernation
Summary: iwl3945/iwlegacy ad-hoc mode crash after waking from hibernation
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stanislaw Gruszka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-24 10:32 UTC by Mikko Rapeli
Modified: 2013-06-21 15:10 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.6.3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
iwlegace backtrace (189.63 KB, image/jpeg)
2012-10-24 10:32 UTC, Mikko Rapeli
Details
iwlegacy backtrace 2 (107.60 KB, image/jpeg)
2012-10-24 10:33 UTC, Mikko Rapeli
Details
iwlegacy errors from video (92.00 KB, image/jpeg)
2012-10-24 10:55 UTC, Mikko Rapeli
Details
first stack trace from video (98.00 KB, image/jpeg)
2012-10-24 11:58 UTC, Mikko Rapeli
Details
iwlegacy objdump from 3.5.7 kernel (397.53 KB, text/plain)
2012-10-25 15:23 UTC, Mikko Rapeli
Details
iwlegacy_prevent_crash.patch (1.30 KB, text/plain)
2012-10-29 12:57 UTC, Stanislaw Gruszka
Details
fix_ibss_scan.patch (3.19 KB, text/plain)
2012-11-17 13:08 UTC, Stanislaw Gruszka
Details
dmesg after waking from hibernation when sending data over adhoc wlan fails (105.21 KB, text/plain)
2012-11-21 22:19 UTC, Mikko Rapeli
Details
kern.log without debug=0x47ffffff (143.91 KB, application/x-gzip)
2012-11-30 19:12 UTC, Mikko Rapeli
Details
Kernel config for 3.6.10, just in case there's something odd in it (95.69 KB, text/plain)
2012-12-11 23:02 UTC, Mikko Rapeli
Details

Description Mikko Rapeli 2012-10-24 10:32:43 UTC
Created attachment 84621 [details]
iwlegace backtrace

I'm using Nokia N9 phone as wireless access point in ad-hoc mode and connecting a Thinkpad T60 to it.

$ iwconfig wlan0
wlan0     IEEE 802.11abg  ESSID:"Ffhugrhgjdcjffegff"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 9E:F5:E0:EC:60:94   
          Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

Thinkpad T60 wlan chip:

03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
        Subsystem: Intel Corporation ThinkPad R60e/X60s
        Flags: bus master, fast devsel, latency 0, IRQ 46
        Memory at edf00000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: iwl3945

After waking up from suspend, the Thinkpad quite reliably crashes with a long backtrace.

Unfortunately the trace is too long for console and seems need Gnome3 desktop and X to trigger. Trying "echo disk > /sys/power/state" and wget from console does not trigger this so reliably. I have a video with 3.5.7 kernel and printk_delay set to 100 but I'll try to process it since it's too big atm. Following screenshots show the end of the backtrace on 3.6.3.
Comment 1 Mikko Rapeli 2012-10-24 10:33:11 UTC
Created attachment 84631 [details]
iwlegacy backtrace 2
Comment 2 Mikko Rapeli 2012-10-24 10:55:09 UTC
Created attachment 84641 [details]
iwlegacy errors from video

Screenshot from the video on 3.5.7 kernel. Seems there's a microcode/firmware problem.
Comment 3 Mikko Rapeli 2012-10-24 11:58:09 UTC
Created attachment 84661 [details]
first stack trace from video

Sorry for the poor quality. NULL pointer exception at il_queue_space(), called from il_enqueue_hcmd().
Comment 4 Stanislaw Gruszka 2012-10-25 08:47:06 UTC
Do you have kernel compiled with CONFIG_DEBUG_INFO=y, if so, please do:

gdb drivers/net/wireless/iwlegacy/iwlegacy.ko
(gdb) l *il_enqueue_hcmd+0xc0

If not please attach txt file generated by:
objdump -r -d --prefix-addresses drivers/net/wireless/iwlegacy/iwlegacy.ko > iwlegacy.objdump.txt

Could you check if problem also happen on other channel than 2.412 GHz (see "iw phy" for list of channels allowable to use in IBSS mode).
Comment 5 Mikko Rapeli 2012-10-25 15:23:03 UTC
Created attachment 84811 [details]
iwlegacy objdump from 3.5.7 kernel

(In reply to comment #4)
> Do you have kernel compiled with CONFIG_DEBUG_INFO=y, if so, please do:

Unfortunately no.

> If not please attach txt file generated by:
> objdump -r -d --prefix-addresses drivers/net/wireless/iwlegacy/iwlegacy.ko >
> iwlegacy.objdump.txt

Objdump from the 3.5.7 that matches the video screen shots attached.
Comment 6 Stanislaw Gruszka 2012-10-29 12:57:14 UTC
Created attachment 85201 [details]
iwlegacy_prevent_crash.patch

This patch should prevent a crash. But it does not solve the root problem of the issue, which is firmware crash (Microcode Errors).

If patch really prevent a crash (if not let me know), please provide verbose debug logs. How to gather them is described here:
https://bugzilla.kernel.org/show_bug.cgi?id=35932#c2
except iwl3945 module should be used (note: kernel should be compiled with CONFIG_IWLEGACY_DEBUG=y)
Comment 7 Mikko Rapeli 2012-11-06 19:26:23 UTC
(In reply to comment #6)
> Created an attachment (id=85201) [details]
> iwlegacy_prevent_crash.patch
> 
> This patch should prevent a crash. But it does not solve the root problem of
> the issue, which is firmware crash (Microcode Errors).

Crash is gone with the patch on 3.6.3 but wireless networking fails to transmit data after hibernation. IP address configuration with dhcp seems to work, or that's how I interpret NetworkManager icons.

Workaround for this, and also for the previous crash, has been to:

 * disable wireless networking in NetworkManager gui
 * sudo rmmod iwl3945 && sudo rmmod iwlegacy
 * sudo modprobe iwl3945

After this everything works again until next wakeup from hibernation.

> If patch really prevent a crash (if not let me know), please provide verbose
> debug logs. How to gather them is described here:
> https://bugzilla.kernel.org/show_bug.cgi?id=35932#c2
> except iwl3945 module should be used (note: kernel should be compiled with
> CONFIG_IWLEGACY_DEBUG=y)

Log is here (used debug=1 initially, and then same with debug=0x47ffffff as in the instructions):

http://mcfrisk.kapsi.fi/temp/iwl3945_kern.log.gz
Comment 8 Stanislaw Gruszka 2012-11-17 13:08:52 UTC
Created attachment 86531 [details]
fix_ibss_scan.patch

Please check if attached patch fixes the problem.
Comment 9 Mikko Rapeli 2012-11-21 22:19:15 UTC
Created attachment 86951 [details]
dmesg after waking from hibernation when sending data over adhoc wlan fails

Sorry but the patches don't help on top of 3.6.3. After waking from hibernation I get attached stuff to dmesg and sending and receiving data fails. NetworkManager is able to find the ad-hoc AP though. rmmod iwl3945 && modprobe iwl3945 fixes this problem.
Comment 10 Stanislaw Gruszka 2012-11-22 13:32:14 UTC
Please provide debug=0x47ffffff dmesg starting from module load and finishing after hibernation (when first Microcode or Warning will show up). On kernel with both patches applied of course.
Comment 11 Mikko Rapeli 2012-11-30 19:12:54 UTC
Created attachment 87961 [details]
kern.log without debug=0x47ffffff

(In reply to comment #10)
> Please provide debug=0x47ffffff dmesg starting from module load and finishing
> after hibernation (when first Microcode or Warning will show up). On kernel
> with both patches applied of course.

Hmm. With that debug=0x47ffffff I was not triggering the problem. Without it yes.
Comment 12 Stanislaw Gruszka 2012-11-30 19:28:38 UTC
So on patched kernel bug is reproducible without debug=0x47ffffff option, but not reproducible with it. On unpatched kernel bug is reproducible with and without debug=0x47ffffff option. Is that really correct - please check/retest all four possibilities ?
Comment 13 Mikko Rapeli 2012-11-30 19:31:33 UTC
(In reply to comment #12)
> So on patched kernel bug is reproducible without debug=0x47ffffff option, but
> not reproducible with it. On unpatched kernel bug is reproducible with and
> without debug=0x47ffffff option. Is that really correct - please check/retest
> all four possibilities ?

I tested only with the patches applied. With debug=0x47ffffff the connection worked after hibernation. Without the patches I previously got the ooops, should I really try without them as well?
Comment 14 Stanislaw Gruszka 2012-11-30 19:48:50 UTC
I'm confused with comment 9, comment 11 and comment 13. If I did not missed something they all are mutually exclusive.

Ok let's try again :-) . Without debug=0x47ffffff option - did the problem happen on patched kernel with patch from comment 6 and comment 8 (dmesg shows microcode errors, connection does not work) ?
Comment 15 Mikko Rapeli 2012-11-30 21:26:48 UTC
Vanilla 3.6.3 kernel, commit 9f2a940965286754f3a34d5737c3097c05db8725 :

 * iwl3945 loaded without debug options, waking from hibernation, reconnecting to ad-hoc network and rx/tx'ing data results in crash

 * iwl3945 loaded with debug=0x47ffffff options, waking from hibernation, reconnecting to ad-hoc network and rx/tx works, no crashes
Comment 16 Mikko Rapeli 2012-11-30 22:21:56 UTC
With patches from this bug (commits below) applied to 3.6.3:

 * iwl3945 loaded without debut options, waking from hibernation, reconnecting to ad-hoc network, rx/tx hangs but kernel does not crash. Workaround is to rmmod and insmod iwl3945 after waking from hibernation.

 * iwl3945 loaded with debug=0x47ffffff options, waking from hibernation, reconnecting to ad-hoc network, rx/tx works and kernel does not crash (tried to hibernate and reconnect 6 times in a row without problems)

So, the extensive debug output is affecting timings and bug goes away. Any ideas how to reduce the debug output and processing?

commit 382e47c854795a60187e6f4f313d3ee866f3ae24
Author: Mikko Rapeli <mikko.rapeli@iki.fi>
Date:   Wed Nov 21 21:19:33 2012 +0100

    Fix ibss scan
    
    From: Stanislaw Gruszka <stf_xl@wp.pl>
    
    https://bugzilla.kernel.org/show_bug.cgi?id=49411

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 5746d62..999356b 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -647,8 +647,8 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
 	sdata_info(sdata,
 		   "No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)\n");
 
-	ieee80211_request_internal_scan(sdata,
-			ifibss->ssid, ifibss->ssid_len, NULL);
+	ieee80211_request_ibss_scan(sdata, ifibss->ssid, ifibss->ssid_len,
+				    NULL);
 }
 
 static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
@@ -746,9 +746,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
 					IEEE80211_SCAN_INTERVAL)) {
 		sdata_info(sdata, "Trigger new scan to find an IBSS to join\n");
 
-		ieee80211_request_internal_scan(sdata,
-				ifibss->ssid, ifibss->ssid_len,
-				ifibss->fixed_channel ? ifibss->channel : NULL);
+		ieee80211_request_ibss_scan(sdata, ifibss->ssid,
+					    ifibss->ssid_len, chan);
 	} else {
 		int interval = IEEE80211_SCAN_INTERVAL;
 
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index bb61f77..40c6317 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1239,9 +1239,9 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
 
 /* scan/BSS handling */
 void ieee80211_scan_work(struct work_struct *work);
-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
-				    const u8 *ssid, u8 ssid_len,
-				    struct ieee80211_channel *chan);
+int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata,
+				const u8 *ssid, u8 ssid_len,
+				struct ieee80211_channel *chan);
 int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
 			   struct cfg80211_scan_request *req);
 void ieee80211_scan_cancel(struct ieee80211_local *local);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 839dd97..a118d0b 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -819,9 +819,9 @@ int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
 	return res;
 }
 
-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
-				    const u8 *ssid, u8 ssid_len,
-				    struct ieee80211_channel *chan)
+int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata,
+				const u8 *ssid, u8 ssid_len,
+				struct ieee80211_channel *chan)
 {
 	struct ieee80211_local *local = sdata->local;
 	int ret = -EBUSY;
@@ -835,16 +835,21 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
 
 	/* fill internal scan request */
 	if (!chan) {
-		int i, nchan = 0;
+		int i, max_nchan, nchan = 0;
 
 		for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 			if (!local->hw.wiphy->bands[band])
 				continue;
-			for (i = 0;
-			     i < local->hw.wiphy->bands[band]->n_channels;
-			     i++) {
-				local->int_scan_req->channels[nchan] =
+
+			max_nchan = local->hw.wiphy->bands[band]->n_channels;
+			for (i = 0; i < max_nchan; i++) {
+				struct ieee80211_channel *tmp_ch =
 				    &local->hw.wiphy->bands[band]->channels[i];
+				
+				if (tmp_ch->flags & IEEE80211_CHAN_NO_IBSS)
+					continue;
+				
+				local->int_scan_req->channels[nchan] = tmp_ch;
 				nchan++;
 			}
 		}

commit 7ad0c74491b71efdd90ac3c6599ce7487b109824
Author: Mikko Rapeli <mikko.rapeli@iki.fi>
Date:   Mon Nov 5 20:07:22 2012 +0100

    iwlegacy: prevent crash
    
    From: Stanislaw Gruszka <stf_xl@wp.pl>
    
    Workaround for bug https://bugzilla.kernel.org/show_bug.cgi?id=49411

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..28894c3 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2987,11 +2987,17 @@ il3945_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 {
 	struct il_priv *il = hw->priv;
 	struct il3945_sta_priv *sta_priv = (void *)sta->drv_priv;
-	int ret;
+	int ret = 0;
 	bool is_ap = vif->type == NL80211_IFTYPE_STATION;
 	u8 sta_id;
 
 	mutex_lock(&il->mutex);
+
+	if (WARN_ON(il->txq == NULL)) {
+		ret = -EIO;
+		goto out;
+	}
+
 	D_INFO("station %pM\n", sta->addr);
 	sta_priv->common.sta_id = IL_INVALID_STATION;
 
@@ -2999,8 +3005,7 @@ il3945_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	if (ret) {
 		IL_ERR("Unable to add station %pM (%d)\n", sta->addr, ret);
 		/* Should we return success if return code is EEXIST ? */
-		mutex_unlock(&il->mutex);
-		return ret;
+		goto out;
 	}
 
 	sta_priv->common.sta_id = sta_id;
@@ -3008,9 +3013,9 @@ il3945_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	/* Initialize rate scaling */
 	D_INFO("Initializing rate scaling for station %pM\n", sta->addr);
 	il3945_rs_rate_init(il, sta, sta_id);
+out:
 	mutex_unlock(&il->mutex);
-
-	return 0;
+	return ret;
 }
 
 static void
Comment 17 Stanislaw Gruszka 2012-12-01 13:10:43 UTC
Ok, I see. 

Some less verbose debug options can be used for example 0x47fff or 0x803 or 0x800. Please attach logs with the most verbose output were failure happen.

But I would like to see also logs with debug=0x47ffffff on patched kernel (with both patches). Even if failure did not happen there, there could be messages which indicate problems. Just reload module with this option, hibernate/resume, do ping to some remote host, unload module, and then provide logs with that. Thanks.
Comment 18 Stanislaw Gruszka 2012-12-11 11:23:46 UTC
I was able to reproduce microcode errors on IBSS with iwlwifi, and I found a bug in patch from comment 8. I improved it and posted upstream:

http://marc.info/?l=linux-wireless&m=135521932503785&w=2

I'm pretty sure it fix also problem on iwl3945 too, but if not, let me know, and provide output of "iw phy phy0 info".
Comment 19 Mikko Rapeli 2012-12-11 22:59:11 UTC
(In reply to comment #18)
> I was able to reproduce microcode errors on IBSS with iwlwifi, and I found a
> bug in patch from comment 8. I improved it and posted upstream:
> 
> http://marc.info/?l=linux-wireless&m=135521932503785&w=2
> 
> I'm pretty sure it fix also problem on iwl3945 too, but if not, let me know,
> and provide output of "iw phy phy0 info".

Sorry but with only this on top of 3.6.10 I got a crash after waking from hibernation and re-connecting to ad-hoc network.

If I also apply https://bugzilla.kernel.org/attachment.cgi?id=85201
then I don't get a crash but still get microcode errors:

Dec 11 23:47:27 totoro kernel: [  222.215222]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:27 totoro kernel: [  222.215234]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:27 totoro kernel: [  222.215245]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:27 totoro kernel: [  222.215258]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:27 totoro kernel: [  222.215270]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:27 totoro kernel: [  222.215277] ---[ end trace 281476e3d4638429 ]---
Dec 11 23:47:27 totoro kernel: [  222.215284] ------------[ cut here ]------------
Dec 11 23:47:27 totoro kernel: [  222.215338] WARNING: at net/mac80211/util.c:1345 ieee80211_reconfig+0x369/0x6b2 [mac80211]()
Dec 11 23:47:27 totoro kernel: [  222.215344] Hardware name: 1952WUV
Dec 11 23:47:27 totoro kernel: [  222.215349] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:27 totoro kernel: [  222.215626] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:27 totoro kernel: [  222.215631] Call Trace:
Dec 11 23:47:27 totoro kernel: [  222.215644]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:27 totoro kernel: [  222.215700]  [<f8a9c879>] ? ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.215713]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:27 totoro kernel: [  222.215769]  [<f8a9c879>] ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.215813]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.215825]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:27 totoro kernel: [  222.215869]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.215882]  [<c10404ea>] process_scheduled_works+0x1b/0x26
Dec 11 23:47:27 totoro kernel: [  222.215893]  [<c10407e9>] worker_thread+0x19c/0x213
Dec 11 23:47:27 totoro kernel: [  222.215904]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:27 totoro kernel: [  222.215915]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:27 totoro kernel: [  222.215926]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:27 totoro kernel: [  222.215939]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:27 totoro kernel: [  222.215950]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:27 totoro kernel: [  222.215956] ---[ end trace 281476e3d463842a ]---
Dec 11 23:47:27 totoro kernel: [  222.287092] iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
Dec 11 23:47:27 totoro kernel: [  222.287105] iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
Dec 11 23:47:27 totoro kernel: [  222.287143] iwl3945 0000:03:00.0: Start IWL Error Log Dump:
Dec 11 23:47:27 totoro kernel: [  222.287152] iwl3945 0000:03:00.0: Status: 0x000202E4, count: 1
Dec 11 23:47:27 totoro kernel: [  222.287159] iwl3945 0000:03:00.0: Desc       Time       asrtPC  blink2 ilink1  nmiPC   Line
Dec 11 23:47:27 totoro kernel: [  222.287390] iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0000033390 0x008B6 0x13BE0 0x0031C 0x00000 1095
Dec 11 23:47:27 totoro kernel: [  222.287390] 
Dec 11 23:47:27 totoro kernel: [  222.287417] iwl3945 0000:03:00.0: Error Reply type 0x00000447 cmd C_RXON (0x10) seq 0x0401 ser 0x000C0000
Dec 11 23:47:27 totoro kernel: [  222.287439] iwl3945 0000:03:00.0: Command C_RXON failed: FW Error
Dec 11 23:47:27 totoro kernel: [  222.287448] iwl3945 0000:03:00.0: Error setting new configuration (-5).
Dec 11 23:47:27 totoro kernel: [  222.289221] iwl3945 0000:03:00.0: Can't stop Rx DMA.
Dec 11 23:47:27 totoro kernel: [  222.290657] ieee80211 phy0: Hardware restart was requested
Dec 11 23:47:27 totoro kernel: [  222.290682] iwl3945 0000:03:00.0: Try to add interface when device not ready
Dec 11 23:47:27 totoro kernel: [  222.290695] ------------[ cut here ]------------
Dec 11 23:47:27 totoro kernel: [  222.290713] WARNING: at drivers/net/wireless/iwlegacy/3945-mac.c:2996 il3945_mac_sta_add+0x47/0x16e [iwl3945]()
Dec 11 23:47:27 totoro kernel: [  222.290719] Hardware name: 1952WUV
Dec 11 23:47:27 totoro kernel: [  222.290725] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:27 totoro kernel: [  222.291021] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:27 totoro kernel: [  222.291027] Call Trace:
Dec 11 23:47:27 totoro kernel: [  222.291045]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:27 totoro kernel: [  222.291062]  [<f813e09f>] ? il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:27 totoro kernel: [  222.291074]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:27 totoro kernel: [  222.291090]  [<f813e09f>] il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:27 totoro kernel: [  222.291106]  [<f813e058>] ? il3945_show_channels+0xc/0xc [iwl3945]
Dec 11 23:47:27 totoro kernel: [  222.291166]  [<f8a9b0db>] drv_sta_state+0x12e/0x22a [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291223]  [<f8a9c864>] ieee80211_reconfig+0x354/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291268]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291282]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:27 totoro kernel: [  222.291326]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291339]  [<c10407d2>] worker_thread+0x185/0x213
Dec 11 23:47:27 totoro kernel: [  222.291351]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:27 totoro kernel: [  222.291363]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:27 totoro kernel: [  222.291374]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:27 totoro kernel: [  222.291387]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:27 totoro kernel: [  222.291400]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:27 totoro kernel: [  222.291406] ---[ end trace 281476e3d463842b ]---
Dec 11 23:47:27 totoro kernel: [  222.291414] ------------[ cut here ]------------
Dec 11 23:47:27 totoro kernel: [  222.291467] WARNING: at net/mac80211/util.c:1345 ieee80211_reconfig+0x369/0x6b2 [mac80211]()
Dec 11 23:47:27 totoro kernel: [  222.291473] Hardware name: 1952WUV
Dec 11 23:47:27 totoro kernel: [  222.291478] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:27 totoro kernel: [  222.291754] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:27 totoro kernel: [  222.291759] Call Trace:
Dec 11 23:47:27 totoro kernel: [  222.291772]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:27 totoro kernel: [  222.291828]  [<f8a9c879>] ? ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291841]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:27 totoro kernel: [  222.291897]  [<f8a9c879>] ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291941]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.291953]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:27 totoro kernel: [  222.291997]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.292052]  [<c10407d2>] worker_thread+0x185/0x213
Dec 11 23:47:27 totoro kernel: [  222.292064]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:27 totoro kernel: [  222.292086]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:27 totoro kernel: [  222.292110]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:27 totoro kernel: [  222.292133]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:27 totoro kernel: [  222.292155]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:27 totoro kernel: [  222.292168] ---[ end trace 281476e3d463842c ]---
Dec 11 23:47:27 totoro kernel: [  222.363179] iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
Dec 11 23:47:27 totoro kernel: [  222.363191] iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
Dec 11 23:47:27 totoro kernel: [  222.363230] iwl3945 0000:03:00.0: Start IWL Error Log Dump:
Dec 11 23:47:27 totoro kernel: [  222.363238] iwl3945 0000:03:00.0: Status: 0x000202E4, count: 1
Dec 11 23:47:27 totoro kernel: [  222.363246] iwl3945 0000:03:00.0: Desc       Time       asrtPC  blink2 ilink1  nmiPC   Line
Dec 11 23:47:27 totoro kernel: [  222.363476] iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0000033342 0x008B6 0x13BE0 0x00320 0x00000 1095
Dec 11 23:47:27 totoro kernel: [  222.363476] 
Dec 11 23:47:27 totoro kernel: [  222.363503] iwl3945 0000:03:00.0: Error Reply type 0x00000447 cmd C_RXON (0x10) seq 0x0401 ser 0x000C0000
Dec 11 23:47:27 totoro kernel: [  222.363525] iwl3945 0000:03:00.0: Command C_RXON failed: FW Error
Dec 11 23:47:27 totoro kernel: [  222.363534] iwl3945 0000:03:00.0: Error setting new configuration (-5).
Dec 11 23:47:27 totoro kernel: [  222.365307] iwl3945 0000:03:00.0: Can't stop Rx DMA.
Dec 11 23:47:27 totoro kernel: [  222.366712] ieee80211 phy0: Hardware restart was requested
Dec 11 23:47:27 totoro kernel: [  222.366737] iwl3945 0000:03:00.0: Try to add interface when device not ready
Dec 11 23:47:27 totoro kernel: [  222.366750] ------------[ cut here ]------------
Dec 11 23:47:27 totoro kernel: [  222.366767] WARNING: at drivers/net/wireless/iwlegacy/3945-mac.c:2996 il3945_mac_sta_add+0x47/0x16e [iwl3945]()
Dec 11 23:47:27 totoro kernel: [  222.366774] Hardware name: 1952WUV
Dec 11 23:47:27 totoro kernel: [  222.366779] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:27 totoro kernel: [  222.367075] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:27 totoro kernel: [  222.367081] Call Trace:
Dec 11 23:47:27 totoro kernel: [  222.367099]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:27 totoro kernel: [  222.367115]  [<f813e09f>] ? il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:27 totoro kernel: [  222.367128]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:27 totoro kernel: [  222.367144]  [<f813e09f>] il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:27 totoro kernel: [  222.367159]  [<f813e058>] ? il3945_show_channels+0xc/0xc [iwl3945]
Dec 11 23:47:27 totoro kernel: [  222.367218]  [<f8a9b0db>] drv_sta_state+0x12e/0x22a [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.367276]  [<f8a9c864>] ieee80211_reconfig+0x354/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.367320]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.367334]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:27 totoro kernel: [  222.367378]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.367391]  [<c10407d2>] worker_thread+0x185/0x213
Dec 11 23:47:27 totoro kernel: [  222.367404]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:27 totoro kernel: [  222.367415]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:27 totoro kernel: [  222.367427]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:27 totoro kernel: [  222.367439]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:27 totoro kernel: [  222.367452]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:27 totoro kernel: [  222.367459] ---[ end trace 281476e3d463842d ]---
Dec 11 23:47:27 totoro kernel: [  222.367465] ------------[ cut here ]------------
Dec 11 23:47:27 totoro kernel: [  222.367519] WARNING: at net/mac80211/util.c:1345 ieee80211_reconfig+0x369/0x6b2 [mac80211]()
Dec 11 23:47:27 totoro kernel: [  222.367525] Hardware name: 1952WUV
Dec 11 23:47:27 totoro kernel: [  222.367530] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:27 totoro kernel: [  222.367805] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:27 totoro kernel: [  222.367811] Call Trace:
Dec 11 23:47:27 totoro kernel: [  222.367824]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:27 totoro kernel: [  222.367880]  [<f8a9c879>] ? ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.367893]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:27 totoro kernel: [  222.367949]  [<f8a9c879>] ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.367993]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.368047]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:27 totoro kernel: [  222.368092]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:27 totoro kernel: [  222.368116]  [<c10407d2>] worker_thread+0x185/0x213
Dec 11 23:47:27 totoro kernel: [  222.368141]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:27 totoro kernel: [  222.368161]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:27 totoro kernel: [  222.368184]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:27 totoro kernel: [  222.368206]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:27 totoro kernel: [  222.368228]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:27 totoro kernel: [  222.368242] ---[ end trace 281476e3d463842e ]---
Dec 11 23:47:27 totoro kernel: [  222.439083] iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
Dec 11 23:47:27 totoro kernel: [  222.439095] iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
Dec 11 23:47:27 totoro kernel: [  222.439133] iwl3945 0000:03:00.0: Start IWL Error Log Dump:
Dec 11 23:47:27 totoro kernel: [  222.439142] iwl3945 0000:03:00.0: Status: 0x000202E4, count: 1
Dec 11 23:47:27 totoro kernel: [  222.439149] iwl3945 0000:03:00.0: Desc       Time       asrtPC  blink2 ilink1  nmiPC   Line
Dec 11 23:47:27 totoro kernel: [  222.439380] iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0000033288 0x008B6 0x13BE0 0x00320 0x00000 1095
Dec 11 23:47:27 totoro kernel: [  222.439380] 
Dec 11 23:47:27 totoro kernel: [  222.439409] iwl3945 0000:03:00.0: Error Reply type 0x00000447 cmd C_RXON (0x10) seq 0x0401 ser 0x000C0000
Dec 11 23:47:27 totoro kernel: [  222.439448] iwl3945 0000:03:00.0: Command C_RXON failed: FW Error
Dec 11 23:47:27 totoro kernel: [  222.439457] iwl3945 0000:03:00.0: Error setting new configuration (-5).
Dec 11 23:47:27 totoro kernel: [  222.441245] iwl3945 0000:03:00.0: Can't stop Rx DMA.
Dec 11 23:47:27 totoro kernel: [  222.442653] ieee80211 phy0: Hardware restart was requested
Dec 11 23:47:29 totoro kernel: [  224.380235] iwl3945 0000:03:00.0: Wait for START_ALIVE timeout after 2000ms.
Dec 11 23:47:29 totoro kernel: [  224.451146] iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
Dec 11 23:47:29 totoro kernel: [  224.451160] iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
Dec 11 23:47:29 totoro kernel: [  224.451198] iwl3945 0000:03:00.0: Start IWL Error Log Dump:
Dec 11 23:47:29 totoro kernel: [  224.451206] iwl3945 0000:03:00.0: Status: 0x000202E4, count: 1
Dec 11 23:47:29 totoro kernel: [  224.451214] iwl3945 0000:03:00.0: Desc       Time       asrtPC  blink2 ilink1  nmiPC   Line
Dec 11 23:47:29 totoro kernel: [  224.451445] iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0000033347 0x008B6 0x13BE0 0x00320 0x00000 1095
Dec 11 23:47:29 totoro kernel: [  224.451445] 
Dec 11 23:47:29 totoro kernel: [  224.451473] iwl3945 0000:03:00.0: Error Reply type 0x00000447 cmd C_RXON (0x10) seq 0x0401 ser 0x000C0000
Dec 11 23:47:29 totoro kernel: [  224.451508] iwl3945 0000:03:00.0: Command C_RXON failed: FW Error
Dec 11 23:47:29 totoro kernel: [  224.451517] iwl3945 0000:03:00.0: Error setting new configuration (-5).
Dec 11 23:47:29 totoro kernel: [  224.453291] iwl3945 0000:03:00.0: Can't stop Rx DMA.
Dec 11 23:47:29 totoro kernel: [  224.454704] ieee80211 phy0: Hardware restart was requested
Dec 11 23:47:29 totoro kernel: [  224.454726] iwl3945 0000:03:00.0: Try to add interface when device not ready
Dec 11 23:47:29 totoro kernel: [  224.454739] ------------[ cut here ]------------
Dec 11 23:47:29 totoro kernel: [  224.454757] WARNING: at drivers/net/wireless/iwlegacy/3945-mac.c:2996 il3945_mac_sta_add+0x47/0x16e [iwl3945]()
Dec 11 23:47:29 totoro kernel: [  224.454763] Hardware name: 1952WUV
Dec 11 23:47:29 totoro kernel: [  224.454769] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:29 totoro kernel: [  224.455061] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:29 totoro kernel: [  224.455067] Call Trace:
Dec 11 23:47:29 totoro kernel: [  224.455086]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:29 totoro kernel: [  224.455102]  [<f813e09f>] ? il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:29 totoro kernel: [  224.455115]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:29 totoro kernel: [  224.455131]  [<f813e09f>] il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:29 totoro kernel: [  224.455146]  [<f813e058>] ? il3945_show_channels+0xc/0xc [iwl3945]
Dec 11 23:47:29 totoro kernel: [  224.455206]  [<f8a9b0db>] drv_sta_state+0x12e/0x22a [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.455263]  [<f8a9c864>] ieee80211_reconfig+0x354/0x6b2 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.455307]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.455321]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:29 totoro kernel: [  224.455365]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.455379]  [<c10404ea>] process_scheduled_works+0x1b/0x26
Dec 11 23:47:29 totoro kernel: [  224.455390]  [<c10407e9>] worker_thread+0x19c/0x213
Dec 11 23:47:29 totoro kernel: [  224.455402]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:29 totoro kernel: [  224.455414]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:29 totoro kernel: [  224.455425]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:29 totoro kernel: [  224.455438]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:29 totoro kernel: [  224.455451]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:29 totoro kernel: [  224.455457] ---[ end trace 281476e3d463842f ]---
Dec 11 23:47:29 totoro kernel: [  224.455464] ------------[ cut here ]------------
Dec 11 23:47:29 totoro kernel: [  224.455518] WARNING: at net/mac80211/util.c:1345 ieee80211_reconfig+0x369/0x6b2 [mac80211]()
Dec 11 23:47:29 totoro kernel: [  224.455524] Hardware name: 1952WUV
Dec 11 23:47:29 totoro kernel: [  224.455529] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:29 totoro kernel: [  224.455804] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:29 totoro kernel: [  224.455809] Call Trace:
Dec 11 23:47:29 totoro kernel: [  224.455823]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:29 totoro kernel: [  224.455879]  [<f8a9c879>] ? ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.455891]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:29 totoro kernel: [  224.455947]  [<f8a9c879>] ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.455992]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.456059]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:29 totoro kernel: [  224.456104]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.456127]  [<c10404ea>] process_scheduled_works+0x1b/0x26
Dec 11 23:47:29 totoro kernel: [  224.456152]  [<c10407e9>] worker_thread+0x19c/0x213
Dec 11 23:47:29 totoro kernel: [  224.456173]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:29 totoro kernel: [  224.456192]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:29 totoro kernel: [  224.456213]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:29 totoro kernel: [  224.456236]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:29 totoro kernel: [  224.456256]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:29 totoro kernel: [  224.456272] ---[ end trace 281476e3d4638430 ]---
Dec 11 23:47:29 totoro kernel: [  224.523009] iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
Dec 11 23:47:29 totoro kernel: [  224.523021] iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
Dec 11 23:47:29 totoro kernel: [  224.523060] iwl3945 0000:03:00.0: Start IWL Error Log Dump:
Dec 11 23:47:29 totoro kernel: [  224.523068] iwl3945 0000:03:00.0: Status: 0x000202E4, count: 1
Dec 11 23:47:29 totoro kernel: [  224.523075] iwl3945 0000:03:00.0: Desc       Time       asrtPC  blink2 ilink1  nmiPC   Line
Dec 11 23:47:29 totoro kernel: [  224.523306] iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0000033220 0x008B6 0x13BE0 0x00320 0x00000 1095
Dec 11 23:47:29 totoro kernel: [  224.523306] 
Dec 11 23:47:29 totoro kernel: [  224.523333] iwl3945 0000:03:00.0: Error Reply type 0x00000447 cmd C_RXON (0x10) seq 0x0401 ser 0x000C0000
Dec 11 23:47:29 totoro kernel: [  224.523362] iwl3945 0000:03:00.0: Command C_RXON failed: FW Error
Dec 11 23:47:29 totoro kernel: [  224.523371] iwl3945 0000:03:00.0: Error setting new configuration (-5).
Dec 11 23:47:29 totoro kernel: [  224.525143] iwl3945 0000:03:00.0: Can't stop Rx DMA.
Dec 11 23:47:29 totoro kernel: [  224.526502] ieee80211 phy0: Hardware restart was requested
Dec 11 23:47:29 totoro kernel: [  224.526526] iwl3945 0000:03:00.0: Try to add interface when device not ready
Dec 11 23:47:29 totoro kernel: [  224.526538] ------------[ cut here ]------------
Dec 11 23:47:29 totoro kernel: [  224.526554] WARNING: at drivers/net/wireless/iwlegacy/3945-mac.c:2996 il3945_mac_sta_add+0x47/0x16e [iwl3945]()
Dec 11 23:47:29 totoro kernel: [  224.526561] Hardware name: 1952WUV
Dec 11 23:47:29 totoro kernel: [  224.526566] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:29 totoro kernel: [  224.526856] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:29 totoro kernel: [  224.526862] Call Trace:
Dec 11 23:47:29 totoro kernel: [  224.526879]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:29 totoro kernel: [  224.526895]  [<f813e09f>] ? il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:29 totoro kernel: [  224.526908]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:29 totoro kernel: [  224.526924]  [<f813e09f>] il3945_mac_sta_add+0x47/0x16e [iwl3945]
Dec 11 23:47:29 totoro kernel: [  224.526940]  [<f813e058>] ? il3945_show_channels+0xc/0xc [iwl3945]
Dec 11 23:47:29 totoro kernel: [  224.526999]  [<f8a9b0db>] drv_sta_state+0x12e/0x22a [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527057]  [<f8a9c864>] ieee80211_reconfig+0x354/0x6b2 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527101]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527115]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:29 totoro kernel: [  224.527159]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527172]  [<c10404ea>] process_scheduled_works+0x1b/0x26
Dec 11 23:47:29 totoro kernel: [  224.527184]  [<c10407e9>] worker_thread+0x19c/0x213
Dec 11 23:47:29 totoro kernel: [  224.527196]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:29 totoro kernel: [  224.527207]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:29 totoro kernel: [  224.527219]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:29 totoro kernel: [  224.527231]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:29 totoro kernel: [  224.527243]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:29 totoro kernel: [  224.527250] ---[ end trace 281476e3d4638431 ]---
Dec 11 23:47:29 totoro kernel: [  224.527257] ------------[ cut here ]------------
Dec 11 23:47:29 totoro kernel: [  224.527311] WARNING: at net/mac80211/util.c:1345 ieee80211_reconfig+0x369/0x6b2 [mac80211]()
Dec 11 23:47:29 totoro kernel: [  224.527316] Hardware name: 1952WUV
Dec 11 23:47:29 totoro kernel: [  224.527321] Modules linked in: arc4 iwl3945 iwlegacy mac80211 cfg80211 cpufreq_conservative cpufreq_stats cpufreq_userspace cpufreq_powersave i915 drm_kms_helper drm i2c_algo_bit snd_hrtimer uinput ipv6 loop fuse dm_crypt joydev pcmcia snd_hda_codec_analog iTCO_wdt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event coretemp snd_rawmidi lpc_ich mfd_core yenta_socket microcode pcmcia_rsrc psmouse pcmcia_core evdev i2c_i801 i2c_core serio_raw rng_core snd_seq thinkpad_acpi battery nvram ac rfkill snd_seq_device acpi_cpufreq snd_timer snd video soundcore mperf intel_agp intel_gtt agpgart processor button ext4 crc16 jbd2 mbcache dm_mod sg sr_mod cdrom sd_mod crc_t10dif ata_generic ata_piix ahci libahci libata scsi_mod uhci_hcd e1000e thermal thermal_sys ehci_hcd usbcore usb_common
Dec 11 23:47:29 totoro kernel: [  224.527597] Pid: 22, comm: kworker/0:1 Tainted: G        W    3.6.10+ #25
Dec 11 23:47:29 totoro kernel: [  224.527602] Call Trace:
Dec 11 23:47:29 totoro kernel: [  224.527615]  [<c102b11a>] warn_slowpath_common+0x68/0x7d
Dec 11 23:47:29 totoro kernel: [  224.527671]  [<f8a9c879>] ? ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527684]  [<c102b143>] warn_slowpath_null+0x14/0x18
Dec 11 23:47:29 totoro kernel: [  224.527740]  [<f8a9c879>] ieee80211_reconfig+0x369/0x6b2 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527784]  [<f8a81276>] ieee80211_restart_work+0x5a/0x87 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527796]  [<c104033f>] process_one_work+0x1d4/0x364
Dec 11 23:47:29 totoro kernel: [  224.527840]  [<f8a8121c>] ? ieee80211_recalc_smps_work+0x31/0x31 [mac80211]
Dec 11 23:47:29 totoro kernel: [  224.527853]  [<c10404ea>] process_scheduled_works+0x1b/0x26
Dec 11 23:47:29 totoro kernel: [  224.527864]  [<c10407e9>] worker_thread+0x19c/0x213
Dec 11 23:47:29 totoro kernel: [  224.527875]  [<c104d874>] ? complete+0x39/0x43
Dec 11 23:47:29 totoro kernel: [  224.527886]  [<c1043ad8>] kthread+0x6c/0x71
Dec 11 23:47:29 totoro kernel: [  224.527897]  [<c104064d>] ? rescuer_thread+0x158/0x158
Dec 11 23:47:29 totoro kernel: [  224.527910]  [<c1043a6c>] ? __init_kthread_worker+0x47/0x47
Dec 11 23:47:29 totoro kernel: [  224.527921]  [<c12924c2>] kernel_thread_helper+0x6/0x10
Dec 11 23:47:29 totoro kernel: [  224.527927] ---[ end trace 281476e3d4638432 ]---
Dec 11 23:47:31 totoro kernel: [  226.548269] iwl3945 0000:03:00.0: Wait for START_ALIVE timeout after 2000ms.
Dec 11 23:48:42 totoro kernel: [  297.968230] cfg80211: Calling CRDA to update world regulatory domain
Dec 11 23:48:42 totoro kernel: [  297.987906] cfg80211: World regulatory domain updated:
Dec 11 23:48:42 totoro kernel: [  297.987917] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Dec 11 23:48:42 totoro kernel: [  297.987921] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Dec 11 23:48:42 totoro kernel: [  297.987925] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Dec 11 23:48:42 totoro kernel: [  297.987929] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Dec 11 23:48:42 totoro kernel: [  297.987933] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Dec 11 23:48:42 totoro kernel: [  297.987937] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Dec 11 23:48:42 totoro kernel: [  297.990648] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, in-tree:ds
Dec 11 23:48:42 totoro kernel: [  297.990654] iwl3945: Copyright(c) 2003-2011 Intel Corporation
Dec 11 23:48:42 totoro kernel: [  298.031528] iwl3945 0000:03:00.0: Tunable channels: 13 802.11bg, 23 802.11a channels
Dec 11 23:48:42 totoro kernel: [  298.031534] iwl3945 0000:03:00.0: Detected Intel Wireless WiFi Link 3945ABG
Dec 11 23:48:42 totoro kernel: [  298.031828] iwl3945 0000:03:00.0: irq 46 for MSI/MSI-X
Dec 11 23:48:42 totoro kernel: [  298.032213] Registered led device: phy0-led
Dec 11 23:48:42 totoro kernel: [  298.034646] ieee80211 phy0: Selected rate control algorithm 'iwl-3945-rs'
Dec 11 23:48:42 totoro kernel: [  298.071566] iwl3945 0000:03:00.0: loaded firmware version 15.32.2.9
Dec 11 23:48:42 totoro kernel: [  298.146073] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Dec 11 23:48:46 totoro kernel: [  301.722868] wlan0: Selected IBSS BSSID ae:3b:0e:ef:61:d2 based on configured SSID
Dec 11 23:48:46 totoro kernel: [  301.753331] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Dec 11 23:49:03 totoro kernel: [  318.624400] iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
Dec 11 23:49:03 totoro kernel: [  318.624414] iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
Dec 11 23:49:03 totoro kernel: [  318.624453] iwl3945 0000:03:00.0: Start IWL Error Log Dump:
Dec 11 23:49:03 totoro kernel: [  318.624462] iwl3945 0000:03:00.0: Status: 0x000202E4, count: 1
Dec 11 23:49:03 totoro kernel: [  318.624470] iwl3945 0000:03:00.0: Desc       Time       asrtPC  blink2 ilink1  nmiPC   Line
Dec 11 23:49:03 totoro kernel: [  318.624701] iwl3945 0000:03:00.0: SYSASSERT     (0x5) 0000055937 0x008B6 0x13BE0 0x00320 0x00000 1095
Dec 11 23:49:03 totoro kernel: [  318.624701] 
Dec 11 23:49:03 totoro kernel: [  318.625026] iwl3945 0000:03:00.0: Error Reply type 0x00000447 cmd C_RXON (0x10) seq 0x044C ser 0x000C0000
Dec 11 23:49:03 totoro kernel: [  318.625074] iwl3945 0000:03:00.0: Command C_RXON failed: FW Error
Dec 11 23:49:03 totoro kernel: [  318.625085] iwl3945 0000:03:00.0: Error setting new configuration (-5).
Dec 11 23:49:03 totoro kernel: [  318.627131] iwl3945 0000:03:00.0: Can't stop Rx DMA.
Dec 11 23:49:03 totoro kernel: [  318.629040] ieee80211 phy0: Hardware restart was requested

I did a couple of kernel recompilations on Debian with kernel-package to make sure that I did not have dirty binaries but the same problem remains. I would be happy if waking up from hibernation resulted in same operations in iwl3945 as "rmmod iwl3945 && modprobe iwl3945" which is a workaround for me.

My kernel tree is v3.6.10 plus these:

commit 58c2c0ba6aae509ba4231889a7f40ecc2cffc10f
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Mon Nov 5 20:07:22 2012 +0100

    iwlegacy: prevent crash
    
    Fixes crashes from bug https://bugzilla.kernel.org/show_bug.cgi?id=49411
    
    Tested-by: Mikko Rapeli <mikko.rapeli@iki.fi>
    Reported-by: Mikko Rapeli <mikko.rapeli@iki.fi>

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..28894c3 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2987,11 +2987,17 @@ il3945_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 {
 	struct il_priv *il = hw->priv;
 	struct il3945_sta_priv *sta_priv = (void *)sta->drv_priv;
-	int ret;
+	int ret = 0;
 	bool is_ap = vif->type == NL80211_IFTYPE_STATION;
 	u8 sta_id;
 
 	mutex_lock(&il->mutex);
+
+	if (WARN_ON(il->txq == NULL)) {
+		ret = -EIO;
+		goto out;
+	}
+
 	D_INFO("station %pM\n", sta->addr);
 	sta_priv->common.sta_id = IL_INVALID_STATION;
 
@@ -2999,8 +3005,7 @@ il3945_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	if (ret) {
 		IL_ERR("Unable to add station %pM (%d)\n", sta->addr, ret);
 		/* Should we return success if return code is EEXIST ? */
-		mutex_unlock(&il->mutex);
-		return ret;
+		goto out;
 	}
 
 	sta_priv->common.sta_id = sta_id;
@@ -3008,9 +3013,9 @@ il3945_mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	/* Initialize rate scaling */
 	D_INFO("Initializing rate scaling for station %pM\n", sta->addr);
 	il3945_rs_rate_init(il, sta, sta_id);
+out:
 	mutex_unlock(&il->mutex);
-
-	return 0;
+	return ret;
 }
 
 static void

commit 9a1faa92044c0ca274fd3c22640f16305808c17e
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Tue Dec 11 23:01:43 2012 +0100

    mac80211: fix ibss scanning
    
    Do not scan on no-IBSS and disabled channels in IBSS mode. Doing this
    can trigger Microcode errors on iwlwifi and iwlegacy drivers.
    
    Also rename ieee80211_request_internal_scan() function since it is only
    used in IBSS mode and simplify calling it from ieee80211_sta_find_ibss().
    
    This patch should address:
    https://bugzilla.redhat.com/show_bug.cgi?id=883414
    https://bugzilla.kernel.org/show_bug.cgi?id=49411
    
    Reported-by: Jesse Kahtava <jesse_kahtava@f-m.fm>
    Reported-by: Mikko Rapeli  <mikko.rapeli@iki.fi>
    Cc: stable@vger.kernel.org
    Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index a5894dd..c55eacc 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -647,8 +647,8 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
 	sdata_info(sdata,
 		   "No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)\n");
 
-	ieee80211_request_internal_scan(sdata,
-			ifibss->ssid, ifibss->ssid_len, NULL);
+	ieee80211_request_ibss_scan(sdata, ifibss->ssid, ifibss->ssid_len,
+				    NULL);
 }
 
 static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
@@ -746,9 +746,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
 					IEEE80211_SCAN_INTERVAL)) {
 		sdata_info(sdata, "Trigger new scan to find an IBSS to join\n");
 
-		ieee80211_request_internal_scan(sdata,
-				ifibss->ssid, ifibss->ssid_len,
-				ifibss->fixed_channel ? ifibss->channel : NULL);
+		ieee80211_request_ibss_scan(sdata, ifibss->ssid,
+					    ifibss->ssid_len, chan);
 	} else {
 		int interval = IEEE80211_SCAN_INTERVAL;
 
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 642a2a3..19d4ec3 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1239,9 +1239,9 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
 
 /* scan/BSS handling */
 void ieee80211_scan_work(struct work_struct *work);
-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
-				    const u8 *ssid, u8 ssid_len,
-				    struct ieee80211_channel *chan);
+int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata,
+				const u8 *ssid, u8 ssid_len,
+				struct ieee80211_channel *chan);
 int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
 			   struct cfg80211_scan_request *req);
 void ieee80211_scan_cancel(struct ieee80211_local *local);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 839dd97..09fc38d 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -819,9 +819,9 @@ int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
 	return res;
 }
 
-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
-				    const u8 *ssid, u8 ssid_len,
-				    struct ieee80211_channel *chan)
+int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata,
+				const u8 *ssid, u8 ssid_len,
+				struct ieee80211_channel *chan)
 {
 	struct ieee80211_local *local = sdata->local;
 	int ret = -EBUSY;
@@ -835,22 +835,36 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
 
 	/* fill internal scan request */
 	if (!chan) {
-		int i, nchan = 0;
+		int i, max_n;
+		int n_ch = 0;
 
 		for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
 			if (!local->hw.wiphy->bands[band])
 				continue;
-			for (i = 0;
-			     i < local->hw.wiphy->bands[band]->n_channels;
-			     i++) {
-				local->int_scan_req->channels[nchan] =
+
+			max_n = local->hw.wiphy->bands[band]->n_channels;
+			for (i = 0; i < max_n; i++) {
+				struct ieee80211_channel *tmp_ch =
 				    &local->hw.wiphy->bands[band]->channels[i];
-				nchan++;
+
+				if (tmp_ch->flags & (IEEE80211_CHAN_NO_IBSS |
+						     IEEE80211_CHAN_DISABLED))
+					continue;
+
+				local->int_scan_req->channels[n_ch] = tmp_ch;
+				n_ch++;
 			}
 		}
 
-		local->int_scan_req->n_channels = nchan;
+		if (WARN_ON_ONCE(n_ch == 0))
+			goto unlock;
+
+		local->int_scan_req->n_channels = n_ch;
 	} else {
+		if (WARN_ON_ONCE(chan->flags & (IEEE80211_CHAN_NO_IBSS |
+						IEEE80211_CHAN_DISABLED)))
+			goto unlock;
+
 		local->int_scan_req->channels[0] = chan;
 		local->int_scan_req->n_channels = 1;
 	}
Comment 20 Mikko Rapeli 2012-12-11 23:02:48 UTC
Created attachment 88931 [details]
Kernel config for 3.6.10, just in case there's something odd in it
Comment 21 Mikko Rapeli 2012-12-11 23:45:02 UTC
Booting back and forth between 3.6.10 with one or two patches mentioned above, and now I can't repeat the problem anymore. Sigh.
Comment 22 Mikko Rapeli 2012-12-11 23:55:54 UTC
(In reply to comment #21)
> Booting back and forth between 3.6.10 with one or two patches mentioned
> above,
> and now I can't repeat the problem anymore. Sigh.

Sorry, my bad. 

With debug options "modprobe iwl3945 debug=800" the problem goes away but the debug options stay within mac80211 stack after iwl3945 is rmmod'ed. After a clean reboot and hibernation cycle problem repeats again with both patches applied. Sorry for the noise.
Comment 23 Stanislaw Gruszka 2012-12-12 14:10:01 UTC
I requested for "iw phy phy0 info" already in comment 18, can you show that ?
Comment 24 Florian Mickler 2013-01-19 23:04:32 UTC
A patch referencing this bug report has been merged in Linux v3.8-rc4:

commit 34bcf71502413f8903ade93746f2d0f04b937a78
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Tue Dec 11 10:48:23 2012 +0100

    mac80211: fix ibss scanning
Comment 25 Stanislaw Gruszka 2013-01-26 17:54:21 UTC
I posted yet another patch, which possibly can fix this:

http://marc.info/?l=linux-wireless&m=135833314404168&w=2
Comment 26 Mikko Rapeli 2013-03-08 06:08:59 UTC
With 3.8.2 all problems mentioned in this bug report are gone. Ad-Hoc mode works as expected with hibernation too.

Note You need to log in before you can comment on or make changes to this bug.