qcacld-3.0: Move DP suspend/resume code to DP component
Currently OSIF calls the CDP API for DP suspend/resume handler directly. Move these calls to DP component so that DP component can handle the suspend/resume related operations for internal DP sub-modules (which are outside CDP). Change-Id: I080809904f619260c707cacbcdbf158250320081 CRs-Fixed: 3502507
This commit is contained in:

committed by
Rahul Choudhary

parent
f3e840679b
commit
ba1fbb8b3f
@@ -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_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_DP, "enter")
|
||||||
#define dp_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_DP, "exit")
|
#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
|
* wlan_dp_txrx_soc_attach() - Datapath soc attach
|
||||||
* @params: SoC attach params
|
* @params: SoC attach params
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
#include <hif.h>
|
#include <hif.h>
|
||||||
#include <htc_api.h>
|
#include <htc_api.h>
|
||||||
#include <cdp_txrx_cmn_reg.h>
|
#include <cdp_txrx_cmn_reg.h>
|
||||||
|
#include <cdp_txrx_bus.h>
|
||||||
#ifdef FEATURE_DIRECT_LINK
|
#ifdef FEATURE_DIRECT_LINK
|
||||||
#include "dp_internal.h"
|
#include "dp_internal.h"
|
||||||
#include "cdp_txrx_ctrl.h"
|
#include "cdp_txrx_ctrl.h"
|
||||||
@@ -1555,6 +1556,26 @@ bool dp_is_data_stall_event_enabled(uint32_t evt)
|
|||||||
return false;
|
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,
|
void *wlan_dp_txrx_soc_attach(struct dp_txrx_soc_attach_params *params,
|
||||||
bool *is_wifi3_0_target)
|
bool *is_wifi3_0_target)
|
||||||
{
|
{
|
||||||
|
@@ -28,4 +28,22 @@
|
|||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
void wlan_dp_update_peer_map_unmap_version(uint8_t *version);
|
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
|
#endif
|
||||||
|
@@ -1435,6 +1435,24 @@ QDF_STATUS ucfg_dp_config_direct_link(struct wlan_objmgr_vdev *vdev,
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
* ucfg_dp_txrx_soc_attach() - Datapath soc attach
|
||||||
* @params: SoC attach params
|
* @params: SoC attach params
|
||||||
|
@@ -25,3 +25,13 @@ void wlan_dp_update_peer_map_unmap_version(uint8_t *version)
|
|||||||
{
|
{
|
||||||
__wlan_dp_update_peer_map_unmap_version(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);
|
||||||
|
}
|
||||||
|
@@ -2395,6 +2395,16 @@ QDF_STATUS ucfg_dp_config_direct_link(struct wlan_objmgr_vdev *vdev,
|
|||||||
}
|
}
|
||||||
#endif
|
#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,
|
void *ucfg_dp_txrx_soc_attach(struct dp_txrx_soc_attach_params *params,
|
||||||
bool *is_wifi3_0_target)
|
bool *is_wifi3_0_target)
|
||||||
{
|
{
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
#include "htc_api.h"
|
#include "htc_api.h"
|
||||||
#include "wlan_pmo_obj_mgmt_api.h"
|
#include "wlan_pmo_obj_mgmt_api.h"
|
||||||
#include <wlan_scan_ucfg_api.h>
|
#include <wlan_scan_ucfg_api.h>
|
||||||
|
#include <wlan_dp_api.h>
|
||||||
#include "cds_api.h"
|
#include "cds_api.h"
|
||||||
#include "wlan_pmo_static_config.h"
|
#include "wlan_pmo_static_config.h"
|
||||||
#include "wlan_mlme_ucfg_api.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;
|
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)
|
if (status != QDF_STATUS_SUCCESS)
|
||||||
goto runtime_failure;
|
goto runtime_failure;
|
||||||
|
|
||||||
ret = htc_runtime_suspend(htc_ctx);
|
ret = htc_runtime_suspend(htc_ctx);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
status = qdf_status_from_os_return(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);
|
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_CORE_PSOC_RUNTIME_PM_QDF_BUG(QDF_STATUS_SUCCESS !=
|
||||||
pmo_tgt_psoc_set_runtime_pm_inprogress(psoc, false));
|
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 !=
|
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:
|
runtime_failure:
|
||||||
hif_process_runtime_suspend_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;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = cdp_runtime_resume(dp_soc, pdev_id);
|
status = wlan_dp_runtime_resume(dp_soc, pdev_id);
|
||||||
if (status != QDF_STATUS_SUCCESS)
|
if (status != QDF_STATUS_SUCCESS)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@@ -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);
|
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) {
|
if (err) {
|
||||||
hdd_err("Failed cdp bus suspend: %d", err);
|
hdd_err("Failed cdp bus suspend: %d", err);
|
||||||
return 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)) {
|
if (ucfg_ipa_is_tx_pending(hdd_ctx->pdev)) {
|
||||||
hdd_err("failed due to pending IPA TX comps");
|
hdd_err("failed due to pending IPA TX comps");
|
||||||
err = -EBUSY;
|
err = -EBUSY;
|
||||||
goto resume_cdp;
|
goto resume_dp;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = hif_bus_early_suspend(hif_ctx);
|
err = hif_bus_early_suspend(hif_ctx);
|
||||||
if (err) {
|
if (err) {
|
||||||
hdd_err("Failed hif bus early suspend");
|
hdd_err("Failed hif bus early suspend");
|
||||||
goto resume_cdp;
|
goto resume_dp;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = ucfg_pmo_psoc_bus_suspend_req(hdd_ctx->psoc,
|
status = ucfg_pmo_psoc_bus_suspend_req(hdd_ctx->psoc,
|
||||||
@@ -1367,8 +1368,8 @@ late_hif_resume:
|
|||||||
status = hif_bus_late_resume(hif_ctx);
|
status = hif_bus_late_resume(hif_ctx);
|
||||||
QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
|
QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
|
||||||
|
|
||||||
resume_cdp:
|
resume_dp:
|
||||||
status = cdp_bus_resume(dp_soc, OL_TXRX_PDEV_ID);
|
status = ucfg_dp_bus_resume(dp_soc, OL_TXRX_PDEV_ID);
|
||||||
QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
|
QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
|
||||||
hif_system_pm_set_state_on(hif_ctx);
|
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);
|
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);
|
status = qdf_status_to_os_return(qdf_status);
|
||||||
if (status) {
|
if (status) {
|
||||||
hdd_err("Failed cdp bus resume");
|
hdd_err("Failed cdp bus resume");
|
||||||
|
Reference in New Issue
Block a user