[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230714055846.1481015-4-quic_viswanat@quicinc.com>
Date: Fri, 14 Jul 2023 11:28:46 +0530
From: Vignesh Viswanathan <quic_viswanat@...cinc.com>
To: <mani@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>,
<linux-arm-msm@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <quic_srichara@...cinc.com>, <quic_clew@...cinc.com>,
Vignesh Viswanathan
<quic_viswanat@...cinc.com>,
Simon Horman <simon.horman@...igine.com>
Subject: [PATCH V2 net-next 3/3] net: qrtr: Handle IPCR control port format of older targets
The destination port value in the IPCR control buffer on older
targets is 0xFFFF. Handle the same by updating the dst_port to
QRTR_PORT_CTRL.
Signed-off-by: Vignesh Viswanathan <quic_viswanat@...cinc.com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
---
net/qrtr/af_qrtr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c
index 78beb74146e7..41ece61eb57a 100644
--- a/net/qrtr/af_qrtr.c
+++ b/net/qrtr/af_qrtr.c
@@ -23,6 +23,8 @@
#define QRTR_EPH_PORT_RANGE \
XA_LIMIT(QRTR_MIN_EPH_SOCKET, QRTR_MAX_EPH_SOCKET)
+#define QRTR_PORT_CTRL_LEGACY 0xffff
+
/**
* struct qrtr_hdr_v1 - (I|R)PCrouter packet header version 1
* @version: protocol version
@@ -495,6 +497,9 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
goto err;
}
+ if (cb->dst_port == QRTR_PORT_CTRL_LEGACY)
+ cb->dst_port = QRTR_PORT_CTRL;
+
if (!size || len != ALIGN(size, 4) + hdrlen)
goto err;
--
2.41.0
Powered by blists - more mailing lists