STRUCT RFKILL_OPS(9)
π 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 therfkill_set{,_hw,_sw}_statefamily 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 therfkill_set{,_hw,_sw}_statefamily 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 return0when 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
- 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