rfkill: rewrite
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Jun 2009 11:01:37 +0000 (13:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 3 Jun 2009 18:06:13 +0000 (14:06 -0400)
commit19d337dff95cbf76edd3ad95c0cee2732c3e1ec5
tree33326eeb09cb9664cc8427a5dc7cd2b08b5a57c3
parent0f6399c4c525b518644a9b09f8d6fb125a418c4d
rfkill: rewrite

This patch completely rewrites the rfkill core to address
the following deficiencies:

 * all rfkill drivers need to implement polling where necessary
   rather than having one central implementation

 * updating the rfkill state cannot be done from arbitrary
   contexts, forcing drivers to use schedule_work and requiring
   lots of code

 * rfkill drivers need to keep track of soft/hard blocked
   internally -- the core should do this

 * the rfkill API has many unexpected quirks, for example being
   asymmetric wrt. alloc/free and register/unregister

 * rfkill can call back into a driver from within a function the
   driver called -- this is prone to deadlocks and generally
   should be avoided

 * rfkill-input pointlessly is a separate module

 * drivers need to #ifdef rfkill functions (unless they want to
   depend on or select RFKILL) -- rfkill should provide inlines
   that do nothing if it isn't compiled in

 * the rfkill structure is not opaque -- drivers need to initialise
   it correctly (lots of sanity checking code required) -- instead
   force drivers to pass the right variables to rfkill_alloc()

 * the documentation is hard to read because it always assumes the
   reader is completely clueless and contains way TOO MANY CAPS

 * the rfkill code needlessly uses a lot of locks and atomic
   operations in locked sections

 * fix LED trigger to actually change the LED when the radio state
   changes -- this wasn't done before

Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
47 files changed:
Documentation/rfkill.txt
MAINTAINERS
arch/arm/mach-pxa/tosa-bt.c
arch/arm/mach-pxa/tosa.c
drivers/net/usb/hso.c
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/pci.c
drivers/net/wireless/b43/Kconfig
drivers/net/wireless/b43/leds.c
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/phy_a.c
drivers/net/wireless/b43/phy_common.c
drivers/net/wireless/b43/phy_common.h
drivers/net/wireless/b43/phy_g.c
drivers/net/wireless/b43/phy_lp.c
drivers/net/wireless/b43/phy_n.c
drivers/net/wireless/b43/rfkill.c
drivers/net/wireless/b43/rfkill.h
drivers/net/wireless/b43legacy/Kconfig
drivers/net/wireless/b43legacy/leds.c
drivers/net/wireless/b43legacy/rfkill.c
drivers/net/wireless/b43legacy/rfkill.h
drivers/net/wireless/iwlwifi/Kconfig
drivers/net/wireless/iwlwifi/iwl-rfkill.c
drivers/net/wireless/iwmc3200wifi/rfkill.c
drivers/platform/x86/Kconfig
drivers/platform/x86/acer-wmi.c
drivers/platform/x86/dell-laptop.c
drivers/platform/x86/eeepc-laptop.c
drivers/platform/x86/hp-wmi.c
drivers/platform/x86/sony-laptop.c
drivers/platform/x86/thinkpad_acpi.c
drivers/platform/x86/toshiba_acpi.c
include/linux/Kbuild
include/linux/rfkill.h
include/net/wimax.h
net/rfkill/Kconfig
net/rfkill/Makefile
net/rfkill/core.c [new file with mode: 0644]
net/rfkill/input.c [new file with mode: 0644]
net/rfkill/rfkill-input.c [deleted file]
net/rfkill/rfkill-input.h [deleted file]
net/rfkill/rfkill.c [deleted file]
net/rfkill/rfkill.h [new file with mode: 0644]
net/wimax/Kconfig
net/wimax/op-rfkill.c