c84b5a140840e47aaef21071e5a0f5c286d624d7
[openwrt/staging/blogic.git] /
1 From 186f2432741f6d28d86ff723ac7830446affddfc Mon Sep 17 00:00:00 2001
2 From: Shiji Yang <yangshiji66@outlook.com>
3 Date: Sat, 5 Aug 2023 17:17:28 +0800
4 Subject: wifi: rt2x00: correct MAC_SYS_CTRL register RX mask in R-Calibration
5
6 For MAC_SYS_CTRL register, Bit[2] controls MAC_TX_EN and Bit[3]
7 controls MAC_RX_EN (Bit index starts from 0). Therefore, 0x08 is
8 the correct mask for RX.
9
10 Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
11 Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
12 Signed-off-by: Kalle Valo <kvalo@kernel.org>
13 Link: https://lore.kernel.org/r/TYAP286MB03150B571B67B896A504AC34BC0EA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
14 ---
15 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
19 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
20 @@ -8561,7 +8561,7 @@ static void rt2800_r_calibration(struct
21 rt2x00_warn(rt2x00dev, "Wait MAC Tx Status to MAX !!!\n");
22
23 maccfg = rt2800_register_read(rt2x00dev, MAC_SYS_CTRL);
24 - maccfg &= (~0x04);
25 + maccfg &= (~0x08);
26 rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, maccfg);
27
28 if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev, MAC_STATUS_CFG_BBP_RF_BUSY_RX)))