diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-03-09 22:48:08 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 19:31:42 -0400 |
commit | aa776721b472e343a8db7f3c0673b1fa24e6c7f7 (patch) | |
tree | b3bb79f05cdd729696877783bb25da7c3a7dd3c0 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | fd3c91c5e57eef8db71cf52e2473832c330bf5db (diff) |
rt2x00: Fix basic rate initialization
The basic rate which is configured in the register
should not match all supported rates, but only the _basic_ rates.
Fix this by adding a new flag to the rt2x00_rate structure
and whenever the mode is changed, loop over all available rates
for that band to get the basic rate mask.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index d6b12789ba77..eb2d21c4e8e9 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -766,75 +766,75 @@ EXPORT_SYMBOL_GPL(rt2x00lib_write_tx_desc); */ const struct rt2x00_rate rt2x00_supported_rates[12] = { { - .flags = DEV_RATE_CCK, + .flags = DEV_RATE_CCK | DEV_RATE_BASIC, .bitrate = 10, - .ratemask = DEV_RATEMASK_1MB, + .ratemask = BIT(0), .plcp = 0x00, }, { - .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, + .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE | DEV_RATE_BASIC, .bitrate = 20, - .ratemask = DEV_RATEMASK_2MB, + .ratemask = BIT(1), .plcp = 0x01, }, { - .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, + .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE | DEV_RATE_BASIC, .bitrate = 55, - .ratemask = DEV_RATEMASK_5_5MB, + .ratemask = BIT(2), .plcp = 0x02, }, { - .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, + .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE | DEV_RATE_BASIC, .bitrate = 110, - .ratemask = DEV_RATEMASK_11MB, + .ratemask = BIT(3), .plcp = 0x03, }, { - .flags = DEV_RATE_OFDM, + .flags = DEV_RATE_OFDM | DEV_RATE_BASIC, .bitrate = 60, - .ratemask = DEV_RATEMASK_6MB, + .ratemask = BIT(4), .plcp = 0x0b, }, { .flags = DEV_RATE_OFDM, .bitrate = 90, - .ratemask = DEV_RATEMASK_9MB, + .ratemask = BIT(5), .plcp = 0x0f, }, { - .flags = DEV_RATE_OFDM, + .flags = DEV_RATE_OFDM | DEV_RATE_BASIC, .bitrate = 120, - .ratemask = DEV_RATEMASK_12MB, + .ratemask = BIT(6), .plcp = 0x0a, }, { .flags = DEV_RATE_OFDM, .bitrate = 180, - .ratemask = DEV_RATEMASK_18MB, + .ratemask = BIT(7), .plcp = 0x0e, }, { - .flags = DEV_RATE_OFDM, + .flags = DEV_RATE_OFDM | DEV_RATE_BASIC, .bitrate = 240, - .ratemask = DEV_RATEMASK_24MB, + .ratemask = BIT(8), .plcp = 0x09, }, { .flags = DEV_RATE_OFDM, .bitrate = 360, - .ratemask = DEV_RATEMASK_36MB, + .ratemask = BIT(9), .plcp = 0x0d, }, { .flags = DEV_RATE_OFDM, .bitrate = 480, - .ratemask = DEV_RATEMASK_48MB, + .ratemask = BIT(10), .plcp = 0x08, }, { .flags = DEV_RATE_OFDM, .bitrate = 540, - .ratemask = DEV_RATEMASK_54MB, + .ratemask = BIT(11), .plcp = 0x0c, }, }; |