diff options
author | RA-Jay Hung <Jay_Hung@ralinktech.com> | 2010-11-13 13:13:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-17 16:18:59 -0500 |
commit | 387e68846413f3dcfc5a5afca9841430057e3340 (patch) | |
tree | b6bbcdfdb1eb998c59282a28acffc3d3b79aa4a9 /drivers/net/wireless | |
parent | f8eaec659f8a7a4e0086fca7c5d5c5e0fbc76d1a (diff) |
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: 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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index dc543174dfad..a3d79c7a21c6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -204,8 +204,10 @@ void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length) | |||
204 | if (!l2pad) | 204 | if (!l2pad) |
205 | return; | 205 | return; |
206 | 206 | ||
207 | memmove(skb->data + l2pad, skb->data, header_length); | 207 | memmove(skb->data + header_length, skb->data + header_length + l2pad, |
208 | skb_pull(skb, l2pad); | 208 | skb->len - header_length - l2pad); |
209 | |||
210 | skb_trim(skb, skb->len - l2pad); | ||
209 | } | 211 | } |
210 | 212 | ||
211 | static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry, | 213 | static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry, |