summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorMario Limonciello <Mario_Limonciello@Dell.com>2010-02-09 14:11:05 -0500
committerMatthew Garrett <mjg@redhat.com>2010-02-25 11:50:46 -0500
commitec1722a21491e4c354bc3bbc704fef9a8fa811fb (patch)
tree90a7ad2bce8dcb2d6b59e8c2e0fbacf8cb365801 /drivers/platform
parente551260b233e8dcbdc9d5f238ad4aa1200dc2ea7 (diff)
downloadtalos-obmc-linux-ec1722a21491e4c354bc3bbc704fef9a8fa811fb.tar.gz
talos-obmc-linux-ec1722a21491e4c354bc3bbc704fef9a8fa811fb.zip
dell-laptop: Block software state changes when rfkill hard blocked
The "hardware" switch is tied directly to a BIOS interface that will connect and disconnect the hardware from the bus. If you use the software interface to request the BIOS to make these changes, the HW switch will be in an inconsistent state and LEDs may not reflect the state of the HW. Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/dell-laptop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index b13eb6a2cb51..81213e815400 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -190,6 +190,10 @@ static int dell_rfkill_set(void *data, bool blocked)
unsigned long radio = (unsigned long)data;
memset(&buffer, 0, sizeof(struct calling_interface_buffer));
+ dell_send_request(&buffer, 17, 11);
+ if (!(buffer.output[1] & BIT(16)))
+ return -EINVAL;
+
buffer.input[0] = (1 | (radio<<8) | (disable << 16));
dell_send_request(&buffer, 17, 11);
OpenPOWER on IntegriCloud