iwlwifi: dbg_ini: use function to check if ini dbg mode is on
use iwl_trans_dbg_ini_valid function instead of a boolean value check if dbg_ini mode is on. It is needed for a future patch. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
committed by
Luca Coelho
parent
4a7bd3cf83
commit
a1af4c486a
@ -2101,7 +2101,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
|
|||||||
u32 trig_type = le32_to_cpu(desc->trig_desc.type);
|
u32 trig_type = le32_to_cpu(desc->trig_desc.type);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (fwrt->trans->dbg.ini_valid) {
|
if (iwl_trans_dbg_ini_valid(fwrt->trans)) {
|
||||||
ret = iwl_fw_dbg_ini_collect(fwrt, trig_type);
|
ret = iwl_fw_dbg_ini_collect(fwrt, trig_type);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
iwl_fw_free_dump_desc(fwrt);
|
iwl_fw_free_dump_desc(fwrt);
|
||||||
@ -2381,7 +2381,7 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IWL_DEBUG_FW_INFO(fwrt, "WRT: data collection start\n");
|
IWL_DEBUG_FW_INFO(fwrt, "WRT: data collection start\n");
|
||||||
if (fwrt->trans->dbg.ini_valid)
|
if (iwl_trans_dbg_ini_valid(fwrt->trans))
|
||||||
iwl_fw_error_ini_dump(fwrt, wk_idx);
|
iwl_fw_error_ini_dump(fwrt, wk_idx);
|
||||||
else
|
else
|
||||||
iwl_fw_error_dump(fwrt);
|
iwl_fw_error_dump(fwrt);
|
||||||
|
@ -202,7 +202,7 @@ _iwl_fw_dbg_trigger_on(struct iwl_fw_runtime *fwrt,
|
|||||||
{
|
{
|
||||||
struct iwl_fw_dbg_trigger_tlv *trig;
|
struct iwl_fw_dbg_trigger_tlv *trig;
|
||||||
|
|
||||||
if (fwrt->trans->dbg.ini_valid)
|
if (iwl_trans_dbg_ini_valid(fwrt->trans))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!iwl_fw_dbg_trigger_enabled(fwrt->fw, id))
|
if (!iwl_fw_dbg_trigger_enabled(fwrt->fw, id))
|
||||||
@ -229,8 +229,9 @@ iwl_fw_ini_trigger_on(struct iwl_fw_runtime *fwrt,
|
|||||||
struct iwl_fw_ini_trigger *trig;
|
struct iwl_fw_ini_trigger *trig;
|
||||||
u32 usec;
|
u32 usec;
|
||||||
|
|
||||||
if (!fwrt->trans->dbg.ini_valid || id == IWL_FW_TRIGGER_ID_INVALID ||
|
if (!iwl_trans_dbg_ini_valid(fwrt->trans) ||
|
||||||
id >= IWL_FW_TRIGGER_ID_NUM || !fwrt->dump.active_trigs[id].active)
|
id == IWL_FW_TRIGGER_ID_INVALID || id >= IWL_FW_TRIGGER_ID_NUM ||
|
||||||
|
!fwrt->dump.active_trigs[id].active)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
trig = fwrt->dump.active_trigs[id].trig;
|
trig = fwrt->dump.active_trigs[id].trig;
|
||||||
@ -394,7 +395,7 @@ static inline void iwl_fw_umac_set_alive_err_table(struct iwl_trans *trans,
|
|||||||
|
|
||||||
static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt)
|
static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt)
|
||||||
{
|
{
|
||||||
if (fwrt->trans->dbg.ini_valid && fwrt->trans->dbg.hw_error) {
|
if (iwl_trans_dbg_ini_valid(fwrt->trans) && fwrt->trans->dbg.hw_error) {
|
||||||
_iwl_fw_dbg_ini_collect(fwrt, IWL_FW_TRIGGER_ID_FW_HW_ERROR);
|
_iwl_fw_dbg_ini_collect(fwrt, IWL_FW_TRIGGER_ID_FW_HW_ERROR);
|
||||||
fwrt->trans->dbg.hw_error = false;
|
fwrt->trans->dbg.hw_error = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1216,6 +1216,11 @@ static inline void iwl_trans_sync_nmi(struct iwl_trans *trans)
|
|||||||
trans->ops->sync_nmi(trans);
|
trans->ops->sync_nmi(trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool iwl_trans_dbg_ini_valid(struct iwl_trans *trans)
|
||||||
|
{
|
||||||
|
return trans->dbg.ini_valid;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
* transport helper functions
|
* transport helper functions
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
|
@ -1304,7 +1304,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
|||||||
if (ret)
|
if (ret)
|
||||||
IWL_ERR(mvm, "Failed to initialize Smart Fifo\n");
|
IWL_ERR(mvm, "Failed to initialize Smart Fifo\n");
|
||||||
|
|
||||||
if (!mvm->trans->dbg.ini_valid) {
|
if (!iwl_trans_dbg_ini_valid(mvm->trans)) {
|
||||||
mvm->fwrt.dump.conf = FW_DBG_INVALID;
|
mvm->fwrt.dump.conf = FW_DBG_INVALID;
|
||||||
/* if we have a destination, assume EARLY START */
|
/* if we have a destination, assume EARLY START */
|
||||||
if (mvm->fw->dbg.dest_tlv)
|
if (mvm->fw->dbg.dest_tlv)
|
||||||
|
@ -96,7 +96,7 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
|
|||||||
cpu_to_le64(trans_pcie->rxq->bd_dma);
|
cpu_to_le64(trans_pcie->rxq->bd_dma);
|
||||||
|
|
||||||
/* Configure debug, for integration */
|
/* Configure debug, for integration */
|
||||||
if (!trans->dbg.ini_valid)
|
if (!iwl_trans_dbg_ini_valid(trans))
|
||||||
iwl_pcie_alloc_fw_monitor(trans, 0);
|
iwl_pcie_alloc_fw_monitor(trans, 0);
|
||||||
if (trans->dbg.num_blocks) {
|
if (trans->dbg.num_blocks) {
|
||||||
prph_sc_ctrl->hwm_cfg.hwm_base_addr =
|
prph_sc_ctrl->hwm_cfg.hwm_base_addr =
|
||||||
|
@ -1044,7 +1044,7 @@ static inline void __iwl_trans_pcie_set_bit(struct iwl_trans *trans,
|
|||||||
|
|
||||||
static inline bool iwl_pcie_dbg_on(struct iwl_trans *trans)
|
static inline bool iwl_pcie_dbg_on(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
return (trans->dbg.dest_tlv || trans->dbg.ini_valid);
|
return (trans->dbg.dest_tlv || iwl_trans_dbg_ini_valid(trans));
|
||||||
}
|
}
|
||||||
|
|
||||||
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
|
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
|
||||||
|
@ -896,7 +896,7 @@ void iwl_pcie_apply_destination(struct iwl_trans *trans)
|
|||||||
const struct iwl_fw_dbg_dest_tlv_v1 *dest = trans->dbg.dest_tlv;
|
const struct iwl_fw_dbg_dest_tlv_v1 *dest = trans->dbg.dest_tlv;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (trans->dbg.ini_valid) {
|
if (iwl_trans_dbg_ini_valid(trans)) {
|
||||||
if (!trans->dbg.num_blocks)
|
if (!trans->dbg.num_blocks)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user