diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-10-22 13:05:32 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-11-10 04:25:10 -0500 |
commit | 51e6b712b5960cc7d086c3f856434ccd096c63a7 (patch) | |
tree | e9691212252730203194e805cba06859d26994ea /drivers | |
parent | 4ef31702c1a83a380d5e144f5af55e21f59c9bb6 (diff) |
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 <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index a8e17076e7de..b24425f74883 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, | |||
182 | goto out; | 182 | goto out; |
183 | } | 183 | } |
184 | 184 | ||
185 | skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); | 185 | skb = dev_alloc_skb(MRVDRV_ETH_RX_PACKET_BUFFER_SIZE + NET_IP_ALIGN); |
186 | if (!skb) { | 186 | if (!skb) { |
187 | ret = -ENOMEM; | 187 | ret = -ENOMEM; |
188 | goto out; | 188 | goto out; |
189 | } | 189 | } |
190 | 190 | ||
191 | skb_reserve(skb, NET_IP_ALIGN); | ||
192 | |||
191 | data = skb_put(skb, size); | 193 | data = skb_put(skb, size); |
192 | 194 | ||
193 | memcpy(data, buffer, size); | 195 | memcpy(data, buffer, size); |