[rt2x00-users] [RFC/RFT 2/4] rt2800: radio 3xxx: program RF_R1 during channel switch

Stanislaw Gruszka sgruszka at redhat.com
Wed Jan 25 01:06:45 AEDT 2012


Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 006347e..67b5ca6 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -1665,6 +1665,15 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field8(&rfcsr, RFCSR13_TX_POWER, info->default_power2);
 	rt2800_rfcsr_write(rt2x00dev, 13, rfcsr);
 
+	/* FIXME: difference between 30xx and 33xx */
+	rt2800_rfcsr_read(rt2x00dev, 1, &rfcsr);
+	rfcsr &= 0xc3;
+	if (rt2x00dev->default_ant.tx_chain_num == 1)
+		rfcsr |= 0x20;
+	if (rt2x00dev->default_ant.rx_chain_num == 1)
+		rfcsr |= 0x10;
+	rt2800_rfcsr_write(rt2x00dev, 1, rfcsr);
+
 	rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
 	rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset);
 	rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);
-- 
1.7.1





More information about the users mailing list