Page MenuHomeFreeBSD

rtwn: refactor out the r92c path protection decision / configuration
ClosedPublic

Authored by adrian on Dec 19 2024, 3:40 AM.
Referenced Files
F108470957: D48142.diff
Sat, Jan 25, 5:32 AM
Unknown Object (File)
Thu, Jan 16, 7:38 AM
Unknown Object (File)
Tue, Jan 14, 6:37 AM
Unknown Object (File)
Mon, Jan 6, 9:26 AM
Unknown Object (File)
Fri, Dec 27, 9:46 AM
Unknown Object (File)
Thu, Dec 26, 7:25 AM
Unknown Object (File)
Dec 26 2024, 2:37 AM
Unknown Object (File)
Dec 26 2024, 2:19 AM
Subscribers

Details

Summary
  • refactor out the r92c path protection (RTS/CTS) decision
  • update the configuration code to ignore setting RTS/CTS for now if firmware rate control is enabled.

This works on RTL8192CU both with firmware rate control and driver
rate control. However, there is no RTS/CTS for firmware rate control -
the awareness will need to be added in a subsequent commit.

Locally tested:

  • RTL8192CU, STA - firmware and net80211 rate control

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 61257
Build 58141: arc lint + arc unit

Event Timeline

Implement rts/cts programming w/ firmware rate control config.

(This isn't enough by itself; the logic that SELECTS whether to do
rts/cts still needs updating.)

update with working protection mode logic for firmware rate control

fuz added inline comments.
sys/dev/rtwn/rtl8192c/r92c_tx.c
114–120

Avoid code duplication of the common ridx assignment.

312

Booleans should not be compared against true/false, use boolean operators instead.

324

This seems wrong. prot is unconditionally overwritten at this point. What is the point of the previous if statements? Is perhaps an else missing?

339

The control flow of this function is confusing and not obvious. Could you perhaps use an early return pattern instead of repeatedly assigning to prot?

bz requested changes to this revision.Tue, Jan 7, 6:58 PM
bz added a subscriber: bz.

@adrian, do you want to update according @fuz 's requests?

sys/dev/rtwn/rtl8192c/r92c_tx.c
114–120

? : go at he end of the line ; also there is an extra ; in there somewhere...

This revision now requires changes to proceed.Tue, Jan 7, 6:58 PM
sys/dev/rtwn/rtl8192c/r92c_tx.c
324

This seems wrong. prot is unconditionally overwritten at this point. What is the point of the previous if statements? Is perhaps an else missing?

oops, left in debugging. :-) I'll remove it.

339

I can't because the last check (rts/cts threshold) needs to override the others.

adrian marked 3 inline comments as done.

oops, this one too

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Jan 14, 4:36 AM
This revision was automatically updated to reflect the committed changes.