]> Pileus Git - ~andy/linux/commitdiff
rt2800: nulify all last words of TXWI
authorStanislaw Gruszka <stf_xl@wp.pl>
Wed, 17 Apr 2013 12:30:48 +0000 (14:30 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Apr 2013 19:20:20 +0000 (15:20 -0400)
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 5c20e98b48081c9c3374691696f25dee4a5f3dfb..35f58bbf25c19d1bd8f8ede322ffc5b1341d3063 100644 (file)
@@ -542,6 +542,7 @@ void rt2800_write_tx_data(struct queue_entry *entry,
 {
        __le32 *txwi = rt2800_drv_get_txwi(entry);
        u32 word;
+       int i;
 
        /*
         * Initialize TX Info descriptor
@@ -584,14 +585,16 @@ void rt2800_write_tx_data(struct queue_entry *entry,
        rt2x00_desc_write(txwi, 1, word);
 
        /*
-        * Always write 0 to IV/EIV fields, hardware will insert the IV
-        * from the IVEIV register when TXD_W3_WIV is set to 0.
+        * Always write 0 to IV/EIV fields (word 2 and 3), hardware will insert
+        * the IV from the IVEIV register when TXD_W3_WIV is set to 0.
         * When TXD_W3_WIV is set to 1 it will use the IV data
         * from the descriptor. The TXWI_W1_WIRELESS_CLI_ID indicates which
         * crypto entry in the registers should be used to encrypt the frame.
+        *
+        * Nulify all remaining words as well, we don't know how to program them.
         */
-       _rt2x00_desc_write(txwi, 2, 0 /* skbdesc->iv[0] */);
-       _rt2x00_desc_write(txwi, 3, 0 /* skbdesc->iv[1] */);
+       for (i = 2; i < entry->queue->winfo_size / sizeof(__le32); i++)
+               _rt2x00_desc_write(txwi, i, 0);
 }
 EXPORT_SYMBOL_GPL(rt2800_write_tx_data);