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 /net/mac80211/util.c | |
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 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3f559e3d0a7c..ede96c4fea2e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -731,12 +731,12 @@ int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz) | |||
731 | return ret; | 731 | return ret; |
732 | } | 732 | } |
733 | 733 | ||
734 | u64 ieee80211_mandatory_rates(struct ieee80211_local *local, | 734 | u32 ieee80211_mandatory_rates(struct ieee80211_local *local, |
735 | enum ieee80211_band band) | 735 | enum ieee80211_band band) |
736 | { | 736 | { |
737 | struct ieee80211_supported_band *sband; | 737 | struct ieee80211_supported_band *sband; |
738 | struct ieee80211_rate *bitrates; | 738 | struct ieee80211_rate *bitrates; |
739 | u64 mandatory_rates; | 739 | u32 mandatory_rates; |
740 | enum ieee80211_rate_flags mandatory_flag; | 740 | enum ieee80211_rate_flags mandatory_flag; |
741 | int i; | 741 | int i; |
742 | 742 | ||