summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKomal Seelam <kseelam@qti.qualcomm.com>2014-02-08 16:40:44 -0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-03-19 13:16:48 -0700
commitb7b68d27bdac3c2a65562f2c53ccc6f728adcf68 (patch)
tree8286666c5a685f76bac17fd92dc78757f4cc1e18
parent79aebdba2e04a3020a963d3595f84c75ff126f99 (diff)
qcacld: Send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID from PCIe Resume
AXI bus errors are seen when host queues tx packets before FW completly resumes. In Cfg80211_resume, tx queues are enabled before host sends WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID to FW. Some Tx Packets are queued to target before target resumes. FW drops all the ack for those packets queued before it recieves WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID. Host will never be able to free the buffers allocated for Tx Frames which are sent before the WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID. Send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID to FW in hif_pci_resume instead in cfg80211_resume. Change-Id: Ica21c0d1105cf72e97f9010634ff5d2d68a96d36 CRs-Fixed: 633989
-rw-r--r--CORE/SERVICES/COMMON/wma_api.h1
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c3
-rw-r--r--CORE/SERVICES/WMA/wma.c41
3 files changed, 45 insertions, 0 deletions
diff --git a/CORE/SERVICES/COMMON/wma_api.h b/CORE/SERVICES/COMMON/wma_api.h
index c145fab6aafd..3b392d5113ac 100644
--- a/CORE/SERVICES/COMMON/wma_api.h
+++ b/CORE/SERVICES/COMMON/wma_api.h
@@ -126,6 +126,7 @@ VOS_STATUS WMA_GetWcnssSoftwareVersion(v_PVOID_t pvosGCtx, tANI_U8 *pVersion,
int wma_suspend_target(WMA_HANDLE handle, int disable_target_intr);
void wma_target_suspend_acknowledge(void *context);
int wma_resume_target(WMA_HANDLE handle);
+int wma_disable_wow_in_fw(WMA_HANDLE handle);
int wma_is_wow_mode_selected(WMA_HANDLE handle);
int wma_enable_wow_in_fw(WMA_HANDLE handle);
#endif
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index b9be432a0b9f..c118d1f4bd90 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -1664,6 +1664,9 @@ hif_pci_resume(struct pci_dev *pdev)
(val == PM_EVENT_HIBERNATE || val == PM_EVENT_SUSPEND)) {
return wma_resume_target(temp_module);
}
+ else if (wma_disable_wow_in_fw(temp_module))
+ return (-1);
+
return 0;
}
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 091650d9f925..36b111dba792 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -12869,6 +12869,47 @@ static VOS_STATUS wma_resume_req(tp_wma_handle wma, tpSirWlanResumeParam info)
}
/*
+ Disable wow in PCIe resume context.
+*/
+
+int wma_disable_wow_in_fw(WMA_HANDLE handle)
+{
+ tp_wma_handle wma = handle;
+ struct wma_txrx_node *iface;
+ int8_t vdev_id;
+ VOS_STATUS ret;
+
+ if(!wma->wow.wow_enable || !wma->wow.wow_enable_cmd_sent) {
+ return VOS_STATUS_SUCCESS;
+ }
+
+ WMA_LOGD("WoW Resume in PCIe Context\n");
+ wma->wow.wow_enable = FALSE;
+ wma->wow.wow_enable_cmd_sent = FALSE;
+
+ for (vdev_id = 0; vdev_id < wma->max_bssid; vdev_id++) {
+ if (!wma->interfaces[vdev_id].handle)
+ continue;
+
+ #ifdef QCA_SUPPORT_TXRX_VDEV_PAUSE_LL
+ /* When host resume, by default, unpause all active vdev */
+ if (wma->interfaces[vdev_id].pause_bitmap) {
+ wdi_in_vdev_unpause(wma->interfaces[vdev_id].handle);
+ wma->interfaces[vdev_id].pause_bitmap = 0;
+ }
+ #endif /* QCA_SUPPORT_TXRX_VDEV_PAUSE_LL */
+
+ iface = &wma->interfaces[vdev_id];
+ iface->conn_state = FALSE;
+ }
+
+ ret = wma_send_host_wakeup_ind_to_fw(wma);
+ vos_wake_lock_timeout_acquire(&wma->wow_wake_lock, 2000);
+
+ return ret;
+}
+
+/*
* Returns true if wow parameters (patterns, wakeup events, etc)
* are configured in fw and waiting for wow to be enabled in fw.
* Other cases, returns false.