Send users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com

or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of users digest..."


Today's Topics:

   1. [PATCH] rt2x00:Add RT5372 chipset support (John Li)
   2. Re: [RFC/RFT] rt2x00: Fix rt2800usb TX status report matching
      to a TX queue entry. (Andreas Hartmann)
   3. Re: [RFC/RFT] rt2x00: Fix rt2800usb TX status report matching
      to a TX queue entry. (Stanislaw Gruszka)
   4. Re: Poor RT2880 performance (Stanislaw Gruszka)


----------------------------------------------------------------------

Message: 1
Date: Thu, 16 Feb 2012 13:32:32 +0800
From: John Li <[email protected]>
To: [email protected]
Cc: [email protected], John Li
        <[email protected]>
Subject: [rt2x00-users] [PATCH] rt2x00:Add RT5372 chipset support
Message-ID:
        <[email protected]>

From: John Li <[email protected]>

Signed-off-by: John Li <[email protected]>
---
 drivers/net/wireless/rt2x00/rt2800.h    |    1 +
 drivers/net/wireless/rt2x00/rt2800lib.c |  153 ++++++++++++++++++++++++++-----
 drivers/net/wireless/rt2x00/rt2800pci.c |    3 +-
 drivers/net/wireless/rt2x00/rt2800usb.c |   14 +++
 drivers/net/wireless/rt2x00/rt2x00.h    |    1 +
 5 files changed, 147 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800.h 
b/drivers/net/wireless/rt2x00/rt2800.h
index 2571a2f..56b78c8 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -68,6 +68,7 @@
 #define RF3322                         0x000c
 #define RF3053                         0x000d
 #define RF5370                         0x5370
