aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/apple
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/apple
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/apple')
-rw-r--r--drivers/net/ethernet/apple/bmac.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c
index ebc0dba5ba33..855bdafb1a87 100644
--- a/drivers/net/ethernet/apple/bmac.c
+++ b/drivers/net/ethernet/apple/bmac.c
@@ -607,8 +607,9 @@ bmac_init_tx_ring(struct bmac_data *bp)
607} 607}
608 608
609static int 609static int
610bmac_init_rx_ring(struct bmac_data *bp) 610bmac_init_rx_ring(struct net_device *dev)
611{ 611{
612 struct bmac_data *bp = netdev_priv(dev);
612 volatile struct dbdma_regs __iomem *rd = bp->rx_dma; 613 volatile struct dbdma_regs __iomem *rd = bp->rx_dma;
613 int i; 614 int i;
614 struct sk_buff *skb; 615 struct sk_buff *skb;
@@ -618,7 +619,7 @@ bmac_init_rx_ring(struct bmac_data *bp)
618 (N_RX_RING + 1) * sizeof(struct dbdma_cmd)); 619 (N_RX_RING + 1) * sizeof(struct dbdma_cmd));
619 for (i = 0; i < N_RX_RING; i++) { 620 for (i = 0; i < N_RX_RING; i++) {
620 if ((skb = bp->rx_bufs[i]) == NULL) { 621 if ((skb = bp->rx_bufs[i]) == NULL) {
621 bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2); 622 bp->rx_bufs[i] = skb = netdev_alloc_skb(dev, RX_BUFLEN + 2);
622 if (skb != NULL) 623 if (skb != NULL)
623 skb_reserve(skb, 2); 624 skb_reserve(skb, 2);
624 } 625 }
@@ -722,7 +723,7 @@ static irqreturn_t bmac_rxdma_intr(int irq, void *dev_id)
722 ++dev->stats.rx_dropped; 723 ++dev->stats.rx_dropped;
723 } 724 }
724 if ((skb = bp->rx_bufs[i]) == NULL) { 725 if ((skb = bp->rx_bufs[i]) == NULL) {
725 bp->rx_bufs[i] = skb = dev_alloc_skb(RX_BUFLEN+2); 726 bp->rx_bufs[i] = skb = netdev_alloc_skb(dev, RX_BUFLEN + 2);
726 if (skb != NULL) 727 if (skb != NULL)
727 skb_reserve(bp->rx_bufs[i], 2); 728 skb_reserve(bp->rx_bufs[i], 2);
728 } 729 }
@@ -1208,7 +1209,7 @@ static void bmac_reset_and_enable(struct net_device *dev)
1208 spin_lock_irqsave(&bp->lock, flags); 1209 spin_lock_irqsave(&bp->lock, flags);
1209 bmac_enable_and_reset_chip(dev); 1210 bmac_enable_and_reset_chip(dev);
1210 bmac_init_tx_ring(bp); 1211 bmac_init_tx_ring(bp);
1211 bmac_init_rx_ring(bp); 1212 bmac_init_rx_ring(dev);
1212 bmac_init_chip(dev); 1213 bmac_init_chip(dev);
1213 bmac_start_chip(dev); 1214 bmac_start_chip(dev);
1214 bmwrite(dev, INTDISABLE, EnableNormal); 1215 bmwrite(dev, INTDISABLE, EnableNormal);
@@ -1218,7 +1219,7 @@ static void bmac_reset_and_enable(struct net_device *dev)
1218 * It seems that the bmac can't receive until it's transmitted 1219 * It seems that the bmac can't receive until it's transmitted
1219 * a packet. So we give it a dummy packet to transmit. 1220 * a packet. So we give it a dummy packet to transmit.
1220 */ 1221 */
1221 skb = dev_alloc_skb(ETHERMINPACKET); 1222 skb = netdev_alloc_skb(dev, ETHERMINPACKET);
1222 if (skb != NULL) { 1223 if (skb != NULL) {
1223 data = skb_put(skb, ETHERMINPACKET); 1224 data = skb_put(skb, ETHERMINPACKET);
1224 memset(data, 0, ETHERMINPACKET); 1225 memset(data, 0, ETHERMINPACKET);