diff options
author | Pradeep A Dalvi <netdev@pradeepdalvi.com> | 2012-02-05 06:50:38 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-06 20:52:27 +0400 |
commit | c056b734e54e12f38f34a2583a4824e6cecc16c1 (patch) | |
tree | 78e501091b9f99477e9b919c03fd5b1930a46198 /drivers/net/ethernet/natsemi | |
parent | 21a4e46995fa1a76281ac0281ff837f706231a37 (diff) | |
download | linux-c056b734e54e12f38f34a2583a4824e6cecc16c1.tar.xz |
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/natsemi')
-rw-r--r-- | drivers/net/ethernet/natsemi/ibmlana.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/natsemi/natsemi.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/natsemi/sonic.c | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ethernet/natsemi/ibmlana.c b/drivers/net/ethernet/natsemi/ibmlana.c index 999407f7ebdf..3f94ddbf4dc0 100644 --- a/drivers/net/ethernet/natsemi/ibmlana.c +++ b/drivers/net/ethernet/natsemi/ibmlana.c @@ -589,7 +589,7 @@ static void irqrx_handler(struct net_device *dev) /* fetch buffer */ - skb = dev_alloc_skb(rda.length + 2); + skb = netdev_alloc_skb(dev, rda.length + 2); if (skb == NULL) dev->stats.rx_dropped++; else { diff --git a/drivers/net/ethernet/natsemi/natsemi.c b/drivers/net/ethernet/natsemi/natsemi.c index ac7b16b6e7af..d38e48d4f430 100644 --- a/drivers/net/ethernet/natsemi/natsemi.c +++ b/drivers/net/ethernet/natsemi/natsemi.c @@ -1934,11 +1934,10 @@ static void refill_rx(struct net_device *dev) int entry = np->dirty_rx % RX_RING_SIZE; if (np->rx_skbuff[entry] == NULL) { unsigned int buflen = np->rx_buf_sz+NATSEMI_PADDING; - skb = dev_alloc_skb(buflen); + skb = netdev_alloc_skb(dev, buflen); np->rx_skbuff[entry] = skb; if (skb == NULL) break; /* Better luck next round. */ - skb->dev = dev; /* Mark as being used by this device. */ np->rx_dma[entry] = pci_map_single(np->pci_dev, skb->data, buflen, PCI_DMA_FROMDEVICE); np->rx_ring[entry].addr = cpu_to_le32(np->rx_dma[entry]); @@ -2344,7 +2343,7 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do) /* Check if the packet is long enough to accept * without copying to a minimally-sized skbuff. */ if (pkt_len < rx_copybreak && - (skb = dev_alloc_skb(pkt_len + RX_OFFSET)) != NULL) { + (skb = netdev_alloc_skb(dev, pkt_len + RX_OFFSET)) != NULL) { /* 16 byte align the IP header */ skb_reserve(skb, RX_OFFSET); pci_dma_sync_single_for_cpu(np->pci_dev, diff --git a/drivers/net/ethernet/natsemi/sonic.c b/drivers/net/ethernet/natsemi/sonic.c index 26e25d7f5829..0452e2968d27 100644 --- a/drivers/net/ethernet/natsemi/sonic.c +++ b/drivers/net/ethernet/natsemi/sonic.c @@ -51,7 +51,7 @@ static int sonic_open(struct net_device *dev) printk("sonic_open: initializing sonic driver.\n"); for (i = 0; i < SONIC_NUM_RRS; i++) { - struct sk_buff *skb = dev_alloc_skb(SONIC_RBSIZE + 2); + struct sk_buff *skb = netdev_alloc_skb(dev, SONIC_RBSIZE + 2); if (skb == NULL) { while(i > 0) { /* free any that were allocated successfully */ i--; @@ -422,7 +422,7 @@ static void sonic_rx(struct net_device *dev) status = sonic_rda_get(dev, entry, SONIC_RD_STATUS); if (status & SONIC_RCR_PRX) { /* Malloc up new buffer. */ - new_skb = dev_alloc_skb(SONIC_RBSIZE + 2); + new_skb = netdev_alloc_skb(SONIC_RBSIZE + 2); if (new_skb == NULL) { printk(KERN_ERR "%s: Memory squeeze, dropping packet.\n", dev->name); lp->stats.rx_dropped++; |