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