aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2017-11-20 11:02:05 -0500
committerLuca Coelho <luciano.coelho@intel.com>2017-12-05 14:01:40 -0500
commit6362ab721ef5c4ecfa01f53ad4137d3d984f0c6c (patch)
treec5ea068797f97d2490d9b532ab383d0d6632bead /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parentd4e4aa7c8e342dc6206771ade55f40f8883fd7e6 (diff)
iwlwifi: mvm: avoid dumping assert log when device is stopped
We might erroneously get to error dumping code when the device is already stopped. In that case the driver will detect a defective value and will try to reset the HW, assuming it is only a bus issue. The driver than proceeds with the dumping. The result has two side effects: 1. The device won't be stopped again, since the transport status is already stopped, so the device remains powered on while it actually should be stopped. 2. The dump in that case is completely garbaged and useless. Detect and avoid this. It will also make debugging such issues easier. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index d46115e2d69e..79acb13f203a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -595,6 +595,12 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u32 base)
595 595
596void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm) 596void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
597{ 597{
598 if (!test_bit(STATUS_DEVICE_ENABLED, &mvm->trans->status)) {
599 IWL_ERR(mvm,
600 "DEVICE_ENABLED bit is not set. Aborting dump.\n");
601 return;
602 }
603
598 iwl_mvm_dump_lmac_error_log(mvm, mvm->error_event_table[0]); 604 iwl_mvm_dump_lmac_error_log(mvm, mvm->error_event_table[0]);
599 605
600 if (mvm->error_event_table[1]) 606 if (mvm->error_event_table[1])