can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 25 Jun 2021 13:09:29 +0000 (15:09 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 24 Jul 2021 17:02:32 +0000 (19:02 +0200)
commit590eb2b7d8cfafb27e8108d52d4bf4850626d31d
tree902258d0b616e5a4340a2b48290c1ecf044490a7
parentc6eea1c8bda56737752465a298dc6ce07d6b8ce3
can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values

This patch fixes an incorrect way of reading error counters in messages
received for this purpose from the PCAN-USB interface. These messages
inform about the increase or decrease of the error counters, whose values
are placed in bytes 1 and 2 of the message data (not 0 and 1).

Fixes: ea8b33bde76c ("can: pcan_usb: add support of rxerr/txerr counters")
Link: https://lore.kernel.org/r/20210625130931.27438-4-s.grosjean@peak-system.com
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb.c