Commit d41cdbcd authored by Rotem Saado's avatar Rotem Saado Committed by Luca Coelho
Browse files

iwlwifi: dbg: treat dbgc allocation failure when tlv is missing



in case allocation tlv is missing for specific dbgc id,
treat it as allocation failure.
with this behavior we removing later the unsupported regions
relating to the failed dbgc allocation.
this saves operational driver memory and run time at collecting
debug data.

Signed-off-by: default avatarRotem Saado <rotem.saado@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211017165728.4cd241abf1de.I8f6cf00a7266675dfebdc01a73c1ac6e001855b9@changeid


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 33c99471
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1149,8 +1149,10 @@ static void iwl_dbg_tlv_init_cfg(struct iwl_fw_runtime *fwrt)
			&fwrt->trans->dbg.fw_mon_cfg[i];
		u32 dest = le32_to_cpu(fw_mon_cfg->buf_location);

		if (dest == IWL_FW_INI_LOCATION_INVALID)
		if (dest == IWL_FW_INI_LOCATION_INVALID) {
			failed_alloc |= BIT(i);
			continue;
		}

		if (*ini_dest == IWL_FW_INI_LOCATION_INVALID)
			*ini_dest = dest;