|
@@ -2060,6 +2060,18 @@ int ieee80211_reconfig(struct ieee80211_local *local)
|
|
mb();
|
|
mb();
|
|
local->resuming = false;
|
|
local->resuming = false;
|
|
|
|
|
|
|
|
+ /* It's possible that we don't handle the scan completion in
|
|
|
|
+ * time during suspend, so if it's still marked as completed
|
|
|
|
+ * here, queue the work and flush it to clean things up.
|
|
|
|
+ * Instead of calling the worker function directly here, we
|
|
|
|
+ * really queue it to avoid potential races with other flows
|
|
|
|
+ * scheduling the same work.
|
|
|
|
+ */
|
|
|
|
+ if (test_bit(SCAN_COMPLETED, &local->scanning)) {
|
|
|
|
+ ieee80211_queue_delayed_work(&local->hw, &local->scan_work, 0);
|
|
|
|
+ flush_delayed_work(&local->scan_work);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (local->open_count && !reconfig_due_to_wowlan)
|
|
if (local->open_count && !reconfig_due_to_wowlan)
|
|
drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_SUSPEND);
|
|
drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_SUSPEND);
|
|
|
|
|