I would suggest reading the updated docs, but I know you'd rather just stay
away from rfkill.
For reference:
Basically, your wireless device driver has to monitor any hardware rfkill
lines and call rfkill_force_state() accordingly (you don't even need to
track if the state changed, rfkill core will do that).
The call to rfkill_force_state() should set state to HARD_BLOCKED (any of
the hardware rfkill lines are active), SOFT_BLOCKED (no hardware rfkill
lines are active, but one of the software rfkill lines are active), or
UNBLOCKED (no rfkill lines of any type are active).
Whether this is to be done through interrupts or pooling is something that
depends on your driver and the hardware.
User and userspace interaction is taken care of by the rfkill core. You do
nothing of the sort in the wireless device driver.
There are *very few* exceptions for the above as far as wireless device
drivers go. They are explained in the docs, and I know of no wireless
device driver that would require any them.
Again, for reference:
You need to synthesize a single state (unblock/soft-block/hard-block) for a
transmitter from every rfkill line that affects that transmitter. This
happens because the interface is a SINGLE ONE rfkill class per independent
wireless interface ("transmitter").
That's quite understandable... b43 is one of the drivers (if not THE
driver) that suffered most from rfkill bugs, as it was an early adopter and
the old rfkill API was just plain broken for the kind of stuff b43 needed it
for.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--