aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-13 01:34:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-13 14:48:18 -0400
commit89d71a66c40d629e3b1285def543ab1425558cd5 (patch)
tree45159e85418170fe36e4e023d9617693625d1740 /drivers/net/8139cp.c
parentbff1c09640b3006bca711e18ef08a5fb955ad9b5 (diff)
net: Use netdev_alloc_skb_ip_align()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r--drivers/net/8139cp.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 83a1922e68e0..ab451bb8995a 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -549,14 +549,12 @@ rx_status_loop:
549 pr_debug("%s: rx slot %d status 0x%x len %d\n", 549 pr_debug("%s: rx slot %d status 0x%x len %d\n",
550 dev->name, rx_tail, status, len); 550 dev->name, rx_tail, status, len);
551 551
552 new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN); 552 new_skb = netdev_alloc_skb_ip_align(dev, buflen);
553 if (!new_skb) { 553 if (!new_skb) {
554 dev->stats.rx_dropped++; 554 dev->stats.rx_dropped++;
555 goto rx_next; 555 goto rx_next;
556 } 556 }
557 557
558 skb_reserve(new_skb, NET_IP_ALIGN);
559
560 dma_unmap_single(&cp->pdev->dev, mapping, 558 dma_unmap_single(&cp->pdev->dev, mapping,
561 buflen, PCI_DMA_FROMDEVICE); 559 buflen, PCI_DMA_FROMDEVICE);
562 560
@@ -1057,12 +1055,10 @@ static int cp_refill_rx(struct cp_private *cp)
1057 struct sk_buff *skb; 1055 struct sk_buff *skb;
1058 dma_addr_t mapping; 1056 dma_addr_t mapping;
1059 1057
1060 skb = netdev_alloc_skb(dev, cp->rx_buf_sz + NET_IP_ALIGN); 1058 skb = netdev_alloc_skb_ip_align(dev, cp->rx_buf_sz);
1061 if (!skb) 1059 if (!skb)
1062 goto err_out; 1060 goto err_out;
1063 1061
1064 skb_reserve(skb, NET_IP_ALIGN);
1065
1066 mapping = dma_map_single(&cp->pdev->dev, skb->data, 1062 mapping = dma_map_single(&cp->pdev->dev, skb->data,
1067 cp->rx_buf_sz, PCI_DMA_FROMDEVICE); 1063 cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
1068 cp->rx_skb[i] = skb; 1064 cp->rx_skb[i] = skb;