Skip to content

Commit

Permalink
dell-laptop: Block software state changes when rfkill hard blocked
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mario Limonciello authored and Matthew Garrett committed Feb 25, 2010
1 parent e551260 commit ec1722a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/platform/x86/dell-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ec1722a

Please sign in to comment.