diff options
author | 2015-01-16 14:30:28 +0000 | |
---|---|---|
committer | 2015-01-20 13:56:53 +0100 | |
commit | be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21 (patch) | |
tree | 41a834156d6483c55fa28eccfc208449bff67d95 /drivers/net/can/cc770 | |
parent | Merge tag 'mac80211-next-for-davem-2015-01-19' of git://git.kernel.org/pub/sc... (diff) | |
download | linux-be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21.tar.gz linux-be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21.tar.bz2 linux-be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21.zip |
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>
Diffstat (limited to 'drivers/net/can/cc770')
-rw-r--r-- | drivers/net/can/cc770/cc770.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/cc770/cc770.c b/drivers/net/can/cc770/cc770.c index c486fe510f37..c11d44984036 100644 --- a/drivers/net/can/cc770/cc770.c +++ b/drivers/net/can/cc770/cc770.c @@ -535,6 +535,7 @@ static int cc770_err(struct net_device *dev, u8 status) cc770_write_reg(priv, control, CTRL_INI); cf->can_id |= CAN_ERR_BUSOFF; priv->can.state = CAN_STATE_BUS_OFF; + priv->can.can_stats.bus_off++; can_bus_off(dev); } else if (status & STAT_WARN) { cf->can_id |= CAN_ERR_CRTL; |