untested, compilable, noop
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
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) |
- 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.
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!