summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMartin Lederhilger <m.lederhilger@ds-automotion.com>2017-12-21 17:42:44 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2018-01-04 18:14:38 +0300
commit6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253 (patch)
tree606c02c669fd365cea4395766e4f68ffe9c947cb /drivers/net/can
parent13454c14550065fcc1705d6bd4ee6d40e057099f (diff)
downloadlinux-6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253.tar.xz
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')
-rw-r--r--drivers/net/can/usb/ems_usb.c1
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 b00358297424..12ff0020ecd6 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;
}