+#define RF5372                         0x5372
 #define RF5390                         0x5390
 
 /*
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c 
b/drivers/net/wireless/rt2x00/rt2800lib.c
index 22a1a8f..7c6c1b5 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -402,7 +402,8 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev,
 
        if (rt2x00_is_pci(rt2x00dev)) {
                if (rt2x00_rt(rt2x00dev, RT3572) ||
-                   rt2x00_rt(rt2x00dev, RT5390)) {
+                   rt2x00_rt(rt2x00dev, RT5390) ||
+                   rt2x00_rt(rt2x00dev, RT5392)) {
                        rt2800_register_read(rt2x00dev, AUX_CTRL, &reg);
                        rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
                        rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
@@ -1906,7 +1907,8 @@ static void rt2800_config_channel_rf53xx(struct 
rt2x00_dev *rt2x00dev,
                                                   r55_nonbt_rev[idx]);
                                rt2800_rfcsr_write(rt2x00dev, 59,
                                                   r59_nonbt_rev[idx]);
-                       } else if (rt2x00_rt(rt2x00dev, RT5390)) {
+                       } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+                                          rt2x00_rt(rt2x00dev, RT5392)) {
                                static const char r59_non_bt[] = {0x8f, 0x8f,
                                        0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
                                        0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
@@ -1956,6 +1958,7 @@ static void rt2800_config_channel(struct rt2x00_dev 
*rt2x00dev,
                rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
                break;
        case RF5370:
+       case RF5372:
        case RF5390:
                rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info);
                break;
@@ -1972,7 +1975,8 @@ static void rt2800_config_channel(struct rt2x00_dev 
*rt2x00dev,
        rt2800_bbp_write(rt2x00dev, 86, 0);
 
        if (rf->channel <= 14) {
-               if (!rt2x00_rt(rt2x00dev, RT5390)) {
+               if (!rt2x00_rt(rt2x00dev, RT5390) ||
+                       !rt2x00_rt(rt2x00dev, RT5392)) {
                        if (test_bit(CAPABILITY_EXTERNAL_LNA_BG,
                                     &rt2x00dev->cap_flags)) {
                                rt2800_bbp_write(rt2x00dev, 82, 0x62);
@@ -2502,7 +2506,8 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev 
*rt2x00dev)
                    rt2x00_rt(rt2x00dev, RT3071) ||
                    rt2x00_rt(rt2x00dev, RT3090) ||
                    rt2x00_rt(rt2x00dev, RT3390) ||
-                   rt2x00_rt(rt2x00dev, RT5390))
+                   rt2x00_rt(rt2x00dev, RT5390) ||
+                   rt2x00_rt(rt2x00dev, RT5392))
                        return 0x1c + (2 * rt2x00dev->lna_gain);
                else
                        return 0x2e + rt2x00dev->lna_gain;
@@ -2637,7 +2642,8 @@ static int rt2800_init_registers(struct rt2x00_dev 
*rt2x00dev)
        } else if (rt2x00_rt(rt2x00dev, RT3572)) {
                rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
                rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
-       } else if (rt2x00_rt(rt2x00dev, RT5390)) {
+       } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+                          rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
                rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
                rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
@@ -3013,7 +3019,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
                     rt2800_wait_bbp_ready(rt2x00dev)))
                return -EACCES;
 
-       if (rt2x00_rt(rt2x00dev, RT5390)) {
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_bbp_read(rt2x00dev, 4, &value);
                rt2x00_set_field8(&value, BBP4_MAC_IF_CTRL, 1);
                rt2800_bbp_write(rt2x00dev, 4, value);
@@ -3021,19 +3028,22 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
 
        if (rt2800_is_305x_soc(rt2x00dev) ||
            rt2x00_rt(rt2x00dev, RT3572) ||
-           rt2x00_rt(rt2x00dev, RT5390))
+           rt2x00_rt(rt2x00dev, RT5390) ||
+           rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 31, 0x08);
 
        rt2800_bbp_write(rt2x00dev, 65, 0x2c);
        rt2800_bbp_write(rt2x00dev, 66, 0x38);
 
-       if (rt2x00_rt(rt2x00dev, RT5390))
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 68, 0x0b);
 
        if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
                rt2800_bbp_write(rt2x00dev, 69, 0x16);
                rt2800_bbp_write(rt2x00dev, 73, 0x12);
-       } else if (rt2x00_rt(rt2x00dev, RT5390)) {
+       } else if (rt2x00_rt(rt2x00dev, RT5390) ||
+                          rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_bbp_write(rt2x00dev, 69, 0x12);
                rt2800_bbp_write(rt2x00dev, 73, 0x13);
                rt2800_bbp_write(rt2x00dev, 75, 0x46);
@@ -3051,7 +3061,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
            rt2x00_rt(rt2x00dev, RT3090) ||
            rt2x00_rt(rt2x00dev, RT3390) ||
            rt2x00_rt(rt2x00dev, RT3572) ||
-           rt2x00_rt(rt2x00dev, RT5390)) {
+           rt2x00_rt(rt2x00dev, RT5390) ||
+           rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_bbp_write(rt2x00dev, 79, 0x13);
                rt2800_bbp_write(rt2x00dev, 80, 0x05);
                rt2800_bbp_write(rt2x00dev, 81, 0x33);
@@ -3063,64 +3074,88 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
        }
 
        rt2800_bbp_write(rt2x00dev, 82, 0x62);
-       if (rt2x00_rt(rt2x00dev, RT5390))
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 83, 0x7a);
        else
                rt2800_bbp_write(rt2x00dev, 83, 0x6a);
 
        if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860D))
                rt2800_bbp_write(rt2x00dev, 84, 0x19);
-       else if (rt2x00_rt(rt2x00dev, RT5390))
+       else if (rt2x00_rt(rt2x00dev, RT5390) ||
+                        rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 84, 0x9a);
        else
                rt2800_bbp_write(rt2x00dev, 84, 0x99);
 
-       if (rt2x00_rt(rt2x00dev, RT5390))
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 86, 0x38);
        else
                rt2800_bbp_write(rt2x00dev, 86, 0x00);
 
+       if (rt2x00_rt(rt2x00dev, RT5392))
+               rt2800_bbp_write(rt2x00dev, 88, 0x90);
+
        rt2800_bbp_write(rt2x00dev, 91, 0x04);
 
-       if (rt2x00_rt(rt2x00dev, RT5390))
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 92, 0x02);
        else
                rt2800_bbp_write(rt2x00dev, 92, 0x00);
 
+       if (rt2x00_rt(rt2x00dev, RT5392)) {
+               rt2800_bbp_write(rt2x00dev, 95, 0x9a);
+               rt2800_bbp_write(rt2x00dev, 98, 0x12);
+       }
+
        if (rt2x00_rt_rev_gte(rt2x00dev, RT3070, REV_RT3070F) ||
            rt2x00_rt_rev_gte(rt2x00dev, RT3071, REV_RT3071E) ||
            rt2x00_rt_rev_gte(rt2x00dev, RT3090, REV_RT3090E) ||
            rt2x00_rt_rev_gte(rt2x00dev, RT3390, REV_RT3390E) ||
            rt2x00_rt(rt2x00dev, RT3572) ||
            rt2x00_rt(rt2x00dev, RT5390) ||
+           rt2x00_rt(rt2x00dev, RT5392) ||
            rt2800_is_305x_soc(rt2x00dev))
                rt2800_bbp_write(rt2x00dev, 103, 0xc0);
        else
                rt2800_bbp_write(rt2x00dev, 103, 0x00);
 
-       if (rt2x00_rt(rt2x00dev, RT5390))
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 104, 0x92);
 
        if (rt2800_is_305x_soc(rt2x00dev))
                rt2800_bbp_write(rt2x00dev, 105, 0x01);
-       else if (rt2x00_rt(rt2x00dev, RT5390))
+       else if (rt2x00_rt(rt2x00dev, RT5390) ||
+                        rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 105, 0x3c);
        else
                rt2800_bbp_write(rt2x00dev, 105, 0x05);
 
        if (rt2x00_rt(rt2x00dev, RT5390))
                rt2800_bbp_write(rt2x00dev, 106, 0x03);
+       else if (rt2x00_rt(rt2x00dev, RT5392))
+               rt2800_bbp_write(rt2x00dev, 106, 0x12);
        else
                rt2800_bbp_write(rt2x00dev, 106, 0x35);
 
-       if (rt2x00_rt(rt2x00dev, RT5390))
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392))
                rt2800_bbp_write(rt2x00dev, 128, 0x12);
 
+       if (rt2x00_rt(rt2x00dev, RT5392)) {
+               rt2800_bbp_write(rt2x00dev, 134, 0xd0);
+               rt2800_bbp_write(rt2x00dev, 135, 0xf6);
+       }
+
        if (rt2x00_rt(rt2x00dev, RT3071) ||
            rt2x00_rt(rt2x00dev, RT3090) ||
            rt2x00_rt(rt2x00dev, RT3390) ||
            rt2x00_rt(rt2x00dev, RT3572) ||
-           rt2x00_rt(rt2x00dev, RT5390)) {
+           rt2x00_rt(rt2x00dev, RT5390) ||
+           rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_bbp_read(rt2x00dev, 138, &value);
 
                rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &eeprom);
@@ -3132,7 +3167,8 @@ static int rt2800_init_bbp(struct rt2x00_dev *rt2x00dev)
                rt2800_bbp_write(rt2x00dev, 138, value);
        }
 
-       if (rt2x00_rt(rt2x00dev, RT5390)) {
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392)) {
                int ant, div_mode;
 
                rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
@@ -3258,13 +3294,15 @@ static int rt2800_init_rfcsr(struct rt2x00_dev 
*rt2x00dev)
            !rt2x00_rt(rt2x00dev, RT3390) &&
            !rt2x00_rt(rt2x00dev, RT3572) &&
            !rt2x00_rt(rt2x00dev, RT5390) &&
+           !rt2x00_rt(rt2x00dev, RT5392) &&
            !rt2800_is_305x_soc(rt2x00dev))
                return 0;
 
        /*
         * Init RF calibration.
         */
-       if (rt2x00_rt(rt2x00dev, RT5390)) {
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_rfcsr_read(rt2x00dev, 2, &rfcsr);
                rt2x00_set_field8(&rfcsr, RFCSR2_RESCAL_EN, 1);
                rt2800_rfcsr_write(rt2x00dev, 2, rfcsr);
@@ -3482,6 +3520,66 @@ static int rt2800_init_rfcsr(struct rt2x00_dev 
*rt2x00dev)
                        rt2800_rfcsr_write(rt2x00dev, 61, 0xdd);
                rt2800_rfcsr_write(rt2x00dev, 62, 0x00);
                rt2800_rfcsr_write(rt2x00dev, 63, 0x00);
+       }       else if (rt2x00_rt(rt2x00dev, RT5392)) {
+                       rt2800_rfcsr_write(rt2x00dev, 1, 0x17);
+                       rt2800_rfcsr_write(rt2x00dev, 2, 0x80);
+                       rt2800_rfcsr_write(rt2x00dev, 3, 0x88);
+                       rt2800_rfcsr_write(rt2x00dev, 5, 0x10);
+                       rt2800_rfcsr_write(rt2x00dev, 6, 0xe0);
+                       rt2800_rfcsr_write(rt2x00dev, 7, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 10, 0x53);
+                       rt2800_rfcsr_write(rt2x00dev, 11, 0x4a);
+                       rt2800_rfcsr_write(rt2x00dev, 12, 0x46);
+                       rt2800_rfcsr_write(rt2x00dev, 13, 0x9f);
+                       rt2800_rfcsr_write(rt2x00dev, 14, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 15, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 16, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 18, 0x03);
+                       rt2800_rfcsr_write(rt2x00dev, 19, 0x4d);
+                       rt2800_rfcsr_write(rt2x00dev, 20, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 21, 0x8d);
+                       rt2800_rfcsr_write(rt2x00dev, 22, 0x20);
+                       rt2800_rfcsr_write(rt2x00dev, 23, 0x0b);
+                       rt2800_rfcsr_write(rt2x00dev, 24, 0x44);
+                       rt2800_rfcsr_write(rt2x00dev, 25, 0x80);
+                       rt2800_rfcsr_write(rt2x00dev, 26, 0x82);
+                       rt2800_rfcsr_write(rt2x00dev, 27, 0x09);
+                       rt2800_rfcsr_write(rt2x00dev, 28, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 29, 0x10);
+                       rt2800_rfcsr_write(rt2x00dev, 30, 0x10);
+                       rt2800_rfcsr_write(rt2x00dev, 31, 0x80);
+                       rt2800_rfcsr_write(rt2x00dev, 32, 0x20);
+                       rt2800_rfcsr_write(rt2x00dev, 33, 0xC0);
+                       rt2800_rfcsr_write(rt2x00dev, 34, 0x07);
+                       rt2800_rfcsr_write(rt2x00dev, 35, 0x12);
+                       rt2800_rfcsr_write(rt2x00dev, 36, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 37, 0x08);
+                       rt2800_rfcsr_write(rt2x00dev, 38, 0x89);
+                       rt2800_rfcsr_write(rt2x00dev, 39, 0x1b);
+                       rt2800_rfcsr_write(rt2x00dev, 40, 0x0f);
+                       rt2800_rfcsr_write(rt2x00dev, 41, 0xbb);
+                       rt2800_rfcsr_write(rt2x00dev, 42, 0xd5);
+                       rt2800_rfcsr_write(rt2x00dev, 43, 0x9b);
+                       rt2800_rfcsr_write(rt2x00dev, 44, 0x0e);
+                       rt2800_rfcsr_write(rt2x00dev, 45, 0xa2);
+                       rt2800_rfcsr_write(rt2x00dev, 46, 0x73);
+                       rt2800_rfcsr_write(rt2x00dev, 47, 0x0c);
+                       rt2800_rfcsr_write(rt2x00dev, 48, 0x10);
+                       rt2800_rfcsr_write(rt2x00dev, 49, 0x94);
+                       rt2800_rfcsr_write(rt2x00dev, 50, 0x94);
+                       rt2800_rfcsr_write(rt2x00dev, 51, 0x3a);
+                       rt2800_rfcsr_write(rt2x00dev, 52, 0x48);
+                       rt2800_rfcsr_write(rt2x00dev, 53, 0x44);
+                       rt2800_rfcsr_write(rt2x00dev, 54, 0x38);
+                       rt2800_rfcsr_write(rt2x00dev, 55, 0x43);
+                       rt2800_rfcsr_write(rt2x00dev, 56, 0xa1);
+                       rt2800_rfcsr_write(rt2x00dev, 57, 0x00);
+                       rt2800_rfcsr_write(rt2x00dev, 58, 0x39);
+                       rt2800_rfcsr_write(rt2x00dev, 59, 0x07);
+                       rt2800_rfcsr_write(rt2x00dev, 60, 0x45);
+                       rt2800_rfcsr_write(rt2x00dev, 61, 0x91);
+                       rt2800_rfcsr_write(rt2x00dev, 62, 0x39);
+                       rt2800_rfcsr_write(rt2x00dev, 63, 0x07);
        }
 
        if (rt2x00_rt_rev_lt(rt2x00dev, RT3070, REV_RT3070F)) {
@@ -3549,7 +3647,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
                        rt2800_init_rx_filter(rt2x00dev, true, 0x27, 0x15);
        }
 
