Commit 200945e6 authored by Rotem Kerem's avatar Rotem Kerem Committed by Miri Korenblit
Browse files

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: default avatarRotem Kerem <rotem.kerem@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250710212632.e061ae241fd3.Ie2043c4e237196ebcfe195006d3d76371de48a55@changeid
parent 27888174
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
 *****************************************************/
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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 */