rt2x00: reduce tx power to nominal level on RT6352
authorTomislav Požega <pozega.tomislav@gmail.com>
Thu, 27 Dec 2018 14:05:25 +0000 (15:05 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 1 Feb 2019 12:05:03 +0000 (14:05 +0200)
Current implementation of RT6352 support provides too high tx power
at least on iPA/eLNA devices. Reduce amplification of variable gain
amplifier by 6dB to match board target power of 17dBm.
Transmited signal strength with this patch is similar to that of
stock firmware or pandorabox firmware. Throughput measured with iperf
improves. Device tested: Xiaomi Miwifi Mini.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c

index 0e95555..7f813f6 100644 (file)
@@ -5477,7 +5477,7 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
                rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
                rt2800_register_write(rt2x00dev, MIMO_PS_CFG, 0x00000002);
                rt2800_register_write(rt2x00dev, TX_PIN_CFG, 0x00150F0F);
-               rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x06060606);
+               rt2800_register_write(rt2x00dev, TX_ALC_VGA3, 0x00000000);
                rt2800_register_write(rt2x00dev, TX0_BB_GAIN_ATTEN, 0x0);
                rt2800_register_write(rt2x00dev, TX1_BB_GAIN_ATTEN, 0x0);
                rt2800_register_write(rt2x00dev, TX0_RF_GAIN_ATTEN, 0x6C6C666C);