STRUCT PTP_DATA(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… struct ptp_data(9) โ€” the Kernel API Manual, but make it make sense

okay so bestie, welcome to the manual page for struct ptp_data(9), literally the kernel API manual entry, and no cap this is the whole thing, every field, every time unit, every default. let's go ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

struct ptp_data โ€” PTP hardware clock data

like, it's the lil struct that holds all the PTP hardware clock data. that's the vibe. ๐Ÿ’–


โœจ SYNOPSIS โœจ

struct ptp_data {
    struct ptp_clock *ptp_clock;
    struct ptp_clock_info ptp_clock_info;
    spinlock_t lock;
    s64 delta;
    u32 scale_update_gp2;
    u64 scale_update_adj_time_ns;
    u64 scaled_freq;
    u32 last_gp2;
    u32 wrap_counter;
    struct delayed_work dwork;
 };

not me putting the whole struct up there character for character ๐Ÿ˜ญ that's the layout, that's the icon, that's the main character energy. ๐ŸŒˆ


๐ŸŽ€ Members ๐ŸŽ€

okay now the part everyone actually came for โ€” the member-by-member breakdown. lowkey obsessed with how organized this is. ๐Ÿ‘‘

  • ptp_clock โ€” a struct ptp_clock pointer, the exact one handed back to you by the ptp_clock_register function. it's giving "receipt from the registration desk". ๐Ÿงพ
  • ptp_clock_info โ€” a struct ptp_clock_info that describes a PTP hardware clock. the whole personality of the clock basically. ๐Ÿ•ฐ๏ธ
  • lock โ€” a spinlock_t that protects the time adjustments data. yes bestie, the adjustments data needs a bodyguard. ๐Ÿ’…
  • delta โ€” the delta between the hardware clock and the ptp clock, measured in nanoseconds. tiny little difference, huge implications, iykyk. ๐Ÿ”ฅ
  • scale_update_gp2 โ€” the GP2 time when the scale was last updated. that's it, that's the fact. โœจ
  • scale_update_adj_time_ns โ€” the adjusted time when the scale was last updated, in nanoseconds. again with the nanoseconds, we love a consistent unit. ๐ŸŽ€
  • scaled_freq โ€” the clock frequency offset, scaled to 65536000000. not 65536, not 6553600 โ€” 65536000000. do not come for me, that's the number in the manual, periodt. ๐Ÿ’€
  • last_gp2 โ€” the last GP2 reading from the hardware, and it's used for tracking GP2 wraparounds. our little wrap-watcher. ๐Ÿฆ‹
  • wrap_counter โ€” the number of wraparounds since scale_update_adj_time_ns. keeping count, always keeping count. ๐Ÿงฎ
  • dwork โ€” a struct delayed_work worker that's scheduled every 1 hour to detect workarounds. hourly check-in, very responsible, very demure. โฐ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • Kernel file ./drivers/net/wireless/intel/iwlwifi/mld/ptp.h โ€” go read it, bestie, that's where the lore lives. ๐Ÿ“–

and that's the whole page, fr fr. this lil masterpiece is sourced from ./drivers/net/wireless/intel/i... and dated October 2026, so likeโ€ฆ mark your calendars and stan responsibly. mwah ๐Ÿ’‹โœจ๐Ÿ“

๐Ÿ“ฆ where this page comes from