Commit cfa5d0ca authored by Mordechay Goodstein's avatar Mordechay Goodstein Committed by Luca Coelho

iwlwifi: mvm: remove redundant support_umac_log field

Currently we have the same info in two variables,
If umac_error_event_table is 0, we know that UMAC log is not supported,
so we don't need the support_umac_log field.
Signed-off-by: default avatarMordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200926002540.299959eeb47b.Ie1f3eecc06e3620098dda74f674f6409b90fe7fa@changeidSigned-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent ee3ae3a1
...@@ -216,7 +216,7 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, ...@@ -216,7 +216,7 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
struct iwl_lmac_alive *lmac1; struct iwl_lmac_alive *lmac1;
struct iwl_lmac_alive *lmac2 = NULL; struct iwl_lmac_alive *lmac2 = NULL;
u16 status; u16 status;
u32 lmac_error_event_table, umac_error_event_table; u32 lmac_error_event_table, umac_error_table;
if (iwl_rx_packet_payload_len(pkt) == sizeof(*palive)) { if (iwl_rx_packet_payload_len(pkt) == sizeof(*palive)) {
palive = (void *)pkt->data; palive = (void *)pkt->data;
...@@ -239,26 +239,22 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, ...@@ -239,26 +239,22 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
mvm->trans->dbg.lmac_error_event_table[1] = mvm->trans->dbg.lmac_error_event_table[1] =
le32_to_cpu(lmac2->dbg_ptrs.error_event_table_ptr); le32_to_cpu(lmac2->dbg_ptrs.error_event_table_ptr);
umac_error_event_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr); umac_error_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr);
if (!umac_error_event_table) { if (umac_error_table) {
mvm->support_umac_log = false; if (umac_error_table >=
} else if (umac_error_event_table >= mvm->trans->cfg->min_umac_error_event_table) {
mvm->trans->cfg->min_umac_error_event_table) { iwl_fw_umac_set_alive_err_table(mvm->trans,
mvm->support_umac_log = true; umac_error_table);
} else { } else {
IWL_ERR(mvm, IWL_ERR(mvm,
"Not valid error log pointer 0x%08X for %s uCode\n", "Not valid error log pointer 0x%08X for %s uCode\n",
umac_error_event_table, umac_error_table,
(mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ? (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ?
"Init" : "RT"); "Init" : "RT");
mvm->support_umac_log = false; }
} }
if (mvm->support_umac_log)
iwl_fw_umac_set_alive_err_table(mvm->trans,
umac_error_event_table);
alive_data->scd_base_addr = le32_to_cpu(lmac1->dbg_ptrs.scd_base_ptr); alive_data->scd_base_addr = le32_to_cpu(lmac1->dbg_ptrs.scd_base_ptr);
alive_data->valid = status == IWL_ALIVE_STATUS_OK; alive_data->valid = status == IWL_ALIVE_STATUS_OK;
......
...@@ -852,7 +852,6 @@ struct iwl_mvm { ...@@ -852,7 +852,6 @@ struct iwl_mvm {
bool hw_registered; bool hw_registered;
bool rfkill_safe_init_done; bool rfkill_safe_init_done;
bool support_umac_log;
u32 ampdu_ref; u32 ampdu_ref;
bool ampdu_toggle; bool ampdu_toggle;
......
...@@ -425,7 +425,7 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm) ...@@ -425,7 +425,7 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm)
struct iwl_umac_error_event_table table; struct iwl_umac_error_event_table table;
u32 base = mvm->trans->dbg.umac_error_event_table; u32 base = mvm->trans->dbg.umac_error_event_table;
if (!mvm->support_umac_log && if (!base &&
!(mvm->trans->dbg.error_event_table_tlv_status & !(mvm->trans->dbg.error_event_table_tlv_status &
IWL_ERROR_EVENT_TABLE_UMAC)) IWL_ERROR_EVENT_TABLE_UMAC))
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment