rt2x00: Fix HT40+/HT40- setting in rt2800.
authorGertjan van Wingerde <gwingerde@gmail.com>
Mon, 3 May 2010 20:43:04 +0000 (22:43 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 May 2010 17:24:23 +0000 (13:24 -0400)
Inspection of the Ralink vendor driver shows that the TX_BAND_CFG register
and BBP register 3 are about HT40- indication, not about HT40+ indication.
Inverse the meaning of these fields in the code.

Signed-off-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/rt2800lib.c

index 4c0b481732138e26f1d2f74de6e036de8b84055c..2aa03751c341d18848f668beb26868bdc252abb5 100644 (file)
  * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz
  */
 #define TX_BAND_CFG                    0x132c
-#define TX_BAND_CFG_HT40_PLUS          FIELD32(0x00000001)
+#define TX_BAND_CFG_HT40_MINUS         FIELD32(0x00000001)
 #define TX_BAND_CFG_A                  FIELD32(0x00000002)
 #define TX_BAND_CFG_BG                 FIELD32(0x00000004)
 
@@ -1519,7 +1519,7 @@ struct mac_iveiv_entry {
  * BBP 3: RX Antenna
  */
 #define BBP3_RX_ANTENNA                        FIELD8(0x18)
-#define BBP3_HT40_PLUS                 FIELD8(0x20)
+#define BBP3_HT40_MINUS                        FIELD8(0x20)
 
 /*
  * BBP 4: Bandwidth
index 7310f34cc12a14c2aedcd25fe655b17a2cf9ad9a..6d2c66d9b290a4bf4b75a4797d7e26f5fb9748dc 100644 (file)
@@ -867,7 +867,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
        }
 
        rt2800_register_read(rt2x00dev, TX_BAND_CFG, &reg);
-       rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_PLUS, conf_is_ht40_plus(conf));
+       rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_MINUS, conf_is_ht40_minus(conf));
        rt2x00_set_field32(&reg, TX_BAND_CFG_A, rf->channel > 14);
        rt2x00_set_field32(&reg, TX_BAND_CFG_BG, rf->channel <= 14);
        rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg);
@@ -900,7 +900,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
        rt2800_bbp_write(rt2x00dev, 4, bbp);
 
        rt2800_bbp_read(rt2x00dev, 3, &bbp);
-       rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf));
+       rt2x00_set_field8(&bbp, BBP3_HT40_MINUS, conf_is_ht40_minus(conf));
        rt2800_bbp_write(rt2x00dev, 3, bbp);
 
        if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {