Page MenuHomeFreeBSD

rtwn: correct TRXDMA_CTRL_QMAP mask for USB chips
Needs ReviewPublic

Authored by vexeduxr on Mon, Aug 24, 2:14 AM.
Tags
None
Referenced Files
F168693286: D59137.diff
Sat, Aug 29, 4:10 PM
Unknown Object (File)
Fri, Aug 28, 9:22 PM
Unknown Object (File)
Fri, Aug 28, 12:57 PM
Unknown Object (File)
Fri, Aug 28, 2:15 AM
Unknown Object (File)
Thu, Aug 27, 2:46 AM
Unknown Object (File)
Wed, Aug 26, 11:33 AM
Unknown Object (File)
Wed, Aug 26, 11:30 AM
Unknown Object (File)
Wed, Aug 26, 6:03 AM
Subscribers

Details

Reviewers
adrian
kevlo
avos
Group Reviewers
wireless
Summary

For USB chips, only the first three bits are preserved in the
TRXDMA_CTRL register.

Swap out rtwn_get_qmap for rtwn_set_qmap, which just writes the "QMAP"
value itself. This allows both the USB and PCI implementations to use
their own mask.

Tested on the RTL8723BU and the RTL8188EU.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76040
Build 72923: arc lint + arc unit

Event Timeline

I think defining R92C_TRXDMA_CTRL_QMAP_M differently depending on the header can cause a bit of confusion, but I didn't want to break the naming conventions...

Edit: Note that not clearing the extra bit doesn't seem to make a difference for the USB chips. So I'm okay with just leaving this as is too...

For convenience, the vendor drivers I checked:

rtl8192cu: https://github.com/pvaret/rtl8192cu-fixes/blob/e5c01a328d2a1/hal/rtl8192c/usb/usb_halinit.c#L855
rtl8192eu: https://github.com/Mange/rtl8192eu-linux-driver/blob/da21d44a40690/hal/rtl8192e/rtl8192e_hal_init.c#L3240
rtl8188eu: https://github.com/lwfinger/rtl8188eu/blob/f5d1c8df2e2d8/hal/usb_halinit.c#L224
rtl8812au: https://github.com/aircrack-ng/rtl8812au/blob/734485506a30d/hal/rtl8812a/usb/usb_halinit.c#L618
rtl8821au: https://github.com/morrownr/8821au-20210708/blob/623d08cb49ba4/hal/rtl8812a/usb/usb_halinit.c#L606