91ed123c015ae365e2f1544232ff8e0b3f9e530c
[openwrt/staging/ansuel.git] /
1 From: Shiji Yang <yangshiji66@outlook.com>
2 Date: Thu, 9 Nov 2023 12:01:18 +0800
3 Subject: [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC
4 calibration
5
6 Refer to Mediatek vendor driver RxDCOC_Calibration() function, when
7 performing gainfreeze calibration, we should write register 140
8 instead of 141. This fix can reduce the total calibration time from
9 6 seconds to 1 second.
10
11 Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
12 ---
13 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
17 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
18 @@ -8692,7 +8692,7 @@ static void rt2800_rxdcoc_calibration(st
19 rfvalue |= 0x03;
20 rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, rfvalue);
21
22 - rt2800_bbp_write(rt2x00dev, 158, 141);
23 + rt2800_bbp_write(rt2x00dev, 158, 140);
24 bbpreg = rt2800_bbp_read(rt2x00dev, 159);
25 bbpreg |= 0x10;
26 rt2800_bbp_write(rt2x00dev, 159, bbpreg);