diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-12 10:43:19 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:39 -0500 |
commit | 4a3cb702b05868f67c4ee3da3380461c5b90b4ca (patch) | |
tree | 557b28bd820e50ad7d3c758c34a60d5df006f6ed /net/mac80211/mesh_pathtbl.c | |
parent | 50640f169372b9977487a328dedf13a8debedff7 (diff) |
mac80211: constify IE parsing
Make all the parsed IE pointers const, and propagate
the change to all the users etc.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_pathtbl.c')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index d5786c3eaee2..2ce4c4023a97 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -181,7 +181,7 @@ errcopy: | |||
181 | return -ENOMEM; | 181 | return -ENOMEM; |
182 | } | 182 | } |
183 | 183 | ||
184 | static u32 mesh_table_hash(u8 *addr, struct ieee80211_sub_if_data *sdata, | 184 | static u32 mesh_table_hash(const u8 *addr, struct ieee80211_sub_if_data *sdata, |
185 | struct mesh_table *tbl) | 185 | struct mesh_table *tbl) |
186 | { | 186 | { |
187 | /* Use last four bytes of hw addr and interface index as hash index */ | 187 | /* Use last four bytes of hw addr and interface index as hash index */ |
@@ -326,8 +326,8 @@ static void mesh_path_move_to_queue(struct mesh_path *gate_mpath, | |||
326 | } | 326 | } |
327 | 327 | ||
328 | 328 | ||
329 | static struct mesh_path *mpath_lookup(struct mesh_table *tbl, u8 *dst, | 329 | static struct mesh_path *mpath_lookup(struct mesh_table *tbl, const u8 *dst, |
330 | struct ieee80211_sub_if_data *sdata) | 330 | struct ieee80211_sub_if_data *sdata) |
331 | { | 331 | { |
332 | struct mesh_path *mpath; | 332 | struct mesh_path *mpath; |
333 | struct hlist_node *n; | 333 | struct hlist_node *n; |
@@ -359,7 +359,8 @@ static struct mesh_path *mpath_lookup(struct mesh_table *tbl, u8 *dst, | |||
359 | * | 359 | * |
360 | * Locking: must be called within a read rcu section. | 360 | * Locking: must be called within a read rcu section. |
361 | */ | 361 | */ |
362 | struct mesh_path *mesh_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata) | 362 | struct mesh_path *mesh_path_lookup(const u8 *dst, |
363 | struct ieee80211_sub_if_data *sdata) | ||
363 | { | 364 | { |
364 | return mpath_lookup(rcu_dereference(mesh_paths), dst, sdata); | 365 | return mpath_lookup(rcu_dereference(mesh_paths), dst, sdata); |
365 | } | 366 | } |
@@ -494,7 +495,7 @@ int mesh_gate_num(struct ieee80211_sub_if_data *sdata) | |||
494 | * | 495 | * |
495 | * State: the initial state of the new path is set to 0 | 496 | * State: the initial state of the new path is set to 0 |
496 | */ | 497 | */ |
497 | int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | 498 | int mesh_path_add(const u8 *dst, struct ieee80211_sub_if_data *sdata) |
498 | { | 499 | { |
499 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 500 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
500 | struct ieee80211_local *local = sdata->local; | 501 | struct ieee80211_local *local = sdata->local; |