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/mesh_plink.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/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index c140a1b71a5e..a8bbdeca013a 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -93,7 +93,7 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta) | |||
93 | * on it in the lifecycle management section! | 93 | * on it in the lifecycle management section! |
94 | */ | 94 | */ |
95 | static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, | 95 | static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, |
96 | u8 *hw_addr, u64 rates) | 96 | u8 *hw_addr, u32 rates) |
97 | { | 97 | { |
98 | struct ieee80211_local *local = sdata->local; | 98 | struct ieee80211_local *local = sdata->local; |
99 | struct sta_info *sta; | 99 | struct sta_info *sta; |
@@ -222,7 +222,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | 224 | ||
225 | void mesh_neighbour_update(u8 *hw_addr, u64 rates, struct ieee80211_sub_if_data *sdata, | 225 | void mesh_neighbour_update(u8 *hw_addr, u32 rates, struct ieee80211_sub_if_data *sdata, |
226 | bool peer_accepting_plinks) | 226 | bool peer_accepting_plinks) |
227 | { | 227 | { |
228 | struct ieee80211_local *local = sdata->local; | 228 | struct ieee80211_local *local = sdata->local; |
@@ -447,7 +447,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
447 | spin_lock_bh(&sta->lock); | 447 | spin_lock_bh(&sta->lock); |
448 | } else if (!sta) { | 448 | } else if (!sta) { |
449 | /* ftype == PLINK_OPEN */ | 449 | /* ftype == PLINK_OPEN */ |
450 | u64 rates; | 450 | u32 rates; |
451 | if (!mesh_plink_free_count(sdata)) { | 451 | if (!mesh_plink_free_count(sdata)) { |
452 | mpl_dbg("Mesh plink error: no more free plinks\n"); | 452 | mpl_dbg("Mesh plink error: no more free plinks\n"); |
453 | rcu_read_unlock(); | 453 | rcu_read_unlock(); |