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

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
parent 04c9a3a0
...@@ -409,15 +409,14 @@ static int dell_rfkill_set(void *data, bool blocked) ...@@ -409,15 +409,14 @@ static int dell_rfkill_set(void *data, bool blocked)
dell_send_request(buffer, 17, 11); dell_send_request(buffer, 17, 11);
/* If the hardware switch controls this radio, and the hardware /* If the hardware switch controls this radio, and the hardware
switch is disabled, don't allow changing the software state */ switch is disabled, always disable the radio */
if ((hwswitch_state & BIT(hwswitch_bit)) && if ((hwswitch_state & BIT(hwswitch_bit)) &&
!(buffer->output[1] & BIT(16))) !(buffer->output[1] & BIT(16)))
goto out; disable = 1;
buffer->input[0] = (1 | (radio<<8) | (disable << 16)); buffer->input[0] = (1 | (radio<<8) | (disable << 16));
dell_send_request(buffer, 17, 11); dell_send_request(buffer, 17, 11);
out:
release_buffer(); release_buffer();
return 0; return 0;
} }
......
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