Merge "qcacmn: Set trigger action after checking Umac reset in progress"

This commit is contained in:
Linux Build Service Account
2023-04-21 09:15:36 -07:00
committed by Gerrit - the friendly Code Review server
3 changed files with 20 additions and 13 deletions

View File

@@ -1130,24 +1130,24 @@ void dp_umac_reset_complete_umac_recovery(struct dp_soc *soc)
* @soc: dp soc handle * @soc: dp soc handle
* @is_target_recovery: Flag to indicate if it is triggered for target recovery * @is_target_recovery: Flag to indicate if it is triggered for target recovery
* *
* Return: void * Return: status
*/ */
void dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc, QDF_STATUS dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
bool is_target_recovery) bool is_target_recovery)
{ {
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc); struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
struct dp_mlo_ctxt *mlo_ctx = be_soc->ml_ctxt; struct dp_mlo_ctxt *mlo_ctx = be_soc->ml_ctxt;
struct dp_soc_mlo_umac_reset_ctx *grp_umac_reset_ctx; struct dp_soc_mlo_umac_reset_ctx *grp_umac_reset_ctx;
if (!mlo_ctx) if (!mlo_ctx)
return; return QDF_STATUS_SUCCESS;
grp_umac_reset_ctx = &mlo_ctx->grp_umac_reset_ctx; grp_umac_reset_ctx = &mlo_ctx->grp_umac_reset_ctx;
qdf_spin_lock_bh(&grp_umac_reset_ctx->grp_ctx_lock); qdf_spin_lock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
if (grp_umac_reset_ctx->umac_reset_in_progress) { if (grp_umac_reset_ctx->umac_reset_in_progress) {
qdf_spin_unlock_bh(&grp_umac_reset_ctx->grp_ctx_lock); qdf_spin_unlock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
return; return QDF_STATUS_E_INVAL;
} }
grp_umac_reset_ctx->umac_reset_in_progress = true; grp_umac_reset_ctx->umac_reset_in_progress = true;
@@ -1160,6 +1160,8 @@ void dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
grp_umac_reset_ctx->umac_reset_count++; grp_umac_reset_ctx->umac_reset_count++;
qdf_spin_unlock_bh(&grp_umac_reset_ctx->grp_ctx_lock); qdf_spin_unlock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
return QDF_STATUS_SUCCESS;
} }
/** /**

View File

@@ -2707,10 +2707,10 @@ void dp_umac_reset_complete_umac_recovery(struct dp_soc *soc);
* @soc: dp soc handle * @soc: dp soc handle
* @is_target_recovery: Flag to indicate if it is triggered for target recovery * @is_target_recovery: Flag to indicate if it is triggered for target recovery
* *
* Return: void * Return: status
*/ */
void dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc, QDF_STATUS dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
bool is_target_recovery); bool is_target_recovery);
/** /**
* dp_umac_reset_handle_action_cb() - Function to call action callback * dp_umac_reset_handle_action_cb() - Function to call action callback

View File

@@ -327,11 +327,12 @@ bool dp_check_umac_reset_in_progress(struct dp_soc *soc)
* @soc: dp soc handle * @soc: dp soc handle
* @is_target_recovery: Flag to indicate if it is triggered for target recovery * @is_target_recovery: Flag to indicate if it is triggered for target recovery
* *
* Return: void * Return: status
*/ */
static void dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc, static QDF_STATUS dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
bool is_target_recovery) bool is_target_recovery)
{ {
return QDF_STATUS_SUCCESS;
} }
/** /**
@@ -482,10 +483,14 @@ static int dp_umac_reset_rx_event_handler(void *dp_ctx)
umac_reset_ctx->ts.trigger_start = umac_reset_ctx->ts.trigger_start =
qdf_get_log_timestamp_usecs(); qdf_get_log_timestamp_usecs();
action = UMAC_RESET_ACTION_DO_TRIGGER_RECOVERY; status =
dp_umac_reset_initiate_umac_recovery(soc, target_recovery); dp_umac_reset_initiate_umac_recovery(soc, target_recovery);
if (status != QDF_STATUS_SUCCESS)
break;
action = UMAC_RESET_ACTION_DO_TRIGGER_RECOVERY;
break; break;
case UMAC_RESET_RX_EVENT_DO_PRE_RESET: case UMAC_RESET_RX_EVENT_DO_PRE_RESET: