smsc911x: Call dev_consume_skb_any instead of dev_kfree_skb.
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 16 Mar 2014 01:08:52 +0000 (18:08 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 25 Mar 2014 04:19:10 +0000 (21:19 -0700)
Replace dev_kfree_skb with dev_consume_skb_any in smsc911x_hard_xmit
which can be called in hard irq and other contexts. smsc911x_hard_xmit
always transmits and consumes the specified skb.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
drivers/net/ethernet/smsc/smsc911x.c

index 95e2b9a..ed36ff4 100644 (file)
@@ -1672,7 +1672,7 @@ static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
        pdata->ops->tx_writefifo(pdata, (unsigned int *)bufp, wrsz);
        freespace -= (skb->len + 32);
        skb_tx_timestamp(skb);
-       dev_kfree_skb(skb);
+       dev_consume_skb_any(skb);
 
        if (unlikely(smsc911x_tx_get_txstatcount(pdata) >= 30))
                smsc911x_tx_update_txcounters(dev);