can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX...
authorStefan Mätje <stefan.maetje@esd.eu>
Wed, 25 Aug 2021 21:52:27 +0000 (23:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 07:44:39 +0000 (09:44 +0200)
commit1f1a5e78b09dace7a899045c1a51ded3042a5569
tree852905b6f4308f52aec96b68f4f91a694b157db5
parent2f1a46968ee42c305820c036532317c54ba8ee93
can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters

commit 044012b52029204900af9e4230263418427f4ba4 upstream.

This patch fixes the interchanged fetch of the CAN RX and TX error
counters from the ESD_EV_CAN_ERROR_EXT message. The RX error counter
is really in struct rx_msg::data[2] and the TX error counter is in
struct rx_msg::data[3].

Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device")
Link: https://lore.kernel.org/r/20210825215227.4947-2-stefan.maetje@esd.eu
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/esd_usb2.c