aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-05-03 16:43:04 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-04 13:24:23 -0400
commita21ee724034b21d51d74eec8e426702a627eb465 (patch)
tree8b87ae245a99eb5c4485172587f9b96ab959d4e4 /drivers
parent79a854f1e1a4482243fe4a2b199e199225b87bf6 (diff)
rt2x00: Fix HT40+/HT40- setting in rt2800.
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800.h4
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 4c0b48173213..2aa03751c341 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -845,7 +845,7 @@
845 * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz 845 * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz
846 */ 846 */
847#define TX_BAND_CFG 0x132c 847#define TX_BAND_CFG 0x132c
848#define TX_BAND_CFG_HT40_PLUS FIELD32(0x00000001) 848#define TX_BAND_CFG_HT40_MINUS FIELD32(0x00000001)
849#define TX_BAND_CFG_A FIELD32(0x00000002) 849#define TX_BAND_CFG_A FIELD32(0x00000002)
850#define TX_BAND_CFG_BG FIELD32(0x00000004) 850#define TX_BAND_CFG_BG FIELD32(0x00000004)
851 851
@@ -1519,7 +1519,7 @@ struct mac_iveiv_entry {
1519 * BBP 3: RX Antenna 1519 * BBP 3: RX Antenna
1520 */ 1520 */
1521#define BBP3_RX_ANTENNA FIELD8(0x18) 1521#define BBP3_RX_ANTENNA FIELD8(0x18)
1522#define BBP3_HT40_PLUS FIELD8(0x20) 1522#define BBP3_HT40_MINUS FIELD8(0x20)
1523 1523
1524/* 1524/*
1525 * BBP 4: Bandwidth 1525 * BBP 4: Bandwidth
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 7310f34cc12a..6d2c66d9b290 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -867,7 +867,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
867 } 867 }
868 868
869 rt2800_register_read(rt2x00dev, TX_BAND_CFG, &reg); 869 rt2800_register_read(rt2x00dev, TX_BAND_CFG, &reg);
870 rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_PLUS, conf_is_ht40_plus(conf)); 870 rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_MINUS, conf_is_ht40_minus(conf));
871 rt2x00_set_field32(&reg, TX_BAND_CFG_A, rf->channel > 14); 871 rt2x00_set_field32(&reg, TX_BAND_CFG_A, rf->channel > 14);
872 rt2x00_set_field32(&reg, TX_BAND_CFG_BG, rf->channel <= 14); 872 rt2x00_set_field32(&reg, TX_BAND_CFG_BG, rf->channel <= 14);
873 rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg); 873 rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg);
@@ -900,7 +900,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
900 rt2800_bbp_write(rt2x00dev, 4, bbp); 900 rt2800_bbp_write(rt2x00dev, 4, bbp);
901 901
902 rt2800_bbp_read(rt2x00dev, 3, &bbp); 902 rt2800_bbp_read(rt2x00dev, 3, &bbp);
903 rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf)); 903 rt2x00_set_field8(&bbp, BBP3_HT40_MINUS, conf_is_ht40_minus(conf));
904 rt2800_bbp_write(rt2x00dev, 3, bbp); 904 rt2800_bbp_write(rt2x00dev, 3, bbp);
905 905
906 if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) { 906 if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {