]> git.baikalelectronics.ru Git - kernel.git/commit
rfkill: rename the rfkill_state states and add block-locked state
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Mon, 23 Jun 2008 20:46:42 +0000 (17:46 -0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 26 Jun 2008 18:21:22 +0000 (14:21 -0400)
commit9d7ad9fa99d4e5a9dbe6031eef24b951ef6ec910
treee6ed81f07a1a85ed2c440ac8631ca19cc77907c1
parent7e46010a9cfccd0ea624158d113b5c4644c25c91
rfkill: rename the rfkill_state states and add block-locked state

The current naming of rfkill_state causes a lot of confusion: not only the
"kill" in rfkill suggests negative logic, but also the fact that rfkill cannot
turn anything on (it can just force something off or stop forcing something
off) is often forgotten.

Rename RFKILL_STATE_OFF to RFKILL_STATE_SOFT_BLOCKED (transmitter is blocked
and will not operate; state can be changed by a toggle_radio request), and
RFKILL_STATE_ON to RFKILL_STATE_UNBLOCKED (transmitter is not blocked, and may
operate).

Also, add a new third state, RFKILL_STATE_HARD_BLOCKED (transmitter is blocked
and will not operate; state cannot be changed through a toggle_radio request),
which is used by drivers to indicate a wireless transmiter was blocked by a
hardware rfkill line that accepts no overrides.

Keep the old names as #defines, but document them as deprecated.  This way,
drivers can be converted to the new names *and* verified to actually use rfkill
correctly one by one.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Documentation/rfkill.txt
include/linux/rfkill.h
net/rfkill/rfkill-input.c
net/rfkill/rfkill.c