]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/mac80211/pm.c
Merge remote-tracking branch 'arm-soc/for-next'
[karo-tx-linux.git] / net / mac80211 / pm.c
index b676b9fa707b3c8872a1065d8582b8ff1463e607..00a43a70e1fc30eedb09ab9dcdde8af2a9c89673 100644 (file)
@@ -6,6 +6,13 @@
 #include "driver-ops.h"
 #include "led.h"
 
+static void ieee80211_sched_scan_cancel(struct ieee80211_local *local)
+{
+       if (ieee80211_request_sched_scan_stop(local))
+               return;
+       cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy);
+}
+
 int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 {
        struct ieee80211_local *local = hw_to_local(hw);
@@ -23,7 +30,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 
        ieee80211_del_virtual_monitor(local);
 
-       if (ieee80211_hw_check(hw, AMPDU_AGGREGATION)) {
+       if (ieee80211_hw_check(hw, AMPDU_AGGREGATION) &&
+           !(wowlan && wowlan->any)) {
                mutex_lock(&local->sta_mtx);
                list_for_each_entry(sta, &local->sta_list, list) {
                        set_sta_flag(sta, WLAN_STA_BLOCK_BA);
@@ -33,6 +41,10 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
                mutex_unlock(&local->sta_mtx);
        }
 
+       /* keep sched_scan only in case of 'any' trigger */
+       if (!(wowlan && wowlan->any))
+               ieee80211_sched_scan_cancel(local);
+
        ieee80211_stop_queues_by_reason(hw,
                                        IEEE80211_MAX_QUEUE_MAP,
                                        IEEE80211_QUEUE_STOP_REASON_SUSPEND,