]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
can: flexcan: Fix CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK
authorReuben Dowle <Reuben.Dowle@navico.com>
Mon, 31 Oct 2011 22:18:03 +0000 (11:18 +1300)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:36:03 +0000 (08:36 +0200)
commit189bb4688cb563b48606e655c76ef8dff67da152
tree24d99a42398a1b01b396e44aa5709161c2113822
parenteaf958d278714d6ce77bc6d54841ee84af1d2166
can: flexcan: Fix CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK

Currently the flexcan driver uses hardware local echo. This blindly
echos all transmitted frames to all receiving sockets, regardless what
CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK are set to.

This patch now submits transmitted frames to be echoed in the transmit
complete interrupt, preserving the reference to the sending
socket. This allows the can protocol to correctly handle the local
echo.

Further this patch moves tx_bytes statistic accounting into the tx_complete
handler.

Signed-off-by: Reuben Dowle <reuben.dowle@navico.com>
[mkl: move tx_bytes accounting into tx_complete handler; cleanups]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c