diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-04-16 19:37:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-22 14:12:45 -0400 |
commit | 47f98c7d4bfc08e5efffd4fe22296044ab4db21e (patch) | |
tree | 32b15b6a7fde42b93d93ed72c403cbf87c463576 /drivers/net/dl2k.c | |
parent | 8eb6013189e03aa21aa53fd72c092713fdb30e44 (diff) |
dl2k: use netdev_alloc_skb
Use netdev_alloc_skb. This sets skb->dev and allows arch specific
allocation.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/dl2k.c')
-rw-r--r-- | drivers/net/dl2k.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index e233d04a2132..8277e89e552d 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -499,7 +499,7 @@ rio_timer (unsigned long data) | |||
499 | entry = np->old_rx % RX_RING_SIZE; | 499 | entry = np->old_rx % RX_RING_SIZE; |
500 | /* Dropped packets don't need to re-allocate */ | 500 | /* Dropped packets don't need to re-allocate */ |
501 | if (np->rx_skbuff[entry] == NULL) { | 501 | if (np->rx_skbuff[entry] == NULL) { |
502 | skb = dev_alloc_skb (np->rx_buf_sz); | 502 | skb = netdev_alloc_skb (dev, np->rx_buf_sz); |
503 | if (skb == NULL) { | 503 | if (skb == NULL) { |
504 | np->rx_ring[entry].fraginfo = 0; | 504 | np->rx_ring[entry].fraginfo = 0; |
505 | printk (KERN_INFO | 505 | printk (KERN_INFO |
@@ -570,7 +570,7 @@ alloc_list (struct net_device *dev) | |||
570 | /* Allocate the rx buffers */ | 570 | /* Allocate the rx buffers */ |
571 | for (i = 0; i < RX_RING_SIZE; i++) { | 571 | for (i = 0; i < RX_RING_SIZE; i++) { |
572 | /* Allocated fixed size of skbuff */ | 572 | /* Allocated fixed size of skbuff */ |
573 | struct sk_buff *skb = dev_alloc_skb (np->rx_buf_sz); | 573 | struct sk_buff *skb = netdev_alloc_skb (dev, np->rx_buf_sz); |
574 | np->rx_skbuff[i] = skb; | 574 | np->rx_skbuff[i] = skb; |
575 | if (skb == NULL) { | 575 | if (skb == NULL) { |
576 | printk (KERN_ERR | 576 | printk (KERN_ERR |
@@ -867,7 +867,7 @@ receive_packet (struct net_device *dev) | |||
867 | PCI_DMA_FROMDEVICE); | 867 | PCI_DMA_FROMDEVICE); |
868 | skb_put (skb = np->rx_skbuff[entry], pkt_len); | 868 | skb_put (skb = np->rx_skbuff[entry], pkt_len); |
869 | np->rx_skbuff[entry] = NULL; | 869 | np->rx_skbuff[entry] = NULL; |
870 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { | 870 | } else if ((skb = netdev_alloc_skb(dev, pkt_len + 2))) { |
871 | pci_dma_sync_single_for_cpu(np->pdev, | 871 | pci_dma_sync_single_for_cpu(np->pdev, |
872 | desc_to_dma(desc), | 872 | desc_to_dma(desc), |
873 | np->rx_buf_sz, | 873 | np->rx_buf_sz, |
@@ -904,7 +904,7 @@ receive_packet (struct net_device *dev) | |||
904 | struct sk_buff *skb; | 904 | struct sk_buff *skb; |
905 | /* Dropped packets don't need to re-allocate */ | 905 | /* Dropped packets don't need to re-allocate */ |
906 | if (np->rx_skbuff[entry] == NULL) { | 906 | if (np->rx_skbuff[entry] == NULL) { |
907 | skb = dev_alloc_skb (np->rx_buf_sz); | 907 | skb = netdev_alloc_skb(dev, np->rx_buf_sz); |
908 | if (skb == NULL) { | 908 | if (skb == NULL) { |
909 | np->rx_ring[entry].fraginfo = 0; | 909 | np->rx_ring[entry].fraginfo = 0; |
910 | printk (KERN_INFO | 910 | printk (KERN_INFO |