Page MenuHomeFreeBSD

rtwn: add tx power training for RTL8812/RTL8821
ClosedPublic

Authored by adrian on Dec 7 2024, 3:49 PM.
Referenced Files
Unknown Object (File)
Thu, Dec 26, 4:22 AM
Unknown Object (File)
Thu, Dec 26, 3:25 AM
Unknown Object (File)
Thu, Dec 26, 3:22 AM
Unknown Object (File)
Thu, Dec 26, 12:53 AM
Unknown Object (File)
Fri, Dec 20, 8:39 PM
Unknown Object (File)
Fri, Dec 20, 4:35 AM
Unknown Object (File)
Dec 9 2024, 6:43 AM
Subscribers

Details

Summary

This apparently kicks off TX power level self-calibration, which
can't hurt.

Locally tested:

  • RTL8812AU, STA
  • RTL8821AU, STA

Obtained from: Linux rtw88

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

adrian requested review of this revision.Dec 7 2024, 3:49 PM
sys/dev/rtwn/rtl8812a/r12a_chan.c
194

So there are 3 writes? Why the loop?

sys/dev/rtwn/rtl8812a/r12a_chan.c
194

For now i'm just trying to mirror what the BSD licenced rtw88 code is doing - save the underflow, which I addressed but their driver doesn't.

Once I know it's all working OK, we should absolutely clean it up before landing. It could be done with three lines and some ternary operators.

sys/dev/rtwn/rtl8812a/r12a_chan.c
194

ok, the write_data |= each loop w/o resetting between loops. Is that cool?

This revision is now accepted and ready to land.Mon, Dec 16, 1:46 PM
bz added inline comments.
sys/dev/rtwn/rtl8812a/r12a_chan.c
194

I think I'd love to know where the Linux rtw88 code is doing this? Do you have file:function -- at least we could then locally fix the underflow problem in rtw88 as well.

I'm talking with the rtw88 upstream maintainers on getting it fixed upstream too!

I'm talking with the rtw88 upstream maintainers on getting it fixed upstream too!

You did NOT answer my question. You do understand that we are shipping this driver and try to maintain it. file:function please.

It's in rtw88xx.c:rtw88xxa_tx_power_training(), line 1609 in my checkout.

It's in rtw88xx.c:rtw88xxa_tx_power_training(), line 1609 in my checkout.

Thanks. That 6.13-RCx code. If 8812 and 8821 are going to be integrated there this is going to be fun as I'll import that code along with rtw88.