]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620
authorDaniel Golle <daniel@makrotopia.org>
Sat, 17 Sep 2022 20:28:29 +0000 (21:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:15:46 +0000 (13:15 +0200)
[ Upstream commit d3aad83d05aec0cfd7670cf0028f2ad4b81de92e ]

The function rt2800_iq_calibrate is intended for Rt5592 only.
Don't call it for MT7620 which has it's own calibration functions.

Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/31a1c34ddbd296b82f38c18c9ae7339059215fdc.1663445157.git.daniel@makrotopia.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c

index 9fc6f1615343773e56a1eb9f264970e7f5f791fa..079611ff8defb2ea34d65d5c74adbdaaa04fc391 100644 (file)
@@ -3386,7 +3386,8 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
                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);
+               if (rt2x00_rt(rt2x00dev, RT5592))
+                       rt2800_iq_calibrate(rt2x00dev, rf->channel);
        }
 
        rt2800_bbp_read(rt2x00dev, 4, &bbp);