|
@@ -941,6 +941,25 @@ static void iwl_mvm_restart_complete(struct iwl_mvm *mvm)
|
|
|
mutex_unlock(&mvm->mutex);
|
|
|
}
|
|
|
|
|
|
+static void iwl_mvm_resume_complete(struct iwl_mvm *mvm)
|
|
|
+{
|
|
|
+ bool exit_now;
|
|
|
+
|
|
|
+ if (!iwl_mvm_is_d0i3_supported(mvm))
|
|
|
+ return;
|
|
|
+
|
|
|
+ mutex_lock(&mvm->d0i3_suspend_mutex);
|
|
|
+ __clear_bit(D0I3_DEFER_WAKEUP, &mvm->d0i3_suspend_flags);
|
|
|
+ exit_now = __test_and_clear_bit(D0I3_PENDING_WAKEUP,
|
|
|
+ &mvm->d0i3_suspend_flags);
|
|
|
+ mutex_unlock(&mvm->d0i3_suspend_mutex);
|
|
|
+
|
|
|
+ if (exit_now) {
|
|
|
+ IWL_DEBUG_RPM(mvm, "Run deferred d0i3 exit\n");
|
|
|
+ _iwl_mvm_exit_d0i3(mvm);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static void
|
|
|
iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw,
|
|
|
enum ieee80211_reconfig_type reconfig_type)
|
|
@@ -952,6 +971,7 @@ iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw,
|
|
|
iwl_mvm_restart_complete(mvm);
|
|
|
break;
|
|
|
case IEEE80211_RECONFIG_TYPE_SUSPEND:
|
|
|
+ iwl_mvm_resume_complete(mvm);
|
|
|
break;
|
|
|
}
|
|
|
}
|