#include "driver-ops.h"
 #include "led.h"
 
+/* return value indicates whether the driver should be further notified */
+static bool ieee80211_quiesce(struct ieee80211_sub_if_data *sdata)
+{
+       switch (sdata->vif.type) {
+       case NL80211_IFTYPE_STATION:
+               ieee80211_sta_quiesce(sdata);
+               return true;
+       case NL80211_IFTYPE_ADHOC:
+               ieee80211_ibss_quiesce(sdata);
+               return true;
+       case NL80211_IFTYPE_MESH_POINT:
+               ieee80211_mesh_quiesce(sdata);
+               return true;
+       case NL80211_IFTYPE_AP_VLAN:
+       case NL80211_IFTYPE_MONITOR:
+               /* don't tell driver about this */
+               return false;
+       default:
+               return true;
+       }
+}
+
 int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 {
        struct ieee80211_local *local = hw_to_local(hw);
                        local->quiescing = false;
                        return err;
                }
+               list_for_each_entry(sdata, &local->interfaces, list) {
+                       cancel_work_sync(&sdata->work);
+                       ieee80211_quiesce(sdata);
+               }
                goto suspend;
        }
 
        list_for_each_entry(sdata, &local->interfaces, list) {
                cancel_work_sync(&sdata->work);
 
-               switch(sdata->vif.type) {
-               case NL80211_IFTYPE_STATION:
-                       ieee80211_sta_quiesce(sdata);
-                       break;
-               case NL80211_IFTYPE_ADHOC:
-                       ieee80211_ibss_quiesce(sdata);
-                       break;
-               case NL80211_IFTYPE_MESH_POINT:
-                       ieee80211_mesh_quiesce(sdata);
-                       break;
-               case NL80211_IFTYPE_AP_VLAN:
-               case NL80211_IFTYPE_MONITOR:
-                       /* don't tell driver about this */
+               if (!ieee80211_quiesce(sdata))
                        continue;
-               default:
-                       break;
-               }
 
                if (!ieee80211_sdata_running(sdata))
                        continue;