diff options
author | Haim Dreyfuss <haim.dreyfuss@intel.com> | 2016-09-12 03:24:19 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-10-19 01:46:33 -0400 |
commit | 5bfadc8255e2cd92be7538fd7dfa777c27f58be0 (patch) | |
tree | cb848d8ba0f880f254d719564f1d60e782c8d8fc | |
parent | 85cd69b8f1f7e289fe931a82889e673fd0f04842 (diff) |
iwlwifi: mvm: comply with fw_restart mod param on suspend
If the suspend flow fails, we restart the hardware to go back to
the D0 image (with non-unified images), but we don't comply with
the fw_restart module parameter. If something goes wrong when
starting the D3 image, we may want to debug it, so we should
comply with the fw_restart flag to avoid clearing everything up
and losing the firmware state when the error occurred.
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 0e17cb238643..03a8fc586548 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c | |||
@@ -1254,7 +1254,10 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, | |||
1254 | out: | 1254 | out: |
1255 | if (ret < 0) { | 1255 | if (ret < 0) { |
1256 | iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); | 1256 | iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); |
1257 | ieee80211_restart_hw(mvm->hw); | 1257 | if (mvm->restart_fw > 0) { |
1258 | mvm->restart_fw--; | ||
1259 | ieee80211_restart_hw(mvm->hw); | ||
1260 | } | ||
1258 | iwl_mvm_free_nd(mvm); | 1261 | iwl_mvm_free_nd(mvm); |
1259 | } | 1262 | } |
1260 | out_noreset: | 1263 | out_noreset: |