Commit ddde7082 authored by Hans de Goede's avatar Hans de Goede Committed by Matthew Garrett

dell-laptop: If there is no hwswitch, then clear all hw-controlled bits

To ensure we don't enter any hw-switch related code paths on machines without
a hw-switch.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
parent 2a925518
...@@ -548,6 +548,9 @@ static int __init dell_setup_rfkill(void) ...@@ -548,6 +548,9 @@ static int __init dell_setup_rfkill(void)
buffer->input[0] = 0x2; buffer->input[0] = 0x2;
dell_send_request(buffer, 17, 11); dell_send_request(buffer, 17, 11);
hwswitch_state = buffer->output[1]; hwswitch_state = buffer->output[1];
/* If there is no hwswitch, then clear all hw-controlled bits */
if (!(status & BIT(0)))
hwswitch_state &= ~7;
release_buffer(); release_buffer();
if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) { if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment