rt2x00: Fix setting of txdesc->length field.
authorGertjan van Wingerde <gwingerde@gmail.com>
Sat, 8 May 2010 21:40:18 +0000 (23:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 May 2010 18:56:47 +0000 (14:56 -0400)
We should take the stripping of the IV into account for the txdesc->length
field.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00crypto.c

index d291c78..583dacd 100644 (file)
@@ -128,6 +128,7 @@ void rt2x00crypto_tx_remove_iv(struct sk_buff *skb, struct txentry_desc *txdesc)
 
        /* Pull buffer to correct size */
        skb_pull(skb, txdesc->iv_len);
+       txdesc->length -= txdesc->iv_len;
 
        /* IV/EIV data has officially been stripped */
        skbdesc->flags |= SKBDESC_IV_STRIPPED;