rfkill_set_hw_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 ⭐

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