net: ftgmac100: use kfree_skb() where appropriate
authorEric Dumazet <edumazet@google.com>
Fri, 17 Jan 2014 07:38:24 +0000 (23:38 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jan 2014 02:54:13 +0000 (18:54 -0800)
In order to get correct drop monitor notifications for dropped
packets, we should call kfree_skb() instead of dev_kfree_skb()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c

index 24d87898209b7669e28e1d5ac50194575ed0f18d..c11ecbc98149ccd7b3e7a884979d362c8da724cf 100644 (file)
@@ -766,7 +766,7 @@ static void ftgmac100_free_buffers(struct ftgmac100 *priv)
                        continue;
 
                dma_unmap_single(priv->dev, map, skb_headlen(skb), DMA_TO_DEVICE);
-               dev_kfree_skb(skb);
+               kfree_skb(skb);
        }
 
        dma_free_coherent(priv->dev, sizeof(struct ftgmac100_descs),
@@ -1148,7 +1148,7 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
                        netdev_dbg(netdev, "tx packet too big\n");
 
                netdev->stats.tx_dropped++;
-               dev_kfree_skb(skb);
+               kfree_skb(skb);
                return NETDEV_TX_OK;
        }
 
@@ -1159,7 +1159,7 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
                        netdev_err(netdev, "map socket buffer failed\n");
 
                netdev->stats.tx_dropped++;
-               dev_kfree_skb(skb);
+               kfree_skb(skb);
                return NETDEV_TX_OK;
        }