aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-28 06:12:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:10:16 -0500
commit1239cd58d237fa6ad501acaec8776262a5784ec8 (patch)
tree13f991cfc6a77e52a336aa75a94d94f5fd919f68
parent97c8b013da7a8ec7aa0a192489d4e7a33c4127fc (diff)
wireless: move mesh config length constant
This is a constant from the 802.11 specification. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/linux/ieee80211.h3
-rw-r--r--net/mac80211/mesh.c2
-rw-r--r--net/mac80211/mesh.h5
-rw-r--r--net/mac80211/scan.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index aad99195a4cc..9dc288b920c8 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -97,7 +97,10 @@
97#define IEEE80211_MAX_FRAME_LEN 2352 97#define IEEE80211_MAX_FRAME_LEN 2352
98 98
99#define IEEE80211_MAX_SSID_LEN 32 99#define IEEE80211_MAX_SSID_LEN 32
100
100#define IEEE80211_MAX_MESH_ID_LEN 32 101#define IEEE80211_MAX_MESH_ID_LEN 32
102#define IEEE80211_MESH_CONFIG_LEN 19
103
101#define IEEE80211_QOS_CTL_LEN 2 104#define IEEE80211_QOS_CTL_LEN 2
102#define IEEE80211_QOS_CTL_TID_MASK 0x000F 105#define IEEE80211_QOS_CTL_TID_MASK 0x000F
103#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 106#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index d3b6e1a648bd..82f568e94365 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -238,7 +238,7 @@ void mesh_mgmt_ies_add(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)
238 238
239 pos = skb_put(skb, 21); 239 pos = skb_put(skb, 21);
240 *pos++ = WLAN_EID_MESH_CONFIG; 240 *pos++ = WLAN_EID_MESH_CONFIG;
241 *pos++ = MESH_CFG_LEN; 241 *pos++ = IEEE80211_MESH_CONFIG_LEN;
242 /* Version */ 242 /* Version */
243 *pos++ = 1; 243 *pos++ = 1;
244 244
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index e10471c6ba42..c197ab545e54 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -145,9 +145,6 @@ struct mesh_rmc {
145}; 145};
146 146
147 147
148/* Mesh IEs constants */
149#define MESH_CFG_LEN 19
150
151/* 148/*
152 * MESH_CFG_COMP_LEN Includes: 149 * MESH_CFG_COMP_LEN Includes:
153 * - Active path selection protocol ID. 150 * - Active path selection protocol ID.
@@ -157,7 +154,7 @@ struct mesh_rmc {
157 * Does not include mesh capabilities, which may vary across nodes in the same 154 * Does not include mesh capabilities, which may vary across nodes in the same
158 * mesh 155 * mesh
159 */ 156 */
160#define MESH_CFG_CMP_LEN 17 157#define MESH_CFG_CMP_LEN (IEEE80211_MESH_CONFIG_LEN - 2)
161 158
162/* Default values, timeouts in ms */ 159/* Default values, timeouts in ms */
163#define MESH_TTL 5 160#define MESH_TTL 5
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 7372d7abb8c0..f5c7c3371929 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -159,7 +159,7 @@ ieee80211_rx_mesh_bss_add(struct ieee80211_local *local, u8 *mesh_id, int mesh_i
159{ 159{
160 struct ieee80211_bss *bss; 160 struct ieee80211_bss *bss;
161 161
162 if (mesh_config_len != MESH_CFG_LEN) 162 if (mesh_config_len != IEEE80211_MESH_CONFIG_LEN)
163 return NULL; 163 return NULL;
164 164
165 bss = kzalloc(sizeof(*bss), GFP_ATOMIC); 165 bss = kzalloc(sizeof(*bss), GFP_ATOMIC);