diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2009-12-04 17:47:07 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-21 18:56:41 -0500 |
commit | e54be4e7356c0612b48407d3b0647a29cb82e254 (patch) | |
tree | 214c1bad46269bb23d89f439d2ae6943b34c7702 /drivers/net/wireless/rt2x00/rt2x00queue.c | |
parent | 5de42f9eeafa7d54ffb833e0526d4828e194fddb (diff) |
rt2x00: Fix trimming of L2 padded frames.
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 7452fa850a0f..3d8fb684b4eb 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -180,7 +180,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length) | |||
180 | unsigned int payload_length = skb->len - header_length; | 180 | unsigned int payload_length = skb->len - header_length; |
181 | unsigned int header_align = ALIGN_SIZE(skb, 0); | 181 | unsigned int header_align = ALIGN_SIZE(skb, 0); |
182 | unsigned int payload_align = ALIGN_SIZE(skb, header_length); | 182 | unsigned int payload_align = ALIGN_SIZE(skb, header_length); |
183 | unsigned int l2pad = L2PAD_SIZE(header_length); | 183 | unsigned int l2pad = payload_length ? L2PAD_SIZE(header_length) : 0; |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Adjust the header alignment if the payload needs to be moved more | 186 | * Adjust the header alignment if the payload needs to be moved more |