aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.h
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2012-03-31 14:31:32 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 15:20:31 -0400
commitdbf498fbafa2c23139d5a990e94ed78bafbbea19 (patch)
tree723a2ed4575ab2178cbd210d85a19d5c968a95a1 /net/mac80211/mesh.h
parent9bdd3a6bf8513a0a9eda031d15b36e4677854243 (diff)
mac80211: Implement mesh synchronization framework
This patch adds MBSS extensible synchronization framework (Sec. 13.13.2 of IEEE Std. 802.11-2012). The framework is implemented via an ops table which defines the following functions: rx_bcn_presp() - this is called every time a mesh beacon is received. adjust_tbtt() - this is called immediately before a beacon is about to be transmitted. The default neighbor offset synchronization defined in the standard is implemented. We also provide template functions for vendor specific methods. When neighbor offset synchronization is active (which is the default) mesh neighbors in the same MBSS will track timing offsets to each other and compensate clock drift. In our tests we observed that this mesh synchronization implementation successfully corrected drifts between stations of ~2PPM while introducing a jitter of ~20us. It is also possible to test this framework on mac80211_hwsim simulated phys to see how it behaves under different topologies, over poor links, etc. Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r--net/mac80211/mesh.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 3e52439ed112..fa7d9704c175 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -19,6 +19,20 @@
19/* Data structures */ 19/* Data structures */
20 20
21/** 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 36 * enum mesh_path_flags - mac80211 mesh path flags
23 * 37 *
24 * 38 *
@@ -56,12 +70,15 @@ enum mesh_path_flags {
56 * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to 70 * @MESH_WORK_GROW_MPP_TABLE: the mesh portals table is full and needs to
57 * grow 71 * grow
58 * @MESH_WORK_ROOT: the mesh root station needs to send a frame 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 */ 75 */
60enum mesh_deferred_task_flags { 76enum mesh_deferred_task_flags {
61 MESH_WORK_HOUSEKEEPING, 77 MESH_WORK_HOUSEKEEPING,
62 MESH_WORK_GROW_MPATH_TABLE, 78 MESH_WORK_GROW_MPATH_TABLE,
63 MESH_WORK_GROW_MPP_TABLE, 79 MESH_WORK_GROW_MPP_TABLE,
64 MESH_WORK_ROOT, 80 MESH_WORK_ROOT,
81 MESH_WORK_DRIFT_ADJUST,
65}; 82};
66 83
67/** 84/**
@@ -234,6 +251,7 @@ void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
234void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata); 251void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
235void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata); 252void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata);
236void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh); 253void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);
254struct ieee80211_mesh_sync_ops *ieee80211_mesh_sync_ops_get(u8 method);
237 255
238/* Mesh paths */ 256/* Mesh paths */
239int mesh_nexthop_lookup(struct sk_buff *skb, 257int mesh_nexthop_lookup(struct sk_buff *skb,
@@ -327,6 +345,7 @@ void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
327void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata); 345void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata);
328void mesh_plink_quiesce(struct sta_info *sta); 346void mesh_plink_quiesce(struct sta_info *sta);
329void mesh_plink_restart(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 349#else
331#define mesh_allocated 0 350#define mesh_allocated 0
332static inline void 351static inline void