Skip to content

Commit

Permalink
iwlwifi: mvm: remove redundant support_umac_log field
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mordechay Goodstein authored and Luca Coelho committed Oct 1, 2020
1 parent ee3ae3a commit cfa5d0c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
32 changes: 14 additions & 18 deletions drivers/net/wireless/intel/iwlwifi/mvm/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cfa5d0c

Please sign in to comment.