summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKomal Seelam <kseelam@qti.qualcomm.com>2015-09-02 20:02:37 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-09-03 00:25:36 -0700
commitdd2c51a8225329c7b7fcb876ad2dd5bcc4be1797 (patch)
treef82f6e85865a133aed20a9113725d5aa039c98af
parent29ce6313b5a98709671d601b3e19295d334cd09b (diff)
qcacld: Take a usage count when Go interface is UP
Increment a usage count when GO interface is UP. When GO is active, we might enter into D0-WOW when APPS is awake, which might result in data loss. Take the usage count and keep PCIe link active. Change-Id: I155cce2970335823ba81eb3c95048438d348c4cd CRs-Fixed: 901550
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c2
-rw-r--r--CORE/SERVICES/WMA/wma.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 6f59287ededb..87f85f2a130f 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -900,7 +900,6 @@ static int __hif_pci_runtime_suspend(struct pci_dev *pdev)
if (wma_get_client_count(temp_module)) {
pr_err("%s: Runtime PM not supported when clients are connected\n",
__func__);
- ret = -EINVAL;
goto out;
}
#endif
@@ -1046,6 +1045,7 @@ static void hif_pci_pm_runtime_pre_init(struct hif_pci_softc *sc)
setup_timer(&sc->runtime_timer, hif_pci_runtime_pm_timeout_fn,
(unsigned long)sc);
+ adf_os_atomic_init(&sc->pm_state);
adf_os_atomic_set(&sc->pm_state, HIF_PM_RUNTIME_STATE_ON);
}
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 9ace833b8298..4785aad7244d 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -15246,7 +15246,7 @@ out:
static void wma_add_pm_vote(tp_wma_handle wma)
{
if (++wma->ap_client_cnt == 1) {
- vos_runtime_pm_prevent_suspend();
+ htc_pm_runtime_get(wma->htc_handle);
vos_pm_control(DISABLE_PCIE_POWER_COLLAPSE);
}
}
@@ -15254,7 +15254,7 @@ static void wma_add_pm_vote(tp_wma_handle wma)
static void wma_del_pm_vote(tp_wma_handle wma)
{
if (--wma->ap_client_cnt == 0) {
- vos_runtime_pm_allow_suspend();
+ htc_pm_runtime_put(wma->htc_handle);
vos_pm_control(ENABLE_PCIE_POWER_COLLAPSE);
}
}