diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-09-30 09:46:00 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-10-18 11:19:42 +0200 |
commit | 711e4d6eccd72c57938228b8e0c29cb205527032 (patch) | |
tree | 4b16ad553166b9477ee69cce7740e1ac0f291a3e /drivers/net/can/mcp251x.c | |
parent | 57d3c7b09bd797b8db974557a71df8675a22601b (diff) | |
download | op-kernel-dev-711e4d6eccd72c57938228b8e0c29cb205527032.zip op-kernel-dev-711e4d6eccd72c57938228b8e0c29cb205527032.tar.gz |
can: mcp251x: increase rx_errors on overflow, not only rx_over_errors
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Diffstat (limited to 'drivers/net/can/mcp251x.c')
-rw-r--r-- | drivers/net/can/mcp251x.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index c06e023..fdea752 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c @@ -816,10 +816,14 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id) if (intf & CANINTF_ERRIF) { /* Handle overflow counters */ if (eflag & (EFLG_RX0OVR | EFLG_RX1OVR)) { - if (eflag & EFLG_RX0OVR) + if (eflag & EFLG_RX0OVR) { net->stats.rx_over_errors++; - if (eflag & EFLG_RX1OVR) + net->stats.rx_errors++; + } + if (eflag & EFLG_RX1OVR) { net->stats.rx_over_errors++; + net->stats.rx_errors++; + } can_id |= CAN_ERR_CRTL; data1 |= CAN_ERR_CRTL_RX_OVERFLOW; } |