Skip to content

Commit a806a81

Browse files
anarsoulPing-Ke Shih
authored andcommitted
wifi: rtw88: 8703b: Fix RX/TX issues
Fix 3 typos in 8703b driver. 2 typos in calibration routines are not fatal and do not seem to have any impact, just fix them to match vendor driver. However the last one in rtw8703b_set_channel_bb() clears too many bits in REG_OFDM0_TX_PSD_NOISE, causing TX and RX issues (neither rate goes above MCS0-MCS1). Vendor driver clears only 2 most significant bits. With the last typo fixed, the driver is able to reach MCS7 on Pinebook Cc: [email protected] Fixes: 9bb762b ("wifi: rtw88: Add definitions for 8703b chip") Signed-off-by: Vasily Khoruzhick <[email protected]> Acked-by: Ping-Ke Shih <[email protected]> Tested-by: Fiona Klute <[email protected]> Tested-by: Andrey Skvortsov <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 5ad4839 commit a806a81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/wireless/realtek/rtw88/rtw8703b.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ static void rtw8703b_set_channel_bb(struct rtw_dev *rtwdev, u8 channel, u8 bw,
903903
rtw_write32_mask(rtwdev, REG_FPGA0_RFMOD, BIT_MASK_RFMOD, 0x0);
904904
rtw_write32_mask(rtwdev, REG_FPGA1_RFMOD, BIT_MASK_RFMOD, 0x0);
905905
rtw_write32_mask(rtwdev, REG_OFDM0_TX_PSD_NOISE,
906-
GENMASK(31, 20), 0x0);
906+
GENMASK(31, 30), 0x0);
907907
rtw_write32(rtwdev, REG_BBRX_DFIR, 0x4A880000);
908908
rtw_write32(rtwdev, REG_OFDM0_A_TX_AFE, 0x19F60000);
909909
break;
@@ -1198,9 +1198,9 @@ static u8 rtw8703b_iqk_rx_path(struct rtw_dev *rtwdev,
11981198
rtw_write32(rtwdev, REG_RXIQK_TONE_A_11N, 0x38008c1c);
11991199
rtw_write32(rtwdev, REG_TX_IQK_TONE_B, 0x38008c1c);
12001200
rtw_write32(rtwdev, REG_RX_IQK_TONE_B, 0x38008c1c);
1201-
rtw_write32(rtwdev, REG_TXIQK_PI_A_11N, 0x8216000f);
1201+
rtw_write32(rtwdev, REG_TXIQK_PI_A_11N, 0x8214030f);
12021202
rtw_write32(rtwdev, REG_RXIQK_PI_A_11N, 0x28110000);
1203-
rtw_write32(rtwdev, REG_TXIQK_PI_B, 0x28110000);
1203+
rtw_write32(rtwdev, REG_TXIQK_PI_B, 0x82110000);
12041204
rtw_write32(rtwdev, REG_RXIQK_PI_B, 0x28110000);
12051205

12061206
/* LOK setting */
@@ -1372,7 +1372,7 @@ void rtw8703b_iqk_fill_a_matrix(struct rtw_dev *rtwdev, const s32 result[])
13721372
return;
13731373

13741374
tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_X, result[IQK_S1_RX_X]);
1375-
tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_Y1, result[IQK_S1_RX_X]);
1375+
tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_Y1, result[IQK_S1_RX_Y]);
13761376
rtw_write32(rtwdev, REG_A_RXIQI, tmp_rx_iqi);
13771377
rtw_write32_mask(rtwdev, REG_RXIQK_MATRIX_LSB_11N, BIT_MASK_RXIQ_S1_Y2,
13781378
BIT_SET_RXIQ_S1_Y2(result[IQK_S1_RX_Y]));

0 commit comments

Comments
 (0)