aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/s6gmac.c
diff options
context:
space:
mode:
authorPradeep A. Dalvi <netdev@pradeepdalvi.com>2012-02-06 06:16:48 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-08 18:46:38 -0500
commit1ab0d2ec9aeb4489c05158e8a2b00bad89f67e03 (patch)
tree212a334c85c3a6f03f8ada4502344ff3ec31c5f2 /drivers/net/ethernet/s6gmac.c
parentdae2e9f430c46c29e3f771110094bd3da3625aa4 (diff)
netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/s6gmac.c')
-rw-r--r--drivers/net/ethernet/s6gmac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c
index bee97033167d..1895605abb35 100644
--- a/drivers/net/ethernet/s6gmac.c
+++ b/drivers/net/ethernet/s6gmac.c
@@ -370,12 +370,13 @@ struct s6gmac {
370 } link; 370 } link;
371}; 371};
372 372
373static void s6gmac_rx_fillfifo(struct s6gmac *pd) 373static void s6gmac_rx_fillfifo(struct net_device *dev)
374{ 374{
375 struct s6gmac *pd = netdev_priv(dev);
375 struct sk_buff *skb; 376 struct sk_buff *skb;
376 while ((((u8)(pd->rx_skb_i - pd->rx_skb_o)) < S6_NUM_RX_SKB) && 377 while ((((u8)(pd->rx_skb_i - pd->rx_skb_o)) < S6_NUM_RX_SKB) &&
377 (!s6dmac_fifo_full(pd->rx_dma, pd->rx_chan)) && 378 (!s6dmac_fifo_full(pd->rx_dma, pd->rx_chan)) &&
378 (skb = dev_alloc_skb(S6_MAX_FRLEN + 2))) { 379 (skb = netdev_alloc_skb(dev, S6_MAX_FRLEN + 2))) {
379 pd->rx_skb[(pd->rx_skb_i++) % S6_NUM_RX_SKB] = skb; 380 pd->rx_skb[(pd->rx_skb_i++) % S6_NUM_RX_SKB] = skb;
380 s6dmac_put_fifo_cache(pd->rx_dma, pd->rx_chan, 381 s6dmac_put_fifo_cache(pd->rx_dma, pd->rx_chan,
381 pd->io, (u32)skb->data, S6_MAX_FRLEN); 382 pd->io, (u32)skb->data, S6_MAX_FRLEN);
@@ -514,7 +515,7 @@ static irqreturn_t s6gmac_interrupt(int irq, void *dev_id)
514 spin_lock(&pd->lock); 515 spin_lock(&pd->lock);
515 if (s6dmac_termcnt_irq(pd->rx_dma, pd->rx_chan)) 516 if (s6dmac_termcnt_irq(pd->rx_dma, pd->rx_chan))
516 s6gmac_rx_interrupt(dev); 517 s6gmac_rx_interrupt(dev);
517 s6gmac_rx_fillfifo(pd); 518 s6gmac_rx_fillfifo(dev);
518 if (s6dmac_termcnt_irq(pd->tx_dma, pd->tx_chan)) 519 if (s6dmac_termcnt_irq(pd->tx_dma, pd->tx_chan))
519 s6gmac_tx_interrupt(dev); 520 s6gmac_tx_interrupt(dev);
520 s6gmac_stats_interrupt(pd, 0); 521 s6gmac_stats_interrupt(pd, 0);
@@ -894,7 +895,7 @@ static int s6gmac_open(struct net_device *dev)
894 s6gmac_init_device(dev); 895 s6gmac_init_device(dev);
895 s6gmac_init_stats(dev); 896 s6gmac_init_stats(dev);
896 s6gmac_init_dmac(dev); 897 s6gmac_init_dmac(dev);
897 s6gmac_rx_fillfifo(pd); 898 s6gmac_rx_fillfifo(dev);
898 s6dmac_enable_chan(pd->rx_dma, pd->rx_chan, 899 s6dmac_enable_chan(pd->rx_dma, pd->rx_chan,
899 2, 1, 0, 1, 0, 0, 0, 7, -1, 2, 0, 1); 900 2, 1, 0, 1, 0, 0, 0, 7, -1, 2, 0, 1);
900 s6dmac_enable_chan(pd->tx_dma, pd->tx_chan, 901 s6dmac_enable_chan(pd->tx_dma, pd->tx_chan,