ath5k_hw_clocktoh(9)
π ath5k_hw_clocktoh(9) β the Kernel API Manual, but make it make sense
okay bestie, so you've stumbled into ath5k_hw_clocktoh β a literal kernel API manual page (section 9, yes, the kernel one) and honestly? it's giving tiny-but-important. let's get into it π
β¨ NAME β¨
ath5k_hw_clocktoh β translate hw clock units to usec πβ‘οΈβ±οΈ
like the name says: hardware clock units in, microseconds out. slay.
πΈ SYNOPSIS πΈ
unsigned int ath5k_hw_clocktoh (struct ath5k_hw *ah , unsigned int clock );
that's the whole vibe. one function, two args, returns an unsigned int. no cap. β¨
π¦ ARGUMENTS π¦
ahβ thestruct ath5k_hwπ like, the hardware struct itself, your main characterclockβ a value in hw clock units β³ that's the thing you're converting, bestie
π DESCRIPTION π
so what does it actually do? it translates hw clock units into usecs β microseconds, for the uninitiated β based on the current hw clock rate. that's it. that's the whole function. lowkey iconic for how focused it is. π
Returns number of usecs β±οΈβ¨ (yes, that's the return value, and yes, it's literally the point)
ngl the "based on the current hw clock rate" part is doing a lot of heavy lifting here β the conversion depends on whatever rate is set at the time, so don't go assuming it's some fixed magic number. π
π₯ SEE ALSO π₯
the whole ath5k reset crew, assembled π:
- Kernel file
./drivers/net/wireless/ath/ath5k/reset.cβ Reset function and helpers(9) π§ ath5k_hw_register_timeout(9)ath5k_hw_htoclock(9)β the reverse direction, iykyk πath5k_hw_init_core_clock(9)ath5k_hw_set_sleep_clock(9)ath5k_hw_nic_reset(9)ath5k_hw_wisoc_reset(9)ath5k_hw_set_power_mode(9)ath5k_hw_on_hold(9)ath5k_hw_nic_wakeup(9)ath5k_hw_tweak_initval_settings(9)ath5k_hw_commit_eeprom_settings(9)ath5k_hw_reset(9)
periodt. go read those if you want the full lore ππ
π«Ά cute little sign-off: this page lives in ./drivers/net/wireless/ath/ath5k, dated October 2026. bye bestie, go convert some clocks πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms