diff options
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 591eb0eb1c2b..efbb05c71bf4 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
@@ -316,7 +316,7 @@ static void ems_usb_rx_can_msg(struct ems_usb *dev, struct ems_cpc_msg *msg) | |||
316 | return; | 316 | return; |
317 | 317 | ||
318 | cf->can_id = le32_to_cpu(msg->msg.can_msg.id); | 318 | cf->can_id = le32_to_cpu(msg->msg.can_msg.id); |
319 | cf->can_dlc = min_t(u8, msg->msg.can_msg.length, 8); | 319 | cf->can_dlc = get_can_dlc(msg->msg.can_msg.length & 0xF); |
320 | 320 | ||
321 | if (msg->type == CPC_MSG_TYPE_EXT_CAN_FRAME || | 321 | if (msg->type == CPC_MSG_TYPE_EXT_CAN_FRAME || |
322 | msg->type == CPC_MSG_TYPE_EXT_RTR_FRAME) | 322 | msg->type == CPC_MSG_TYPE_EXT_RTR_FRAME) |