Skip to content

Commit

Permalink
rt2x00: Modify rt2x00queue_remove_l2pad to make skb->data two-byte al…
Browse files Browse the repository at this point in the history
…ignment

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: RA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
RA-Jay Hung authored and John W. Linville committed Nov 17, 2010
1 parent f8eaec6 commit 387e688
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 387e688

Please sign in to comment.