summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2017-10-02 15:44:20 +0300
committerLuca Coelho <luciano.coelho@intel.com>2017-10-18 13:00:44 +0300
commitfb5b28469d2a5be83aae0c754a9a69bb37fec6ff (patch)
treedbd2d30454a30bafe3ec06e335571e5ea26a8df2 /drivers/net/wireless/intel/iwlwifi/mvm/fw.c
parent0e1be40a45d767a07c1fb50ebfba273368f57484 (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/fw.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index f476882291ae..70d0505a176e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -200,10 +200,19 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
mvm->umac_error_event_table = le32_to_cpu(umac->error_info_addr);
+ if (mvm->umac_error_event_table <
+ (mvm->trans->cfg->device_family == IWL_DEVICE_FAMILY_A000 ?
+ 0x400000 : 0x800000))
+ IWL_ERR(mvm,
+ "Not valid error log pointer 0x%08X for %s uCode\n",
+ mvm->umac_error_event_table,
+ (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ?
+ "Init" : "RT");
+ else
+ mvm->support_umac_log = true;
+
alive_data->scd_base_addr = le32_to_cpu(lmac1->scd_base_ptr);
alive_data->valid = status == IWL_ALIVE_STATUS_OK;
- if (mvm->umac_error_event_table)
- mvm->support_umac_log = true;
IWL_DEBUG_FW(mvm,
"Alive ucode status 0x%04x revision 0x%01X 0x%01X\n",