about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/dell-rfkill.patch
blob: 32f890c84f660464e0c47cf3cfc08af475d3bd42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Ensure that the dell-bluetooth device does not stay in the "hard
blocked" state.

From https://patchwork.kernel.org/patch/37539/

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 74909c4..cf40c4e 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -197,8 +197,11 @@  static void dell_rfkill_query(struct rfkill *rfkill, void *data)
 	dell_send_request(&buffer, 17, 11);
 	status = buffer.output[1];
 
-	if (status & BIT(bit))
-		rfkill_set_hw_state(rfkill, !!(status & BIT(16)));
+	/*
+	 * Don't change state unless the read-only HW rfkill switch is disabled.
+	 */
+	if (status & BIT(16))
+		rfkill_set_hw_state(rfkill, !!(status & BIT(bit)));
 }
 
 static const struct rfkill_ops dell_rfkill_ops = {