Commit 37948fcf authored by Eliad Peller's avatar Eliad Peller Committed by Emmanuel Grumbach

iwlwifi: mvm: wait for d0i3 exit on hw restart

On hw restart, make sure to wait for d0i3 exit
(by checking the IN_D0I3 status bit).

This is needed in order to avoid the stale
d0i3_exit_work from doing harm (e.g. unref
cleared reference).
Signed-off-by: default avatarEliad Peller <eliadx.peller@intel.com>
Reviewed-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent b0677f71
......@@ -972,6 +972,19 @@ static int iwl_mvm_mac_start(struct ieee80211_hw *hw)
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
int ret;
/* Some hw restart cleanups must not hold the mutex */
if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
/*
* Make sure we are out of d0i3. This is needed
* to make sure the reference accounting is correct
* (and there is no stale d0i3_exit_work).
*/
wait_event_timeout(mvm->d0i3_exit_waitq,
!test_bit(IWL_MVM_STATUS_IN_D0I3,
&mvm->status),
HZ);
}
mutex_lock(&mvm->mutex);
ret = __iwl_mvm_mac_start(mvm);
mutex_unlock(&mvm->mutex);
......
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