summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_sync.c
diff options
context:
space:
mode:
authorPedersen, Thomas <twp@qca.qualcomm.com>2016-09-28 16:56:28 -0700
committerJohannes Berg <johannes.berg@intel.com>2016-09-30 13:45:44 +0200
commit354d381baf1126c45d03b5c0d87d22caf938b86b (patch)
treeef838588ad6a1f1c4b51e347794e5c5085a67cf1 /net/mac80211/mesh_sync.c
parent3ff23cd5654b9c8f4d567caa73439b4c39fbeaae (diff)
downloadlinux-354d381baf1126c45d03b5c0d87d22caf938b86b.tar.bz2
mac80211: add offset_tsf driver op and use it for mesh
This allows the mesh sync (and debugfs) code to make incremental TSF adjustments, avoiding any uncertainty introduced by delay in programming absolute TSF. Signed-off-by: Thomas Pedersen <twp@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_sync.c')
-rw-r--r--net/mac80211/mesh_sync.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/mac80211/mesh_sync.c b/net/mac80211/mesh_sync.c
index 64bc22ad9496..22ca43c500e4 100644
--- a/net/mac80211/mesh_sync.c
+++ b/net/mac80211/mesh_sync.c
@@ -70,9 +70,13 @@ void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata)
}
spin_unlock_bh(&ifmsh->sync_offset_lock);
- tsf = drv_get_tsf(local, sdata);
- if (tsf != -1ULL)
- drv_set_tsf(local, sdata, tsf + tsfdelta);
+ if (local->ops->offset_tsf) {
+ drv_offset_tsf(local, sdata, tsfdelta);
+ } else {
+ tsf = drv_get_tsf(local, sdata);
+ if (tsf != -1ULL)
+ drv_set_tsf(local, sdata, tsf + tsfdelta);
+ }
}
static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,