qcacld-3.0: check if runtime pm enabled in runtime_suspend
check if runtime pm enabled in wlan_hdd_runtime_resume and wlan_hdd_runtime_suspend. Change-Id: I107f953d19ea6078d8bb8a59d51dcac6736ff914 CRs-Fixed: 2920169
This commit is contained in:
@@ -4935,6 +4935,14 @@ static inline unsigned long wlan_hdd_get_pm_qos_cpu_latency(void)
|
|||||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0) */
|
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0) */
|
||||||
#endif /* defined(CLD_PM_QOS) || defined(FEATURE_RUNTIME_PM) */
|
#endif /* defined(CLD_PM_QOS) || defined(FEATURE_RUNTIME_PM) */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_is_runtime_pm_enabled - if runtime pm enabled
|
||||||
|
* @hdd_ctx: hdd context
|
||||||
|
*
|
||||||
|
* Return: true if runtime pm enabled. false if disabled.
|
||||||
|
*/
|
||||||
|
bool hdd_is_runtime_pm_enabled(struct hdd_context *hdd_ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hdd_netdev_feature_update - Update the netdev features
|
* hdd_netdev_feature_update - Update the netdev features
|
||||||
* @net_dev: Handle to net_device
|
* @net_dev: Handle to net_device
|
||||||
|
@@ -1569,6 +1569,9 @@ static int wlan_hdd_runtime_suspend(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hdd_is_runtime_pm_enabled(hdd_ctx))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (ucfg_scan_get_pdev_status(hdd_ctx->pdev) !=
|
if (ucfg_scan_get_pdev_status(hdd_ctx->pdev) !=
|
||||||
SCAN_NOT_IN_PROGRESS) {
|
SCAN_NOT_IN_PROGRESS) {
|
||||||
hdd_debug("Scan in progress, ignore runtime suspend");
|
hdd_debug("Scan in progress, ignore runtime suspend");
|
||||||
@@ -1655,6 +1658,9 @@ static int wlan_hdd_runtime_resume(struct device *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hdd_is_runtime_pm_enabled(hdd_ctx))
|
||||||
|
return 0;
|
||||||
|
|
||||||
hdd_ctx->runtime_resume_start_time_stamp =
|
hdd_ctx->runtime_resume_start_time_stamp =
|
||||||
qdf_get_log_timestamp_usecs();
|
qdf_get_log_timestamp_usecs();
|
||||||
delta = hdd_ctx->runtime_resume_start_time_stamp -
|
delta = hdd_ctx->runtime_resume_start_time_stamp -
|
||||||
|
@@ -12331,12 +12331,22 @@ static void hdd_init_runtime_pm(struct hdd_config *config,
|
|||||||
{
|
{
|
||||||
config->runtime_pm = cfg_get(psoc, CFG_ENABLE_RUNTIME_PM);
|
config->runtime_pm = cfg_get(psoc, CFG_ENABLE_RUNTIME_PM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hdd_is_runtime_pm_enabled(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
return hdd_ctx->config->runtime_pm != hdd_runtime_pm_disabled;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static void hdd_init_runtime_pm(struct hdd_config *config,
|
static void hdd_init_runtime_pm(struct hdd_config *config,
|
||||||
struct wlan_objmgr_psoc *psoc)
|
struct wlan_objmgr_psoc *psoc)
|
||||||
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hdd_is_runtime_pm_enabled(struct hdd_context *hdd_ctx)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_WMI_SEND_RECV_QMI
|
#ifdef WLAN_FEATURE_WMI_SEND_RECV_QMI
|
||||||
|
Reference in New Issue
Block a user