Skip to content

Commit

Permalink
rt2x00: Fix trimming of L2 padded frames.
Browse files Browse the repository at this point in the history
Ensure that frames without payload are properly trimmed in
rt2x00queue_insert_l2pad.

This should fix the bug reported by Benoit Papillault in:
http://marc.info/?l=linux-wireless&m=125974773006734&w=2

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Gertjan van Wingerde authored and John W. Linville committed Dec 21, 2009
1 parent 5de42f9 commit e54be4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
unsigned int payload_length = skb->len - header_length;
unsigned int header_align = ALIGN_SIZE(skb, 0);
unsigned int payload_align = ALIGN_SIZE(skb, header_length);
unsigned int l2pad = L2PAD_SIZE(header_length);
unsigned int l2pad = payload_length ? L2PAD_SIZE(header_length) : 0;

/*
* Adjust the header alignment if the payload needs to be moved more
Expand Down

0 comments on commit e54be4e

Please sign in to comment.