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 <quic_clew@quicinc.com>
This commit is contained in:
Chris Lew 2022-10-17 13:34:48 -07:00 committed by Gerrit - the friendly Code Review server
parent 9f592dc2e2
commit 88d41e5947

View File

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