Code to sync Fi-Wi TSFs radio heads over PCIe
Go to file
Robert McMahon f831f47adc FiWiTSF: single exit points in helpers and main
- follower_var_pop, kf1_update: one return each.

- stats_maybe_print, apply_correction: goto out.

- run_single: goto out on alloc failure; main: funnel to out.

Made-with: Cursor
2026-03-31 12:30:17 -07:00
.gitignore Initial import: FiWiTSF TSF sync helper 2026-03-31 10:13:43 -07:00
Makefile FiWiTSF: signals, stats (Welford), Kalman mode, Makefile -lm 2026-03-31 12:24:54 -07:00
README.md FiWiTSF: README SSH/Gitea notes; fix tsf_sync_rt_starter.c 2026-03-31 12:10:37 -07:00
tsf_sync_rt_starter.c FiWiTSF: single exit points in helpers and main 2026-03-31 12:30:17 -07:00

README.md

FiWiTSF

Userspace tool (C11, SCHED_FIFO) that periodically reads a master 802.11 TSF from mac80211 debugfs and nudges follower interfaces toward it by writing their tsf files.

Repository root: ~/Code/FiWiTSF (standalone; not part of a Linux kernel tree).

Hosting (Gitea, SSH)

Canonical server: git.umbernetworks.com.

Optional: ~/.ssh/config

If git push over SSH fails (wrong port or key), add a host block. Gitea uses SSH user git. Port is often 22; some installs use 2222.

Host git.umbernetworks.com
    HostName git.umbernetworks.com
    User git
    Port 22

Add IdentityFile ~/.ssh/your_key only if you do not use the default key.

Check SSH before Git

ssh -T git@git.umbernetworks.com

You want a success message from Gitea, not a normal shell login.

Remote URL (this repo)

User repo rjmcmahon/FiWiTSF — use the git SSH user (not your Linux username):

cd ~/Code/FiWiTSF
git remote set-url origin git@git.umbernetworks.com:rjmcmahon/FiWiTSF.git
git push -u origin main

If you must put a non-default port in the URL itself (no Host block):

git remote set-url origin ssh://git@git.umbernetworks.com:2222/rjmcmahon/FiWiTSF.git

New clone

git clone git@git.umbernetworks.com:rjmcmahon/FiWiTSF.git

Build

make

Requirements

  • Linux with mac80211 and CONFIG_MAC80211_DEBUGFS
  • debugfs mounted (e.g. on /sys/kernel/debug)
  • Privileges for real-time scheduling (root or CAP_SYS_NICE)

Usage

sudo ./tsf_sync_rt_starter -h

See -h / --help for options (-m, -f, -p, -j, etc.).

Note

Experimental tooling for lab and bring-up. Production systems often replace debugfs with a dedicated kernel interface or driver hook.