summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Jeon <dennis.jeon@broadcom.corp-partner.google.com>2022-09-29 20:01:34 +0900
committerIsaac Chiou <isaacchiou@google.com>2022-10-12 05:03:21 +0000
commit9615f7c3f7f9050d467715e3016070b5727765e9 (patch)
tree82035d27636739e4fd561dd7e00ce4f76f54783c
parentfbf55dda6072ff07eefa9c564596388b88d8764c (diff)
downloadbcm4389-9615f7c3f7f9050d467715e3016070b5727765e9.tar.gz
bcmdhd: Added wakelock to keep host awake when monitor mode is enabled
since there is no rx wakelock in dhd_rx_mon_pkt(), the host system could be entered suspend mode despite receiving and processing many 802.11 frames on open air. added rx wakelock to dhd_rx_mon_pkt() as handled by STA in dhd_rx_frame() Bug:216077458 Test: Compared the size of pcap file with screen-on device Change-Id: I593439b187b5ee96caa92828c770db595af81e85 Signed-off-by: Dennis Jeon <dennis.jeon@broadcom.corp-partner.google.com>
-rw-r--r--dhd.h1
-rw-r--r--dhd_linux_rx.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/dhd.h b/dhd.h
index 9f07779..6288d5a 100644
--- a/dhd.h
+++ b/dhd.h
@@ -2269,6 +2269,7 @@ extern void dhd_os_oob_irq_wake_unlock(dhd_pub_t *pub);
* to prevent the system from entering suspend during TX/RX frame processing.
* It can be adjusted depending on the host platform.
*/
+#define DHD_MONITOR_TIMEOUT_MS 1000
#define DHD_PACKET_TIMEOUT_MS 100
#define DHD_HANDSHAKE_TIMEOUT_MS 1000
#define DHD_EVENT_TIMEOUT_MS 1500
diff --git a/dhd_linux_rx.c b/dhd_linux_rx.c
index 286678b..55725db 100644
--- a/dhd_linux_rx.c
+++ b/dhd_linux_rx.c
@@ -1322,6 +1322,11 @@ dhd_rx_mon_pkt(dhd_pub_t *dhdp, host_rxbuf_cmpl_t* msg, void *pkt, int ifidx)
}
dhd->monitor_skb = NULL;
+
+#if defined(OEM_ANDROID)
+ DHD_OS_WAKE_LOCK_RX_TIMEOUT_ENABLE(dhdp, DHD_MONITOR_TIMEOUT_MS);
+ DHD_OS_WAKE_LOCK_TIMEOUT(dhdp);
+#endif /* OEM_ANDROID */
}
#endif /* WL_MONITOR */