Просмотр исходного кода

qcacmn: Set trigger action after checking Umac reset in progress

Set the Umac reset trigger action after checking if
Umac reset is already in progress.

Change-Id: Ifb4d9523d9f746eef657ef81e934ffe5c2800a6f
CRs-Fixed: 3472090
Pavankumar Nandeshwar 2 лет назад
Родитель
Сommit
84aff202e7
3 измененных файлов с 20 добавлено и 13 удалено
  1. 7 5
      dp/wifi3.0/be/mlo/dp_mlo.c
  2. 3 3
      dp/wifi3.0/dp_internal.h
  3. 10 5
      dp/wifi3.0/dp_umac_reset.c

+ 7 - 5
dp/wifi3.0/be/mlo/dp_mlo.c

@@ -1130,24 +1130,24 @@ void dp_umac_reset_complete_umac_recovery(struct dp_soc *soc)
  * @soc: dp soc handle
  * @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,
-					  bool is_target_recovery)
+QDF_STATUS dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
+						bool is_target_recovery)
 {
 	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_soc_mlo_umac_reset_ctx *grp_umac_reset_ctx;
 
 	if (!mlo_ctx)
-		return;
+		return QDF_STATUS_SUCCESS;
 
 	grp_umac_reset_ctx = &mlo_ctx->grp_umac_reset_ctx;
 	qdf_spin_lock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
 
 	if (grp_umac_reset_ctx->umac_reset_in_progress) {
 		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;
@@ -1160,6 +1160,8 @@ void dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
 	grp_umac_reset_ctx->umac_reset_count++;
 
 	qdf_spin_unlock_bh(&grp_umac_reset_ctx->grp_ctx_lock);
+
+	return QDF_STATUS_SUCCESS;
 }
 
 /**

+ 3 - 3
dp/wifi3.0/dp_internal.h

@@ -2702,10 +2702,10 @@ void dp_umac_reset_complete_umac_recovery(struct dp_soc *soc);
  * @soc: dp soc handle
  * @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,
-					  bool is_target_recovery);
+QDF_STATUS dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
+						bool is_target_recovery);
 
 /**
  * dp_umac_reset_handle_action_cb() - Function to call action callback

+ 10 - 5
dp/wifi3.0/dp_umac_reset.c

@@ -327,11 +327,12 @@ bool dp_check_umac_reset_in_progress(struct dp_soc *soc)
  * @soc: dp soc handle
  * @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,
-						 bool is_target_recovery)
+static QDF_STATUS dp_umac_reset_initiate_umac_recovery(struct dp_soc *soc,
+						       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 =
 						qdf_get_log_timestamp_usecs();
 
-		action = UMAC_RESET_ACTION_DO_TRIGGER_RECOVERY;
-
+		status =
 		dp_umac_reset_initiate_umac_recovery(soc, target_recovery);
 
+		if (status != QDF_STATUS_SUCCESS)
+			break;
+
+		action = UMAC_RESET_ACTION_DO_TRIGGER_RECOVERY;
+
 		break;
 
 	case UMAC_RESET_RX_EVENT_DO_PRE_RESET: