diff options
Diffstat (limited to 'net/mac80211/mesh_sync.c')
-rw-r--r-- | net/mac80211/mesh_sync.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c index d1cf2d553499..2bc5dc25d5ad 100644 --- a/net/mac80211/mesh_sync.c +++ b/net/mac80211/mesh_sync.c | |||
@@ -164,12 +164,15 @@ no_sync: | |||
164 | rcu_read_unlock(); | 164 | rcu_read_unlock(); |
165 | } | 165 | } |
166 | 166 | ||
167 | static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata) | 167 | static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, |
168 | struct beacon_data *beacon) | ||
168 | { | 169 | { |
169 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 170 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
171 | u8 cap; | ||
170 | 172 | ||
171 | WARN_ON(ifmsh->mesh_sp_id != IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET); | 173 | WARN_ON(ifmsh->mesh_sp_id != IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET); |
172 | BUG_ON(!rcu_read_lock_held()); | 174 | BUG_ON(!rcu_read_lock_held()); |
175 | cap = beacon->meshconf->meshconf_cap; | ||
173 | 176 | ||
174 | spin_lock_bh(&ifmsh->sync_offset_lock); | 177 | spin_lock_bh(&ifmsh->sync_offset_lock); |
175 | 178 | ||
@@ -194,6 +197,10 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata) | |||
194 | ifmsh->adjusting_tbtt = false; | 197 | ifmsh->adjusting_tbtt = false; |
195 | } | 198 | } |
196 | spin_unlock_bh(&ifmsh->sync_offset_lock); | 199 | spin_unlock_bh(&ifmsh->sync_offset_lock); |
200 | |||
201 | beacon->meshconf->meshconf_cap = ifmsh->adjusting_tbtt ? | ||
202 | IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING | cap : | ||
203 | ~IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING & cap; | ||
197 | } | 204 | } |
198 | 205 | ||
199 | static const struct sync_method sync_methods[] = { | 206 | static const struct sync_method sync_methods[] = { |