diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-23 09:17:19 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-06 15:30:42 -0500 |
commit | 902acc7896d7649fb30e4b22bd4e643c7f34b02c (patch) | |
tree | 8d8f2838fead8417e16e801383ddb2691a89719f /net/mac80211/mesh.h | |
parent | f7a921443740d7dafc65b17aa32531730d358f50 (diff) |
mac80211: clean up mesh code
Various cleanups, reducing the #ifdef mess and other things.
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 | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index ac8923793908..d565b3fb9e6a 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h | |||
@@ -11,10 +11,10 @@ | |||
11 | #ifndef IEEE80211S_H | 11 | #ifndef IEEE80211S_H |
12 | #define IEEE80211S_H | 12 | #define IEEE80211S_H |
13 | 13 | ||
14 | #include "ieee80211_i.h" | 14 | #include <linux/types.h> |
15 | #include <linux/jhash.h> | 15 | #include <linux/jhash.h> |
16 | #include "ieee80211_i.h" | ||
16 | 17 | ||
17 | extern int mesh_allocated; | ||
18 | 18 | ||
19 | /* Data structures */ | 19 | /* Data structures */ |
20 | 20 | ||
@@ -211,6 +211,8 @@ void mesh_rmc_free(struct net_device *dev); | |||
211 | int mesh_rmc_init(struct net_device *dev); | 211 | int mesh_rmc_init(struct net_device *dev); |
212 | void ieee80211s_init(void); | 212 | void ieee80211s_init(void); |
213 | void ieee80211s_stop(void); | 213 | void ieee80211s_stop(void); |
214 | void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata); | ||
215 | |||
214 | /* Mesh paths */ | 216 | /* Mesh paths */ |
215 | int mesh_nexthop_lookup(u8 *next_hop, struct sk_buff *skb, | 217 | int mesh_nexthop_lookup(u8 *next_hop, struct sk_buff *skb, |
216 | struct net_device *dev); | 218 | struct net_device *dev); |
@@ -257,6 +259,9 @@ void mesh_path_timer(unsigned long data); | |||
257 | void mesh_path_flush_by_nexthop(struct sta_info *sta); | 259 | void mesh_path_flush_by_nexthop(struct sta_info *sta); |
258 | void mesh_path_discard_frame(struct sk_buff *skb, struct net_device *dev); | 260 | void mesh_path_discard_frame(struct sk_buff *skb, struct net_device *dev); |
259 | 261 | ||
262 | #ifdef CONFIG_MAC80211_MESH | ||
263 | extern int mesh_allocated; | ||
264 | |||
260 | static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata) | 265 | static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata) |
261 | { | 266 | { |
262 | return sdata->u.sta.mshcfg.dot11MeshMaxPeerLinks - | 267 | return sdata->u.sta.mshcfg.dot11MeshMaxPeerLinks - |
@@ -278,6 +283,10 @@ static inline void mesh_path_activate(struct mesh_path *mpath) | |||
278 | for (i = 0; i <= x->hash_mask; i++) \ | 283 | for (i = 0; i <= x->hash_mask; i++) \ |
279 | hlist_for_each_entry_rcu(node, p, &x->hash_buckets[i], list) | 284 | hlist_for_each_entry_rcu(node, p, &x->hash_buckets[i], list) |
280 | 285 | ||
286 | #else | ||
287 | #define mesh_allocated 0 | ||
288 | #endif | ||
289 | |||
281 | #define MESH_PREQ(skb) (skb->cb + 30) | 290 | #define MESH_PREQ(skb) (skb->cb + 30) |
282 | 291 | ||
283 | #endif /* IEEE80211S_H */ | 292 | #endif /* IEEE80211S_H */ |