diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 3a9bd8fce6..e9ff1d1b65 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -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, 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); qdf_spin_lock_irqsave(&hdd_ctx->pm_qos_lock); if (!hdd_ctx->runtime_pm_prevented && 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; } else if (hdd_ctx->runtime_pm_prevented && 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; }