aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorShahar S Matityahu <shahar.s.matityahu@intel.com>2018-09-13 07:52:59 -0400
committerLuca Coelho <luciano.coelho@intel.com>2019-01-25 13:57:18 -0500
commitd3561e0ecd75a595cb4a477fa4c65fdb51535364 (patch)
tree697360098fd03f8ffe35149a2d7114af3dd6e1a5 /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parentaba1e632c2e810bd685a2c954ebc726e5ca30b2b (diff)
iwlwifi: wrt: add to dump number of lmacs, lmac1 and umac error id
Add to the dump the number of lmacs, the error id of the umac and the error id of lmac1, if supported. In case the reason for the dump trigger is not an assert the error id is zero. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/utils.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index d116c6ae18ff..e8659bf50890 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -463,6 +463,9 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm)
463 iwl_trans_read_mem_bytes(trans, mvm->umac_error_event_table, &table, 463 iwl_trans_read_mem_bytes(trans, mvm->umac_error_event_table, &table,
464 sizeof(table)); 464 sizeof(table));
465 465
466 if (table.valid)
467 mvm->fwrt.dump.umac_err_id = table.error_id;
468
466 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { 469 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
467 IWL_ERR(trans, "Start IWL Error Log Dump:\n"); 470 IWL_ERR(trans, "Start IWL Error Log Dump:\n");
468 IWL_ERR(trans, "Status: 0x%08lX, count: %d\n", 471 IWL_ERR(trans, "Status: 0x%08lX, count: %d\n",
@@ -486,11 +489,11 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm)
486 IWL_ERR(mvm, "0x%08X | isr status reg\n", table.nic_isr_pref); 489 IWL_ERR(mvm, "0x%08X | isr status reg\n", table.nic_isr_pref);
487} 490}
488 491
489static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u32 base) 492static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u8 lmac_num)
490{ 493{
491 struct iwl_trans *trans = mvm->trans; 494 struct iwl_trans *trans = mvm->trans;
492 struct iwl_error_event_table table; 495 struct iwl_error_event_table table;
493 u32 val; 496 u32 val, base = mvm->error_event_table[lmac_num];
494 497
495 if (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) { 498 if (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) {
496 if (!base) 499 if (!base)
@@ -541,7 +544,7 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u32 base)
541 iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table)); 544 iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table));
542 545
543 if (table.valid) 546 if (table.valid)
544 mvm->fwrt.dump.rt_status = table.error_id; 547 mvm->fwrt.dump.lmac_err_id[lmac_num] = table.error_id;
545 548
546 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { 549 if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
547 IWL_ERR(trans, "Start IWL Error Log Dump:\n"); 550 IWL_ERR(trans, "Start IWL Error Log Dump:\n");
@@ -598,10 +601,10 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
598 return; 601 return;
599 } 602 }
600 603
601 iwl_mvm_dump_lmac_error_log(mvm, mvm->error_event_table[0]); 604 iwl_mvm_dump_lmac_error_log(mvm, 0);
602 605
603 if (mvm->error_event_table[1]) 606 if (mvm->error_event_table[1])
604 iwl_mvm_dump_lmac_error_log(mvm, mvm->error_event_table[1]); 607 iwl_mvm_dump_lmac_error_log(mvm, 1);
605 608
606 iwl_mvm_dump_umac_error_log(mvm); 609 iwl_mvm_dump_umac_error_log(mvm);
607} 610}