• Ira W. Snyder's avatar
    can: janz-ican3: fix error and byte counters · 88b58703
    Ira W. Snyder authored
    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: default avatarIra W. Snyder <iws@ovro.caltech.edu>
    Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    88b58703
janz-ican3.c 43.4 KB