rt2x00: rt2800usb: use correct [RT]XWI size for RT3593
authorGabor Juhos <juhosg@openwrt.org>
Mon, 8 Jul 2013 14:08:34 +0000 (16:08 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Jul 2013 20:54:36 +0000 (16:54 -0400)
The RT3593 chipset requires different [RT]XWI size
values. Modify the driver to use the correct values.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800usb.c

index 1ba797b0e147d8173f9eb8a5fddb7daeac393695..a3132414ac9f4602454b1294d01c4f34dd01dbc3 100644 (file)
@@ -2814,6 +2814,7 @@ enum rt2800_eeprom_word {
 #define TXWI_DESC_SIZE_5WORDS          (5 * sizeof(__le32))
 
 #define RXWI_DESC_SIZE_4WORDS          (4 * sizeof(__le32))
+#define RXWI_DESC_SIZE_5WORDS          (5 * sizeof(__le32))
 #define RXWI_DESC_SIZE_6WORDS          (6 * sizeof(__le32))
 
 /*
index 840833b26bfaeeda520a5ce29fba81bf839af284..c24c1fd913514c48d049bc04dd499aa94fea6f61 100644 (file)
@@ -854,7 +854,10 @@ static void rt2800usb_queue_init(struct data_queue *queue)
        struct rt2x00_dev *rt2x00dev = queue->rt2x00dev;
        unsigned short txwi_size, rxwi_size;
 
-       if (rt2x00_rt(rt2x00dev, RT5592)) {
+       if (rt2x00_rt(rt2x00dev, RT3593)) {
+               txwi_size = TXWI_DESC_SIZE_4WORDS;
+               rxwi_size = RXWI_DESC_SIZE_5WORDS;
+       } else if (rt2x00_rt(rt2x00dev, RT5592)) {
                txwi_size = TXWI_DESC_SIZE_5WORDS;
                rxwi_size = RXWI_DESC_SIZE_6WORDS;
        } else {