mediatek: fix sysupgrade board detection
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / 021-03-rt2800-fix-mt7620-vco-calibration-registers.patch
1 From 02c452f317b4a4d06c433c294e66896a389731c1 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Tue, 18 Apr 2017 11:09:53 +0200
4 Subject: [PATCH] rt2800: fix mt7620 vco calibration registers
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 To: Stanislaw Gruszka <sgruszka@redhat.com>
9 Cc: Helmut Schaa <helmut.schaa@googlemail.com>,
10 linux-wireless@vger.kernel.org,
11 Kalle Valo <kvalo@codeaurora.org>,
12 Tom Psyborg <pozega.tomislav@gmail.com>
13
14 Use register values from init LNA function instead of the ones from
15 restore LNA function. Apply register values based on rx path
16 configuration.
17
18 Signed-off-by: Tomislav Po┼żega <pozega.tomislav@gmail.com>
19 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 ---
21 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 +++---
22 1 file changed, 3 insertions(+), 3 deletions(-)
23
24 diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
25 index 870bf315f98b..86cffee6876a 100644
26 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
27 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
28 @@ -4932,7 +4932,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
29 rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin);
30
31 if (rt2x00_rt(rt2x00dev, RT6352)) {
32 - if (rt2x00dev->default_ant.tx_chain_num == 1) {
33 + if (rt2x00dev->default_ant.rx_chain_num == 1) {
34 rt2800_bbp_write(rt2x00dev, 91, 0x07);
35 rt2800_bbp_write(rt2x00dev, 95, 0x1A);
36 rt2800_bbp_write(rt2x00dev, 195, 128);
37 @@ -4953,8 +4953,8 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
38 }
39
40 if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) {
41 - rt2800_bbp_write(rt2x00dev, 75, 0x60);
42 - rt2800_bbp_write(rt2x00dev, 76, 0x44);
43 + rt2800_bbp_write(rt2x00dev, 75, 0x68);
44 + rt2800_bbp_write(rt2x00dev, 76, 0x4C);
45 rt2800_bbp_write(rt2x00dev, 79, 0x1C);
46 rt2800_bbp_write(rt2x00dev, 80, 0x0C);
47 rt2800_bbp_write(rt2x00dev, 82, 0xB6);
48 --
49 2.12.2
50