[kernel/f18] Add patch to fix ieee80211_do_stop (rhbz 892599)

Josh Boyer jwboyer at fedoraproject.org
Tue Mar 12 16:59:45 UTC 2013


commit f032373d45ef89603d7baaa40d7c5ae4416f4f5d
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Mar 12 12:49:55 2013 -0400

    Add patch to fix ieee80211_do_stop (rhbz 892599)

 kernel.spec                                        |    7 ++-
 ..._for_ieee80211_do_stop_while_suspend_v3.8.patch |   71 ++++++++++++++++++++
 2 files changed, 76 insertions(+), 2 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index db65faf..0fd7b7a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -803,9 +803,10 @@ Patch24108: signal-always-clear-sa_restorer-on-execve.patch
 #CVE-2013-0913 rhbz 920471 920529
 Patch24109: drm-i915-bounds-check-execbuffer-relocation-count.patch
 
-#rhbz 865863
+#rhbz 856863 892599
 Patch24110: mac80211-Fix-crash-due-to-un-canceled-work-items.patch
 Patch24111: cfg80211-mac80211-disconnect-on-suspend.patch
+Patch24112: mac80211_fixes_for_ieee80211_do_stop_while_suspend_v3.8.patch
 
 # AMD64 EDAC reports a wrong dimm count with new API. Fix it
 Patch25000: amd64_edac_fix_rank_count.patch
@@ -1564,9 +1565,10 @@ ApplyPatch signal-always-clear-sa_restorer-on-execve.patch
 #CVE-2013-0913 rhbz 920471 920529
 ApplyPatch drm-i915-bounds-check-execbuffer-relocation-count.patch
 
-#rhbz 856863
+#rhbz 856863 892599
 ApplyPatch mac80211-Fix-crash-due-to-un-canceled-work-items.patch
 ApplyPatch cfg80211-mac80211-disconnect-on-suspend.patch
+ApplyPatch mac80211_fixes_for_ieee80211_do_stop_while_suspend_v3.8.patch
 
 # END OF PATCH APPLICATIONS
 
@@ -2426,6 +2428,7 @@ fi
 #                 ||     ||
 %changelog
 * Tue Mar 12 2013 Josh Boyer <jwboyer at redhat.com>
+- Add patch to fix ieee80211_do_stop (rhbz 892599)
 - Add patches to fix cfg80211 issues with suspend (rhbz 856863)
 - Add patch to fix Cypress trackpad on XPS 12 machines (rhbz 912166)
 - CVE-2013-0913 drm/i915: head writing overflow (rhbz 920471 920529)
diff --git a/mac80211_fixes_for_ieee80211_do_stop_while_suspend_v3.8.patch b/mac80211_fixes_for_ieee80211_do_stop_while_suspend_v3.8.patch
new file mode 100644
index 0000000..8249ab3
--- /dev/null
+++ b/mac80211_fixes_for_ieee80211_do_stop_while_suspend_v3.8.patch
@@ -0,0 +1,71 @@
+diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
+index 8be854e..6d2bab7 100644
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -605,7 +605,7 @@ int ieee80211_do_open(struct wireless_dev *wdev, bool coming_up)
+ 		}
+ 
+ 		ieee80211_adjust_monitor_flags(sdata, 1);
+-		ieee80211_configure_filter(local);
++		/* tell driver latter (if not suspended) */
+ 
+ 		netif_carrier_on(dev);
+ 		break;
+@@ -804,8 +804,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
+ 				 sdata->dev->addr_len);
+ 		spin_unlock_bh(&local->filter_lock);
+ 		netif_addr_unlock_bh(sdata->dev);
+-
+-		ieee80211_configure_filter(local);
++		/* configure filter latter (if not suspended) */
+ 	}
+ 
+ 	del_timer_sync(&local->dynamic_ps_timer);
+@@ -872,32 +871,30 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
+ 		 */
+ 		ieee80211_free_keys(sdata);
+ 
+-		if (going_down)
++		if (going_down && !local->suspended)
+ 			drv_remove_interface(local, sdata);
+ 	}
+ 
+ 	sdata->bss = NULL;
+ 
+-	mutex_lock(&local->mtx);
+-	hw_reconf_flags |= __ieee80211_recalc_idle(local);
+-	mutex_unlock(&local->mtx);
+-
+-	ieee80211_recalc_ps(local, -1);
++	if (!local->suspended) {
++		if (local->open_count == 0) {
++			if (local->ops->napi_poll)
++				napi_disable(&local->napi);
++			ieee80211_clear_tx_pending(local);
++			ieee80211_stop_device(local);
++		} else {
++			ieee80211_recalc_ps(local, -1);
+ 
+-	if (local->open_count == 0) {
+-		if (local->ops->napi_poll)
+-			napi_disable(&local->napi);
+-		ieee80211_clear_tx_pending(local);
+-		ieee80211_stop_device(local);
++			mutex_lock(&local->mtx);
++			hw_reconf_flags |= __ieee80211_recalc_idle(local);
++			mutex_unlock(&local->mtx);
+ 
+-		/* no reconfiguring after stop! */
+-		hw_reconf_flags = 0;
++			if (hw_reconf_flags)
++				ieee80211_hw_config(local, hw_reconf_flags);
++		}
+ 	}
+ 
+-	/* do after stop to avoid reconfiguring when we stop anyway */
+-	if (hw_reconf_flags)
+-		ieee80211_hw_config(local, hw_reconf_flags);
+-
+ 	spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
+ 	for (i = 0; i < IEEE80211_MAX_QUEUES; i++) {
+ 		skb_queue_walk_safe(&local->pending[i], skb, tmp) {


More information about the scm-commits mailing list