Commit 9875b547 authored by Daniel Gabay's avatar Daniel Gabay Committed by Johannes Berg
Browse files

wifi: iwlwifi: Ensure prph_mac dump includes all addresses



In prph_mac_iter, ensure that all required addresses are dumped
even if a read fails. Currently, if a read fails, the region dump
is stopped, preventing the creation of prph_mac.lst.

By dumping all addresses even if a read fails, we can accurately
determine which addresses were successfully read and which were not.

Signed-off-by: default avatarDaniel Gabay <daniel.gabay@intel.com>
Reviewed-by: default avatarEilon Rinat <eilon.rinat@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240506095953.31fa9ce91a1c.Ia0c86f70c7a6874c15ffc6f8235aa88530208546@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b31b77b7
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1026,17 +1026,12 @@ static int iwl_dump_ini_prph_mac_iter_common(struct iwl_fw_runtime *fwrt,
{
	struct iwl_fw_ini_error_dump_range *range = range_ptr;
	__le32 *val = range->data;
	u32 prph_val;
	int i;

	range->internal_base_addr = cpu_to_le32(addr);
	range->range_data_size = size;
	for (i = 0; i < le32_to_cpu(size); i += 4) {
		prph_val = iwl_read_prph(fwrt->trans, addr + i);
		if (iwl_trans_is_hw_error_value(prph_val))
			return -EBUSY;
		*val++ = cpu_to_le32(prph_val);
	}
	for (i = 0; i < le32_to_cpu(size); i += 4)
		*val++ = cpu_to_le32(iwl_read_prph(fwrt->trans, addr + i));

	return sizeof(*range) + le32_to_cpu(range->range_data_size);
}