]> 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)
commitd5d209522561e41cbb6413af7a2104cbbcf1e6fc
tree54a97a0157e7f8330c8625f5527ffcb11bfcae64
parent635494de35307f40802853cf710134788dc00154
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