linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration
@ 2023-11-09  4:38 Shiji Yang
  2023-11-09 16:38 ` Stanislaw Gruszka
  2023-11-14 10:18 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Shiji Yang @ 2023-11-09  4:38 UTC (permalink / raw)
  To: linux-wireless; +Cc: Stanislaw Gruszka, Kalle Valo, linux-kernel, Shiji Yang

Refer to Mediatek vendor driver RxDCOC_Calibration() function, when
performing gainfreeze calibration, we should write register 140
instead of 141. This fix can reduce the total calibration time from
6 seconds to 1 second.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---

Hi!

I found another small fix. Ref:
https://github.com/hanwckf/rt-n56u/blob/23387b278a7cf728748af606760758f5d59d1451/trunk/proprietary/rt_wifi/rtsoc/2.7.X.X/rt2860v2/common/cmm_rf_cal.c#L2464-L2470

This link may not be a permanent link, so it is not included in the
commit message.

Regards,
Shiji Yang


 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index 7b13c176d..3a52a04d3 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8710,7 +8710,7 @@ static void rt2800_rxdcoc_calibration(struct rt2x00_dev *rt2x00dev)
 	rt2800_rfcsr_write_bank(rt2x00dev, 5, 4, saverfb5r4);
 	rt2800_rfcsr_write_bank(rt2x00dev, 7, 4, saverfb7r4);
 
-	rt2800_bbp_write(rt2x00dev, 158, 141);
+	rt2800_bbp_write(rt2x00dev, 158, 140);
 	bbpreg = rt2800_bbp_read(rt2x00dev, 159);
 	bbpreg = bbpreg & (~0x40);
 	rt2800_bbp_write(rt2x00dev, 159, bbpreg);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration
  2023-11-09  4:38 [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration Shiji Yang
@ 2023-11-09 16:38 ` Stanislaw Gruszka
  2023-11-14 10:18 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Stanislaw Gruszka @ 2023-11-09 16:38 UTC (permalink / raw)
  To: Shiji Yang; +Cc: linux-wireless, Kalle Valo, linux-kernel

On Thu, Nov 09, 2023 at 12:38:51PM +0800, Shiji Yang wrote:
> Refer to Mediatek vendor driver RxDCOC_Calibration() function, when
> performing gainfreeze calibration, we should write register 140
> instead of 141. This fix can reduce the total calibration time from
> 6 seconds to 1 second.
> 
> Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration
  2023-11-09  4:38 [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration Shiji Yang
  2023-11-09 16:38 ` Stanislaw Gruszka
@ 2023-11-14 10:18 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-11-14 10:18 UTC (permalink / raw)
  To: Shiji Yang; +Cc: linux-wireless, Stanislaw Gruszka, linux-kernel, Shiji Yang

Shiji Yang <yangshiji66@outlook.com> wrote:

> Refer to Mediatek vendor driver RxDCOC_Calibration() function, when
> performing gainfreeze calibration, we should write register 140
> instead of 141. This fix can reduce the total calibration time from
> 6 seconds to 1 second.
> 
> Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

Patch applied to wireless-next.git, thanks.

50da74e1e8b6 wifi: rt2x00: correct wrong BBP register in RxDCOC calibration

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/TYAP286MB0315B13B89DF57B6B27BB854BCAFA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-14 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-09  4:38 [PATCH] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration Shiji Yang
2023-11-09 16:38 ` Stanislaw Gruszka
2023-11-14 10:18 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).