summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-12-09 14:36:41 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-12-28 20:00:17 +0200
commite06d8437cdf903a39bf93f16338c5b5a37810017 (patch)
treecbddde4466682d85c7141988df3b642a04fc3568 /drivers/net/wireless/iwlwifi/mvm/mac80211.c
parentaddfaada8fd044ad8cb365a792a09b1b3265376f (diff)
iwlwifi: mvm: change SMEM dump to general purpose memory dump
Instead of adding a dump type for each type of memory, change the SMEM type to be a general purpose memory dump. Add the type of the memory and its offset in the device in the dump itself. This will allow an external parser to know where this memory came from. Note that since this type isn't really in use yet, this is not a real problem. Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index d5d1cdaa0310..e24de9712476 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -815,7 +815,8 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
/* Make room for the SMEM, if it exists */
if (smem_len)
- file_len += sizeof(*dump_data) + smem_len;
+ file_len += sizeof(*dump_data) +
+ sizeof(struct iwl_fw_error_dump_mem) + smem_len;
dump_file = vzalloc(file_len);
if (!dump_file) {
@@ -868,11 +869,16 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
sram_len);
if (smem_len) {
+ struct iwl_fw_error_dump_mem *dump_mem;
+
dump_data = iwl_fw_error_next_data(dump_data);
- dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_SMEM);
- dump_data->len = cpu_to_le32(smem_len);
+ dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_MEM);
+ dump_data->len = cpu_to_le32(smem_len + sizeof(*dump_mem));
+ dump_mem = (void *)dump_data->data;
+ dump_mem->type = cpu_to_le32(IWL_FW_ERROR_DUMP_MEM_SMEM);
+ dump_mem->offset = cpu_to_le32(mvm->cfg->smem_offset);
iwl_trans_read_mem_bytes(mvm->trans, mvm->cfg->smem_offset,
- dump_data->data, smem_len);
+ dump_mem->data, smem_len);
}
fw_error_dump->trans_ptr = iwl_trans_dump_data(mvm->trans);