diff options
author | Tomislav Požega <pozega.tomislav@gmail.com> | 2017-04-16 14:14:42 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-05-02 23:17:22 +0200 |
commit | 64fa4ead3247f50f39d2f5c1a48d38df5bc3cba0 (patch) | |
tree | 4a7653ca881cc3ddf260d439838d56871a303b2d | |
parent | 820a39687db3b14c3264ee37548e2cac3f911bca (diff) | |
download | mtk-20170518-64fa4ead3247f50f39d2f5c1a48d38df5bc3cba0.zip mtk-20170518-64fa4ead3247f50f39d2f5c1a48d38df5bc3cba0.tar.gz mtk-20170518-64fa4ead3247f50f39d2f5c1a48d38df5bc3cba0.tar.bz2 |
mac80211: rt2800: fix mt7620 vco calibration registers
Use register values from init LNA function instead of the ones from
restore LNA function. Apply register values based on rx path
configuration.
Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
-rw-r--r-- | package/kernel/mac80211/patches/021-03-rt2800-fix-mt7620-vco-calibration-registers.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/021-03-rt2800-fix-mt7620-vco-calibration-registers.patch b/package/kernel/mac80211/patches/021-03-rt2800-fix-mt7620-vco-calibration-registers.patch new file mode 100644 index 0000000..708b0b2 --- /dev/null +++ b/package/kernel/mac80211/patches/021-03-rt2800-fix-mt7620-vco-calibration-registers.patch @@ -0,0 +1,50 @@ +From 02c452f317b4a4d06c433c294e66896a389731c1 Mon Sep 17 00:00:00 2001 +From: Daniel Golle <daniel@makrotopia.org> +Date: Tue, 18 Apr 2017 11:09:53 +0200 +Subject: [PATCH] rt2800: fix mt7620 vco calibration registers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +To: Stanislaw Gruszka <sgruszka@redhat.com> +Cc: Helmut Schaa <helmut.schaa@googlemail.com>, + linux-wireless@vger.kernel.org, + Kalle Valo <kvalo@codeaurora.org>, + Tom Psyborg <pozega.tomislav@gmail.com> + +Use register values from init LNA function instead of the ones from +restore LNA function. Apply register values based on rx path +configuration. + +Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com> +Signed-off-by: Daniel Golle <daniel@makrotopia.org> +--- + drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +index 870bf315f98b..86cffee6876a 100644 +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +@@ -4932,7 +4932,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev) + rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin); + + if (rt2x00_rt(rt2x00dev, RT6352)) { +- if (rt2x00dev->default_ant.tx_chain_num == 1) { ++ if (rt2x00dev->default_ant.rx_chain_num == 1) { + rt2800_bbp_write(rt2x00dev, 91, 0x07); + rt2800_bbp_write(rt2x00dev, 95, 0x1A); + rt2800_bbp_write(rt2x00dev, 195, 128); +@@ -4953,8 +4953,8 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev) + } + + if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) { +- rt2800_bbp_write(rt2x00dev, 75, 0x60); +- rt2800_bbp_write(rt2x00dev, 76, 0x44); ++ rt2800_bbp_write(rt2x00dev, 75, 0x68); ++ rt2800_bbp_write(rt2x00dev, 76, 0x4C); + rt2800_bbp_write(rt2x00dev, 79, 0x1C); + rt2800_bbp_write(rt2x00dev, 80, 0x0C); + rt2800_bbp_write(rt2x00dev, 82, 0xB6); +-- +2.12.2 + |