Skip to contentSkip to conversation

rt2x00: Fix padding bug on L2PAD devices.

PATCH Ivo van Doorn 1 participant 1 message Nov 25, 2009 1 message not in the archive

lore
Share & tools
lore

Ivo van Doorn

author Acked-by
#1 lore raw
In reply to a message not in the archive
Quoted 6 lines · Gertjan van Wingerde

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.

Quoted 17 lines
---
 drivers/net/wireless/rt2x00/rt2x00queue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2x00queue.c +1 -1
index 32d4aea..239afc7 100644
@@ -214,7 +214,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
 		skb_push(skb, header_align);
 		memmove(skb->data, skb->data + header_align, header_length);
 		memmove(skb->data + header_length + l2pad,
-			skb->data + header_length + l2pad + header_align,
+			skb->data + header_length + l2pad + payload_align,
 			frame_length - header_length);
 		skbdesc->flags |= SKBDESC_L2_PADDED;
 	}