From 222b6522d007bb168a97cd3412cc1d01b012e92c Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Wed, 23 Sep 2020 16:16:00 -0700 Subject: [PATCH] net: qrtr: Force wakeups for data packets Force a wakeup when queueing packets to a socket. This is needed to give userspace clients a chance to run if the device is going into system suspend. The wakeup event should force the device to abort suspend. The only node that should not behave this way is the SLPI node because sensor stream race conditions cause suspend issues and power drain issues. Change-Id: I4375e36261dd18da7bae5a5a4f3f708ed00ed62f Signed-off-by: Chris Lew --- net/qrtr/qrtr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 6ccb13c598fa..c64ead2b5e50 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -828,6 +828,10 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len) if (sock_queue_rcv_skb(&ipc->sk, skb)) goto err; + /* Force wakeup for all packets except for sensors */ + if (node->nid != 9) + __pm_wakeup_event(node->ws, 0); + qrtr_port_put(ipc); }