qcacld-3.0: Use the hif api for doing PM idle operations
wlan_hdd_pm_qos_notify() is currently directly calling the kernel runtime pm operation functions. Use the hif api functions to perform these operations instead. Change-Id: I8b13a8dd0d5a89f2208b4f319e71b4ffc217ae5c CRs-Fixed: 2607715
This commit is contained in:
@@ -950,17 +950,23 @@ int wlan_hdd_pm_qos_notify(struct notifier_block *nb, unsigned long curr_val,
|
|||||||
{
|
{
|
||||||
struct hdd_context *hdd_ctx = container_of(nb, struct hdd_context,
|
struct hdd_context *hdd_ctx = container_of(nb, struct hdd_context,
|
||||||
pm_qos_notifier);
|
pm_qos_notifier);
|
||||||
|
void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||||
|
|
||||||
|
if (!hif_ctx) {
|
||||||
|
hdd_err("Hif context is Null");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
hdd_debug("PM QOS update. Current value: %ld", curr_val);
|
hdd_debug("PM QOS update. Current value: %ld", curr_val);
|
||||||
qdf_spin_lock_irqsave(&hdd_ctx->pm_qos_lock);
|
qdf_spin_lock_irqsave(&hdd_ctx->pm_qos_lock);
|
||||||
|
|
||||||
if (!hdd_ctx->runtime_pm_prevented &&
|
if (!hdd_ctx->runtime_pm_prevented &&
|
||||||
curr_val != PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
|
curr_val != PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
|
||||||
pm_runtime_get_noresume(hdd_ctx->parent_dev);
|
hif_pm_runtime_get_noresume(hif_ctx);
|
||||||
hdd_ctx->runtime_pm_prevented = true;
|
hdd_ctx->runtime_pm_prevented = true;
|
||||||
} else if (hdd_ctx->runtime_pm_prevented &&
|
} else if (hdd_ctx->runtime_pm_prevented &&
|
||||||
curr_val == PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
|
curr_val == PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE) {
|
||||||
pm_runtime_put_noidle(hdd_ctx->parent_dev);
|
hif_pm_runtime_put_noidle(hif_ctx);
|
||||||
hdd_ctx->runtime_pm_prevented = false;
|
hdd_ctx->runtime_pm_prevented = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user