From: Ira W. Snyder Date: Wed, 18 Jul 2012 22:33:14 +0000 (-0700) Subject: can: janz-ican3: drop invalid skbs X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=007890d726602c925077381500f0b633cfacd711;p=deliverable%2Flinux.git can: janz-ican3: drop invalid skbs The commit which added the janz-ican3 driver and commit 3ccd4c61 "can: Unify droping of invalid tx skbs and netdev stats" were committed into mainline Linux during the same merge window. Therefore, the addition of this code to the janz-ican3 driver was forgotten. This patch adds the expected code. Signed-off-by: Ira W. Snyder Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index f41623d003e1..754b803fa926 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c @@ -1420,6 +1420,9 @@ static int ican3_xmit(struct sk_buff *skb, struct net_device *ndev) void __iomem *desc_addr; unsigned long flags; + if (can_dropped_invalid_skb(ndev, skb)) + return NETDEV_TX_OK; + spin_lock_irqsave(&mod->lock, flags); /* check that we can actually transmit */