STRUCT RFKILL_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct rfkill_ops(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for struct rfkill_ops β€” it’s giving β€œrfkill driver methods” and we are gonna go through every single detail together 🫢 no skips, no cap.


🌸 NAME 🌸

struct rfkill_ops β€” rfkill driver methods. literally the little method squad your driver hands over so rfkill knows what’s up πŸ’…


✨ SYNOPSIS ✨

struct rfkill_ops {
    void (*poll)(struct rfkill *rfkill, void *data);
    void (*query)(struct rfkill *rfkill, void *data);
    int (*set_block)(void *data, bool blocked);
 };

🧚 Members 🧚

  • poll β€” poll the rfkill block state(s) πŸ’« only assign this method when you actually need polling, bestie. When it gets called, simply call one of the rfkill_set{,_hw,_sw}_state family of functions. If the hw is getting unblocked, you need to take into account the return value of those functions to make sure the software block is properly used β€” that part is important, don’t sleep on it 😭
  • query β€” query the rfkill block state(s) and call exactly one of the rfkill_set{,_hw,_sw}_state family of functions. Assign this method if input events can cause hardware state changes, so the rfkill core can query your driver before setting a requested block. it’s giving β€œhey bestie, check the hardware vibe first” πŸ”βœ¨
  • set_block β€” turn the transmitter on (blocked == false) or off (blocked == true) πŸ”₯ ignore it and return 0 when hard blocked. This callback must be assigned. like, mandatory mandatory, not optional cute extra πŸ’€

πŸ”— SEE ALSO πŸ”—

Kernel file ./include/linux/rfkill.h β€” and the whole linked bestie lineup is: 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_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) 🌈⭐


okay bye bestie πŸ’– this cute lil page is from ./include/linux, dated October 2026, and it’s all about struct rfkill_ops(9) β€” slay, go forth and rfkill responsibly πŸ«ΆπŸ’…

πŸ“¦ where this page comes from