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/bcm63xx_enet.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/bcm63xx_enet.c')
-rw-r--r-- | drivers/net/bcm63xx_enet.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index ba29dc319b34..1f6c5486d715 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c | |||
@@ -320,16 +320,13 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget) | |||
320 | if (len < copybreak) { | 320 | if (len < copybreak) { |
321 | struct sk_buff *nskb; | 321 | struct sk_buff *nskb; |
322 | 322 | ||
323 | nskb = netdev_alloc_skb(dev, len + NET_IP_ALIGN); | 323 | nskb = netdev_alloc_skb_ip_align(dev, len); |
324 | if (!nskb) { | 324 | if (!nskb) { |
325 | /* forget packet, just rearm desc */ | 325 | /* forget packet, just rearm desc */ |
326 | priv->stats.rx_dropped++; | 326 | priv->stats.rx_dropped++; |
327 | continue; | 327 | continue; |
328 | } | 328 | } |
329 | 329 | ||
330 | /* since we're copying the data, we can align | ||
331 | * them properly */ | ||
332 | skb_reserve(nskb, NET_IP_ALIGN); | ||
333 | dma_sync_single_for_cpu(kdev, desc->address, | 330 | dma_sync_single_for_cpu(kdev, desc->address, |
334 | len, DMA_FROM_DEVICE); | 331 | len, DMA_FROM_DEVICE); |
335 | memcpy(nskb->data, skb->data, len); | 332 | memcpy(nskb->data, skb->data, len); |