wifi: iwlwifi: add suppress_cmd_error_once() API

Add iwl_trans_suppress_cmd_error_once() function to be called by the op
modes instead of directly checking the trans status bits.
This hides the trans internal implementation details from callers.

Signed-off-by: Rotem Kerem <rotem.kerem@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250710212632.e061ae241fd3.Ie2043c4e237196ebcfe195006d3d76371de48a55@changeid
This commit is contained in:
Rotem Kerem 2025-07-10 21:28:23 +03:00 committed by Miri Korenblit
parent 2788817481
commit 200945e6a6
3 changed files with 7 additions and 2 deletions

View File

@ -1230,6 +1230,11 @@ static inline u16 iwl_trans_get_num_rbds(struct iwl_trans *trans)
return result;
}
static inline void iwl_trans_suppress_cmd_error_once(struct iwl_trans *trans)
{
set_bit(STATUS_SUPPRESS_CMD_ERROR_ONCE, &trans->status);
}
/*****************************************************
* PCIe handling
*****************************************************/

View File

@ -86,7 +86,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mld *mld, char *buf,
if (count == 6 && !strcmp(buf, "nolog\n")) {
mld->fw_status.do_not_dump_once = true;
set_bit(STATUS_SUPPRESS_CMD_ERROR_ONCE, &mld->trans->status);
iwl_trans_suppress_cmd_error_once(mld->trans);
}
/* take the return value to make compiler happy - it will

View File

@ -1134,7 +1134,7 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct iwl_mvm *mvm, char *buf,
if (count == 6 && !strcmp(buf, "nolog\n")) {
set_bit(IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE, &mvm->status);
set_bit(STATUS_SUPPRESS_CMD_ERROR_ONCE, &mvm->trans->status);
iwl_trans_suppress_cmd_error_once(mvm->trans);
}
/* take the return value to make compiler happy - it will fail anyway */