Skip to content

Commit

Permalink
iwlwifi: mvm: disable dbg data collect when fw isn't alive
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liad Kaufman authored and Luca Coelho committed Jun 22, 2017
1 parent 0ec971f commit f45f979
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f45f979

Please sign in to comment.