Page MenuHomeFreeBSD

urtwn(4): remove duplicate initialization of some registers from urtwn_mac_init()
AbandonedPublic

Authored by avos on Oct 8 2015, 12:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 3, 10:30 PM
Unknown Object (File)
Sun, Nov 30, 4:07 PM
Unknown Object (File)
Sat, Nov 22, 2:24 PM
Unknown Object (File)
Thu, Nov 20, 12:59 AM
Unknown Object (File)
Oct 31 2025, 5:25 AM
Unknown Object (File)
Oct 11 2025, 10:51 PM
Unknown Object (File)
Sep 7 2025, 8:46 AM
Unknown Object (File)
Aug 17 2025, 7:35 PM
Subscribers

Details

Reviewers
kevlo
adrian
Test Plan

Tested with RTL8188EU, STA/MONITOR modes.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

avos retitled this revision from to urtwn(4): remove duplicate initialization of some registers from urtwn_mac_init().
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added reviewers: adrian, kevlo.
avos set the repository for this revision to rS FreeBSD src repository - subversion.

The vendor driver doesn't set R92C_BCN_MAX_ERR for for RTL8188EUS/RTL8188ETV
and I don't see duplicate initialization of some registers.
Could you point me out? Thanks.

sys/dev/usb/wlan/if_urtwnreg.h
1101

R92C_BCN_MAX_ERR (0x55d)

1126

R92C_BCN_MAX_ERR (0x55d)

sys/dev/usb/wlan/if_urtwnreg.h
1092

and here (R92C_AGGLEN_LMT (0x458))

1115

Also, R92C_AGGLEN_LMT (0x458) is overriden here; however I don't know to do with it (remove it from here? or from urtwn_init()?)

Not sure I like this. Part of the reason is we don't know much about
the internal workings of the chip. As for initializations of MAC/BB/RF,
you can see the vendor driver does set those registers.
The device may not work properly unless they are set up correctly.

In D3845#79972, @kevlo wrote:

Not sure I like this. Part of the reason is we don't know much about
the internal workings of the chip. As for initializations of MAC/BB/RF,
you can see the vendor driver does set those registers.

Can you specify this place? (the vendor driver is rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz, am I right?)

The device may not work properly unless they are set up correctly.

I have not seen any regressions with this patch + current behavior corrupts RX filter.

In D3845#80121, @s3erios_gmail.com wrote:
In D3845#79972, @kevlo wrote:

Not sure I like this. Part of the reason is we don't know much about
the internal workings of the chip. As for initializations of MAC/BB/RF,
you can see the vendor driver does set those registers.

Can you specify this place? (the vendor driver is rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz, am I right?)

Yes, it's for RTL8188CU/RTL8192CU. For RTL8188EUS/RTL8188ETV, the driver
is RTL8188EUS_RTL8189ES_linux_v4.1.8_9499.20131104.zip.

The device may not work properly unless they are set up correctly.

I have not seen any regressions with this patch + current behavior corrupts RX filter.

avos edited edge metadata.

Remove EDCA_VI_PARAM modification; vendor driver sets this value after common initialization procedure.

adrian edited edge metadata.

I'm okay with this as long as kevin is.

I'll go and test it all next week (after you commit it) and report back issues.

just note - duplicate registers in configuration writing doesn't mean it's duplicate work - sometimes these chips are buggy or have .. interesting behaviour that requires multiple register reads/writes in order to advance some internal state engine.

This revision is now accepted and ready to land.Oct 26 2015, 11:54 AM