dl2k: use netdev_alloc_skb
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 16 Apr 2008 23:37:39 +0000 (16:37 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 22 May 2008 18:12:45 +0000 (14:12 -0400)
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>
drivers/net/dl2k.c

index e233d04a2132fcca328f3000dd546df963b7a356..8277e89e552d076c200539c4c52da49f983fa27c 100644 (file)
@@ -499,7 +499,7 @@ rio_timer (unsigned long data)
                        entry = np->old_rx % RX_RING_SIZE;
                        /* Dropped packets don't need to re-allocate */
                        if (np->rx_skbuff[entry] == NULL) {
-                               skb = dev_alloc_skb (np->rx_buf_sz);
+                               skb = netdev_alloc_skb (dev, np->rx_buf_sz);
                                if (skb == NULL) {
                                        np->rx_ring[entry].fraginfo = 0;
                                        printk (KERN_INFO
@@ -570,7 +570,7 @@ alloc_list (struct net_device *dev)
        /* Allocate the rx buffers */
        for (i = 0; i < RX_RING_SIZE; i++) {
                /* Allocated fixed size of skbuff */
-               struct sk_buff *skb = dev_alloc_skb (np->rx_buf_sz);
+               struct sk_buff *skb = netdev_alloc_skb (dev, np->rx_buf_sz);
                np->rx_skbuff[i] = skb;
                if (skb == NULL) {
                        printk (KERN_ERR
@@ -867,7 +867,7 @@ receive_packet (struct net_device *dev)
                                                  PCI_DMA_FROMDEVICE);
                                skb_put (skb = np->rx_skbuff[entry], pkt_len);
                                np->rx_skbuff[entry] = NULL;
-                       } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) {
+                       } else if ((skb = netdev_alloc_skb(dev, pkt_len + 2))) {
                                pci_dma_sync_single_for_cpu(np->pdev,
                                                            desc_to_dma(desc),
                                                            np->rx_buf_sz,
@@ -904,7 +904,7 @@ receive_packet (struct net_device *dev)
                struct sk_buff *skb;
                /* Dropped packets don't need to re-allocate */
                if (np->rx_skbuff[entry] == NULL) {
-                       skb = dev_alloc_skb (np->rx_buf_sz);
+                       skb = netdev_alloc_skb(dev, np->rx_buf_sz);
                        if (skb == NULL) {
                                np->rx_ring[entry].fraginfo = 0;
                                printk (KERN_INFO