diff options
author | Javier Cardona <javier@cozybit.com> | 2012-03-31 14:31:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-10 15:20:31 -0400 |
commit | dbf498fbafa2c23139d5a990e94ed78bafbbea19 (patch) | |
tree | 723a2ed4575ab2178cbd210d85a19d5c968a95a1 /net/mac80211/tx.c | |
parent | 9bdd3a6bf8513a0a9eda031d15b36e4677854243 (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/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index e0b89780b472..daab5adeb93c 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -2373,6 +2373,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2373 | IEEE80211_STYPE_BEACON); | 2373 | IEEE80211_STYPE_BEACON); |
2374 | } else if (ieee80211_vif_is_mesh(&sdata->vif)) { | 2374 | } else if (ieee80211_vif_is_mesh(&sdata->vif)) { |
2375 | struct ieee80211_mgmt *mgmt; | 2375 | struct ieee80211_mgmt *mgmt; |
2376 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | ||
2376 | u8 *pos; | 2377 | u8 *pos; |
2377 | int hdr_len = offsetof(struct ieee80211_mgmt, u.beacon) + | 2378 | int hdr_len = offsetof(struct ieee80211_mgmt, u.beacon) + |
2378 | sizeof(mgmt->u.beacon); | 2379 | sizeof(mgmt->u.beacon); |
@@ -2382,6 +2383,10 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2382 | goto out; | 2383 | goto out; |
2383 | #endif | 2384 | #endif |
2384 | 2385 | ||
2386 | if (ifmsh->sync_ops) | ||
2387 | ifmsh->sync_ops->adjust_tbtt( | ||
2388 | sdata); | ||
2389 | |||
2385 | skb = dev_alloc_skb(local->tx_headroom + | 2390 | skb = dev_alloc_skb(local->tx_headroom + |
2386 | hdr_len + | 2391 | hdr_len + |
2387 | 2 + /* NULL SSID */ | 2392 | 2 + /* NULL SSID */ |