diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-11-17 08:00:24 -0500 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-11-20 18:50:49 -0500 |
commit | ed1128989ab242f44664b446702a512e5695c4b7 (patch) | |
tree | 33bb1838cb165f3659d2740f1b5f2e840fa9c203 | |
parent | 04c9a3a06c47b337b90a91e458716262cc45b103 (diff) |
dell-laptop: Do not skip setting blocked bit rfkill_set while hw-blocked
Instead when hw-blocked always write 1 to the blocked bit for the radio in
question. This is necessary to properly set all the blocked bits for hw-switch
controlled radios to 1 after power-on and resume.
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 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 7f59624d805d..b33b77991523 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -409,15 +409,14 @@ static int dell_rfkill_set(void *data, bool blocked) | |||
409 | dell_send_request(buffer, 17, 11); | 409 | dell_send_request(buffer, 17, 11); |
410 | 410 | ||
411 | /* If the hardware switch controls this radio, and the hardware | 411 | /* If the hardware switch controls this radio, and the hardware |
412 | switch is disabled, don't allow changing the software state */ | 412 | switch is disabled, always disable the radio */ |
413 | if ((hwswitch_state & BIT(hwswitch_bit)) && | 413 | if ((hwswitch_state & BIT(hwswitch_bit)) && |
414 | !(buffer->output[1] & BIT(16))) | 414 | !(buffer->output[1] & BIT(16))) |
415 | goto out; | 415 | disable = 1; |
416 | 416 | ||
417 | buffer->input[0] = (1 | (radio<<8) | (disable << 16)); | 417 | buffer->input[0] = (1 | (radio<<8) | (disable << 16)); |
418 | dell_send_request(buffer, 17, 11); | 418 | dell_send_request(buffer, 17, 11); |
419 | 419 | ||
420 | out: | ||
421 | release_buffer(); | 420 | release_buffer(); |
422 | return 0; | 421 | return 0; |
423 | } | 422 | } |