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 <clew@codeaurora.org>
This commit is contained in:
Chris Lew 2020-09-23 16:16:00 -07:00
commit 222b6522d0

View file

@ -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);
}