3fcf231870107ee61096a655fb92b965857253ec
[openwrt/staging/hauke.git] /
1 From patchwork Thu Aug 29 11:29:59 2019
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 X-Patchwork-Submitter: Stanislaw Gruszka <sgruszka@redhat.com>
6 X-Patchwork-Id: 11121089
7 X-Patchwork-Delegate: kvalo@adurom.com
8 From: Stanislaw Gruszka <sgruszka@redhat.com>
9 To: linux-wireless@vger.kernel.org
10 Subject: [PATCH 5.3] Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band"
11 Date: Thu, 29 Aug 2019 13:29:59 +0200
12 Message-Id: <1567078199-3645-1-git-send-email-sgruszka@redhat.com>
13 Sender: linux-wireless-owner@vger.kernel.org
14 List-ID: <linux-wireless.vger.kernel.org>
15 X-Mailing-List: linux-wireless@vger.kernel.org
16
17 This reverts commit 9ad3b55654455258a9463384edb40077439d879f.
18
19 As reported by Sergey:
20
21 "I got some problem after upgrade kernel to 5.2 version (debian testing
22 linux-image-5.2.0-2-amd64). 5Ghz client stopped to see AP.
23 Some tests with 1metre distance between client-AP: 2.4Ghz -22dBm, for
24 5Ghz - 53dBm !, for longer distance (8m + walls) 2.4 - 61dBm, 5Ghz not
25 visible."
26
27 It was identified that rx signal level degradation was caused by
28 9ad3b5565445 ("rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band").
29 So revert this commit.
30
31 Cc: <stable@vger.kernel.org> # v5.1+
32 Reported-and-tested-by: Sergey Maranchuk <slav0nic0@gmail.com>
33 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
34 ---
35 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 18 ++++++------------
36 1 file changed, 6 insertions(+), 12 deletions(-)
37
38 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
39 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
40 @@ -4242,24 +4242,18 @@ static void rt2800_config_channel(struct
41 switch (rt2x00dev->default_ant.rx_chain_num) {
42 case 3:
43 /* Turn on tertiary LNAs */
44 - rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN,
45 - rf->channel > 14);
46 - rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN,
47 - rf->channel <= 14);
48 + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN, 1);
49 + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN, 1);
50 /* fall-through */
51 case 2:
52 /* Turn on secondary LNAs */
53 - rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN,
54 - rf->channel > 14);
55 - rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN,
56 - rf->channel <= 14);
57 + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN, 1);
58 + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN, 1);
59 /* fall-through */
60 case 1:
61 /* Turn on primary LNAs */
62 - rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN,
63 - rf->channel > 14);
64 - rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN,
65 - rf->channel <= 14);
66 + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN, 1);
67 + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G0_EN, 1);
68 break;
69 }
70