Wi-Fi hardware-timestamping prototypes: USB RX SO_TIMESTAMPING + PCIe PHC/rtw88#232
Merged
Conversation
… PHC/rtw88 Out-of-band reference tooling behind the timing findings in docs/timing-accuracy.md. None of it is part of the devourer library build. USB (surfaces the vendor rtl88x2cu RX hardware timestamp): - Bump the reference/rtl88x2cu submodule to the merged CONFIG_RTW_HWTSTAMP driver (attaches the RX-descriptor TSF to skb_hwtstamps -> SO_TIMESTAMPING). - tests/rx_hwtstamp_probe.c: AF_PACKET + SO_TIMESTAMPING reader. - tests/rx_hwtstamp_validate.sh: capability check (driver swap + ethtool -T). - tests/rx_hwtstamp_onair.sh: on-air value check against a devourer open AP. PCIe (RTL8821CE, rtw88): - tests/pcie_phc/: a passive PTP hardware clock off the MAC TSF over BAR2 MMIO (rtw88 stays bound), a gettime-latency probe, an Intel-I226 cross-check, and a one-hunk rtw88 RX skb_hwtstamps patch. See tests/pcie_phc/README.md. - tests/pcie_tsf_read.c: userspace BAR2 TSF reader. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Out-of-band reference tooling behind the timing findings in
docs/timing-accuracy.md. None of it is part of the devourer library build — it's kernel-side experiments intests/, so the library CI is unchanged.USB — surface the vendor
rtl88x2cuRX hardware timestampreference/rtl88x2cu→ the mergedCONFIG_RTW_HWTSTAMPdriver (attaches the RX-descriptor TSF toskb_hwtstampsbefore delivery, so aSO_TIMESTAMPINGsocket reads the 802.11 hardware RX timestamp).tests/rx_hwtstamp_probe.c— AF_PACKET +SO_TIMESTAMPINGreader.tests/rx_hwtstamp_validate.sh— capability check (driver swap +ethtool -T).tests/rx_hwtstamp_onair.sh— on-air value check against a devourer open AP; verified the RX timestamps advance in step with real airtime.PCIe — RTL8821CE (
rtw88)tests/pcie_phc/— a passive PTP hardware clock (/dev/ptpN) off the MAC TSF over BAR2 MMIO (rtw88stays bound; the module onlyioremaps and reads), a gettime-latency probe (~3.7 µs MMIO floor), an Intel I226 cross-check (Wi-Fi TSF tracks a real IEEE-1588 clock to ~290 ns), and a one-hunkrtw88RXskb_hwtstampspatch. Seetests/pcie_phc/README.md.tests/pcie_tsf_read.c— userspace BAR2 TSF reader.Scope
RX hardware timestamping works on both transports; a real PHC is tractable on PCIe. Two-way
ptp4lover the Wi-Fi radio stays blocked on a host-reported TX-egress timestamp (firmware limitation) — the board's I226 Ethernet is the real-PTP reference. All measured results and that limit are indocs/timing-accuracy.md.🤖 Generated with Claude Code