]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: mvm: disable dbg data collect when fw isn't alive
authorLiad Kaufman <liad.kaufman@intel.com>
Thu, 23 Mar 2017 09:08:59 +0000 (11:08 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 22 Jun 2017 21:12:59 +0000 (00:12 +0300)
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>
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c

index c66baf1e1443b828dc8a4a14565eba3da9e9d5d3..d5cb47e2fe449ee6bb078dfc368184d832c8a1a7 100644 (file)
@@ -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;