diff options
author | Martin Lederhilger <m.lederhilger@ds-automotion.com> | 2017-12-21 14:42:44 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-01-04 16:14:38 +0100 |
commit | 6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253 (patch) | |
tree | 606c02c669fd365cea4395766e4f68ffe9c947cb /drivers/net/can/usb | |
parent | 13454c14550065fcc1705d6bd4ee6d40e057099f (diff) | |
download | op-kernel-dev-6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253.zip op-kernel-dev-6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253.tar.gz |
can: ems_usb: improve error reporting for error warning and error passive
This patch adds the missing CAN_ERR_CRTL to cf->can_id in case of
CAN_STATE_ERROR_WARNING or CAN_STATE_ERROR_PASSIVE
Signed-off-by: Martin Lederhilger <m.lederhilger@ds-automotion.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index b003582..12ff002 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -395,6 +395,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg) if (dev->can.state == CAN_STATE_ERROR_WARNING || dev->can.state == CAN_STATE_ERROR_PASSIVE) { + cf->can_id |= CAN_ERR_CRTL; cf->data[1] = (txerr > rxerr) ? CAN_ERR_CRTL_TX_PASSIVE : CAN_ERR_CRTL_RX_PASSIVE; } |