mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-21 06:50:25 +00:00
wifi: iwlwifi: fw: add an error table status getter
Add a function for getting the error status and error code for given error table. Remove a static function of same purpose from mvm/d3.c Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241008072037.610a38614ce6.Iab5f795bc30ce5d08550cff1772fe051527bcb95@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
02ea0fb981
commit
43e0b2ada5
3 changed files with 32 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
@ -327,6 +327,7 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt);
|
|||
void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,
|
||||
u32 timepoint,
|
||||
u32 timepoint_data);
|
||||
bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id);
|
||||
void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt);
|
||||
void iwl_fw_dbg_clear_monitor_buf(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
@ -530,3 +530,23 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt)
|
|||
}
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fwrt_dump_error_logs);
|
||||
|
||||
bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id)
|
||||
{
|
||||
struct error_table_start {
|
||||
/* cf. struct iwl_error_event_table */
|
||||
u32 valid;
|
||||
__le32 err_id;
|
||||
} err_info;
|
||||
|
||||
if (!base)
|
||||
return false;
|
||||
|
||||
iwl_trans_read_mem_bytes(trans, base,
|
||||
&err_info, sizeof(err_info));
|
||||
if (err_info.valid && err_id)
|
||||
*err_id = le32_to_cpu(err_info.err_id);
|
||||
|
||||
return !!err_info.valid;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fwrt_read_err_table);
|
||||
|
|
|
@ -3024,24 +3024,6 @@ static void iwl_mvm_d3_disconnect_iter(void *data, u8 *mac,
|
|||
ieee80211_resume_disconnect(vif);
|
||||
}
|
||||
|
||||
static bool iwl_mvm_rt_status(struct iwl_trans *trans, u32 base, u32 *err_id)
|
||||
{
|
||||
struct error_table_start {
|
||||
/* cf. struct iwl_error_event_table */
|
||||
u32 valid;
|
||||
__le32 err_id;
|
||||
} err_info;
|
||||
|
||||
if (!base)
|
||||
return false;
|
||||
|
||||
iwl_trans_read_mem_bytes(trans, base,
|
||||
&err_info, sizeof(err_info));
|
||||
if (err_info.valid && err_id)
|
||||
*err_id = le32_to_cpu(err_info.err_id);
|
||||
|
||||
return !!err_info.valid;
|
||||
}
|
||||
|
||||
static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif)
|
||||
|
@ -3049,7 +3031,7 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm,
|
|||
u32 err_id;
|
||||
|
||||
/* check for lmac1 error */
|
||||
if (iwl_mvm_rt_status(mvm->trans,
|
||||
if (iwl_fwrt_read_err_table(mvm->trans,
|
||||
mvm->trans->dbg.lmac_error_event_table[0],
|
||||
&err_id)) {
|
||||
if (err_id == RF_KILL_INDICATOR_FOR_WOWLAN && vif) {
|
||||
|
@ -3063,13 +3045,15 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm,
|
|||
}
|
||||
|
||||
/* check if we have lmac2 set and check for error */
|
||||
if (iwl_mvm_rt_status(mvm->trans,
|
||||
mvm->trans->dbg.lmac_error_event_table[1], NULL))
|
||||
if (iwl_fwrt_read_err_table(mvm->trans,
|
||||
mvm->trans->dbg.lmac_error_event_table[1],
|
||||
NULL))
|
||||
return true;
|
||||
|
||||
/* check for umac error */
|
||||
if (iwl_mvm_rt_status(mvm->trans,
|
||||
mvm->trans->dbg.umac_error_event_table, NULL))
|
||||
if (iwl_fwrt_read_err_table(mvm->trans,
|
||||
mvm->trans->dbg.umac_error_event_table,
|
||||
NULL))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue