From 88d41e5947379c2090c438da0f8ad1d32d40c3cf Mon Sep 17 00:00:00 2001 From: Chris Lew Date: Mon, 17 Oct 2022 13:34:48 -0700 Subject: [PATCH] net: qrtr: Retry hello message on error If the initial hello message fails, the communication protocol will stall unless the remote sends a subsequent hello. Queue a say hello work to prevent this stall from happening. Change-Id: I5de224906b104f223c7166feb76aedd6246b3922 Signed-off-by: Chris Lew --- net/qrtr/af_qrtr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c index 9794496c55dd..6ec1526c182f 100644 --- a/net/qrtr/af_qrtr.c +++ b/net/qrtr/af_qrtr.c @@ -460,8 +460,12 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb, * confirm_rx flag if we dropped this one */ if (rc && confirm_rx) qrtr_tx_flow_failed(node, to->sq_node, to->sq_port); - if (!rc && type == QRTR_TYPE_HELLO) - atomic_inc(&node->hello_sent); + if (type == QRTR_TYPE_HELLO) { + if (!rc) + atomic_inc(&node->hello_sent); + else + kthread_queue_work(&node->kworker, &node->say_hello); + } return rc; }