mesh.h (d2a079fd48c05235b86016a33a79cb86a86e15a8) mesh.h (dbf498fbafa2c23139d5a990e94ed78bafbbea19)
1/*
2 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Authors: Luis Carlos Cobo <luisca@cozybit.com>
4 * Javier Cardona <javier@cozybit.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 5 unchanged lines hidden (view full) ---

14#include <linux/types.h>
15#include <linux/jhash.h>
16#include "ieee80211_i.h"
17
18
19/* Data structures */
20
21/**
1/*
2 * Copyright (c) 2008, 2009 open80211s Ltd.
3 * Authors: Luis Carlos Cobo <luisca@cozybit.com>
4 * Javier Cardona <javier@cozybit.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 5 unchanged lines hidden (view full) ---

14#include <linux/types.h>
15#include <linux/jhash.h>
16#include "ieee80211_i.h"
17
18
19/* Data structures */
20
21/**
22 * enum mesh_config_capab_flags - mesh config IE capability flags
23 *
24 * @MESHCONF_CAPAB_ACCEPT_PLINKS: STA is willing to establish
25 * additional mesh peerings with other mesh STAs
26 * @MESHCONF_CAPAB_FORWARDING: the STA forwards MSDUs
27 * @MESHCONF_CAPAB_TBTT_ADJUSTING: TBTT adjustment procedure is ongoing
28 */
29enum mesh_config_capab_flags {
30 MESHCONF_CAPAB_ACCEPT_PLINKS = BIT(0),
31 MESHCONF_CAPAB_FORWARDING = BIT(3),
32 MESHCONF_CAPAB_TBTT_ADJUSTING = BIT(5),
33};
34
35/**
22 * enum mesh_path_flags - mac80211 mesh path flags
23 *
24 *
25 *
26 * @MESH_PATH_ACTIVE: the mesh path can be used for forwarding
27 * @MESH_PATH_RESOLVING: the discovery process is running for this mesh path
28 * @MESH_PATH_SN_VALID: the mesh path contains a valid destination sequence
29 * number

--- 21 unchanged lines hidden (view full) ---

51 *
52 *
53 * @MESH_WORK_HOUSEKEEPING: run the periodic mesh housekeeping tasks
54 * @MESH_WORK_GROW_MPATH_TABLE: the mesh path table is full and needs
55 * to grow.
56 * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to
57 * grow
58 * @MESH_WORK_ROOT: the mesh root station needs to send a frame
36 * enum mesh_path_flags - mac80211 mesh path flags
37 *
38 *
39 *
40 * @MESH_PATH_ACTIVE: the mesh path can be used for forwarding
41 * @MESH_PATH_RESOLVING: the discovery process is running for this mesh path
42 * @MESH_PATH_SN_VALID: the mesh path contains a valid destination sequence
43 * number

--- 21 unchanged lines hidden (view full) ---

65 *
66 *
67 * @MESH_WORK_HOUSEKEEPING: run the periodic mesh housekeeping tasks
68 * @MESH_WORK_GROW_MPATH_TABLE: the mesh path table is full and needs
69 * to grow.
70 * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to
71 * grow
72 * @MESH_WORK_ROOT: the mesh root station needs to send a frame
73 * @MESH_WORK_DRIFT_ADJUST: time to compensate for clock drift relative to other
74 * mesh nodes
59 */
60enum mesh_deferred_task_flags {
61 MESH_WORK_HOUSEKEEPING,
62 MESH_WORK_GROW_MPATH_TABLE,
63 MESH_WORK_GROW_MPP_TABLE,
64 MESH_WORK_ROOT,
75 */
76enum mesh_deferred_task_flags {
77 MESH_WORK_HOUSEKEEPING,
78 MESH_WORK_GROW_MPATH_TABLE,
79 MESH_WORK_GROW_MPP_TABLE,
80 MESH_WORK_ROOT,
81 MESH_WORK_DRIFT_ADJUST,
65};
66
67/**
68 * struct mesh_path - mac80211 mesh path structure
69 *
70 * @dst: mesh path destination mac address
71 * @sdata: mesh subif
72 * @next_hop: mesh neighbor to which frames for this destination will be

--- 156 unchanged lines hidden (view full) ---

229void ieee80211s_init(void);
230void ieee80211s_update_metric(struct ieee80211_local *local,
231 struct sta_info *stainfo, struct sk_buff *skb);
232void ieee80211s_stop(void);
233void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
234void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
235void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata);
236void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);
82};
83
84/**
85 * struct mesh_path - mac80211 mesh path structure
86 *
87 * @dst: mesh path destination mac address
88 * @sdata: mesh subif
89 * @next_hop: mesh neighbor to which frames for this destination will be

--- 156 unchanged lines hidden (view full) ---

246void ieee80211s_init(void);
247void ieee80211s_update_metric(struct ieee80211_local *local,
248 struct sta_info *stainfo, struct sk_buff *skb);
249void ieee80211s_stop(void);
250void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
251void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
252void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata);
253void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);
254struct ieee80211_mesh_sync_ops *ieee80211_mesh_sync_ops_get(u8 method);
237
238/* Mesh paths */
239int mesh_nexthop_lookup(struct sk_buff *skb,
240 struct ieee80211_sub_if_data *sdata);
241int mesh_nexthop_resolve(struct sk_buff *skb,
242 struct ieee80211_sub_if_data *sdata);
243void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata);
244struct mesh_path *mesh_path_lookup(u8 *dst,

--- 77 unchanged lines hidden (view full) ---

322}
323
324void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local);
325
326void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
327void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata);
328void mesh_plink_quiesce(struct sta_info *sta);
329void mesh_plink_restart(struct sta_info *sta);
255
256/* Mesh paths */
257int mesh_nexthop_lookup(struct sk_buff *skb,
258 struct ieee80211_sub_if_data *sdata);
259int mesh_nexthop_resolve(struct sk_buff *skb,
260 struct ieee80211_sub_if_data *sdata);
261void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata);
262struct mesh_path *mesh_path_lookup(u8 *dst,

--- 77 unchanged lines hidden (view full) ---

340}
341
342void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local);
343
344void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
345void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata);
346void mesh_plink_quiesce(struct sta_info *sta);
347void mesh_plink_restart(struct sta_info *sta);
348void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata);
330#else
331#define mesh_allocated 0
332static inline void
333ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {}
334static inline void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
335{}
336static inline void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
337{}
338static inline void mesh_plink_quiesce(struct sta_info *sta) {}
339static inline void mesh_plink_restart(struct sta_info *sta) {}
340static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
341{ return false; }
342#endif
343
344#endif /* IEEE80211S_H */
349#else
350#define mesh_allocated 0
351static inline void
352ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {}
353static inline void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
354{}
355static inline void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
356{}
357static inline void mesh_plink_quiesce(struct sta_info *sta) {}
358static inline void mesh_plink_restart(struct sta_info *sta) {}
359static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
360{ return false; }
361#endif
362
363#endif /* IEEE80211S_H */