diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-10 18:01:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-15 16:48:20 -0400 |
commit | 472dbc45dc1966284de72d7de15690c17ed2cf33 (patch) | |
tree | e8bfb88067f7fd8845978d1613f868e6a4499999 /net/mac80211/mesh.h | |
parent | 7c95069522d02ff144cd421be6618dce619caf7e (diff) |
mac80211: split off mesh handling entirely
This patch splits off mesh handling from the STA/IBSS.
Unfortunately it increases mesh code size a bit, but I
think it makes things clearer. The patch also reduces
per-interface run-time memory usage.
Also clean up a few places where ifdef is not required.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r-- | net/mac80211/mesh.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 84ff5d828fd..8ee414a0447 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h | |||
@@ -206,7 +206,7 @@ int mesh_rmc_check(u8 *addr, struct ieee80211s_hdr *mesh_hdr, | |||
206 | struct ieee80211_sub_if_data *sdata); | 206 | struct ieee80211_sub_if_data *sdata); |
207 | bool mesh_matches_local(struct ieee802_11_elems *ie, | 207 | bool mesh_matches_local(struct ieee802_11_elems *ie, |
208 | struct ieee80211_sub_if_data *sdata); | 208 | struct ieee80211_sub_if_data *sdata); |
209 | void mesh_ids_set_default(struct ieee80211_if_sta *sta); | 209 | void mesh_ids_set_default(struct ieee80211_if_mesh *mesh); |
210 | void mesh_mgmt_ies_add(struct sk_buff *skb, | 210 | void mesh_mgmt_ies_add(struct sk_buff *skb, |
211 | struct ieee80211_sub_if_data *sdata); | 211 | struct ieee80211_sub_if_data *sdata); |
212 | void mesh_rmc_free(struct ieee80211_sub_if_data *sdata); | 212 | void mesh_rmc_free(struct ieee80211_sub_if_data *sdata); |
@@ -214,6 +214,11 @@ int mesh_rmc_init(struct ieee80211_sub_if_data *sdata); | |||
214 | void ieee80211s_init(void); | 214 | void ieee80211s_init(void); |
215 | void ieee80211s_stop(void); | 215 | void ieee80211s_stop(void); |
216 | void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata); | 216 | void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata); |
217 | ieee80211_rx_result | ||
218 | ieee80211_mesh_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, | ||
219 | struct ieee80211_rx_status *rx_status); | ||
220 | void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata); | ||
221 | void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata); | ||
217 | 222 | ||
218 | /* Mesh paths */ | 223 | /* Mesh paths */ |
219 | int mesh_nexthop_lookup(struct sk_buff *skb, | 224 | int mesh_nexthop_lookup(struct sk_buff *skb, |
@@ -269,8 +274,8 @@ extern int mesh_allocated; | |||
269 | 274 | ||
270 | static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata) | 275 | static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata) |
271 | { | 276 | { |
272 | return sdata->u.sta.mshcfg.dot11MeshMaxPeerLinks - | 277 | return sdata->u.mesh.mshcfg.dot11MeshMaxPeerLinks - |
273 | atomic_read(&sdata->u.sta.mshstats.estab_plinks); | 278 | atomic_read(&sdata->u.mesh.mshstats.estab_plinks); |
274 | } | 279 | } |
275 | 280 | ||
276 | static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata) | 281 | static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata) |
@@ -288,8 +293,12 @@ static inline void mesh_path_activate(struct mesh_path *mpath) | |||
288 | for (i = 0; i <= x->hash_mask; i++) \ | 293 | for (i = 0; i <= x->hash_mask; i++) \ |
289 | hlist_for_each_entry_rcu(node, p, &x->hash_buckets[i], list) | 294 | hlist_for_each_entry_rcu(node, p, &x->hash_buckets[i], list) |
290 | 295 | ||
296 | void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local); | ||
297 | |||
291 | #else | 298 | #else |
292 | #define mesh_allocated 0 | 299 | #define mesh_allocated 0 |
300 | static inline void | ||
301 | ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {} | ||
293 | #endif | 302 | #endif |
294 | 303 | ||
295 | #endif /* IEEE80211S_H */ | 304 | #endif /* IEEE80211S_H */ |