Commit 1174764e authored by David S. Miller's avatar David S. Miller
parents cdf485be 1ccba210
...@@ -741,16 +741,14 @@ static int pcan_usb_encode_msg(struct peak_usb_device *dev, struct sk_buff *skb, ...@@ -741,16 +741,14 @@ static int pcan_usb_encode_msg(struct peak_usb_device *dev, struct sk_buff *skb,
/* can id */ /* can id */
if (cf->can_id & CAN_EFF_FLAG) { if (cf->can_id & CAN_EFF_FLAG) {
__le32 tmp32 = cpu_to_le32(cf->can_id & CAN_ERR_MASK); __le32 tmp32 = cpu_to_le32((cf->can_id & CAN_ERR_MASK) << 3);
tmp32 <<= 3;
*pc |= PCAN_USB_STATUSLEN_EXT_ID; *pc |= PCAN_USB_STATUSLEN_EXT_ID;
memcpy(++pc, &tmp32, 4); memcpy(++pc, &tmp32, 4);
pc += 4; pc += 4;
} else { } else {
__le16 tmp16 = cpu_to_le32(cf->can_id & CAN_ERR_MASK); __le16 tmp16 = cpu_to_le16((cf->can_id & CAN_ERR_MASK) << 5);
tmp16 <<= 5;
memcpy(++pc, &tmp16, 2); memcpy(++pc, &tmp16, 2);
pc += 2; pc += 2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment