diff --git a/components/dp/core/inc/wlan_dp_main.h b/components/dp/core/inc/wlan_dp_main.h index 8f691aa6f7..81587d49bd 100644 --- a/components/dp/core/inc/wlan_dp_main.h +++ b/components/dp/core/inc/wlan_dp_main.h @@ -169,6 +169,42 @@ void dp_wait_complete_tasks(struct wlan_dp_psoc_context *dp_ctx); #define dp_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_DP, "enter") #define dp_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_DP, "exit") +/** + * __wlan_dp_runtime_suspend() - Runtime suspend DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS __wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id); + +/** + * __wlan_dp_runtime_resume() - Runtime suspend DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS __wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id); + +/** + * __wlan_dp_bus_suspend() - BUS suspend DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS __wlan_dp_bus_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id); + +/** + * __wlan_dp_bus_resume() - BUS resume DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS __wlan_dp_bus_resume(ol_txrx_soc_handle soc, uint8_t pdev_id); + /** * wlan_dp_txrx_soc_attach() - Datapath soc attach * @params: SoC attach params diff --git a/components/dp/core/src/wlan_dp_main.c b/components/dp/core/src/wlan_dp_main.c index 2e83698a0a..23e9a25ec0 100644 --- a/components/dp/core/src/wlan_dp_main.c +++ b/components/dp/core/src/wlan_dp_main.c @@ -37,6 +37,7 @@ #include #include #include +#include #ifdef FEATURE_DIRECT_LINK #include "dp_internal.h" #include "cdp_txrx_ctrl.h" @@ -1555,6 +1556,26 @@ bool dp_is_data_stall_event_enabled(uint32_t evt) return false; } +QDF_STATUS __wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return cdp_runtime_suspend(soc, pdev_id); +} + +QDF_STATUS __wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return cdp_runtime_resume(soc, pdev_id); +} + +QDF_STATUS __wlan_dp_bus_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return cdp_bus_suspend(soc, pdev_id); +} + +QDF_STATUS __wlan_dp_bus_resume(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return cdp_bus_resume(soc, pdev_id); +} + void *wlan_dp_txrx_soc_attach(struct dp_txrx_soc_attach_params *params, bool *is_wifi3_0_target) { diff --git a/components/dp/dispatcher/inc/wlan_dp_api.h b/components/dp/dispatcher/inc/wlan_dp_api.h index cd0f6c5cdf..20703a15cf 100644 --- a/components/dp/dispatcher/inc/wlan_dp_api.h +++ b/components/dp/dispatcher/inc/wlan_dp_api.h @@ -28,4 +28,22 @@ * Return: None */ void wlan_dp_update_peer_map_unmap_version(uint8_t *version); + +/** + * wlan_dp_runtime_suspend() - Runtime suspend DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id); + +/** + * wlan_dp_runtime_resume() - Runtime suspend DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id); #endif diff --git a/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h b/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h index 4835a9122d..4f269dac01 100644 --- a/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h +++ b/components/dp/dispatcher/inc/wlan_dp_ucfg_api.h @@ -1435,6 +1435,24 @@ QDF_STATUS ucfg_dp_config_direct_link(struct wlan_objmgr_vdev *vdev, } #endif +/** + * ucfg_dp_bus_suspend() - BUS suspend DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS ucfg_dp_bus_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id); + +/** + * ucfg_dp_bus_resume() - BUS resume DP handler + * @soc: CDP SoC handle + * @pdev_id: DP PDEV ID + * + * Return: QDF_STATUS + */ +QDF_STATUS ucfg_dp_bus_resume(ol_txrx_soc_handle soc, uint8_t pdev_id); + /** * ucfg_dp_txrx_soc_attach() - Datapath soc attach * @params: SoC attach params diff --git a/components/dp/dispatcher/src/wlan_dp_api.c b/components/dp/dispatcher/src/wlan_dp_api.c index 47da3fe4a8..cf41483518 100644 --- a/components/dp/dispatcher/src/wlan_dp_api.c +++ b/components/dp/dispatcher/src/wlan_dp_api.c @@ -25,3 +25,13 @@ void wlan_dp_update_peer_map_unmap_version(uint8_t *version) { __wlan_dp_update_peer_map_unmap_version(version); } + +QDF_STATUS wlan_dp_runtime_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return __wlan_dp_runtime_suspend(soc, pdev_id); +} + +QDF_STATUS wlan_dp_runtime_resume(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return __wlan_dp_runtime_resume(soc, pdev_id); +} diff --git a/components/dp/dispatcher/src/wlan_dp_ucfg_api.c b/components/dp/dispatcher/src/wlan_dp_ucfg_api.c index 508fabcfac..7940dc49f7 100644 --- a/components/dp/dispatcher/src/wlan_dp_ucfg_api.c +++ b/components/dp/dispatcher/src/wlan_dp_ucfg_api.c @@ -2395,6 +2395,16 @@ QDF_STATUS ucfg_dp_config_direct_link(struct wlan_objmgr_vdev *vdev, } #endif +QDF_STATUS ucfg_dp_bus_suspend(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return __wlan_dp_bus_suspend(soc, pdev_id); +} + +QDF_STATUS ucfg_dp_bus_resume(ol_txrx_soc_handle soc, uint8_t pdev_id) +{ + return __wlan_dp_bus_resume(soc, pdev_id); +} + void *ucfg_dp_txrx_soc_attach(struct dp_txrx_soc_attach_params *params, bool *is_wifi3_0_target) { diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 383f631242..0f833d29d2 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -35,6 +35,7 @@ #include "htc_api.h" #include "wlan_pmo_obj_mgmt_api.h" #include +#include #include "cds_api.h" #include "wlan_pmo_static_config.h" #include "wlan_mlme_ucfg_api.h" @@ -1108,14 +1109,14 @@ QDF_STATUS pmo_core_psoc_bus_runtime_suspend(struct wlan_objmgr_psoc *psoc, goto runtime_failure; } - status = cdp_runtime_suspend(dp_soc, pdev_id); + status = wlan_dp_runtime_suspend(dp_soc, pdev_id); if (status != QDF_STATUS_SUCCESS) goto runtime_failure; ret = htc_runtime_suspend(htc_ctx); if (ret) { status = qdf_status_from_os_return(ret); - goto cdp_runtime_resume; + goto dp_runtime_resume; } status = pmo_tgt_psoc_set_runtime_pm_inprogress(psoc, true); @@ -1208,9 +1209,9 @@ resume_htc: PMO_CORE_PSOC_RUNTIME_PM_QDF_BUG(QDF_STATUS_SUCCESS != pmo_tgt_psoc_set_runtime_pm_inprogress(psoc, false)); -cdp_runtime_resume: +dp_runtime_resume: PMO_CORE_PSOC_RUNTIME_PM_QDF_BUG(QDF_STATUS_SUCCESS != - cdp_runtime_resume(dp_soc, pdev_id)); + wlan_dp_runtime_resume(dp_soc, pdev_id)); runtime_failure: hif_process_runtime_suspend_failure(); @@ -1310,7 +1311,7 @@ QDF_STATUS pmo_core_psoc_bus_runtime_resume(struct wlan_objmgr_psoc *psoc, goto fail; } - status = cdp_runtime_resume(dp_soc, pdev_id); + status = wlan_dp_runtime_resume(dp_soc, pdev_id); if (status != QDF_STATUS_SUCCESS) goto fail; diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index d85e2b5a5e..b21144eb97 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -1284,7 +1284,8 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params, } dp_soc = cds_get_context(QDF_MODULE_ID_SOC); - err = qdf_status_to_os_return(cdp_bus_suspend(dp_soc, OL_TXRX_PDEV_ID)); + err = qdf_status_to_os_return(ucfg_dp_bus_suspend(dp_soc, + OL_TXRX_PDEV_ID)); if (err) { hdd_err("Failed cdp bus suspend: %d", err); return err; @@ -1293,13 +1294,13 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params, if (ucfg_ipa_is_tx_pending(hdd_ctx->pdev)) { hdd_err("failed due to pending IPA TX comps"); err = -EBUSY; - goto resume_cdp; + goto resume_dp; } err = hif_bus_early_suspend(hif_ctx); if (err) { hdd_err("Failed hif bus early suspend"); - goto resume_cdp; + goto resume_dp; } status = ucfg_pmo_psoc_bus_suspend_req(hdd_ctx->psoc, @@ -1367,8 +1368,8 @@ late_hif_resume: status = hif_bus_late_resume(hif_ctx); QDF_BUG(QDF_IS_STATUS_SUCCESS(status)); -resume_cdp: - status = cdp_bus_resume(dp_soc, OL_TXRX_PDEV_ID); +resume_dp: + status = ucfg_dp_bus_resume(dp_soc, OL_TXRX_PDEV_ID); QDF_BUG(QDF_IS_STATUS_SUCCESS(status)); hif_system_pm_set_state_on(hif_ctx); @@ -1546,7 +1547,7 @@ int wlan_hdd_bus_resume(enum qdf_suspend_type type) } dp_soc = cds_get_context(QDF_MODULE_ID_SOC); - qdf_status = cdp_bus_resume(dp_soc, OL_TXRX_PDEV_ID); + qdf_status = ucfg_dp_bus_resume(dp_soc, OL_TXRX_PDEV_ID); status = qdf_status_to_os_return(qdf_status); if (status) { hdd_err("Failed cdp bus resume");