qcacmn: Avoid multiple pre reset done triggers in Umac reset

Make sure that the pre reset done notification is sent
only once during Umac reset.

Change-Id: I1d9e1d8caef49443d25e879086043e815ea087a1
CRs-Fixed: 3594653
This commit is contained in:
Pavankumar Nandeshwar
2023-09-06 02:26:47 -07:00
committed by Rahul Choudhary
parent 3ceac81c5e
commit d003031f93
4 changed files with 27 additions and 8 deletions

View File

@@ -11618,12 +11618,17 @@ void dp_check_n_notify_umac_prereset_done(struct dp_soc *soc)
if (soc->service_rings_running)
return;
/* Unregister the callback */
dp_unregister_notify_umac_pre_reset_fw_callback(soc);
/* Check if notify was already sent by any other thread */
if (qdf_atomic_test_and_set_bit(DP_UMAC_RESET_NOTIFY_DONE,
&soc->service_rings_running))
return;
/* Notify the firmware that Umac pre reset is complete */
dp_umac_reset_notify_action_completion(soc,
UMAC_RESET_ACTION_DO_PRE_RESET);
/* Unregister the callback */
dp_unregister_notify_umac_pre_reset_fw_callback(soc);
}
/**
@@ -11773,7 +11778,7 @@ static QDF_STATUS dp_umac_reset_service_handle_n_notify_done(struct dp_soc *soc)
non_ppeds:
dp_register_notify_umac_pre_reset_fw_callback(soc);
dp_check_n_notify_umac_prereset_done(soc);
dp_umac_reset_trigger_pre_reset_notify_cb(soc);
soc->umac_reset_ctx.nbuf_list = NULL;
return QDF_STATUS_SUCCESS;
}
@@ -11811,7 +11816,7 @@ static inline void dp_umac_reset_ppeds_start(struct dp_soc *soc)
static QDF_STATUS dp_umac_reset_service_handle_n_notify_done(struct dp_soc *soc)
{
dp_register_notify_umac_pre_reset_fw_callback(soc);
dp_check_n_notify_umac_prereset_done(soc);
dp_umac_reset_trigger_pre_reset_notify_cb(soc);
soc->umac_reset_ctx.nbuf_list = NULL;
return QDF_STATUS_SUCCESS;
}
@@ -11886,6 +11891,8 @@ static QDF_STATUS dp_umac_reset_handle_post_reset_complete(struct dp_soc *soc)
soc->umac_reset_ctx.nbuf_list = NULL;
soc->service_rings_running = 0;
dp_resume_reo_send_cmd(soc);
dp_umac_reset_ppeds_start(soc);