diff options
| -rw-r--r-- | core/wma/src/wma_main.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 3962513329ea..98eadc66cbb8 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1672,6 +1672,25 @@ static void wma_init_max_no_of_peers(tp_wma_handle wma_handle, cfg->max_no_of_peers = max_peers; } +/** + * wma_shutdown_notifier_cb - Shutdown notifer call back + * @priv : WMA handle + * + * During recovery, WMA may wait for resume to complete if the crash happens + * while in suspend. This may cause delays in completing the recovery. This call + * back would be called during recovery and the event is completed so that if + * the resume is waiting on FW to respond then it can get out of the wait so + * that recovery thread can start bringing down all the modules. + * + * Return: None + */ +static void wma_shutdown_notifier_cb(void *priv) +{ + tp_wma_handle wma_handle = priv; + + qdf_event_set(&wma_handle->wma_resume_event); +} + struct wma_version_info g_wmi_version_info; /** @@ -2097,6 +2116,14 @@ QDF_STATUS wma_open(void *cds_context, goto err_event_init; } + qdf_status = cds_shutdown_notifier_register(wma_shutdown_notifier_cb, + wma_handle); + if (qdf_status != QDF_STATUS_SUCCESS) { + WMA_LOGP("%s: Shutdown notifier register failed: %d", + __func__, qdf_status); + goto err_event_init; + } + qdf_status = qdf_event_create(&wma_handle->runtime_suspend); if (qdf_status != QDF_STATUS_SUCCESS) { WMA_LOGP("%s: runtime_suspend event initialization failed", |
