qcacld-3.0: Set system suspend/resume state in hif ctx
Set system state in hif ctx to suspend or resume on system suspend and resume respectively. Change-Id: If1904a4fe5c861deed1b35071be10cb8cc8d6407 CRs-Fixed: 2899520
This commit is contained in:

committed by
snandini

parent
95580961d5
commit
43a40f83b0
1
Kbuild
1
Kbuild
@@ -3408,6 +3408,7 @@ cppflags-y += -DDP_RX_DESC_COOKIE_INVALIDATE
|
|||||||
cppflags-y += -DMON_ENABLE_DROP_FOR_MAC
|
cppflags-y += -DMON_ENABLE_DROP_FOR_MAC
|
||||||
cppflags-y += -DPCI_LINK_STATUS_SANITY
|
cppflags-y += -DPCI_LINK_STATUS_SANITY
|
||||||
cppflags-y += -DDP_MON_RSSI_IN_DBM
|
cppflags-y += -DDP_MON_RSSI_IN_DBM
|
||||||
|
cppflags-y += -DSYSTEM_PM_CHECK
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable Low latency optimisation mode
|
# Enable Low latency optimisation mode
|
||||||
|
@@ -361,6 +361,20 @@ QDF_STATUS pmo_core_txrx_resume(struct wlan_objmgr_psoc *psoc);
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS pmo_core_config_forced_dtim(struct wlan_objmgr_vdev *vdev,
|
QDF_STATUS pmo_core_config_forced_dtim(struct wlan_objmgr_vdev *vdev,
|
||||||
uint32_t dynamic_dtim);
|
uint32_t dynamic_dtim);
|
||||||
|
|
||||||
|
#ifdef SYSTEM_PM_CHECK
|
||||||
|
/**
|
||||||
|
* pmo_core_system_resume() - function to handle system resume notification
|
||||||
|
* @psoc: objmgr psoc handle
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void pmo_core_system_resume(struct wlan_objmgr_psoc *psoc);
|
||||||
|
#else
|
||||||
|
static inline void pmo_core_system_resume(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
|
#endif /* WLAN_POWER_MANAGEMENT_OFFLOAD */
|
||||||
|
|
||||||
#endif /* end of _WLAN_PMO_SUSPEND_RESUME_H_ */
|
#endif /* end of _WLAN_PMO_SUSPEND_RESUME_H_ */
|
||||||
|
@@ -1816,3 +1816,28 @@ out:
|
|||||||
pmo_exit();
|
pmo_exit();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SYSTEM_PM_CHECK
|
||||||
|
void pmo_core_system_resume(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct pmo_psoc_priv_obj *psoc_ctx;
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
pmo_err("psoc is NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = pmo_psoc_get_ref(psoc);
|
||||||
|
if (status != QDF_STATUS_SUCCESS) {
|
||||||
|
pmo_err("pmo cannot get the reference out of psoc");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
psoc_ctx = pmo_psoc_get_priv(psoc);
|
||||||
|
|
||||||
|
htc_system_resume(psoc_ctx->htc_hdl);
|
||||||
|
|
||||||
|
pmo_psoc_put_ref(psoc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -2073,4 +2073,19 @@ ucfg_pmo_get_sap_mode_bus_suspend(struct wlan_objmgr_psoc *psoc);
|
|||||||
bool
|
bool
|
||||||
ucfg_pmo_get_go_mode_bus_suspend(struct wlan_objmgr_psoc *psoc);
|
ucfg_pmo_get_go_mode_bus_suspend(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
#ifdef SYSTEM_PM_CHECK
|
||||||
|
/**
|
||||||
|
* ucfg_pmo_notify_system_resume() - system resume notification to pmo
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
ucfg_pmo_notify_system_resume(struct wlan_objmgr_psoc *psoc);
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void ucfg_pmo_notify_system_resume(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif /* end of _WLAN_PMO_UCFG_API_H_ */
|
#endif /* end of _WLAN_PMO_UCFG_API_H_ */
|
||||||
|
@@ -919,3 +919,10 @@ QDF_STATUS ucfg_pmo_core_txrx_resume(struct wlan_objmgr_psoc *psoc)
|
|||||||
{
|
{
|
||||||
return pmo_core_txrx_resume(psoc);
|
return pmo_core_txrx_resume(psoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SYSTEM_PM_CHECK
|
||||||
|
void ucfg_pmo_notify_system_resume(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
pmo_core_system_resume(psoc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -1208,6 +1208,8 @@ static int __wlan_hdd_bus_suspend(struct wow_enable_params wow_params,
|
|||||||
goto late_hif_resume;
|
goto late_hif_resume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hif_system_pm_set_state_suspended(hif_ctx);
|
||||||
|
|
||||||
err = hif_bus_suspend(hif_ctx);
|
err = hif_bus_suspend(hif_ctx);
|
||||||
if (err) {
|
if (err) {
|
||||||
hdd_err("Failed hif bus suspend: %d", err);
|
hdd_err("Failed hif bus suspend: %d", err);
|
||||||
@@ -1259,6 +1261,7 @@ late_hif_resume:
|
|||||||
resume_cdp:
|
resume_cdp:
|
||||||
status = cdp_bus_resume(dp_soc, OL_TXRX_PDEV_ID);
|
status = cdp_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);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -1415,6 +1418,8 @@ int wlan_hdd_bus_resume(enum qdf_suspend_type type)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hif_system_pm_set_state_resuming(hif_ctx);
|
||||||
|
|
||||||
qdf_status = ucfg_pmo_psoc_bus_resume_req(hdd_ctx->psoc,
|
qdf_status = ucfg_pmo_psoc_bus_resume_req(hdd_ctx->psoc,
|
||||||
type);
|
type);
|
||||||
status = qdf_status_to_os_return(qdf_status);
|
status = qdf_status_to_os_return(qdf_status);
|
||||||
@@ -1423,6 +1428,8 @@ int wlan_hdd_bus_resume(enum qdf_suspend_type type)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hif_system_pm_set_state_on(hif_ctx);
|
||||||
|
|
||||||
status = hif_bus_late_resume(hif_ctx);
|
status = hif_bus_late_resume(hif_ctx);
|
||||||
if (status) {
|
if (status) {
|
||||||
hdd_err("Failed hif bus late resume");
|
hdd_err("Failed hif bus late resume");
|
||||||
@@ -1441,6 +1448,7 @@ int wlan_hdd_bus_resume(enum qdf_suspend_type type)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
hif_system_pm_set_state_suspended(hif_ctx);
|
||||||
if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() ||
|
if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() ||
|
||||||
cds_is_fw_down())
|
cds_is_fw_down())
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -1942,6 +1942,8 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ucfg_pmo_notify_system_resume(hdd_ctx->psoc);
|
||||||
|
|
||||||
qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD,
|
qdf_mtrace(QDF_MODULE_ID_HDD, QDF_MODULE_ID_HDD,
|
||||||
TRACE_CODE_HDD_CFG80211_RESUME_WLAN,
|
TRACE_CODE_HDD_CFG80211_RESUME_WLAN,
|
||||||
NO_SESSION, hdd_ctx->is_wiphy_suspended);
|
NO_SESSION, hdd_ctx->is_wiphy_suspended);
|
||||||
|
Reference in New Issue
Block a user