]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dell-laptop: Block software state changes when rfkill hard blocked
authorMario Limonciello <Mario_Limonciello@Dell.com>
Tue, 9 Feb 2010 19:11:05 +0000 (14:11 -0500)
committerMatthew Garrett <mjg@redhat.com>
Thu, 25 Feb 2010 16:50:46 +0000 (11:50 -0500)
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>
drivers/platform/x86/dell-laptop.c

index b13eb6a2cb514e34fd05d5827470f73eb5eb3f6f..81213e8154002ed810dfc7428aa63464abb84960 100644 (file)
@@ -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);