6b27f6a7055e489c1f00b87a8a7d5c5bcb229b05
[openwrt/staging/rmilecki.git] /
1 From patchwork Sat Sep 17 20:28:29 2022
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
6 X-Patchwork-Id: 12979250
7 X-Patchwork-Delegate: kvalo@adurom.com
8 Return-Path: <linux-wireless-owner@kernel.org>
9 Date: Sat, 17 Sep 2022 21:28:29 +0100
10 From: Daniel Golle <daniel@makrotopia.org>
11 To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>,
12 Helmut Schaa <helmut.schaa@googlemail.com>
13 Cc: Kalle Valo <kvalo@kernel.org>,
14 "David S. Miller" <davem@davemloft.net>,
15 Eric Dumazet <edumazet@google.com>,
16 Jakub Kicinski <kuba@kernel.org>,
17 Paolo Abeni <pabeni@redhat.com>,
18 Johannes Berg <johannes.berg@intel.com>
19 Subject: [PATCH v3 09/16] rt2x00: don't run Rt5592 IQ calibration on MT7620
20 Message-ID:
21 <31a1c34ddbd296b82f38c18c9ae7339059215fdc.1663445157.git.daniel@makrotopia.org>
22 References: <cover.1663445157.git.daniel@makrotopia.org>
23 MIME-Version: 1.0
24 Content-Disposition: inline
25 In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org>
26 Precedence: bulk
27 List-ID: <linux-wireless.vger.kernel.org>
28 X-Mailing-List: linux-wireless@vger.kernel.org
29
30 The function rt2800_iq_calibrate is intended for Rt5592 only.
31 Don't call it for MT7620 which has it's own calibration functions.
32
33 Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
34 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
35 ---
36 v2: test for RT5592 instead of !RT6352
37
38 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++-
39 1 file changed, 2 insertions(+), 1 deletion(-)
40
41 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
42 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
43 @@ -4398,7 +4398,8 @@ static void rt2800_config_channel(struct
44 reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2*rt2x00dev->lna_gain;
45 rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
46
47 - rt2800_iq_calibrate(rt2x00dev, rf->channel);
48 + if (rt2x00_rt(rt2x00dev, RT5592))
49 + rt2800_iq_calibrate(rt2x00dev, rf->channel);
50 }
51
52 if (rt2x00_rt(rt2x00dev, RT6352)) {