thinkpad-acpi: preserve rfkill state across suspend/resume
commit25e7be63c208d546f9da5d3d231d836995c02772
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 1 Dec 2009 02:12:29 +0000 (1 00:12 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 2 Dec 2009 11:53:04 +0000 (2 09:53 -0200)
tree343b4443c8c8920a7c78f5b6157890362839c39d
parent4c339f60b018d96e72a745458074aa172993e6e1
thinkpad-acpi: preserve rfkill state across suspend/resume

Since the rfkill rework in 2.6.31, the driver is always resuming with
the radios all in blocked state.  We used to resume with radios
blocked, and then depend on the rfkill core to re-enable them.

This doesn't work with the new rfkill core and thinkpad-acpi rfkill
code for various reasons.

Change thinkpad-acpi to ask the firmware to resume with the radios
in the last state.  This fixes the Bluetooth and WWAN rfkill switches.

Note that it means we respect the firmware's wishes.  Should the user
toggle the hardware rfkill switch on and off, it will likely cause the
radios to resume enabled.

UWB is an unknown quantity since it has nowhere the same level of
firmware support (no control over state storage in NVRAM, for
example), and might further fixing.

This change fixes a regression from 2.6.30.

Reported-by: Ian Molton <ian.molton@collabora.co.uk>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Tested-by: Ian Molton <ian.molton@collabora.co.uk>
Cc: stable@kernel.org
drivers/platform/x86/thinkpad_acpi.c