diff options
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 3685f3e42d12..3e4419054c81 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
@@ -315,7 +315,7 @@ static void ems_usb_rx_can_msg(struct ems_usb *dev, struct ems_cpc_msg *msg) | |||
315 | if (skb == NULL) | 315 | if (skb == NULL) |
316 | return; | 316 | return; |
317 | 317 | ||
318 | cf->can_id = 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 = min_t(u8, msg->msg.can_msg.length, 8); |
320 | 320 | ||
321 | if (msg->type == CPC_MSG_TYPE_EXT_CAN_FRAME | 321 | if (msg->type == CPC_MSG_TYPE_EXT_CAN_FRAME |
@@ -801,6 +801,9 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne | |||
801 | msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc; | 801 | msg->length = CPC_CAN_MSG_MIN_SIZE + cf->can_dlc; |
802 | } | 802 | } |
803 | 803 | ||
804 | /* Respect byte order */ | ||
805 | msg->msg.can_msg.id = cpu_to_le32(msg->msg.can_msg.id); | ||
806 | |||
804 | for (i = 0; i < MAX_TX_URBS; i++) { | 807 | for (i = 0; i < MAX_TX_URBS; i++) { |
805 | if (dev->tx_contexts[i].echo_index == MAX_TX_URBS) { | 808 | if (dev->tx_contexts[i].echo_index == MAX_TX_URBS) { |
806 | context = &dev->tx_contexts[i]; | 809 | context = &dev->tx_contexts[i]; |