Page MenuHomeFreeBSD

rtwn: explicitly configure RTS based on basic rates
ClosedPublic

Authored by adrian on Dec 19 2024, 2:21 AM.
Referenced Files
Unknown Object (File)
Sun, Jan 26, 12:15 AM
Unknown Object (File)
Sat, Jan 25, 11:08 PM
Unknown Object (File)
Tue, Jan 14, 6:05 AM
Unknown Object (File)
Fri, Jan 10, 10:31 AM
Unknown Object (File)
Dec 26 2024, 2:32 PM
Unknown Object (File)
Dec 26 2024, 3:30 AM
Unknown Object (File)
Dec 25 2024, 1:18 PM
Unknown Object (File)
Dec 25 2024, 11:02 AM
Subscribers

Details

Summary

The NIC/firmware initialises the initial RTS/CTS rate to something
high, like OFDM48. That's not going to be very reliable.

It's not a problem right now as we program in the RTS/CTS value
to use in the TX descriptor setup path based on the control rate
for the given frame TX rate, and like the INIDATA/driver rate
stuff in the TX descriptor, the TX descriptor RTS/CTS rate overrides
the INIRTS rate.

However when it's time to flip on firmware based rate control,
the initial rate needs to not be OFDM48. Yes, the firmware and
hardware does have some rate retry schedule for RTS/CTS frames,
but there's no point in wasting short retries trying to do OFDM48
based RTS/CTS setup.

Add some warning logging if there are no basic or RTS/CTS rates
available, and leave things at default. If this happens in
production for someone then it would be good to know and what
the rate mask was.

Locally tested:

  • RTL8192CU, STA mode (with/without firmware rate control enabled locally)

Diff Detail

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

Event Timeline

bz added a subscriber: bz.
bz added inline comments.
sys/dev/rtwn/if_rtwn_rx.c
164

That could be a single line of arguments and save some vertical space.

This revision is now accepted and ready to land.Dec 20 2024, 7:26 AM
  • fix fls() offset bug, it starts at 1, not 0
  • allow more CCK rates and OFDM up to 24, after consultation with other wifi community people
This revision now requires review to proceed.Dec 24 2024, 5:32 PM

This also looks good.

sys/dev/rtwn/if_rtwn_rx.c
154

Can we have symbolic constants for this mask instead of a comment?

bz requested changes to this revision.Tue, Jan 7, 7:06 PM

There are pending requests fr changes from @fuz and me here.

This revision now requires changes to proceed.Tue, Jan 7, 7:06 PM
This revision was not accepted when it landed; it landed in state Needs Review.Tue, Jan 14, 4:35 AM
This revision was automatically updated to reflect the committed changes.