rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxx
authorHelmut Schaa <helmut.schaa@googlemail.com>
Fri, 23 Apr 2010 13:54:43 +0000 (15:54 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Apr 2010 18:21:23 +0000 (14:21 -0400)
Get closer to what the ralink driver does by setting the rf register 13
to tx_power2 during channel switch.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800lib.c

index ec893721cc80c6ff6133c1119f093be9247d21b9..1c59dc6a3aa2d53460cbc6b3cffc772b3e4adc6d 100644 (file)
@@ -1565,6 +1565,11 @@ struct mac_iveiv_entry {
  */
 #define RFCSR12_TX_POWER               FIELD8(0x1f)
 
+/*
+ * RFCSR 13:
+ */
+#define RFCSR13_TX_POWER               FIELD8(0x1f)
+
 /*
  * RFCSR 15:
  */
index 867b6527a1fd6bfb8679c1383e8224703df198dc..2b9be79fc77fef05bf257bb1551ac67e7d03edba 100644 (file)
@@ -793,6 +793,11 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev,
                          TXPOWER_G_TO_DEV(info->tx_power1));
        rt2800_rfcsr_write(rt2x00dev, 12, rfcsr);
 
+       rt2800_rfcsr_read(rt2x00dev, 13, &rfcsr);
+       rt2x00_set_field8(&rfcsr, RFCSR13_TX_POWER,
+                         TXPOWER_G_TO_DEV(info->tx_power2));
+       rt2800_rfcsr_write(rt2x00dev, 13, rfcsr);
+
        rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
        rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset);
        rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);