diff options
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r-- | net/mac80211/mesh.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index dd1c19319f0a..31e102541869 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2008 open80211s Ltd. | 2 | * Copyright (c) 2008, 2009 open80211s Ltd. |
3 | * Authors: Luis Carlos Cobo <luisca@cozybit.com> | 3 | * Authors: Luis Carlos Cobo <luisca@cozybit.com> |
4 | * Javier Cardona <javier@cozybit.com> | 4 | * Javier Cardona <javier@cozybit.com> |
5 | * | 5 | * |
@@ -26,7 +26,7 @@ | |||
26 | * | 26 | * |
27 | * @MESH_PATH_ACTIVE: the mesh path can be used for forwarding | 27 | * @MESH_PATH_ACTIVE: the mesh path can be used for forwarding |
28 | * @MESH_PATH_RESOLVING: the discovery process is running for this mesh path | 28 | * @MESH_PATH_RESOLVING: the discovery process is running for this mesh path |
29 | * @MESH_PATH_DSN_VALID: the mesh path contains a valid destination sequence | 29 | * @MESH_PATH_SN_VALID: the mesh path contains a valid destination sequence |
30 | * number | 30 | * number |
31 | * @MESH_PATH_FIXED: the mesh path has been manually set and should not be | 31 | * @MESH_PATH_FIXED: the mesh path has been manually set and should not be |
32 | * modified | 32 | * modified |
@@ -38,7 +38,7 @@ | |||
38 | enum mesh_path_flags { | 38 | enum mesh_path_flags { |
39 | MESH_PATH_ACTIVE = BIT(0), | 39 | MESH_PATH_ACTIVE = BIT(0), |
40 | MESH_PATH_RESOLVING = BIT(1), | 40 | MESH_PATH_RESOLVING = BIT(1), |
41 | MESH_PATH_DSN_VALID = BIT(2), | 41 | MESH_PATH_SN_VALID = BIT(2), |
42 | MESH_PATH_FIXED = BIT(3), | 42 | MESH_PATH_FIXED = BIT(3), |
43 | MESH_PATH_RESOLVED = BIT(4), | 43 | MESH_PATH_RESOLVED = BIT(4), |
44 | }; | 44 | }; |
@@ -53,11 +53,13 @@ enum mesh_path_flags { | |||
53 | * to grow. | 53 | * to grow. |
54 | * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to | 54 | * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to |
55 | * grow | 55 | * grow |
56 | * @MESH_WORK_ROOT: the mesh root station needs to send a frame | ||
56 | */ | 57 | */ |
57 | enum mesh_deferred_task_flags { | 58 | enum mesh_deferred_task_flags { |
58 | MESH_WORK_HOUSEKEEPING, | 59 | MESH_WORK_HOUSEKEEPING, |
59 | MESH_WORK_GROW_MPATH_TABLE, | 60 | MESH_WORK_GROW_MPATH_TABLE, |
60 | MESH_WORK_GROW_MPP_TABLE, | 61 | MESH_WORK_GROW_MPP_TABLE, |
62 | MESH_WORK_ROOT, | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | /** | 65 | /** |
@@ -70,7 +72,7 @@ enum mesh_deferred_task_flags { | |||
70 | * @timer: mesh path discovery timer | 72 | * @timer: mesh path discovery timer |
71 | * @frame_queue: pending queue for frames sent to this destination while the | 73 | * @frame_queue: pending queue for frames sent to this destination while the |
72 | * path is unresolved | 74 | * path is unresolved |
73 | * @dsn: destination sequence number of the destination | 75 | * @sn: target sequence number |
74 | * @metric: current metric to this destination | 76 | * @metric: current metric to this destination |
75 | * @hop_count: hops to destination | 77 | * @hop_count: hops to destination |
76 | * @exp_time: in jiffies, when the path will expire or when it expired | 78 | * @exp_time: in jiffies, when the path will expire or when it expired |
@@ -94,7 +96,7 @@ struct mesh_path { | |||
94 | struct timer_list timer; | 96 | struct timer_list timer; |
95 | struct sk_buff_head frame_queue; | 97 | struct sk_buff_head frame_queue; |
96 | struct rcu_head rcu; | 98 | struct rcu_head rcu; |
97 | u32 dsn; | 99 | u32 sn; |
98 | u32 metric; | 100 | u32 metric; |
99 | u8 hop_count; | 101 | u8 hop_count; |
100 | unsigned long exp_time; | 102 | unsigned long exp_time; |
@@ -174,7 +176,7 @@ struct mesh_rmc { | |||
174 | #define MESH_CFG_CMP_LEN (IEEE80211_MESH_CONFIG_LEN - 2) | 176 | #define MESH_CFG_CMP_LEN (IEEE80211_MESH_CONFIG_LEN - 2) |
175 | 177 | ||
176 | /* Default values, timeouts in ms */ | 178 | /* Default values, timeouts in ms */ |
177 | #define MESH_TTL 5 | 179 | #define MESH_TTL 31 |
178 | #define MESH_MAX_RETR 3 | 180 | #define MESH_MAX_RETR 3 |
179 | #define MESH_RET_T 100 | 181 | #define MESH_RET_T 100 |
180 | #define MESH_CONF_T 100 | 182 | #define MESH_CONF_T 100 |
@@ -206,13 +208,19 @@ struct mesh_rmc { | |||
206 | #define MESH_MAX_MPATHS 1024 | 208 | #define MESH_MAX_MPATHS 1024 |
207 | 209 | ||
208 | /* Pending ANA approval */ | 210 | /* Pending ANA approval */ |
209 | #define PLINK_CATEGORY 30 | 211 | #define MESH_PLINK_CATEGORY 30 |
210 | #define MESH_PATH_SEL_CATEGORY 32 | 212 | #define MESH_PATH_SEL_CATEGORY 32 |
213 | #define MESH_PATH_SEL_ACTION 0 | ||
214 | |||
215 | /* PERR reason codes */ | ||
216 | #define PEER_RCODE_UNSPECIFIED 11 | ||
217 | #define PERR_RCODE_NO_ROUTE 12 | ||
218 | #define PERR_RCODE_DEST_UNREACH 13 | ||
211 | 219 | ||
212 | /* Public interfaces */ | 220 | /* Public interfaces */ |
213 | /* Various */ | 221 | /* Various */ |
214 | int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc, | 222 | int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc, |
215 | char *da, char *sa); | 223 | const u8 *da, const u8 *sa); |
216 | int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr, | 224 | int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr, |
217 | struct ieee80211_sub_if_data *sdata, char *addr4, | 225 | struct ieee80211_sub_if_data *sdata, char *addr4, |
218 | char *addr5, char *addr6); | 226 | char *addr5, char *addr6); |
@@ -234,6 +242,7 @@ ieee80211_rx_result | |||
234 | ieee80211_mesh_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb); | 242 | ieee80211_mesh_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb); |
235 | void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata); | 243 | void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata); |
236 | void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata); | 244 | void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata); |
245 | void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh); | ||
237 | 246 | ||
238 | /* Mesh paths */ | 247 | /* Mesh paths */ |
239 | int mesh_nexthop_lookup(struct sk_buff *skb, | 248 | int mesh_nexthop_lookup(struct sk_buff *skb, |
@@ -274,8 +283,8 @@ void mesh_mpp_table_grow(void); | |||
274 | u32 mesh_table_hash(u8 *addr, struct ieee80211_sub_if_data *sdata, | 283 | u32 mesh_table_hash(u8 *addr, struct ieee80211_sub_if_data *sdata, |
275 | struct mesh_table *tbl); | 284 | struct mesh_table *tbl); |
276 | /* Mesh paths */ | 285 | /* Mesh paths */ |
277 | int mesh_path_error_tx(u8 *dest, __le32 dest_dsn, u8 *ra, | 286 | int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn, __le16 target_rcode, |
278 | struct ieee80211_sub_if_data *sdata); | 287 | const u8 *ra, struct ieee80211_sub_if_data *sdata); |
279 | void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta); | 288 | void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta); |
280 | void mesh_path_flush_pending(struct mesh_path *mpath); | 289 | void mesh_path_flush_pending(struct mesh_path *mpath); |
281 | void mesh_path_tx_pending(struct mesh_path *mpath); | 290 | void mesh_path_tx_pending(struct mesh_path *mpath); |
@@ -288,6 +297,7 @@ void mesh_path_discard_frame(struct sk_buff *skb, | |||
288 | struct ieee80211_sub_if_data *sdata); | 297 | struct ieee80211_sub_if_data *sdata); |
289 | void mesh_path_quiesce(struct ieee80211_sub_if_data *sdata); | 298 | void mesh_path_quiesce(struct ieee80211_sub_if_data *sdata); |
290 | void mesh_path_restart(struct ieee80211_sub_if_data *sdata); | 299 | void mesh_path_restart(struct ieee80211_sub_if_data *sdata); |
300 | void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata); | ||
291 | 301 | ||
292 | extern int mesh_paths_generation; | 302 | extern int mesh_paths_generation; |
293 | 303 | ||