-       if (!rt2x00_rt(rt2x00dev, RT5390)) {
+       if (!rt2x00_rt(rt2x00dev, RT5390) ||
+               !rt2x00_rt(rt2x00dev, RT5392)) {
                /*
                 * Set back to initial state
                 */
@@ -3577,7 +3676,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
        rt2x00_set_field32(&reg, OPT_14_CSR_BIT0, 1);
        rt2800_register_write(rt2x00dev, OPT_14_CSR, reg);
 
-       if (!rt2x00_rt(rt2x00dev, RT5390)) {
+       if (!rt2x00_rt(rt2x00dev, RT5390) ||
+               !rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
                rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
                if (rt2x00_rt(rt2x00dev, RT3070) ||
@@ -3645,7 +3745,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
                rt2800_rfcsr_write(rt2x00dev, 27, rfcsr);
        }
 
-       if (rt2x00_rt(rt2x00dev, RT5390)) {
+       if (rt2x00_rt(rt2x00dev, RT5390) ||
+               rt2x00_rt(rt2x00dev, RT5392)) {
                rt2800_rfcsr_read(rt2x00dev, 38, &rfcsr);
                rt2x00_set_field8(&rfcsr, RFCSR38_RX_LO1_EN, 0);
                rt2800_rfcsr_write(rt2x00dev, 38, rfcsr);
@@ -3929,7 +4030,8 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
         * RT53xx: defined in "EEPROM_CHIP_ID" field
         */
        rt2800_register_read(rt2x00dev, MAC_CSR0, &reg);
-       if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390)
+       if (rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5390 ||
+               rt2x00_get_field32(reg, MAC_CSR0_CHIPSET) == RT5392)
                rt2x00_eeprom_read(rt2x00dev, EEPROM_CHIP_ID, &value);
        else
                value = rt2x00_get_field16(eeprom, EEPROM_NIC_CONF0_RF_TYPE);
@@ -3947,6 +4049,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
        case RT3390:
        case RT3572:
        case RT5390:
+       case RT5392:
                break;
        default:
                ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
@@ -3965,6 +4068,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
        case RF3052:
        case RF3320:
        case RF5370:
+       case RF5372:
        case RF5390:
                break;
        default:
@@ -4271,6 +4375,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
                   rt2x00_rf(rt2x00dev, RF3022) ||
                   rt2x00_rf(rt2x00dev, RF3320) ||
                   rt2x00_rf(rt2x00dev, RF5370) ||
+                  rt2x00_rf(rt2x00dev, RF5372) ||
                   rt2x00_rf(rt2x00dev, RF5390)) {
                spec->num_channels = 14;
                spec->channels = rf_vals_3x;
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c 
b/drivers/net/wireless/rt2x00/rt2800pci.c
index 837b460..bf0f83c 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -480,7 +480,8 @@ static int rt2800pci_init_registers(struct rt2x00_dev 
*rt2x00dev)
 
        if (rt2x00_is_pcie(rt2x00dev) &&
            (rt2x00_rt(rt2x00dev, RT3572) ||
-            rt2x00_rt(rt2x00dev, RT5390))) {
+            rt2x00_rt(rt2x00dev, RT5390) ||
+            rt2x00_rt(rt2x00dev, RT5392))) {
                rt2x00pci_register_read(rt2x00dev, AUX_CTRL, &reg);
                rt2x00_set_field32(&reg, AUX_CTRL_FORCE_PCIE_CLK, 1);
                rt2x00_set_field32(&reg, AUX_CTRL_WAKE_PCIE_EN, 1);
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c 
b/drivers/net/wireless/rt2x00/rt2800usb.c
index 7f21005..6565113 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1101,12 +1101,26 @@ static struct usb_device_id rt2800usb_device_table[] = {
        { USB_DEVICE(0x5a57, 0x0284) },
 #endif
 #ifdef CONFIG_RT2800USB_RT53XX
+       /* Alpha */
+       { USB_DEVICE(0x2001, 0x3c15) },
+       { USB_DEVICE(0x2001, 0x3c19) },
+       /* Arcadyan */
+       { USB_DEVICE(0x043e, 0x7a12) },
        /* Azurewave */
        { USB_DEVICE(0x13d3, 0x3329) },
        { USB_DEVICE(0x13d3, 0x3365) },
+       /* LG innotek */
+       { USB_DEVICE(0x043e, 0x7a22) },
+       /* Panasonic */
+       { USB_DEVICE(0x04da, 0x1801) },
+       { USB_DEVICE(0x04da, 0x1800) },
+       /* Philips */
+       { USB_DEVICE(0x0471, 0x2104) },
        /* Ralink */
        { USB_DEVICE(0x148f, 0x5370) },
        { USB_DEVICE(0x148f, 0x5372) },
+       /* Unknown */
+       { USB_DEVICE(0x04da, 0x23f6) },
 #endif
 #ifdef CONFIG_RT2800USB_UNKNOWN
        /*
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h 
b/drivers/net/wireless/rt2x00/rt2x00.h
index b03b22c..bf743cd 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -192,6 +192,7 @@ struct rt2x00_chip {
 #define RT3593         0x3593
 #define RT3883         0x3883  /* WSOC */
 #define RT5390         0x5390  /* 2.4GHz */
+#define RT5392         0x5392  /* 2.4GHz */
 
        u16 rf;
        u16 rev;
-- 
1.7.6.5




------------------------------

Message: 2
Date: Thu, 16 Feb 2012 08:33:26 +0100
From: Andreas Hartmann <[email protected]>
To: Gertjan van Wingerde <[email protected]>
Cc: [email protected]
Subject: Re: [rt2x00-users] [RFC/RFT] rt2x00: Fix rt2800usb TX status
        report matching to a TX queue entry.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

Hi Gertjan,

Am Wed, 15 Feb 2012 23:13:28 +0100
schrieb Gertjan van Wingerde <[email protected]>:

> rt2800usb tries to match a TX status report to a TX queue entry by putting
> an indication of the TX queue entry index in the TXWI, which is then copied
> to the TX status report.
> 
> This, however, assumes that for each frame the TXWI field containing this
> index indication is correctly copied to the TX status report.
> 
> As it turns out, this assumption is not correct, as the device, when
> aggregating frames, reports the TXWI field of the first aggregated frame
> in the TX status reports of all the aggregated frames.
> 
> This causes a lot of mismatching of TX status reports, causing rt2800usb to
> miss TX status reports for TX-ed frames that actually are correctly received.
> 
> Fix this by no longer including this index indication in the TXWI field and
> by not checking this index indication anymore when trying to match a TX
> status report to a TX queue entry.
> 
> The net result is that rt2800usb now no longer spews out endless dmesg logs 
> of:
>       phy0 -> rt2800usb_txdone_entry_check: Warning - TX status report missed 
> for queue <x> entry <y>

I did a short test (802.11n on a single core STA with the last rt3572
patches applied (same compat-wireless as used for the last check, but
with your additional patch)) which showed up two things:

1. You achieved your primary goal: get rid of
the rt2800usb_txdone_entry_check warnings.

2. There are some other entries now, probably these which Ivo meant:

kernel: [21058.994029] phy0 -> rt2x00queue_flush_queue: Warning - Queue 0 
failed to flush

kernel: [21060.002297] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
0 status timed out, invoke forced tx handler

very often, about each second:
kernel: [21128.004179] wlan1: detected beacon loss from AP - sending probe 
request
...
kernel: [21133.183417] wlan1: cancelling probereq poll due to a received beacon

...
kernel: [21312.002269] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
2 status timed out, invoke forced tx handler

After stopping the test with netperf (and a idle connection again),
the following messages came up:

kernel: [21357.507039] ieee80211 phy0: wlan1: No probe response from AP 
94:1b:a2:34:d2:a5 after 500ms, try 1/5
kernel: [21358.002278] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
0 status timed out, invoke forced tx handler
kernel: [21358.010281] ieee80211 phy0: wlan1: No probe response from AP 
94:1b:a2:34:d2:a5 after 500ms, try 2/5
kernel: [21358.368219] wlan1: cancelling probereq poll due to a received beacon
kernel: [21359.002358] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
0 status timed out, invoke forced tx handler
kernel: [21359.181028] phy0 -> rt2x00queue_flush_queue: Warning - Queue 0 
failed to flush
kernel: [21360.002317] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
0 status timed out, invoke forced tx handler
kernel: [21361.004031] wlan1: detected beacon loss from AP - sending probe 
request
kernel: [21361.507042] ieee80211 phy0: wlan1: No probe response from AP 
94:1b:a2:34:d2:a5 after 500ms, try 1/5
kernel: [21362.002354] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
0 status timed out, invoke forced tx handler
kernel: [21362.010234] ieee80211 phy0: wlan1: No probe response from AP 
94:1b:a2:34:d2:a5 after 500ms, try 2/5
kernel: [21362.511045] ieee80211 phy0: wlan1: No probe response from AP 
94:1b:a2:34:d2:a5 after 500ms, try 3/5
kernel: [21362.669193] wlan1: cancelling probereq poll due to a received beacon
kernel: [21363.002312] phy0 -> rt2x00usb_watchdog_tx_status: Warning - TX queue 
0 status timed out, invoke forced tx handler
....


Thank you,
kind regards,
Andreas



------------------------------

Message: 3
Date: Thu, 16 Feb 2012 13:42:29 +0100
From: Stanislaw Gruszka <[email protected]>
To: Ivo Van Doorn <[email protected]>
Cc: [email protected]
Subject: Re: [rt2x00-users] [RFC/RFT] rt2x00: Fix rt2800usb TX status
        report matching to a TX queue entry.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Hello

On Wed, Feb 15, 2012 at 11:29:41PM +0100, Ivo Van Doorn wrote:
> > This causes a lot of mismatching of TX status reports, causing rt2800usb to
> > miss TX status reports for TX-ed frames that actually are correctly 
> > received.
> 
> Well those "missed" frames are marked as UNKNOWN, and those are by rt2x00lib
> resolved to SUCCESS. So mac80211 doesn't know that those frames failed or 
> not...
> 
> > Fix this by no longer including this index indication in the TXWI field and
> > by not checking this index indication anymore when trying to match a TX
> > status report to a TX queue entry.
> 
> But this prevents the queue code to catch up on entries which have
> been freed, as
> the logic so far has been that when first you get a report for entry 1
> in queue 1, and
> then entry 5 in queue 1, that all in between entries are marked as "UNKWOWN" 
> and
> properly processed to mac80211. 
Hmm, if UNKNOWN frame ignored by rate scalling algoritm, or
influent it somehow?

> You don''t want to prevent that from
> occurring as
> the queue would fill up and at some point will choke when it is
> completely filled.
> 
> So the current approach is perhaps wrong in the fact that it bugs
> users by printing
> errors in the log, but other then that, the logic sounds fine to me.
Beside seems that when firmware aggregate frames, we get only
status for one frame, instead of let say 5 frames. So that warning
does not necessary indicate an real error.

Stanislaw



------------------------------

Message: 4
Date: Thu, 16 Feb 2012 14:00:21 +0100
From: Stanislaw Gruszka <[email protected]>
To: Florian Fainelli <[email protected]>
Cc: "[email protected]" <[email protected]>,
        [email protected], Andreas Hartmann
        <[email protected]>
Subject: Re: [rt2x00-users] Poor RT2880 performance
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1

On Mon, Feb 13, 2012 at 08:18:19PM +0100, Florian Fainelli wrote:
> Le 02/13/12 14:45, Helmut Schaa a ?crit :
> >On Mon, Feb 13, 2012 at 2:23 PM, Florian Fainelli<[email protected]>  
> >wrote:
> >>I am playing with a RT2880-F based AP, with a N connected station, in a
> >>residential environment.
> >Mind to provide the RF and RT chipset identifications? rt2x00 should print 
> >them
> >out during module load (at least when compiled with debugging options).
> 
> Sure, here are the HW infos of the AP:
> Ralink RT2880   id:1 rev:1 running at 266.66 MHz
> phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 2860, rf:
> 0001, rev: 0101.

Did you try to revert commit (if you use kernel, which include it) ?

commit f0425beda4d404a6e751439b562100b902ba9c98
Author: Felix Fietkau <[email protected]>
Date:   Sun Aug 28 21:11:01 2011 +0200

    mac80211: retry sending failed BAR frames later instead of tearing

It was already identified that it couse performace issues on rt2860
based APs.

Stanislaw




------------------------------

_______________________________________________
users mailing list
[email protected]
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com


End of users Digest, Vol 36, Issue 20
*************************************

Reply via email to