]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: ifi_canfd: ifi_canfd_handle_lec_err(): fix {rx,tx}_errors statistics
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 22 Nov 2024 22:15:48 +0000 (23:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:26 +0000 (19:51 +0100)
commitc56112f3e709e2bbb01ec6743ce50ca944178a9c
tree4ee45ffbd5b794c14e4378309c2df5db948d79df
parentdd3ef4edcc895458dde0bafcc83b56aac1d4a8ef
can: ifi_canfd: ifi_canfd_handle_lec_err(): fix {rx,tx}_errors statistics

[ Upstream commit bb03d568bb21b4afe7935d1943bcf68ddea3ea45 ]

The ifi_canfd_handle_lec_err() function was incorrectly incrementing only
the receive error counter, even in cases of bit or acknowledgment errors
that occur during transmission.

Fix the issue by incrementing the appropriate counter based on the
type of error.

Fixes: 5bbd655a8bd0 ("can: ifi: Add more detailed error reporting")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Link: https://patch.msgid.link/20241122221650.633981-8-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/ifi_canfd/ifi_canfd.c