Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfd4b08c authored by Liad Kaufman's avatar Liad Kaufman Committed by Luca Coelho
Browse files

iwlwifi: dbg: allow wrt collection before ALIVE



Even if no ALIVE was received, the WRT data can still
be collected. Add this.

Signed-off-by: default avatarLiad Kaufman <liad.kaufman@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 76c5bcb3
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -964,7 +964,20 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
	if (trigger)
		delay = msecs_to_jiffies(le32_to_cpu(trigger->stop_delay));

	if (WARN(fwrt->trans->state == IWL_TRANS_NO_FW,
	/*
	 * If the loading of the FW completed successfully, the next step is to
	 * get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non
	 * zero, the FW was already loaded successully. If the state is "NO_FW"
	 * in such a case - WARN and exit, since FW may be dead. Otherwise, we
	 * can try to collect the data, since FW might just not be fully
	 * loaded (no "ALIVE" yet), and the debug data is accessible.
	 *
	 * Corner case: got the FW alive but crashed before getting the SMEM
	 *	config. In such a case, due to HW access problems, we might
	 *	collect garbage.
	 */
	if (WARN((fwrt->trans->state == IWL_TRANS_NO_FW) &&
		 fwrt->smem_cfg.num_lmacs,
		 "Can't collect dbg data when FW isn't alive\n"))
		return -EIO;