Skip to content

Commit

Permalink
b44: use netdev_alloc_skb_ip_align()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hauke Mehrtens authored and David S. Miller committed Feb 19, 2013
1 parent d372045 commit 7341a73
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/broadcom/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7341a73

Please sign in to comment.