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>
This commit is contained in:

committed by
David S. Miller

parent
dae2e9f430
commit
1ab0d2ec9a
@@ -826,11 +826,10 @@ static int corkscrew_open(struct net_device *dev)
|
||||
vp->rx_ring[i].next = 0;
|
||||
vp->rx_ring[i].status = 0; /* Clear complete bit. */
|
||||
vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000;
|
||||
skb = dev_alloc_skb(PKT_BUF_SZ);
|
||||
skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
|
||||
vp->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break; /* Bad news! */
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
vp->rx_ring[i].addr = isa_virt_to_bus(skb->data);
|
||||
}
|
||||
@@ -1295,7 +1294,7 @@ static int corkscrew_rx(struct net_device *dev)
|
||||
short pkt_len = rx_status & 0x1fff;
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = dev_alloc_skb(pkt_len + 5 + 2);
|
||||
skb = netdev_alloc_skb(dev, pkt_len + 5 + 2);
|
||||
if (corkscrew_debug > 4)
|
||||
pr_debug("Receiving packet size %d status %4.4x.\n",
|
||||
pkt_len, rx_status);
|
||||
@@ -1368,7 +1367,7 @@ static int boomerang_rx(struct net_device *dev)
|
||||
/* Check if the packet is long enough to just accept without
|
||||
copying to a properly sized skbuff. */
|
||||
if (pkt_len < rx_copybreak &&
|
||||
(skb = dev_alloc_skb(pkt_len + 4)) != NULL) {
|
||||
(skb = netdev_alloc_skb(dev, pkt_len + 4)) != NULL) {
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
/* 'skb_put()' points to the start of sk_buff data area. */
|
||||
memcpy(skb_put(skb, pkt_len),
|
||||
@@ -1403,10 +1402,9 @@ static int boomerang_rx(struct net_device *dev)
|
||||
struct sk_buff *skb;
|
||||
entry = vp->dirty_rx % RX_RING_SIZE;
|
||||
if (vp->rx_skbuff[entry] == NULL) {
|
||||
skb = dev_alloc_skb(PKT_BUF_SZ);
|
||||
skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
|
||||
if (skb == NULL)
|
||||
break; /* Bad news! */
|
||||
skb->dev = dev; /* Mark as being used by this device. */
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
vp->rx_ring[entry].addr = isa_virt_to_bus(skb->data);
|
||||
vp->rx_skbuff[entry] = skb;
|
||||
|
Reference in New Issue
Block a user