Commit a5186e99 authored by Gertjan van Wingerde's avatar Gertjan van Wingerde Committed by John W. Linville

rt2x00: Fix padding bug on L2PAD devices.

While reviewing the l2pad function to align both the header and the payload
on a DMA-capable boundary a bug was discovered where the payload would not
be properly aligned. The header_align value was used where the payload_align
value should have been used.
Signed-off-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1014eb6e
...@@ -214,7 +214,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) ...@@ -214,7 +214,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
skb_push(skb, header_align); skb_push(skb, header_align);
memmove(skb->data, skb->data + header_align, header_length); memmove(skb->data, skb->data + header_align, header_length);
memmove(skb->data + header_length + l2pad, memmove(skb->data + header_length + l2pad,
skb->data + header_length + l2pad + header_align, skb->data + header_length + l2pad + payload_align,
frame_length - header_length); frame_length - header_length);
skbdesc->flags |= SKBDESC_L2_PADDED; skbdesc->flags |= SKBDESC_L2_PADDED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment