summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bgmac.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-02-16 12:10:38 +0100
committerDavid S. Miller <davem@davemloft.net>2013-02-18 18:45:09 +0100
commit885d29941435e16dea6a52e42bbb3c8b87676bd8 (patch)
treeb7caaac7a8a0fc706d3cff8028511c4f7e5ab80a /drivers/net/ethernet/broadcom/bgmac.c
parentip: fix warning in xfrm4_mode_tunnel_input (diff)
downloadlinux-885d29941435e16dea6a52e42bbb3c8b87676bd8.tar.xz
linux-885d29941435e16dea6a52e42bbb3c8b87676bd8.zip
bgmac: fix unaligned accesses to network headers
Without this patch I get many unaligned access warnings per packet, this patches fixes them all. This should improve performance on some systems like mips. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index d34109004ee6..3fd32880e526 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -301,7 +301,7 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring,
bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
ring->start);
} else {
- new_skb = netdev_alloc_skb(bgmac->net_dev, len);
+ new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
if (new_skb) {
skb_put(new_skb, len);
skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,