From: Pierre Ossman Date: Mon, 22 Oct 2007 17:05:32 +0000 (+0200) Subject: libertas: make if_sdio align packets X-Git-Tag: v2.6.24-rc3~163^2~26 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=51e6b712b5960cc7d086c3f856434ccd096c63a7;p=linux-2.6-omap-h63xx.git libertas: make if_sdio align packets Incoming packets have to be aligned or the IP stack becomes upset. Make sure to shift them two bytes to achieve this. Signed-off-by: Pierre Ossman Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index a8e17076e7d..b24425f7488 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c @@ -182,12 +182,14 @@ static int if_sdio_handle_data(struct if_sdio_card *card, goto out; } - skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); + skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + NET_IP_ALIGN); if (!skb) { ret = -ENOMEM; goto out; } + skb_reserve(skb, NET_IP_ALIGN); + data = skb_put(skb, size); memcpy(data, buffer, size);