diff options
author | Martin Lederhilger <m.lederhilger@ds-automotion.com> | 2017-12-21 15:42:44 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-01-04 16:14:38 +0100 |
commit | 6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253 (patch) | |
tree | 606c02c669fd365cea4395766e4f68ffe9c947cb /drivers/net/can | |
parent | can: flex_can: Correct the checking for frame length in flexcan_start_xmit() (diff) | |
download | linux-6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253.tar.xz linux-6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253.zip |
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.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 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; } |