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

Commit 387e6884 authored by RA-Jay Hung's avatar RA-Jay Hung Committed by John W. Linville
Browse files

rt2x00: Modify rt2x00queue_remove_l2pad to make skb->data two-byte alignment



When send out skb data to mac80211, orignal code will cause mac80211
unaligned access, so modify code to make mac80211 can natural access.

Signed-off-by: default avatarRA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f8eaec65
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -204,8 +204,10 @@ void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length)
	if (!l2pad)
		return;

	memmove(skb->data + l2pad, skb->data, header_length);
	skb_pull(skb, l2pad);
	memmove(skb->data + header_length, skb->data + header_length + l2pad,
				skb->len - header_length - l2pad);

	skb_trim(skb, skb->len - l2pad);
}

static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry,