aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/b44.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-06-04 16:25:40 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-08 22:16:40 -0400
commitbf0dcbd929faf036f1a4f2918090344d0e249cf5 (patch)
treee15207063022d237cbdc326445dfa724ebb079be /drivers/net/b44.c
parent72f4861ef9b1c1ca6e4abb49854698e80d3b684d (diff)
b44: use netdev_alloc_skb
Use netdev_alloc_skb rather than dev_alloc_skb when allocating receive buffers. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r--drivers/net/b44.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 8fdcb698d611..96fb0ec905a7 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -653,7 +653,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
653 src_map = &bp->rx_buffers[src_idx]; 653 src_map = &bp->rx_buffers[src_idx];
654 dest_idx = dest_idx_unmasked & (B44_RX_RING_SIZE - 1); 654 dest_idx = dest_idx_unmasked & (B44_RX_RING_SIZE - 1);
655 map = &bp->rx_buffers[dest_idx]; 655 map = &bp->rx_buffers[dest_idx];
656 skb = dev_alloc_skb(RX_PKT_BUF_SZ); 656 skb = netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ);
657 if (skb == NULL) 657 if (skb == NULL)
658 return -ENOMEM; 658 return -ENOMEM;
659 659
@@ -669,7 +669,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
669 if (!dma_mapping_error(mapping)) 669 if (!dma_mapping_error(mapping))
670 pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE); 670 pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE);
671 dev_kfree_skb_any(skb); 671 dev_kfree_skb_any(skb);
672 skb = __dev_alloc_skb(RX_PKT_BUF_SZ,GFP_DMA); 672 skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA);
673 if (skb == NULL) 673 if (skb == NULL)
674 return -ENOMEM; 674 return -ENOMEM;
675 mapping = pci_map_single(bp->pdev, skb->data, 675 mapping = pci_map_single(bp->pdev, skb->data,
@@ -684,7 +684,6 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
684 } 684 }
685 } 685 }
686 686
687 skb->dev = bp->dev;
688 rh = (struct rx_header *) skb->data; 687 rh = (struct rx_header *) skb->data;
689 skb_reserve(skb, RX_PKT_OFFSET); 688 skb_reserve(skb, RX_PKT_OFFSET);
690 689