diff mbox series

[08/15] rt2x00: don't run Rt5592 IQ calibration on MT7620

Message ID YyUBf3hPNZMgGFM6@makrotopia.org (mailing list archive)
State Superseded
Delegated to: Kalle Valo
Headers show
Series [RESEND,01/15] rt2x00: define RF5592 in init_eeprom routine | expand

Commit Message

Daniel Golle Sept. 16, 2022, 11:06 p.m. UTC
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>
---
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stanislaw Gruszka Sept. 17, 2022, 12:40 p.m. UTC | #1
On Sat, Sep 17, 2022 at 12:06:39AM +0100, Daniel Golle wrote:
> 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>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> index 6e5a72cf2a81a0..55a46e27b59875 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> @@ -4365,7 +4365,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, RT6352))

Since is needed for rt5992 that check would be more appropriate.
diff mbox series

Patch

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 6e5a72cf2a81a0..55a46e27b59875 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -4365,7 +4365,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, RT6352))
+			rt2800_iq_calibrate(rt2x00dev, rf->channel);
 	}
 
 	if (rt2x00_rt(rt2x00dev, RT6352)) {