rfkill_init_sw_state(9)
π rfkill_init_sw_state β kernel API manual, bestie edition π
okay so this is rfkill_init_sw_state(9) from the Kernel API Manual, and it's genuinely one of those tiny functions that does exactly one job and does it iconically. no notes. let's get into it π«Ά
β¨ NAME β¨
rfkill_init_sw_state β initialize that persistent software block state, periodt π
πΈ SYNOPSIS πΈ
void rfkill_init_sw_state (struct rfkill *rfkill , bool blocked );
like, that's the whole signature. two args. beautiful. no cap.
π ARGUMENTS π
rfkillβ pointer to the rfkill class to modify. yes bestie, it's a pointer, and yes it's the class you're touching πblockedβ the current software block state to set. you're literally telling it "this is the vibe rn" πΈ
π¦ DESCRIPTION π¦
okay so picture this: some rfkill drivers preserve their software block state over power off. like they remember. main character energy fr fr. those drivers use this function to notify the rfkill core β and through that, also userspace β of their initial state. so everybody's on the same page from the jump β¨
β οΈ it should only be used before registration. that's the rule. do not come in late with this one, bestie π
and there's a bonus slay: it also marks the device as "persistent", which is an attribute that can be read by userspace π. and persistent devices? they're expected to preserve their own state when suspended. that's the whole deal, iykyk π§
π₯ SEE ALSO π₯
- Kernel file
./include/linux/rfkill.hstruct rfkill_ops(9) rfkill_alloc(9)rfkill_register(9)rfkill_pause_polling(9)rfkill_resume_polling(9)rfkill_unregister(9)rfkill_destroy(9)rfkill_set_hw_state_reason(9)rfkill_set_hw_state(9)rfkill_set_sw_state(9)rfkill_set_states(9)rfkill_blocked(9)rfkill_soft_blocked(9)rfkill_find_type(9)rfkill_get_led_trigger_name(9)rfkill_set_led_trigger_name(9)
like, the whole friend group. go read them too π
and that's the page!! π source/version is ./include/linux, dated October 2026 β so yeah, this manual page is coming at you straight from the kernel source tree, and it ate. mwah π bye bestie!! πβ¨π¦
π¦ 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