rt2x00: Rate structure overhaul

Recent changes to the rate structure registration broke rt2x00,
the hw_value was reduced from 32bits to 16bits while rt2x00 used
the full 32bits. However the way rt2x00 used the value was inflexible
and needed to be changed anyway.

This patch creates a array containing information for each rate,
the hw_value passed to mac80211 is the index value for that array
including a field to indicate if short preamble should be enabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Ivo van Doorn
2008-02-03 15:50:40 +01:00
committed by John W. Linville
parent e71c9fac31
commit 70e2fed4ec
4 changed files with 153 additions and 140 deletions

View File

@@ -246,9 +246,7 @@ config:
band = &rt2x00dev->bands[conf->channel->band];
rate = &band->bitrates[band->n_bitrates - 1];
libconf.basic_rates =
DEVICE_GET_RATE_FIELD(rate->hw_value, RATEMASK) & DEV_BASIC_RATEMASK;
libconf.basic_rates = rt2x00_get_rate(rate->hw_value)->ratemask;
}
if (flags & CONFIG_UPDATE_CHANNEL) {