Skip to content
Commit 7ee330c7 authored by Holger Bechtold's avatar Holger Bechtold Committed by Marc Kleine-Budde
Browse files

can: c_can: fix calculation of transmitted bytes on tx complete



The number of bytes transmitted was not updated correctly, if several CAN
messages (with different length) were transmitted in one 'bunch'. Thus
programs like 'ifconfig' showed wrong transmit byte counts. Reason was, that
the message object whose DLC is to be read was not necessarily the active one
at the time when

    priv->read_reg(priv, C_CAN_IFACE(MSGCTRL_REG, 0)) & IF_MCONT_DLC_MASK;

was executed.

Signed-off-by: default avatarHolger Bechtold <Holger.Bechtold@gmx.net>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent e35d46ad
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment