OSDN Git Service

eeepc-laptop: fix wlan rfkill state change during init
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Mon, 27 Apr 2009 07:23:37 +0000 (09:23 +0200)
committerCorentin Chary <corentincj@iksaif.net>
Wed, 30 Sep 2009 20:17:41 +0000 (22:17 +0200)
commit6ecd7b6242f48e087117e451e75c30998b7cfe22
tree4b3aebc8befe06c0dcf7863ab93489c7fadf3f3c
parent8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84
eeepc-laptop: fix wlan rfkill state change during init

When an rfkill device is registered, the rfkill core will change its
state to the system default. So we need to prepare for state changes
*before* we register it. That means installing the eeepc-specific ACPI
callback which handles the hotplug of the wireless network adaptor.

This problem doesn't occur during normal operation.  You have to

1) Boot with wireless enabled. eeepc-laptop should load automatically.
2) modprobe -r eeepc-laptop
3) modprobe eeepc-laptop

On boot, the default rfkill state will be set to enabled.
With the current core code, step 2) will disable the wireless.
Therefore in step 3), the wireless will change state during registration,
from disabled to enabled.  But without this fix, the PCI device for the
wireless adaptor will not appear.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/eeepc-laptop.c