net: qrtr: smd: Dump invalid packet

If a corrupted packet is detected, dump the contents of the packet to
help debug the source of the corruption.

Change-Id: I7320edeb45ffb707fc8070e9abc9c2675f5831ea
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
This commit is contained in:
Chris Lew 2021-12-22 18:08:51 -08:00
parent 95f6869800
commit 161733a7d2

View File

@ -32,6 +32,8 @@ static int qcom_smd_qrtr_callback(struct rpmsg_device *rpdev,
rc = qrtr_endpoint_post(&qdev->ep, data, len);
if (rc == -EINVAL) {
print_hex_dump(KERN_INFO, "qrtr: ", DUMP_PREFIX_OFFSET, 16, 1,
data, len, 1);
dev_err(qdev->dev, "invalid ipcrouter packet\n");
/* return 0 to let smd drop the packet */
rc = 0;