diff options
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r-- | drivers/net/cpmac.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index 61f9da2b4943..678222389407 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -380,9 +380,8 @@ static struct sk_buff *cpmac_rx_one(struct cpmac_priv *priv, | |||
380 | return NULL; | 380 | return NULL; |
381 | } | 381 | } |
382 | 382 | ||
383 | skb = netdev_alloc_skb(priv->dev, CPMAC_SKB_SIZE); | 383 | skb = netdev_alloc_skb_ip_align(priv->dev, CPMAC_SKB_SIZE); |
384 | if (likely(skb)) { | 384 | if (likely(skb)) { |
385 | skb_reserve(skb, 2); | ||
386 | skb_put(desc->skb, desc->datalen); | 385 | skb_put(desc->skb, desc->datalen); |
387 | desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); | 386 | desc->skb->protocol = eth_type_trans(desc->skb, priv->dev); |
388 | desc->skb->ip_summed = CHECKSUM_NONE; | 387 | desc->skb->ip_summed = CHECKSUM_NONE; |
@@ -991,12 +990,11 @@ static int cpmac_open(struct net_device *dev) | |||
991 | 990 | ||
992 | priv->rx_head = &priv->desc_ring[CPMAC_QUEUES]; | 991 | priv->rx_head = &priv->desc_ring[CPMAC_QUEUES]; |
993 | for (i = 0, desc = priv->rx_head; i < priv->ring_size; i++, desc++) { | 992 | for (i = 0, desc = priv->rx_head; i < priv->ring_size; i++, desc++) { |
994 | skb = netdev_alloc_skb(dev, CPMAC_SKB_SIZE); | 993 | skb = netdev_alloc_skb_ip_align(dev, CPMAC_SKB_SIZE); |
995 | if (unlikely(!skb)) { | 994 | if (unlikely(!skb)) { |
996 | res = -ENOMEM; | 995 | res = -ENOMEM; |
997 | goto fail_desc; | 996 | goto fail_desc; |
998 | } | 997 | } |
999 | skb_reserve(skb, 2); | ||
1000 | desc->skb = skb; | 998 | desc->skb = skb; |
1001 | desc->data_mapping = dma_map_single(&dev->dev, skb->data, | 999 | desc->data_mapping = dma_map_single(&dev->dev, skb->data, |
1002 | CPMAC_SKB_SIZE, | 1000 | CPMAC_SKB_SIZE, |