1 From bac453ab3745eaa64137ea6e77e009b45954f0ae Mon Sep 17 00:00:00 2001
2 From: Luca Coelho <luciano.coelho@intel.com>
3 Date: Fri, 7 Oct 2016 15:16:26 +0300
4 Subject: iwlwifi: mvm: don't restart HW if suspend fails with unified image
6 From: Luca Coelho <luciano.coelho@intel.com>
8 commit bac453ab3745eaa64137ea6e77e009b45954f0ae upstream.
10 For unified images, we shouldn't restart the HW if suspend fails. The
11 only reason for restarting the HW with non-unified images is to go
14 Fixes: 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend")
15 Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 ++++++++-----
20 1 file changed, 8 insertions(+), 5 deletions(-)
22 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
23 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
24 @@ -1262,12 +1262,15 @@ static int __iwl_mvm_suspend(struct ieee
25 iwl_trans_d3_suspend(mvm->trans, test, !unified_image);
28 - iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
29 - if (mvm->restart_fw > 0) {
31 - ieee80211_restart_hw(mvm->hw);
35 + if (!unified_image) {
36 + iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
37 + if (mvm->restart_fw > 0) {
39 + ieee80211_restart_hw(mvm->hw);
44 mutex_unlock(&mvm->mutex);