diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-01-21 09:13:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:09 -0500 |
commit | 881d948c23442173a011f1adcfe4c95bf7f27515 (patch) | |
tree | 3d7e6a4bf23b960cf45a4d2c5734578168ce0424 /drivers/net | |
parent | 369391db1aabd089cefaadaabb6d9fc82e78b0a7 (diff) |
wireless: restrict to 32 legacy rates
Since the standards only define 12 legacy rates, 32 is certainly
a sane upper limit and we don't need to use u64 everywhere. Add
sanity checking that no more than 32 rates are registered and
change the variables to u32 throughout.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 8bb6659c0b3f..675a73a98072 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -3398,7 +3398,7 @@ out_unlock_mutex: | |||
3398 | return err; | 3398 | return err; |
3399 | } | 3399 | } |
3400 | 3400 | ||
3401 | static void b43_update_basic_rates(struct b43_wldev *dev, u64 brates) | 3401 | static void b43_update_basic_rates(struct b43_wldev *dev, u32 brates) |
3402 | { | 3402 | { |
3403 | struct ieee80211_supported_band *sband = | 3403 | struct ieee80211_supported_band *sband = |
3404 | dev->wl->hw->wiphy->bands[b43_current_band(dev->wl)]; | 3404 | dev->wl->hw->wiphy->bands[b43_current_band(dev->wl)]; |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index fb996c27a19b..879edc786713 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -2650,7 +2650,7 @@ out_unlock_mutex: | |||
2650 | return err; | 2650 | return err; |
2651 | } | 2651 | } |
2652 | 2652 | ||
2653 | static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u64 brates) | 2653 | static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u32 brates) |
2654 | { | 2654 | { |
2655 | struct ieee80211_supported_band *sband = | 2655 | struct ieee80211_supported_band *sband = |
2656 | dev->wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | 2656 | dev->wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ]; |
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h index 64492feca9b2..94c3acd1fcaf 100644 --- a/drivers/net/wireless/p54/p54.h +++ b/drivers/net/wireless/p54/p54.h | |||
@@ -144,7 +144,7 @@ struct p54_common { | |||
144 | unsigned int output_power; | 144 | unsigned int output_power; |
145 | u32 tsf_low32; | 145 | u32 tsf_low32; |
146 | u32 tsf_high32; | 146 | u32 tsf_high32; |
147 | u64 basic_rate_mask; | 147 | u32 basic_rate_mask; |
148 | u16 wakeup_timer; | 148 | u16 wakeup_timer; |
149 | u16 aid; | 149 | u16 aid; |
150 | struct ieee80211_tx_queue_stats tx_stats[8]; | 150 | struct ieee80211_tx_queue_stats tx_stats[8]; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index cc56637e73b5..46918deceda1 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -396,7 +396,7 @@ struct rt2x00lib_erp { | |||
396 | int ack_timeout; | 396 | int ack_timeout; |
397 | int ack_consume_time; | 397 | int ack_consume_time; |
398 | 398 | ||
399 | u64 basic_rates; | 399 | u32 basic_rates; |
400 | 400 | ||
401 | int slot_time; | 401 | int slot_time; |
402 | 402 | ||