diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2009-12-04 17:47:04 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-21 18:56:36 -0500 |
commit | b734083349d1f1aab1edc810cef02e8046251b48 (patch) | |
tree | 8e3c5d9f38693806f625b32c9c0be510f5929d78 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | 2e331462fcb3d897921d8a0af4fca1b08c1b7269 (diff) |
rt2x00: Only remove L2 padding in received frames if there is payload.
L2 padding will only be present when there is actual payload present.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index cc6bcc5a20c7..d7711e4d4751 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -401,7 +401,9 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev, | |||
401 | (rxdesc.flags & RX_FLAG_IV_STRIPPED)) | 401 | (rxdesc.flags & RX_FLAG_IV_STRIPPED)) |
402 | rt2x00crypto_rx_insert_iv(entry->skb, header_length, | 402 | rt2x00crypto_rx_insert_iv(entry->skb, header_length, |
403 | &rxdesc); | 403 | &rxdesc); |
404 | else if (rxdesc.dev_flags & RXDONE_L2PAD) | 404 | else if (header_length && |
405 | (rxdesc.size > header_length) && | ||
406 | (rxdesc.dev_flags & RXDONE_L2PAD)) | ||
405 | rt2x00queue_remove_l2pad(entry->skb, header_length); | 407 | rt2x00queue_remove_l2pad(entry->skb, header_length); |
406 | else | 408 | else |
407 | rt2x00queue_align_payload(entry->skb, header_length); | 409 | rt2x00queue_align_payload(entry->skb, header_length); |