From: Sascha Hauer Date: Thu, 30 Sep 2010 07:46:00 +0000 (+0200) Subject: can: mcp251x: increase rx_errors on overflow, not only rx_over_errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=711e4d6eccd72c57938228b8e0c29cb205527032;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git can: mcp251x: increase rx_errors on overflow, not only rx_over_errors Signed-off-by: Sascha Hauer Signed-off-by: Marc Kleine-Budde Acked-by: Wolfgang Grandegger --- diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index c06e02382eca..fdea752f398f 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; }