Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7dcc986 authored by Chris Lew's avatar Chris Lew Committed by Arun Kumar Neelakantam
Browse files

net: qrtr: Change node discovery mechanism of QRTR



Discover nodes through QRTR_TYPE_NEW_SERVER messages as
well in order to find remote hosts which require more than
one hop to reach it.

Change-Id: Ia79df1fa2730250786d221fb847029046a53bea4
Signed-off-by: default avatarGustavo Solaira <gustavos@codeaurora.org>
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 5ebcda44
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ static void qrtr_port_put(struct qrtr_sock *ipc);
static void qrtr_node_rx_work(struct work_struct *work)
{
	struct qrtr_node *node = container_of(work, struct qrtr_node, work);
	struct qrtr_ctrl_pkt *pkt;
	struct sk_buff *skb;

	while ((skb = skb_dequeue(&node->rx_queue)) != NULL) {
@@ -538,6 +539,12 @@ static void qrtr_node_rx_work(struct work_struct *work)
		cb = (struct qrtr_cb *)skb->cb;
		qrtr_node_assign(node, cb->src_node);

		if (cb->type == QRTR_TYPE_NEW_SERVER &&
		    skb->len == sizeof(*pkt)) {
			pkt = (void *)skb->data;
			qrtr_node_assign(node, le32_to_cpu(pkt->server.node));
		}

		if (cb->type == QRTR_TYPE_RESUME_TX) {
			qrtr_tx_resume(node, skb);
			consume_skb(skb);