Commit cf8c3cff authored by Luciano Coelho's avatar Luciano Coelho

iwlwifi: mvm: make sure d0i3 exit work runs before suspending

If we are in d0i3 when entering suspend, we leave d0i3 so that
mac80211 can call us to remove connections or whatever before going to
suspend.  We do this by calling pm_runtime_resume() early in the slave
transport flow and reactivating it later, when the wiphy suspend flow
runs.

The problem is that we queue a work in order to leave d0i3.  If this
work hasn't run yet when the wiphy suspend flow is called, we have a
race and entering d0i3 fails (because we're still holding the
IWL_MVM_REF_EXIT_WORK reference).

To solve this, simply flush the d0i3_exit_work at the beginning of the
iwl_mvm_suspend() function.
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
parent 94939080
...@@ -1170,6 +1170,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) ...@@ -1170,6 +1170,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
int ret; int ret;
/* make sure the d0i3 exit work is not pending */
flush_work(&mvm->d0i3_exit_work);
ret = iwl_trans_suspend(mvm->trans); ret = iwl_trans_suspend(mvm->trans);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment