aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm
diff options
context:
space:
mode:
authorMatti Gottlieb <matti.gottlieb@intel.com>2015-07-20 10:55:51 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-10-25 07:45:01 -0400
commitf0afea54ee0dd212186de0291ec025c63016fa39 (patch)
treea5b3260db41c698666b62ec2ed3b7f0a01db7d79 /drivers/net/wireless/iwlwifi/mvm
parente621c2282e310aa83a50db4da3e16dfc5945db08 (diff)
iwlwifi: mvm: Dump FW's virtual image in the case of a NIC error
When paging is enabled the driver stores part of the FW's image in the DRAM. Dump FW's virtual image in the case of a NIC error. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 8443e14101cf..aaffb54e8f78 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1192,6 +1192,13 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
1192 if (sram2_len) 1192 if (sram2_len)
1193 file_len += sizeof(*dump_data) + sizeof(*dump_mem) + sram2_len; 1193 file_len += sizeof(*dump_data) + sizeof(*dump_mem) + sram2_len;
1194 1194
1195 /* Make room for fw's virtual image pages, if it exists */
1196 if (mvm->fw->img[mvm->cur_ucode].paging_mem_size)
1197 file_len += mvm->num_of_paging_blk *
1198 (sizeof(*dump_data) +
1199 sizeof(struct iwl_fw_error_dump_paging) +
1200 PAGING_BLOCK_SIZE);
1201
1195 /* If we only want a monitor dump, reset the file length */ 1202 /* If we only want a monitor dump, reset the file length */
1196 if (monitor_dump_only) { 1203 if (monitor_dump_only) {
1197 file_len = sizeof(*dump_file) + sizeof(*dump_data) + 1204 file_len = sizeof(*dump_file) + sizeof(*dump_data) +
@@ -1302,6 +1309,26 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)
1302 dump_mem->data, IWL8260_ICCM_LEN); 1309 dump_mem->data, IWL8260_ICCM_LEN);
1303 } 1310 }
1304 1311
1312 /* Dump fw's virtual image */
1313 if (mvm->fw->img[mvm->cur_ucode].paging_mem_size) {
1314 u32 i;
1315
1316 for (i = 1; i < mvm->num_of_paging_blk + 1; i++) {
1317 struct iwl_fw_error_dump_paging *paging;
1318 struct page *pages =
1319 mvm->fw_paging_db[i].fw_paging_block;
1320
1321 dump_data = iwl_fw_error_next_data(dump_data);
1322 dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_PAGING);
1323 dump_data->len = cpu_to_le32(sizeof(*paging) +
1324 PAGING_BLOCK_SIZE);
1325 paging = (void *)dump_data->data;
1326 paging->index = cpu_to_le32(i);
1327 memcpy(paging->data, page_address(pages),
1328 PAGING_BLOCK_SIZE);
1329 }
1330 }
1331
1305dump_trans_data: 1332dump_trans_data:
1306 fw_error_dump->trans_ptr = iwl_trans_dump_data(mvm->trans, 1333 fw_error_dump->trans_ptr = iwl_trans_dump_data(mvm->trans,
1307 mvm->fw_dump_trig); 1334 mvm->fw_dump_trig);