glibc: update to latest 2.27 commit (BZ #18035)
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / rt2x00 / 019-rt2800-comment-and-simplify-AGC-init-for-RT6352.patch
1 From c7ff1bfeaf1ca69e3e401be211b55d1738d0c5fc Mon Sep 17 00:00:00 2001
2 From: Stanislaw Gruszka <sgruszka@redhat.com>
3 Date: Wed, 13 Feb 2019 11:09:16 +0100
4 Subject: [PATCH 19/28] rt2800: comment and simplify AGC init for RT6352
5
6 We do not need separate lines for calculating register values.
7 Also add comment that value is different than in vendor driver.
8
9 Suggested-by: Daniel Golle <daniel@makrotopia.org>
10 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
11 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
12 ---
13 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++++++---
14 1 file changed, 6 insertions(+), 3 deletions(-)
15
16 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
17 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
18 @@ -3989,9 +3989,12 @@ static void rt2800_config_channel(struct
19 rt2800_bbp_write(rt2x00dev, 195, 141);
20 rt2800_bbp_write(rt2x00dev, 196, reg);
21
22 - /* AGC init */
23 - reg = rf->channel <= 14 ? 0x1c : 0x24;
24 - reg += 2 * rt2x00dev->lna_gain;
25 + /* AGC init.
26 + * Despite the vendor driver using different values here for
27 + * RT6352 chip, we use 0x1c for now. This may have to be changed
28 + * once TSSI got implemented.
29 + */
30 + reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2*rt2x00dev->lna_gain;
31 rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
32
33 rt2800_iq_calibrate(rt2x00dev, rf->channel);