ar9002_hw_set_channel(9)
π ar9002_hw_set_channel β kernel API manual energy
okay so this page is ar9002_hw_set_channel(9) from the Kernel API Manual, and it's genuinely one of those little functions that's lowkey the main character of the whole chip π₯
β¨ NAME β¨
ar9002_hw_set_channel β set channel on single-chip device π―
πΈ SYNOPSIS πΈ
int ar9002_hw_set_channel (struct ath_hw *ah , struct ath9k_channel
*chan );
π ARGUMENTS π
ahβ atheros hardware structure (this is the whole hardware vibe holder, bestie)chanβ ngl the original page literally gives this one zero description π so we're just gonna hold space for it π«Ά
π¦ DESCRIPTION π¦
okay so this is the function to change channel on single-chip devices β and by "single-chip devices" we mean all devices after ar9280. periodt. π
What it does: it takes the channel value in MHz and sets the hardware channel value. Simple, iconic, no notes. β¨
β οΈ heads up though β it assumes writes have been enabled to analog bus already. like, that's on you, it's not doing the vibe check for you π
Actual Expression, (yes, the original page really says it like that, and honestly? slay π)
For 2GHz channel:
Channel Frequency = (3/4) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^17) (freq_ref = 40MHz)
For 5GHz channel:
Channel Frequency = (3/2) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^10) (freq_ref = 40MHz/(24>>amodeRefSel))
the way those fractions are just sitting there being all math-y π§ iykyk π
π₯ SEE ALSO π₯
- Kernel file
./drivers/net/wireless/ath/ath9k/ar9002_phy.c Programming Atheros 802.11n analog front end radios(9)ar9002_hw_spur_mitigate(9)
and that's the whole page, bestie π cute lil sign-off time: this one lives under ./drivers/net/wireless/ath/ath9k, it's dated October 2026, and the page itself is ar9002_hw_set_channel(9) π go set some channels, ily π«Άβ¨
π¦ 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