summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2011-05-18 18:25:05 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2011-06-01 19:10:58 (GMT)
commit65f31b5e7029e55d4f7020a1d0b0658a50ea73cb (patch)
tree0ebc6f067cc08045519415167b37250c1fb39e9c
parent1bdcd095e39a789135f8638a2ff76f74e3071d46 (diff)
downloadlinux-65f31b5e7029e55d4f7020a1d0b0658a50ea73cb.tar.xz
rt2x00: Enable PA_PE bits in TX_PIN_CFG according to active band.
(split off from the earlier RT35xx patch submitted by Shiang) There's no point in enabling the PA_PE bits for the bands that we are not active on. Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 2a6aa85..0fab315 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1795,8 +1795,10 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
/* Turn on unused PA or LNA when not using 1T or 1R */
if (rt2x00dev->default_ant.tx_chain_num == 2) {
- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A1_EN, 1);
- rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G1_EN, 1);
+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A1_EN,
+ rf->channel > 14);
+ rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G1_EN,
+ rf->channel <= 14);
}
/* Turn on unused PA or LNA when not using 1T or 1R */