b44: use netdev_alloc_skb_ip_align()
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 18 Feb 2013 10:49:56 +0000 (10:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Feb 2013 05:51:09 +0000 (00:51 -0500)
Without this patch b44 always allocates the 2 bytes needed for aligned
access on every platform, now it uses netdev_alloc_skb_ip_align().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/b44.c

index c030274a70ab5d8288128d14814438295feec8d4..a7efec29303720f9ccc88d8723435db1f64f8e7c 100644 (file)
@@ -809,11 +809,10 @@ static int b44_rx(struct b44 *bp, int budget)
                        struct sk_buff *copy_skb;
 
                        b44_recycle_rx(bp, cons, bp->rx_prod);
-                       copy_skb = netdev_alloc_skb(bp->dev, len + 2);
+                       copy_skb = netdev_alloc_skb_ip_align(bp->dev, len);
                        if (copy_skb == NULL)
                                goto drop_it_no_recycle;
 
-                       skb_reserve(copy_skb, 2);
                        skb_put(copy_skb, len);
                        /* DMA sync done above, copy just the actual packet */
                        skb_copy_from_linear_data_offset(skb, RX_PKT_OFFSET,