net: qrtr: Make wakeup timeout configurable
The qrtr driver can guarantee that the packet gets queued to the socket but cannot guarantee the client process will get time to run if auto sleep is enabled. This config will help mitigate missed packets on systems where auto sleep is too aggressive. Use the pm_wakeup_ws_event() api so a hard wakeup can be specified. This will ensure a resume occurs if the data coming in happens while the device is going into suspend. Change-Id: Ic596e06e585b3479a6faa1d0210c016fc9138c6e Signed-off-by: Chris Lew <clew@codeaurora.org> Signed-off-by: Arun Prakash <app@codeaurora.org>
This commit is contained in:
parent
459d6fa3a5
commit
898151cd02
2 changed files with 13 additions and 1 deletions
|
@ -14,6 +14,17 @@ config QRTR
|
|||
|
||||
if QRTR
|
||||
|
||||
config QRTR_WAKEUP_MS
|
||||
int "QRTR Wakeup timeout"
|
||||
default 0
|
||||
help
|
||||
This option is used to configure the wakesource timeout that QRTR
|
||||
should take when a packet is received. The qrtr driver can guarantee
|
||||
that the packet gets queued to the socket but cannot guarantee the
|
||||
client process will get time to run if auto sleep is enabled. This
|
||||
config will help mitigate missed packets on systems where auto sleep
|
||||
is aggressive.
|
||||
|
||||
config QRTR_SMD
|
||||
tristate "SMD IPC Router channels"
|
||||
depends on RPMSG || (COMPILE_TEST && RPMSG=n)
|
||||
|
|
|
@ -123,6 +123,7 @@ static inline struct qrtr_sock *qrtr_sk(struct sock *sk)
|
|||
}
|
||||
|
||||
static unsigned int qrtr_local_nid = 1;
|
||||
static unsigned int qrtr_wakeup_ms = CONFIG_QRTR_WAKEUP_MS;
|
||||
|
||||
/* for node ids */
|
||||
static RADIX_TREE(qrtr_nodes, GFP_KERNEL);
|
||||
|
@ -843,7 +844,7 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
|
|||
cb->type != QRTR_TYPE_RESUME_TX)
|
||||
goto err;
|
||||
|
||||
pm_wakeup_ws_event(node->ws, 0, true);
|
||||
pm_wakeup_ws_event(node->ws, qrtr_wakeup_ms, true);
|
||||
|
||||
skb->data_len = size;
|
||||
skb->len = size;
|
||||
|
|
Loading…
Reference in a new issue