]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: mvm: comply with fw_restart mod param on suspend
authorHaim Dreyfuss <haim.dreyfuss@intel.com>
Mon, 12 Sep 2016 07:24:19 +0000 (10:24 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 19 Oct 2016 05:46:33 +0000 (08:46 +0300)
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>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c

index 0e17cb238643ec177ef478aa8b995bba0422ed88..03a8fc5865488415c7ff1497612904f48e1ceec4 100644 (file)
@@ -1254,7 +1254,10 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
  out:
        if (ret < 0) {
                iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
-               ieee80211_restart_hw(mvm->hw);
+               if (mvm->restart_fw > 0) {
+                       mvm->restart_fw--;
+                       ieee80211_restart_hw(mvm->hw);
+               }
                iwl_mvm_free_nd(mvm);
        }
  out_noreset: