Page MenuHomeFreeBSD

net80211: change ieee80211_ratectl_rate() to not return a rix
ClosedPublic

Authored by adrian on Jan 23 2025, 2:35 AM.
Referenced Files
F114372591: D48603.id149732.diff
Fri, Apr 11, 7:55 PM
Unknown Object (File)
Wed, Apr 9, 6:08 PM
Unknown Object (File)
Fri, Apr 4, 11:45 PM
Unknown Object (File)
Thu, Mar 27, 6:21 PM
Unknown Object (File)
Mar 12 2025, 1:02 PM
Unknown Object (File)
Mar 11 2025, 5:58 PM
Unknown Object (File)
Mar 10 2025, 7:43 AM
Unknown Object (File)
Mar 1 2025, 10:44 PM

Details

Summary

There are only a few places where the returned rix is used:

  • linuxkpi - logging
  • bwi/bwn - used for finding a fallback rate to choose, which honestly should be returned by the ratectl API
  • iwm - building the rateset to program into firmware

Everyone else uses the dot11rate value in ni->ni_txnode.

This is a precursor for VHT and later rate support; where currently
there aren't rate tables in ieee80211_phy.c for VHT and later
rates.

Although it's likely doable to add tables for VHT, 11ax and MU-OFDMA
(HE) rates are sufficiently larger/different to just not fit in the
current scheme without more refactoring.

Diff Detail

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

Event Timeline

thj added inline comments.
sys/compat/linuxkpi/common/src/linux_80211.c
6948

This cast isn't needed

sys/compat/linuxkpi/common/src/linux_80211.c
6948

I'm so used to using/building in envs where you get a warning if you don't handle the return value. :-) Lemme go make sure that doesn't happen here on all of our branches and then I'll go remove em all.

bz requested changes to this revision.Jan 26 2025, 10:31 PM
bz added a subscriber: bz.
bz added inline comments.
sys/compat/linuxkpi/common/src/linux_80211.c
6948

remove it!

sys/dev/iwm/if_iwm.c
4582

Please declare within proper scope or pass the result from the function to the next w/o variable. A dot11rate is an uint8_t anyway

sys/net80211/ieee80211_ratectl.h
135

Cast not needed.

This revision now requires changes to proceed.Jan 26 2025, 10:31 PM

updated, please re-review!

gaivn reported iwm being broken and .. well, now i know why.

rix here isn't index into the rate table, it's an index into the rateset/ht_rateset
in the node.

I'm happy with the ieee80211 and driver changes, but bz@ should respond for the linuxkpi as he has all the experience there.

This revision is now accepted and ready to land.Feb 15 2025, 12:16 PM