Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: Use appropriate name for functions and messages

These functions drifts TSF timers, not TBTT.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Masashi Honma and committed by
Johannes Berg
445cd452 76f43b4c

+13 -13
+2 -2
net/mac80211/ieee80211_i.h
··· 625 625 struct ieee80211_rx_status *rx_status); 626 626 627 627 /* should be called with beacon_data under RCU read lock */ 628 - void (*adjust_tbtt)(struct ieee80211_sub_if_data *sdata, 629 - struct beacon_data *beacon); 628 + void (*adjust_tsf)(struct ieee80211_sub_if_data *sdata, 629 + struct beacon_data *beacon); 630 630 /* add other framework functions here */ 631 631 }; 632 632
+1 -1
net/mac80211/mesh.c
··· 1346 1346 ieee80211_mesh_rootpath(sdata); 1347 1347 1348 1348 if (test_and_clear_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags)) 1349 - mesh_sync_adjust_tbtt(sdata); 1349 + mesh_sync_adjust_tsf(sdata); 1350 1350 1351 1351 if (test_and_clear_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags)) 1352 1352 mesh_bss_info_changed(sdata);
+1 -1
net/mac80211/mesh.h
··· 341 341 } 342 342 343 343 void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata); 344 - void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata); 344 + void mesh_sync_adjust_tsf(struct ieee80211_sub_if_data *sdata); 345 345 void ieee80211s_stop(void); 346 346 #else 347 347 static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
+8 -8
net/mac80211/mesh_sync.c
··· 12 12 #include "mesh.h" 13 13 #include "driver-ops.h" 14 14 15 - /* This is not in the standard. It represents a tolerable tbtt drift below 15 + /* This is not in the standard. It represents a tolerable tsf drift below 16 16 * which we do no TSF adjustment. 17 17 */ 18 18 #define TOFFSET_MINIMUM_ADJUSTMENT 10 ··· 46 46 IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING) != 0; 47 47 } 48 48 49 - void mesh_sync_adjust_tbtt(struct ieee80211_sub_if_data *sdata) 49 + void mesh_sync_adjust_tsf(struct ieee80211_sub_if_data *sdata) 50 50 { 51 51 struct ieee80211_local *local = sdata->local; 52 52 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; ··· 57 57 58 58 spin_lock_bh(&ifmsh->sync_offset_lock); 59 59 if (ifmsh->sync_offset_clockdrift_max < beacon_int_fraction) { 60 - msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting\n", 60 + msync_dbg(sdata, "TSF : max clockdrift=%lld; adjusting\n", 61 61 (long long) ifmsh->sync_offset_clockdrift_max); 62 62 tsfdelta = -ifmsh->sync_offset_clockdrift_max; 63 63 ifmsh->sync_offset_clockdrift_max = 0; 64 64 } else { 65 - msync_dbg(sdata, "TBTT : max clockdrift=%lld; adjusting by %llu\n", 65 + msync_dbg(sdata, "TSF : max clockdrift=%lld; adjusting by %llu\n", 66 66 (long long) ifmsh->sync_offset_clockdrift_max, 67 67 (unsigned long long) beacon_int_fraction); 68 68 tsfdelta = -beacon_int_fraction; ··· 167 167 rcu_read_unlock(); 168 168 } 169 169 170 - static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata, 170 + static void mesh_sync_offset_adjust_tsf(struct ieee80211_sub_if_data *sdata, 171 171 struct beacon_data *beacon) 172 172 { 173 173 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; ··· 184 184 * the tsf adjustment to the mesh tasklet 185 185 */ 186 186 msync_dbg(sdata, 187 - "TBTT : kicking off TBTT adjustment with clockdrift_max=%lld\n", 187 + "TSF : kicking off TSF adjustment with clockdrift_max=%lld\n", 188 188 ifmsh->sync_offset_clockdrift_max); 189 189 set_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags); 190 190 } else { 191 191 msync_dbg(sdata, 192 - "TBTT : max clockdrift=%lld; too small to adjust\n", 192 + "TSF : max clockdrift=%lld; too small to adjust\n", 193 193 (long long)ifmsh->sync_offset_clockdrift_max); 194 194 ifmsh->sync_offset_clockdrift_max = 0; 195 195 } ··· 201 201 .method = IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET, 202 202 .ops = { 203 203 .rx_bcn_presp = &mesh_sync_offset_rx_bcn_presp, 204 - .adjust_tbtt = &mesh_sync_offset_adjust_tbtt, 204 + .adjust_tsf = &mesh_sync_offset_adjust_tsf, 205 205 } 206 206 }, 207 207 };
+1 -1
net/mac80211/tx.c
··· 4196 4196 } 4197 4197 4198 4198 if (ifmsh->sync_ops) 4199 - ifmsh->sync_ops->adjust_tbtt(sdata, beacon); 4199 + ifmsh->sync_ops->adjust_tsf(sdata, beacon); 4200 4200 4201 4201 skb = dev_alloc_skb(local->tx_headroom + 4202 4202 beacon->head_len +