diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-11-17 08:00:27 -0500 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-11-20 18:50:49 -0500 |
commit | 2bd4ac139259bb605fc0325a7dda33e2fbb67ae3 (patch) | |
tree | e8ecf859c13cc21121ab0a669a76281c4402ebd6 | |
parent | 8e0e668d0aa09d2eb0a7a260b6c7801796e01bd3 (diff) |
dell-laptop: Only enable rfkill functionality on laptops with a hw killswitch
All my testing has been on laptops with a hw killswitch, so to be on the
safe side disable rfkill functionality on models without a hw killswitch for
now. Once we gather some feedback on laptops without a hw killswitch this
decision maybe reconsidered.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index bd67c893ba07..c608b1d33f4a 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -580,11 +580,18 @@ static int __init dell_setup_rfkill(void) | |||
580 | buffer->input[0] = 0x2; | 580 | buffer->input[0] = 0x2; |
581 | dell_send_request(buffer, 17, 11); | 581 | dell_send_request(buffer, 17, 11); |
582 | hwswitch_state = buffer->output[1]; | 582 | hwswitch_state = buffer->output[1]; |
583 | /* If there is no hwswitch, then clear all hw-controlled bits */ | ||
584 | if (!(status & BIT(0))) | ||
585 | hwswitch_state &= ~7; | ||
586 | release_buffer(); | 583 | release_buffer(); |
587 | 584 | ||
585 | if (!(status & BIT(0))) { | ||
586 | if (force_rfkill) { | ||
587 | /* No hwsitch, clear all hw-controlled bits */ | ||
588 | hwswitch_state &= ~7; | ||
589 | } else { | ||
590 | /* rfkill is only tested on laptops with a hwswitch */ | ||
591 | return 0; | ||
592 | } | ||
593 | } | ||
594 | |||
588 | if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) { | 595 | if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) { |
589 | wifi_rfkill = rfkill_alloc("dell-wifi", &platform_device->dev, | 596 | wifi_rfkill = rfkill_alloc("dell-wifi", &platform_device->dev, |
590 | RFKILL_TYPE_WLAN, | 597 | RFKILL_TYPE_WLAN, |