]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.28/iwlwifi-mvm-don-t-restart-hw-if-suspend-fails-with-unified-image.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.28 / iwlwifi-mvm-don-t-restart-hw-if-suspend-fails-with-unified-image.patch
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
5
6 From: Luca Coelho <luciano.coelho@intel.com>
7
8 commit bac453ab3745eaa64137ea6e77e009b45954f0ae upstream.
9
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
12 back to the D0 image.
13
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>
17
18 ---
19 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 ++++++++-----
20 1 file changed, 8 insertions(+), 5 deletions(-)
21
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);
26 out:
27 if (ret < 0) {
28 - iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
29 - if (mvm->restart_fw > 0) {
30 - mvm->restart_fw--;
31 - ieee80211_restart_hw(mvm->hw);
32 - }
33 iwl_mvm_free_nd(mvm);
34 +
35 + if (!unified_image) {
36 + iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
37 + if (mvm->restart_fw > 0) {
38 + mvm->restart_fw--;
39 + ieee80211_restart_hw(mvm->hw);
40 + }
41 + }
42 }
43 out_noreset:
44 mutex_unlock(&mvm->mutex);