]> git.baikalelectronics.ru Git - kernel.git/commit
net: qrtr: Fix message type of outgoing packets
authorBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 20 May 2019 23:51:56 +0000 (16:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 May 2019 00:50:31 +0000 (20:50 -0400)
commit00abc411594d359c952c7aea0a86fb89f858425d
treeded117af12671b67d6c9ab02763d5782fd837b43
parent91ecc777b566a4d90e2a5003aea7961406f2140e
net: qrtr: Fix message type of outgoing packets

QRTR packets has a message type in the header, which is repeated in the
control header. For control packets we therefor copy the type from
beginning of the outgoing payload and use that as message type.

For non-control messages an endianness fix introduced in v5.2-rc1 caused the
type to be 0, rather than QRTR_TYPE_DATA, causing all messages to be dropped by
the receiver. Fix this by converting and using qrtr_type, which will remain
QRTR_TYPE_DATA for non-control messages.

Fixes: 9173c8b7d708 ("net: qrtr: use protocol endiannes variable")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/qrtr/qrtr.c