aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/3com
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/3com
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/3com')
-rw-r--r--drivers/net/ethernet/3com/3c515.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c
index f67a5d3a200c..59e1e001bc3f 100644
--- a/drivers/net/ethernet/3com/3c515.c
+++ b/drivers/net/ethernet/3com/3c515.c
@@ -826,11 +826,10 @@ static int corkscrew_open(struct net_device *dev)
826 vp->rx_ring[i].next = 0; 826 vp->rx_ring[i].next = 0;
827 vp->rx_ring[i].status = 0; /* Clear complete bit. */ 827 vp->rx_ring[i].status = 0; /* Clear complete bit. */
828 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000; 828 vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000;
829 skb = dev_alloc_skb(PKT_BUF_SZ); 829 skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
830 vp->rx_skbuff[i] = skb; 830 vp->rx_skbuff[i] = skb;
831 if (skb == NULL) 831 if (skb == NULL)
832 break; /* Bad news! */ 832 break; /* Bad news! */
833 skb->dev = dev; /* Mark as being used by this device. */
834 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 833 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
835 vp->rx_ring[i].addr = isa_virt_to_bus(skb->data); 834 vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
836 } 835 }
@@ -1295,7 +1294,7 @@ static int corkscrew_rx(struct net_device *dev)
1295 short pkt_len = rx_status & 0x1fff; 1294 short pkt_len = rx_status & 0x1fff;
1296 struct sk_buff *skb; 1295 struct sk_buff *skb;
1297 1296
1298 skb = dev_alloc_skb(pkt_len + 5 + 2); 1297 skb = netdev_alloc_skb(dev, pkt_len + 5 + 2);
1299 if (corkscrew_debug > 4) 1298 if (corkscrew_debug > 4)
1300 pr_debug("Receiving packet size %d status %4.4x.\n", 1299 pr_debug("Receiving packet size %d status %4.4x.\n",
1301 pkt_len, rx_status); 1300 pkt_len, rx_status);
@@ -1368,7 +1367,7 @@ static int boomerang_rx(struct net_device *dev)
1368 /* Check if the packet is long enough to just accept without 1367 /* Check if the packet is long enough to just accept without
1369 copying to a properly sized skbuff. */ 1368 copying to a properly sized skbuff. */
1370 if (pkt_len < rx_copybreak && 1369 if (pkt_len < rx_copybreak &&
1371 (skb = dev_alloc_skb(pkt_len + 4)) != NULL) { 1370 (skb = netdev_alloc_skb(dev, pkt_len + 4)) != NULL) {
1372 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 1371 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
1373 /* 'skb_put()' points to the start of sk_buff data area. */ 1372 /* 'skb_put()' points to the start of sk_buff data area. */
1374 memcpy(skb_put(skb, pkt_len), 1373 memcpy(skb_put(skb, pkt_len),
@@ -1403,10 +1402,9 @@ static int boomerang_rx(struct net_device *dev)
1403 struct sk_buff *skb; 1402 struct sk_buff *skb;
1404 entry = vp->dirty_rx % RX_RING_SIZE; 1403 entry = vp->dirty_rx % RX_RING_SIZE;
1405 if (vp->rx_skbuff[entry] == NULL) { 1404 if (vp->rx_skbuff[entry] == NULL) {
1406 skb = dev_alloc_skb(PKT_BUF_SZ); 1405 skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
1407 if (skb == NULL) 1406 if (skb == NULL)
1408 break; /* Bad news! */ 1407 break; /* Bad news! */
1409 skb->dev = dev; /* Mark as being used by this device. */
1410 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 1408 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
1411 vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data); 1409 vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data);
1412 vp->rx_skbuff[entry] = skb; 1410 vp->rx_skbuff[entry] = skb;