Skip to content

Commit 6ebc5e8

Browse files
mlederhimarckleinebudde
authored andcommitted
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>
1 parent 13454c1 commit 6ebc5e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/can/usb/ems_usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg)
395395

396396
if (dev->can.state == CAN_STATE_ERROR_WARNING ||
397397
dev->can.state == CAN_STATE_ERROR_PASSIVE) {
398+
cf->can_id |= CAN_ERR_CRTL;
398399
cf->data[1] = (txerr > rxerr) ?
399400
CAN_ERR_CRTL_TX_PASSIVE : CAN_ERR_CRTL_RX_PASSIVE;
400401
}

0 commit comments

Comments
 (0)