Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: don't try to powersave/config disabled interfaces
@ 2009-01-26 18:11 Johannes Berg
  2009-01-26 18:19 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-01-26 18:11 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/scan.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- wireless-testing.orig/net/mac80211/scan.c	2009-01-26 19:10:06.000000000 +0100
+++ wireless-testing/net/mac80211/scan.c	2009-01-26 19:10:33.000000000 +0100
@@ -475,6 +475,9 @@ void ieee80211_scan_completed(struct iee
 
 	mutex_lock(&local->iflist_mtx);
 	list_for_each_entry(sdata, &local->interfaces, list) {
+		if (!netif_running(sdata->dev))
+			continue;
+
 		/* Tell AP we're back */
 		if (sdata->vif.type == NL80211_IFTYPE_STATION) {
 			if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED) {
@@ -637,6 +640,9 @@ int ieee80211_start_scan(struct ieee8021
 
 	mutex_lock(&local->iflist_mtx);
 	list_for_each_entry(sdata, &local->interfaces, list) {
+		if (!netif_running(sdata->dev))
+			continue;
+
 		ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON_ENABLED);
 
 		if (sdata->vif.type == NL80211_IFTYPE_STATION) {



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: don't try to powersave/config disabled interfaces
  2009-01-26 18:11 [PATCH] mac80211: don't try to powersave/config disabled interfaces Johannes Berg
@ 2009-01-26 18:19 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-01-26 18:19 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 2887 bytes --]

Should fix warnings like this:

[20661.028030] ------------[ cut here ]------------
[20661.028035] WARNING: at net/mac80211/main.c:161 ieee80211_if_config+0x204/0x250 [mac80211]()
[20661.028039] Hardware name: MacBook5,1
[20661.028041] Modules linked in: zd1211rw mac80211 cfg80211 sha256_generic af_packet binfmt_misc rfcomm l2cap kvm_intel kvm acpi_cpufreq cpufreq_userspace cpufreq_powersave fuse loop btusb bluetooth bcm5974 snd_hda_codec_realtek hid_apple usbhid arc4 snd_hda_intel snd_hda_codec snd_hwdep uvcvideo snd_pcm_oss snd_mixer_oss rfkill videodev v4l1_compat v4l2_compat_ioctl32 snd_pcm joydev snd_seq_oss snd_seq_midi_event snd_seq snd_timer snd_seq_device sg applesmc hwmon snd input_polldev mbp_nvidia_bl soundcore ehci_hcd ohci_hcd sr_mod backlight ssb cdrom snd_page_alloc usbcore evdev sd_mod unix [last unloaded: cfg80211]
[20661.028122] Pid: 3997, comm: phy0 Tainted: G        W  2.6.29-rc2-wl-11979-gc32422d-dirty #21
[20661.028125] Call Trace:
[20661.028134]  [<ffffffff802467f0>] warn_slowpath+0xd0/0x130
[20661.028140]  [<ffffffff8027525f>] ? __lock_acquired+0x18f/0x290
[20661.028146]  [<ffffffff80508afb>] ? __qdisc_run+0xeb/0x2a0
[20661.028150]  [<ffffffff80508afb>] ? __qdisc_run+0xeb/0x2a0
[20661.028155]  [<ffffffff8024d336>] ? local_bh_enable+0x96/0x120
[20661.028160]  [<ffffffff80272a49>] ? trace_hardirqs_on_caller+0x29/0x1e0
[20661.028165]  [<ffffffff804f4e4e>] ? dev_queue_xmit+0x14e/0x4b0
[20661.028170]  [<ffffffff80272c0d>] ? trace_hardirqs_on+0xd/0x10
[20661.028174]  [<ffffffff8024d336>] ? local_bh_enable+0x96/0x120
[20661.028177]  [<ffffffff804f4e4e>] ? dev_queue_xmit+0x14e/0x4b0
[20661.028191]  [<ffffffffa11f2d24>] ieee80211_if_config+0x204/0x250 [mac80211]
[20661.028209]  [<ffffffffa1210081>] ? ieee80211_tx_skb+0x61/0x70 [mac80211]
[20661.028223]  [<ffffffffa11f922a>] ? ieee80211_send_nullfunc+0xda/0x110 [mac80211]
[20661.028237]  [<ffffffffa11f936e>] ieee80211_start_scan+0x10e/0x290 [mac80211]
[20661.028252]  [<ffffffffa1201300>] ? ieee80211_sta_work+0x0/0x340 [mac80211]
[20661.028267]  [<ffffffffa12013d6>] ieee80211_sta_work+0xd6/0x340 [mac80211]
[20661.028281]  [<ffffffffa1201300>] ? ieee80211_sta_work+0x0/0x340 [mac80211]
[20661.028286]  [<ffffffff8025a735>] run_workqueue+0x105/0x250
[20661.028291]  [<ffffffff8025a6e3>] ? run_workqueue+0xb3/0x250
[20661.028296]  [<ffffffff8025a92f>] worker_thread+0xaf/0x130
[20661.028301]  [<ffffffff8025f480>] ? autoremove_wake_function+0x0/0x40
[20661.028306]  [<ffffffff8025a880>] ? worker_thread+0x0/0x130
[20661.028310]  [<ffffffff8025efb9>] kthread+0x49/0x90
[20661.028315]  [<ffffffff8020cdba>] child_rip+0xa/0x20
[20661.028319]  [<ffffffff8020c780>] ? restore_args+0x0/0x30
[20661.028322]  [<ffffffff8025ef70>] ? kthread+0x0/0x90
[20661.028326]  [<ffffffff8020cdb0>] ? child_rip+0x0/0x20
[20661.028329] ---[ end trace b62cb281890fe250 ]---


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-26 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 18:11 [PATCH] mac80211: don't try to powersave/config disabled interfaces Johannes Berg
2009-01-26 18:19 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox