]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: ems_usb: ems_usb_rx_err(): fix {rx,tx}_errors statistics
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 22 Nov 2024 22:15:52 +0000 (23:15 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 26 Nov 2024 09:51:06 +0000 (10:51 +0100)
commit72a7e2e74b3075959f05e622bae09b115957dffe
tree07a0845d575549d331fb55c823905d81069b84da
parent595a81988a6fe06eb5849e972c8b9cb21c4e0d54
can: ems_usb: ems_usb_rx_err(): fix {rx,tx}_errors statistics

The ems_usb_rx_err() function only incremented the receive error counter
and never the transmit error counter, even if the ECC_DIR flag reported
that an error had occurred during transmission.

Increment the receive/transmit error counter based on the value of the
ECC_DIR flag.

Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241122221650.633981-12-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/ems_usb.c