ath5k_hw_set_power_mode(9)
π€ ath5k_hw_set_power_mode(9) β the sleepover episode π€
Okay bestie, so this one is from the Kernel API Manual and it's literally about telling your wifi chip how to nap π΄β¨ Not me getting emotional over a power mode function at 2am.
πΈ NAME πΈ
ath5k_hw_set_power_mode β set power mode. She sets the vibe, she sets the sleep. Simple as that π
π SYNOPSIS π
int ath5k_hw_set_power_mode (struct ath5k_hw *ah , enum ath5k_power_mode
mode , bool set_chip , u16 sleep_duration );
That's the whole cast of characters right there, no cap π«Ά
β¨ ARGUMENTS β¨
ahβ thestruct ath5k_hw. It's the hardware struct, the main character of the whole operation πmodeβ one ofenum ath5k_power_mode. Gotta pick your nap style from the official list, no improvising π§set_chipβ set this totrueto write the sleep control register. Fr fr,trueactually writes the thing, that's the whole point πsleep_durationβ how much time the device is allowed to sleep when the sleep logic is enabled, measured in 128 microsecond increments. So like, do the math on that one π₯
π DESCRIPTION π
So the way that this works is: ath5k_hw_set_power_mode is the function you use to configure the sleep policy and the allowed sleep modes. It's giving bedtime-routine-for-hardware energy ποΈβ¨
For more info, she says go check out the sleep control register on reg.h and STA_ID1. That's where the lore lives, iykyk π
And the returns? Bestie, listen:
- Returns
0on success π slay - Returns
-EIOif the chip didn't wake up π lowkey tragic - Returns
-EINVALif an invalid mode is requested π like, girl, that mode doesn't exist
Heads up: that -EIO is the chip refusing to wake up situation β pay attention to that one, it's not just flavor text π
π¦ SEE ALSO π¦
Kernel file ./drivers/net/wireless/ath/ath5k/reset.c β Reset function and helpers(9), plus the whole friend group:
ath5k_hw_register_timeout(9)ath5k_hw_htoclock(9)ath5k_hw_clocktoh(9)ath5k_hw_init_core_clock(9)ath5k_hw_set_sleep_clock(9)ath5k_hw_nic_reset(9)ath5k_hw_wisoc_reset(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)
That's the group chat and everyone is invited π
πΈ sign-off πΈ
This icon lives in ./drivers/net/wireless/ath/ath5k, dated October 2026 β and the page is ath5k_hw_set_power_mode(9) in the Kernel API Manual. Periodt. Sleep tight bestie, don't let the -EIO bite ππ€
π¦ 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