rfkill_set_hw_state(9)
β¨ rfkill_set_hw_state β¨
okay bestie, welcome to the rfkill_set_hw_state(9) page from the Kernel API Manual β this is the kernel-doc 9-section girlie and she is here to explain hardware blocking to you π
π NAME π
rfkill_set_hw_state β literally just "Set the internal rfkill hardware block state", no cap, that's the whole gig π¦
πΈ SYNOPSIS πΈ
bool rfkill_set_hw_state (struct rfkill *rfkill , bool blocked );
like, it takes two things and gives you back a bool, periodt β¨
π«Ά ARGUMENTS π«Ά
rfkillβ pointer to the rfkill class to modify. yeah, the one you wanna poke at πblockedβ the current hardware block state to set. this is the vibe you're assigning it π
π₯ DESCRIPTION π₯
so here's the tea β β rfkill drivers that get events when the hard-blocked state changes use this function to notify the rfkill core (and through that also userspace) of the current state. they should also use this after resume if the state could have changed. like, resume is sketchy, the state might have shifted while you weren't looking, so tell the core about it π§
you need not (but may) call this function if poll_state is assigned. so it's optional-optional in that case, do what feels right bestie π
this function can be called in any context, even from within rfkill callbacks. no rules, no restrictions, main character energy for real π
and the best part β the function returns the combined block state (true if the transmitter should be blocked) so that drivers need not keep track of the soft block state β which they might not be able to. it's literally doing the bookkeeping for you, obsessed ππ
ok but fr fr, the important bit: returns combined block state, true means transmitter should be blocked. drivers don't have to track the soft block state themselves, which is iconic because they might not even be able to π«Ά
β SEE ALSO β
- Kernel file
./include/linux/rfkill.h struct 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_sw_state(9)rfkill_init_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, that's the whole friend group right there, go say hi ππ
this page lives in ./include/linux, it's the October 2026 edition, and it ships with the Kernel API Manual β mwah, go block some transmitters responsibly, ily, bye πππ¦
π¦ 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