diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2015-08-24 14:53:25 +0300 |
---|---|---|
committer | Luciano Coelho <luciano.coelho@intel.com> | 2015-08-28 13:26:34 +0300 |
commit | cf8c3cff3fcce966c6d31001c09c92778f961eea (patch) | |
tree | 03e0ddf2fb5f4386a9dcc369c6cf149bb73cc8ac | |
parent | 9493908095a3d0b4fa24ff529975376b3a2b8394 (diff) | |
download | blackbird-op-linux-cf8c3cff3fcce966c6d31001c09c92778f961eea.tar.gz blackbird-op-linux-cf8c3cff3fcce966c6d31001c09c92778f961eea.zip |
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: Luciano Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 04264e417c1c..1d54355ad76a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c @@ -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); int ret; + /* make sure the d0i3 exit work is not pending */ + flush_work(&mvm->d0i3_exit_work); + ret = iwl_trans_suspend(mvm->trans); if (ret) return ret; |