|
@@ -3931,6 +3931,9 @@ int hif_pm_runtime_get_sync(struct hif_opaque_softc *hif_ctx)
|
|
if (!sc)
|
|
if (!sc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+ if (!pm_runtime_enabled(sc->dev))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED ||
|
|
if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED ||
|
|
pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING)
|
|
pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING)
|
|
@@ -3975,6 +3978,9 @@ int hif_pm_runtime_put_sync_suspend(struct hif_opaque_softc *hif_ctx)
|
|
if (!sc)
|
|
if (!sc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+ if (!pm_runtime_enabled(sc->dev))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
usage_count = atomic_read(&sc->dev->power.usage_count);
|
|
usage_count = atomic_read(&sc->dev->power.usage_count);
|
|
if (usage_count == 1) {
|
|
if (usage_count == 1) {
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
@@ -4001,6 +4007,9 @@ int hif_pm_runtime_request_resume(struct hif_opaque_softc *hif_ctx)
|
|
if (!sc)
|
|
if (!sc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+ if (!pm_runtime_enabled(sc->dev))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED ||
|
|
if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED ||
|
|
pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING)
|
|
pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING)
|
|
@@ -4033,6 +4042,9 @@ void hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx)
|
|
if (!sc)
|
|
if (!sc)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ if (!pm_runtime_enabled(sc->dev))
|
|
|
|
+ return;
|
|
|
|
+
|
|
sc->pm_stats.runtime_get++;
|
|
sc->pm_stats.runtime_get++;
|
|
pm_runtime_get_noresume(sc->dev);
|
|
pm_runtime_get_noresume(sc->dev);
|
|
}
|
|
}
|
|
@@ -4062,6 +4074,9 @@ int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx)
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!pm_runtime_enabled(sc->dev))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
pm_state = qdf_atomic_read(&sc->pm_state);
|
|
|
|
|
|
if (pm_state == HIF_PM_RUNTIME_STATE_ON ||
|
|
if (pm_state == HIF_PM_RUNTIME_STATE_ON ||
|
|
@@ -4126,6 +4141,10 @@ int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx)
|
|
__func__);
|
|
__func__);
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (!pm_runtime_enabled(sc->dev))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
usage_count = atomic_read(&sc->dev->power.usage_count);
|
|
usage_count = atomic_read(&sc->dev->power.usage_count);
|
|
|
|
|
|
if (usage_count == 1) {
|
|
if (usage_count == 1) {
|