summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2017-03-23 11:08:59 +0200
committerLuca Coelho <luciano.coelho@intel.com>2017-06-23 00:12:59 +0300
commitf45f979dc208c96bb13a229381be2c1e4bf3afb3 (patch)
treee7f01b5caed1224e91ff1623756ca496b4383647
parent0ec971fdaddfcab72e5104e35774f489991f1f68 (diff)
downloadlinux-f45f979dc208c96bb13a229381be2c1e4bf3afb3.tar.bz2
iwlwifi: mvm: disable dbg data collect when fw isn't alive
If FW isn't alive, trying to collect debug data will result in errors both in driver and in the collected data, so just warn and leave the collecting function in this case. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
index c66baf1e1443..d5cb47e2fe44 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
@@ -915,6 +915,10 @@ int iwl_mvm_fw_dbg_collect_desc(struct iwl_mvm *mvm,
if (trigger)
delay = msecs_to_jiffies(le32_to_cpu(trigger->stop_delay));
+ if (WARN(mvm->trans->state == IWL_TRANS_NO_FW,
+ "Can't collect dbg data when FW isn't alive\n"))
+ return -EIO;
+
if (test_and_set_bit(IWL_MVM_STATUS_DUMPING_FW_LOG, &mvm->status))
return -EBUSY;