diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2017-10-02 08:44:20 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-10-18 06:00:44 -0400 |
commit | fb5b28469d2a5be83aae0c754a9a69bb37fec6ff (patch) | |
tree | dbd2d30454a30bafe3ec06e335571e5ea26a8df2 /drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |
parent | 0e1be40a45d767a07c1fb50ebfba273368f57484 (diff) |
iwlwifi: mvm: move umac_error_event_table validity check to where it's set
There's no point in checking the validity of the
umac_error_event_table pointer every time we generate a dump. It's
cleaner to do so when we read the value, namely when we receive the
alive data.
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.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index 4ade688db63b..d46115e2d69e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -455,21 +455,12 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm) | |||
455 | { | 455 | { |
456 | struct iwl_trans *trans = mvm->trans; | 456 | struct iwl_trans *trans = mvm->trans; |
457 | struct iwl_umac_error_event_table table; | 457 | struct iwl_umac_error_event_table table; |
458 | u32 base; | ||
459 | 458 | ||
460 | base = mvm->umac_error_event_table; | 459 | if (!mvm->support_umac_log) |
461 | |||
462 | if (base < (mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_A000 ? | ||
463 | 0x400000 : 0x800000)) { | ||
464 | IWL_ERR(mvm, | ||
465 | "Not valid error log pointer 0x%08X for %s uCode\n", | ||
466 | base, | ||
467 | (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) | ||
468 | ? "Init" : "RT"); | ||
469 | return; | 460 | return; |
470 | } | ||
471 | 461 | ||
472 | iwl_trans_read_mem_bytes(trans, base, &table, sizeof(table)); | 462 | iwl_trans_read_mem_bytes(trans, mvm->umac_error_event_table, &table, |
463 | sizeof(table)); | ||
473 | 464 | ||
474 | if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { | 465 | if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) { |
475 | IWL_ERR(trans, "Start IWL Error Log Dump:\n"); | 466 | IWL_ERR(trans, "Start IWL Error Log Dump:\n"); |
@@ -609,8 +600,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm) | |||
609 | if (mvm->error_event_table[1]) | 600 | if (mvm->error_event_table[1]) |
610 | iwl_mvm_dump_lmac_error_log(mvm, mvm->error_event_table[1]); | 601 | iwl_mvm_dump_lmac_error_log(mvm, mvm->error_event_table[1]); |
611 | 602 | ||
612 | if (mvm->support_umac_log) | 603 | iwl_mvm_dump_umac_error_log(mvm); |
613 | iwl_mvm_dump_umac_error_log(mvm); | ||
614 | } | 604 | } |
615 | 605 | ||
616 | int iwl_mvm_find_free_queue(struct iwl_mvm *mvm, u8 sta_id, u8 minq, u8 maxq) | 606 | int iwl_mvm_find_free_queue(struct iwl_mvm *mvm, u8 sta_id, u8 minq, u8 maxq) |