summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-12-27 11:01:09 +0300
committerJohannes Berg <johannes.berg@intel.com>2025-01-13 17:26:39 +0300
commit14eef4e2355920eea8c20424f9260a266f81f650 (patch)
treecba121ae3dc82a1a12ae283e5d65c8dd00c5b22c /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parent99baaf924a30b240622a42fdab0fff3ffa8138cc (diff)
downloadlinux-14eef4e2355920eea8c20424f9260a266f81f650.tar.xz
wifi: iwlwifi: unify cmd_queue_full() into nic_error()
Except for some special handling in DVM, error dump and some message behaviour, cmd_queue_full and nic_error are equivalent now. Unify by giving a special error type, so DVM can continue to differentiate. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241227095718.0222183504aa.Ie29cef75fbd91b64a43619bc36bd5b29c5b9f957@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index aad0449fab36..13a24030acdb 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -2118,9 +2118,11 @@ static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode,
{
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
- if (!test_bit(STATUS_TRANS_DEAD, &mvm->trans->status) &&
- !test_and_clear_bit(IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE,
- &mvm->status))
+ if (type == IWL_ERR_TYPE_CMD_QUEUE_FULL)
+ IWL_ERR(mvm, "Command queue full!\n");
+ else if (!test_bit(STATUS_TRANS_DEAD, &mvm->trans->status) &&
+ !test_and_clear_bit(IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE,
+ &mvm->status))
iwl_mvm_dump_nic_error_log(mvm);
/* reset HS timeout is during shutdown, so collect right now */
@@ -2140,14 +2142,6 @@ static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode,
iwl_mvm_nic_restart(mvm);
}
-static void iwl_mvm_cmd_queue_full(struct iwl_op_mode *op_mode)
-{
- struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
-
- WARN_ON(1);
- iwl_mvm_nic_restart(mvm);
-}
-
static void iwl_op_mode_mvm_time_point(struct iwl_op_mode *op_mode,
enum iwl_fw_ini_time_point tp_id,
union iwl_dbg_tlv_tp_data *tp_data)
@@ -2181,7 +2175,6 @@ static void iwl_op_mode_mvm_device_powered_off(struct iwl_op_mode *op_mode)
.hw_rf_kill = iwl_mvm_set_hw_rfkill_state, \
.free_skb = iwl_mvm_free_skb, \
.nic_error = iwl_mvm_nic_error, \
- .cmd_queue_full = iwl_mvm_cmd_queue_full, \
.nic_config = iwl_mvm_nic_config, \
/* as we only register one, these MUST be common! */ \
.start = iwl_op_mode_mvm_start, \