aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/ti_hecc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/ti_hecc.c')
-rw-r--r--drivers/net/can/ti_hecc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 5c993c2da528..7d370e32a7a8 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -477,6 +477,9 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)
477 u32 mbxno, mbx_mask, data; 477 u32 mbxno, mbx_mask, data;
478 unsigned long flags; 478 unsigned long flags;
479 479
480 if (can_dropped_invalid_skb(ndev, skb))
481 return NETDEV_TX_OK;
482
480 mbxno = get_tx_head_mb(priv); 483 mbxno = get_tx_head_mb(priv);
481 mbx_mask = BIT(mbxno); 484 mbx_mask = BIT(mbxno);
482 spin_lock_irqsave(&priv->mbx_lock, flags); 485 spin_lock_irqsave(&priv->mbx_lock, flags);
@@ -491,7 +494,6 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)
491 spin_unlock_irqrestore(&priv->mbx_lock, flags); 494 spin_unlock_irqrestore(&priv->mbx_lock, flags);
492 495
493 /* Prepare mailbox for transmission */ 496 /* Prepare mailbox for transmission */
494 data = min_t(u8, cf->can_dlc, 8);
495 if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ 497 if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */
496 data |= HECC_CANMCF_RTR; 498 data |= HECC_CANMCF_RTR;
497 data |= get_tx_head_prio(priv) << 8; 499 data |= get_tx_head_prio(priv) << 8;