diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-13 01:34:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 14:48:18 -0400 |
commit | 89d71a66c40d629e3b1285def543ab1425558cd5 (patch) | |
tree | 45159e85418170fe36e4e023d9617693625d1740 /drivers/net/skge.c | |
parent | bff1c09640b3006bca711e18ef08a5fb955ad9b5 (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/skge.c')
-rw-r--r-- | drivers/net/skge.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 01f6811f1324..be28ebb3811c 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -3070,11 +3070,10 @@ static struct sk_buff *skge_rx_get(struct net_device *dev, | |||
3070 | goto error; | 3070 | goto error; |
3071 | 3071 | ||
3072 | if (len < RX_COPY_THRESHOLD) { | 3072 | if (len < RX_COPY_THRESHOLD) { |
3073 | skb = netdev_alloc_skb(dev, len + 2); | 3073 | skb = netdev_alloc_skb_ip_align(dev, len); |
3074 | if (!skb) | 3074 | if (!skb) |
3075 | goto resubmit; | 3075 | goto resubmit; |
3076 | 3076 | ||
3077 | skb_reserve(skb, 2); | ||
3078 | pci_dma_sync_single_for_cpu(skge->hw->pdev, | 3077 | pci_dma_sync_single_for_cpu(skge->hw->pdev, |
3079 | pci_unmap_addr(e, mapaddr), | 3078 | pci_unmap_addr(e, mapaddr), |
3080 | len, PCI_DMA_FROMDEVICE); | 3079 | len, PCI_DMA_FROMDEVICE); |
@@ -3085,11 +3084,11 @@ static struct sk_buff *skge_rx_get(struct net_device *dev, | |||
3085 | skge_rx_reuse(e, skge->rx_buf_size); | 3084 | skge_rx_reuse(e, skge->rx_buf_size); |
3086 | } else { | 3085 | } else { |
3087 | struct sk_buff *nskb; | 3086 | struct sk_buff *nskb; |
3088 | nskb = netdev_alloc_skb(dev, skge->rx_buf_size + NET_IP_ALIGN); | 3087 | |
3088 | nskb = netdev_alloc_skb_ip_align(dev, skge->rx_buf_size); | ||
3089 | if (!nskb) | 3089 | if (!nskb) |
3090 | goto resubmit; | 3090 | goto resubmit; |
3091 | 3091 | ||
3092 | skb_reserve(nskb, NET_IP_ALIGN); | ||
3093 | pci_unmap_single(skge->hw->pdev, | 3092 | pci_unmap_single(skge->hw->pdev, |
3094 | pci_unmap_addr(e, mapaddr), | 3093 | pci_unmap_addr(e, mapaddr), |
3095 | pci_unmap_len(e, maplen), | 3094 | pci_unmap_len(e, maplen), |