Josh Boyer 28ce01f
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
Josh Boyer 6bc6734
index baaa860..7a3d675 100644
Josh Boyer 28ce01f
--- a/net/mac80211/iface.c
Josh Boyer 28ce01f
+++ b/net/mac80211/iface.c
Josh Boyer 28ce01f
@@ -748,8 +748,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
Josh Boyer 28ce01f
 				 sdata->dev->addr_len);
Josh Boyer 28ce01f
 		spin_unlock_bh(&local->filter_lock);
Josh Boyer 28ce01f
 		netif_addr_unlock_bh(sdata->dev);
Josh Boyer 28ce01f
-
Josh Boyer 28ce01f
-		ieee80211_configure_filter(local);
Josh Boyer 28ce01f
+		/* configure filter latter (if not suspended) */
Josh Boyer 28ce01f
 	}
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
 	del_timer_sync(&local->dynamic_ps_timer);
Josh Boyer 28ce01f
@@ -814,10 +813,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
Josh Boyer 28ce01f
 		}
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
 		ieee80211_adjust_monitor_flags(sdata, -1);
Josh Boyer 28ce01f
-		ieee80211_configure_filter(local);
Josh Boyer 28ce01f
-		mutex_lock(&local->mtx);
Josh Boyer 28ce01f
-		ieee80211_recalc_idle(local);
Josh Boyer 28ce01f
-		mutex_unlock(&local->mtx);
Josh Boyer 28ce01f
+		/* tell driver latter (if not suspended) */
Josh Boyer 28ce01f
 		break;
Josh Boyer 28ce01f
 	case NL80211_IFTYPE_P2P_DEVICE:
Josh Boyer 28ce01f
 		/* relies on synchronize_rcu() below */
Josh Boyer 6bc6734
@@ -848,28 +844,31 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
 		drv_remove_interface_debugfs(local, sdata);
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
-		if (going_down)
Josh Boyer 28ce01f
+		if (going_down && !local->suspended)
Josh Boyer 28ce01f
 			drv_remove_interface(local, sdata);
Josh Boyer 28ce01f
 	}
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
 	sdata->bss = NULL;
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
-	ieee80211_recalc_ps(local, -1);
Josh Boyer 28ce01f
-
Josh Boyer 28ce01f
-	if (local->open_count == 0) {
Josh Boyer 28ce01f
-		if (local->ops->napi_poll)
Josh Boyer 28ce01f
-			napi_disable(&local->napi);
Josh Boyer 28ce01f
-		ieee80211_clear_tx_pending(local);
Josh Boyer 28ce01f
-		ieee80211_stop_device(local);
Josh Boyer 28ce01f
-
Josh Boyer 28ce01f
-		/* no reconfiguring after stop! */
Josh Boyer 28ce01f
-		hw_reconf_flags = 0;
Josh Boyer 28ce01f
+	if (!local->suspended) {
Josh Boyer 28ce01f
+		if (local->open_count == 0) {
Josh Boyer 28ce01f
+			if (local->ops->napi_poll)
Josh Boyer 28ce01f
+				napi_disable(&local->napi);
Josh Boyer 28ce01f
+			ieee80211_clear_tx_pending(local);
Josh Boyer 28ce01f
+			ieee80211_stop_device(local);
Josh Boyer 28ce01f
+		} else {
Josh Boyer 28ce01f
+			ieee80211_configure_filter(local);
Josh Boyer 28ce01f
+			ieee80211_recalc_ps(local, -1);
Josh Boyer 28ce01f
+ 
Josh Boyer 28ce01f
+			mutex_lock(&local->mtx);
Josh Boyer 28ce01f
+			ieee80211_recalc_idle(local);
Josh Boyer 28ce01f
+			mutex_unlock(&local->mtx);
Josh Boyer 28ce01f
+
Josh Boyer 28ce01f
+			if (hw_reconf_flags)
Josh Boyer 28ce01f
+				ieee80211_hw_config(local, hw_reconf_flags);
Josh Boyer 6bc6734
+		}
Josh Boyer 28ce01f
 	}
Josh Boyer 28ce01f
 
Josh Boyer 28ce01f
-	/* do after stop to avoid reconfiguring when we stop anyway */
Josh Boyer 28ce01f
-	if (hw_reconf_flags)
Josh Boyer 28ce01f
-		ieee80211_hw_config(local, hw_reconf_flags);
Josh Boyer 28ce01f
-
Josh Boyer 28ce01f
 	spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
Josh Boyer 28ce01f
 	for (i = 0; i < IEEE80211_MAX_QUEUES; i++) {
Josh Boyer 28ce01f
 		skb_queue_walk_safe(&local->pending[i], skb, tmp) {