]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
can: c_can: fix calculation of transmitted bytes on tx complete
authorHolger Bechtold <Holger.Bechtold@gmx.net>
Mon, 25 Nov 2013 14:48:19 +0000 (15:48 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 25 Nov 2013 20:48:54 +0000 (21:48 +0100)
commit7ee330c7b3b738847bf297912b371bbcec3bc994
tree71314361df1ad1e174b87b8f913f361231b204f8
parente35d46adc49b469fd92bdb64fea8af93640e6651
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: Holger Bechtold <Holger.Bechtold@gmx.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c