]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rt2x00: rt2800: fix zeroing skb structure
authorStanislaw Gruszka <sgruszka@redhat.com>
Sat, 30 Jul 2011 11:32:56 +0000 (13:32 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Aug 2011 01:31:32 +0000 (18:31 -0700)
commit b52398b6e4522176dd125722c72c301015d24520 upstream.

We should clear skb->data not skb itself. Bug was introduced by:
commit 0b8004aa12d13ec750d102ba4082a95f0107c649 "rt2x00: Properly
reserve room for descriptors in skbs".

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/rt2x00/rt2800lib.c

index 2a6aa85cc6c9df67ab072e7a53d74cb29c622da6..5a4522860a4c0cb3846805db5010124607501b68 100644 (file)
@@ -784,8 +784,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
        /*
         * Add space for the TXWI in front of the skb.
         */
-       skb_push(entry->skb, TXWI_DESC_SIZE);
-       memset(entry->skb, 0, TXWI_DESC_SIZE);
+       memset(skb_push(entry->skb, TXWI_DESC_SIZE), 0, TXWI_DESC_SIZE);
 
        /*
         * Register descriptor details in skb frame descriptor.