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

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: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: default avatarIvo van Doorn <ivdoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2e331462
...@@ -401,7 +401,9 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev, ...@@ -401,7 +401,9 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
(rxdesc.flags & RX_FLAG_IV_STRIPPED)) (rxdesc.flags & RX_FLAG_IV_STRIPPED))
rt2x00crypto_rx_insert_iv(entry->skb, header_length, rt2x00crypto_rx_insert_iv(entry->skb, header_length,
&rxdesc); &rxdesc);
else if (rxdesc.dev_flags & RXDONE_L2PAD) else if (header_length &&
(rxdesc.size > header_length) &&
(rxdesc.dev_flags & RXDONE_L2PAD))
rt2x00queue_remove_l2pad(entry->skb, header_length); rt2x00queue_remove_l2pad(entry->skb, header_length);
else else
rt2x00queue_align_payload(entry->skb, header_length); rt2x00queue_align_payload(entry->skb, header_length);
......
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