提交 ec1722a2 编写于 作者: M Mario Limonciello 提交者: Matthew Garrett

dell-laptop: Block software state changes when rfkill hard blocked

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: NMario Limonciello <Mario_Limonciello@Dell.com>
上级 e551260b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册