Skip to content

Commit

Permalink
libertas: make if_sdio align packets
Browse files Browse the repository at this point in the history
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 <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Pierre Ossman authored and Jeff Garzik committed Nov 10, 2007
1 parent 4ef3170 commit 51e6b71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 51e6b71

Please sign in to comment.