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: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20200926002540.299959eeb47b.Ie1f3eecc06e3620098dda74f674f6409b90fe7fa@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
ee3ae3a18a
commit
cfa5d0ca0f
|
@ -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 *lmac2 = NULL;
|
||||
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)) {
|
||||
palive = (void *)pkt->data;
|
||||
|
@ -239,26 +239,22 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
|||
mvm->trans->dbg.lmac_error_event_table[1] =
|
||||
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) {
|
||||
mvm->support_umac_log = false;
|
||||
} else if (umac_error_event_table >=
|
||||
mvm->trans->cfg->min_umac_error_event_table) {
|
||||
mvm->support_umac_log = true;
|
||||
} else {
|
||||
IWL_ERR(mvm,
|
||||
"Not valid error log pointer 0x%08X for %s uCode\n",
|
||||
umac_error_event_table,
|
||||
(mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ?
|
||||
"Init" : "RT");
|
||||
mvm->support_umac_log = false;
|
||||
if (umac_error_table) {
|
||||
if (umac_error_table >=
|
||||
mvm->trans->cfg->min_umac_error_event_table) {
|
||||
iwl_fw_umac_set_alive_err_table(mvm->trans,
|
||||
umac_error_table);
|
||||
} else {
|
||||
IWL_ERR(mvm,
|
||||
"Not valid error log pointer 0x%08X for %s uCode\n",
|
||||
umac_error_table,
|
||||
(mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ?
|
||||
"Init" : "RT");
|
||||
}
|
||||
}
|
||||
|
||||
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->valid = status == IWL_ALIVE_STATUS_OK;
|
||||
|
||||
|
|
|
@ -852,7 +852,6 @@ struct iwl_mvm {
|
|||
|
||||
bool hw_registered;
|
||||
bool rfkill_safe_init_done;
|
||||
bool support_umac_log;
|
||||
|
||||
u32 ampdu_ref;
|
||||
bool ampdu_toggle;
|
||||
|
|
|
@ -425,7 +425,7 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm)
|
|||
struct iwl_umac_error_event_table 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 &
|
||||
IWL_ERROR_EVENT_TABLE_UMAC))
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue