Page MenuHomeFreeBSD

rtwn: import rS289758 (replace hardcoded rate indices with their names)
ClosedPublic

Authored by avos on Jan 8 2016, 10:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 25 2024, 10:45 PM
Unknown Object (File)
Apr 22 2024, 8:49 PM
Unknown Object (File)
Feb 29 2024, 8:05 AM
Unknown Object (File)
Feb 26 2024, 1:31 AM
Unknown Object (File)
Jan 9 2024, 5:15 PM
Unknown Object (File)
Dec 24 2023, 6:36 PM
Unknown Object (File)
Dec 20 2023, 1:27 AM
Unknown Object (File)
Sep 24 2023, 8:35 PM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avos retitled this revision from to rtwn: import rS289758 (replace hardcoded rate indices with their names).
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.

I'd just break out the switch statement into a mapping function rather than using an array - because once we are doing 11n the rate mapping can be very big.

Everything else is fine!

sys/dev/rtwn/if_rtwn.c
1364 ↗(On Diff #12061)

I'd create a macro that is "RATE_IS_OFDM" and "RATE_IS_CCK", and use those.

That way things like 11n won't be .. as confusing.

but we can do that later!

1508 ↗(On Diff #12061)

You should make these a function. Once we get to 11n the rate values will be much crazier.

So just create a pair of mapping functions that do the case bits.

sys/dev/rtwn/if_rtwn.c
1508 ↗(On Diff #12061)

There are no other places where this array may be used (rtwn_ra_init() should use rate2ridx() instead)

avos edited edge metadata.
  • Add rate2ridx() and utilize it in rtwn_ra_init().
  • Add RTWN_RATE_IS_CCK() / RTWN_RATE_IS_OFDM() macro.
  • Define indices for MCS0 and MCS15 rates.
avos marked an inline comment as done.Jan 11 2016, 6:20 AM
adrian edited edge metadata.

I'd just break out the switch statement into a mapping function rather than using an array - because once we are doing 11n the rate mapping can be very big.

Everything else is fine!

This revision is now accepted and ready to land.Jan 11 2016, 6:50 AM
This revision was automatically updated to reflect the committed changes.