Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51e6b712 authored by Pierre Ossman's avatar Pierre Ossman Committed by Jeff Garzik
Browse files

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: default avatarPierre Ossman <drzeus@drzeus.cx>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4ef31702
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);