From be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 16 Jan 2015 14:30:28 +0000 Subject: 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 Signed-off-by: Marc Kleine-Budde --- drivers/net/can/softing/softing_main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/can/softing') diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index 2bf98d862302..7621f91a8a20 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c @@ -261,6 +261,7 @@ static int softing_handle_1(struct softing *card) ++priv->can.can_stats.error_passive; else if (can_state == CAN_STATE_BUS_OFF) { /* this calls can_close_cleanup() */ + ++priv->can.can_stats.bus_off; can_bus_off(netdev); netif_stop_queue(netdev); } -- cgit v1.2.3