mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
can: move can_stats.bus_off++ from can_bus_off into can_change_state
In order to be able to move the stats increment from can_bus_off() into can_change_state(), the increment had to be moved back into code that was using can_bus_off() but not can_change_state(). As a side-effect, this patch fixes the following bugs: * Redundant call to can_bus_off() in c_can. * Bus-off counted twice in xilinx_can. Signed-off-by: Andri Yngvason <andri.yngvason@marel.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
0c49087462
commit
be38a6f9f4
16 changed files with 17 additions and 2 deletions
|
@ -289,6 +289,8 @@ static void can_update_state_error_stats(struct net_device *dev,
|
|||
priv->can_stats.error_passive++;
|
||||
break;
|
||||
case CAN_STATE_BUS_OFF:
|
||||
priv->can_stats.bus_off++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
@ -544,7 +546,6 @@ void can_bus_off(struct net_device *dev)
|
|||
netdev_dbg(dev, "bus-off\n");
|
||||
|
||||
netif_carrier_off(dev);
|
||||
priv->can_stats.bus_off++;
|
||||
|
||||
if (priv->restart_ms)
|
||||
mod_timer(&priv->restart_timer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue