mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
8554982e1f
Those have by now been merged into wireless-drivers-next: 17ae2acd1a6f rt2x00: remove unneeded check 5991a2ecd070 rt2x00: remove confusing AGC register 9ad3b5565445 rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band 7aca14885ede rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620 c7ff1bfeaf1c rt2800: comment and simplify AGC init for RT6352 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From c7ff1bfeaf1ca69e3e401be211b55d1738d0c5fc Mon Sep 17 00:00:00 2001
|
|
From: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
Date: Wed, 13 Feb 2019 11:09:16 +0100
|
|
Subject: [PATCH 19/28] rt2800: comment and simplify AGC init for RT6352
|
|
|
|
We do not need separate lines for calculating register values.
|
|
Also add comment that value is different than in vendor driver.
|
|
|
|
Suggested-by: Daniel Golle <daniel@makrotopia.org>
|
|
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
---
|
|
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
@@ -3989,9 +3989,12 @@ static void rt2800_config_channel(struct
|
|
rt2800_bbp_write(rt2x00dev, 195, 141);
|
|
rt2800_bbp_write(rt2x00dev, 196, reg);
|
|
|
|
- /* AGC init */
|
|
- reg = rf->channel <= 14 ? 0x1c : 0x24;
|
|
- reg += 2 * rt2x00dev->lna_gain;
|
|
+ /* AGC init.
|
|
+ * Despite the vendor driver using different values here for
|
|
+ * RT6352 chip, we use 0x1c for now. This may have to be changed
|
|
+ * once TSSI got implemented.
|
|
+ */
|
|
+ reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2*rt2x00dev->lna_gain;
|
|
rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
|
|
|
|
rt2800_iq_calibrate(rt2x00dev, rf->channel);
|