diff options
author | Eliad Peller <eliad@wizery.com> | 2015-03-03 05:03:20 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-03-19 09:06:28 -0400 |
commit | 48e67751681654efe9743be64f18f1f08d1dbef2 (patch) | |
tree | 2a8e944af43bd68cec134b3a378e97c3e41f933b | |
parent | 28c8c19a0004a74cd6303fa088b33212d0d80536 (diff) |
iwlwifi: mvm: take IWL_MVM_REF_UCODE_DOWN before restarting hw
we unref IWL_MVM_REF_UCODE_DOWN on iwl_mvm_restart_complete().
Usually, the restart is initiated by iwl_mvm_nic_restart(),
which takes the reference before restarting the hw.
However, in D3 flow we might call ieee80211_restart_hw()
directly (in case of suspend error and on d3_test-resume),
which without taking the ref first. fix it.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 5f8afa5f11a3..e730ea2b0812 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -1131,6 +1131,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, | |||
1131 | iwl_trans_d3_suspend(mvm->trans, test); | 1131 | iwl_trans_d3_suspend(mvm->trans, test); |
1132 | out: | 1132 | out: |
1133 | if (ret < 0) { | 1133 | if (ret < 0) { |
1134 | iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); | ||
1134 | ieee80211_restart_hw(mvm->hw); | 1135 | ieee80211_restart_hw(mvm->hw); |
1135 | iwl_mvm_free_nd(mvm); | 1136 | iwl_mvm_free_nd(mvm); |
1136 | } | 1137 | } |
@@ -2016,6 +2017,7 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) | |||
2016 | __iwl_mvm_resume(mvm, true); | 2017 | __iwl_mvm_resume(mvm, true); |
2017 | rtnl_unlock(); | 2018 | rtnl_unlock(); |
2018 | iwl_abort_notification_waits(&mvm->notif_wait); | 2019 | iwl_abort_notification_waits(&mvm->notif_wait); |
2020 | iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); | ||
2019 | ieee80211_restart_hw(mvm->hw); | 2021 | ieee80211_restart_hw(mvm->hw); |
2020 | 2022 | ||
2021 | /* wait for restart and disconnect all interfaces */ | 2023 | /* wait for restart and disconnect all interfaces */ |