diff options
-rw-r--r-- | drivers/net/can/bfin_can.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c index b6e890d28366..dc6ef4a9e02a 100644 --- a/drivers/net/can/bfin_can.c +++ b/drivers/net/can/bfin_can.c | |||
@@ -243,21 +243,12 @@ static int bfin_can_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
243 | /* fill id */ | 243 | /* fill id */ |
244 | if (id & CAN_EFF_FLAG) { | 244 | if (id & CAN_EFF_FLAG) { |
245 | bfin_write16(®->chl[TRANSMIT_CHL].id0, id); | 245 | bfin_write16(®->chl[TRANSMIT_CHL].id0, id); |
246 | if (id & CAN_RTR_FLAG) | 246 | val = ((id & 0x1FFF0000) >> 16) | IDE; |
247 | writew(((id & 0x1FFF0000) >> 16) | IDE | AME | RTR, | 247 | } else |
248 | ®->chl[TRANSMIT_CHL].id1); | 248 | val = (id << 2); |
249 | else | 249 | if (id & CAN_RTR_FLAG) |
250 | writew(((id & 0x1FFF0000) >> 16) | IDE | AME, | 250 | val |= RTR; |
251 | ®->chl[TRANSMIT_CHL].id1); | 251 | bfin_write16(®->chl[TRANSMIT_CHL].id1, val | AME); |
252 | |||
253 | } else { | ||
254 | if (id & CAN_RTR_FLAG) | ||
255 | writew((id << 2) | AME | RTR, | ||
256 | ®->chl[TRANSMIT_CHL].id1); | ||
257 | else | ||
258 | bfin_write16(®->chl[TRANSMIT_CHL].id1, | ||
259 | (id << 2) | AME); | ||
260 | } | ||
261 | 252 | ||
262 | /* fill payload */ | 253 | /* fill payload */ |
263 | for (i = 0; i < 8; i += 2) { | 254 | for (i = 0; i < 8; i += 2) { |