aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-23 09:17:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-06 15:30:42 -0500
commit902acc7896d7649fb30e4b22bd4e643c7f34b02c (patch)
tree8d8f2838fead8417e16e801383ddb2691a89719f /net/mac80211/util.c
parentf7a921443740d7dafc65b17aa32531730d358f50 (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/util.c')
-rw-r--r--net/mac80211/util.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 6b50b6c12da3..b46496fa2e10 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -26,9 +26,7 @@
26 26
27#include "ieee80211_i.h" 27#include "ieee80211_i.h"
28#include "ieee80211_rate.h" 28#include "ieee80211_rate.h"
29#ifdef CONFIG_MAC80211_MESH
30#include "mesh.h" 29#include "mesh.h"
31#endif
32#include "wme.h" 30#include "wme.h"
33 31
34/* privid for wiphys to determine whether they belong to us or not */ 32/* privid for wiphys to determine whether they belong to us or not */
@@ -149,7 +147,6 @@ int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb)
149} 147}
150EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); 148EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb);
151 149
152#ifdef CONFIG_MAC80211_MESH
153int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) 150int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
154{ 151{
155 int ae = meshhdr->flags & IEEE80211S_FLAGS_AE; 152 int ae = meshhdr->flags & IEEE80211S_FLAGS_AE;
@@ -167,7 +164,6 @@ int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr)
167 return 5; 164 return 5;
168 } 165 }
169} 166}
170#endif
171 167
172void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx) 168void ieee80211_tx_set_iswep(struct ieee80211_txrx_data *tx)
173{ 169{
@@ -418,31 +414,3 @@ void ieee80211_iterate_active_interfaces(
418 rcu_read_unlock(); 414 rcu_read_unlock();
419} 415}
420EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); 416EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces);
421
422#ifdef CONFIG_MAC80211_MESH
423/**
424 * ieee80211_new_mesh_header - create a new mesh header
425 * @meshhdr: uninitialized mesh header
426 * @sdata: mesh interface to be used
427 *
428 * Return the header length.
429 */
430int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
431 struct ieee80211_sub_if_data *sdata)
432{
433 meshhdr->flags = 0;
434 meshhdr->ttl = sdata->u.sta.mshcfg.dot11MeshTTL;
435
436 meshhdr->seqnum[0] = sdata->u.sta.mesh_seqnum[0]++;
437 meshhdr->seqnum[1] = sdata->u.sta.mesh_seqnum[1];
438 meshhdr->seqnum[2] = sdata->u.sta.mesh_seqnum[2];
439
440 if (sdata->u.sta.mesh_seqnum[0] == 0) {
441 sdata->u.sta.mesh_seqnum[1]++;
442 if (sdata->u.sta.mesh_seqnum[1] == 0)
443 sdata->u.sta.mesh_seqnum[2]++;
444 }
445
446 return 5;
447}
448#endif