]> git.baikalelectronics.ru Git - kernel.git/commit
can: janz-ican3: fix error and byte counters
authorIra W. Snyder <iws@ovro.caltech.edu>
Thu, 19 Jul 2012 15:54:18 +0000 (08:54 -0700)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 20 Jul 2012 15:49:03 +0000 (17:49 +0200)
commite73a95e3f0ab67140e2169182529f24436ea94b3
tree54a97a0157e7f8330c8625f5527ffcb11bfcae64
parent39e1455e5931491d7a1dd8556fc2503a623c3540
can: janz-ican3: fix error and byte counters

The error and byte counter statistics were being incremented
incorrectly. For example, a TX error would be counted both in tx_errors
and rx_errors.

This corrects the problem so that tx_errors and rx_errors are only
incremented for errors caused by packets sent to the bus. Error packets
generated by the driver are not counted.

The byte counters are only increased for packets which are actually
transmitted or received from the bus. Error packets generated by the
driver are not counted.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/janz-ican3.c