This is a note to let you know that I've just added the patch titled

    rt2x00: Fix transmit power troubles on some Ralink RT30xx cards

to the 3.9-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rt2x00-fix-transmit-power-troubles-on-some-ralink-rt30xx-cards.patch
and it can be found in the queue-3.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 7e9dafd873034dd64ababcb858be424c4780ae13 Mon Sep 17 00:00:00 2001
From: "Alex A. Mihaylov" <[email protected]>
Date: Mon, 15 Apr 2013 07:29:35 +0400
Subject: rt2x00: Fix transmit power troubles on some Ralink RT30xx cards

From: "Alex A. Mihaylov" <[email protected]>

commit 7e9dafd873034dd64ababcb858be424c4780ae13 upstream.

Some cards on Ralink RT30xx chipset not have correctly TX_MIXER_GAIN
value in them EEPROM/EFUSE. In this case, we must use default value,
but always used EEPROM/EFUSE value. As result we have tranmitt power
range from -10dBm to +6dBm instead 0dBm to +16dBm.

Correctly value in EEPROM/EFUSE is one or more for RT3070 and two or
more for other RT30xx chips.

Tested on Canyon CNP-WF518N1 usb Wi-Fi dongle and Jorjin WN8020 usb
embedded Wi-Fi module.

Signed-off-by: Alex A. Mihaylov <[email protected]>
Acked-by: Gertjan van Wingerde <[email protected]>
Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/net/wireless/rt2x00/rt2800lib.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4436,6 +4436,8 @@ static int rt2800_init_rfcsr(struct rt2x
 
        if (!rt2x00_rt(rt2x00dev, RT5390) &&
            !rt2x00_rt(rt2x00dev, RT5392)) {
+               u8 min_gain = rt2x00_rt(rt2x00dev, RT3070) ? 1 : 2;
+
                rt2800_rfcsr_read(rt2x00dev, 17, &rfcsr);
                rt2x00_set_field8(&rfcsr, RFCSR17_TX_LO1_EN, 0);
                if (rt2x00_rt(rt2x00dev, RT3070) ||
@@ -4446,8 +4448,10 @@ static int rt2800_init_rfcsr(struct rt2x
                                      &rt2x00dev->cap_flags))
                                rt2x00_set_field8(&rfcsr, RFCSR17_R, 1);
                }
-               rt2x00_set_field8(&rfcsr, RFCSR17_TXMIXER_GAIN,
-                                 drv_data->txmixer_gain_24g);
+               if (drv_data->txmixer_gain_24g >= min_gain) {
+                       rt2x00_set_field8(&rfcsr, RFCSR17_TXMIXER_GAIN,
+                                         drv_data->txmixer_gain_24g);
+               }
                rt2800_rfcsr_write(rt2x00dev, 17, rfcsr);
        }
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.9/rt2x00-fix-transmit-power-troubles-on-some-ralink-rt30xx-cards.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to