svn path=/nixpkgs/branches/kde-4.7/; revision=28146
[NixPkgs.git] / pkgs / os-specific / linux / kernel / dell-rfkill.patch
blob32f890c84f660464e0c47cf3cfc08af475d3bd42
1 Ensure that the dell-bluetooth device does not stay in the "hard
2 blocked" state.
4 From https://patchwork.kernel.org/patch/37539/
6 diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
7 index 74909c4..cf40c4e 100644
8 --- a/drivers/platform/x86/dell-laptop.c
9 +++ b/drivers/platform/x86/dell-laptop.c
10 @@ -197,8 +197,11 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
11 dell_send_request(&buffer, 17, 11);
12 status = buffer.output[1];
14 - if (status & BIT(bit))
15 - rfkill_set_hw_state(rfkill, !!(status & BIT(16)));
16 + /*
17 + * Don't change state unless the read-only HW rfkill switch is disabled.
18 + */
19 + if (status & BIT(16))
20 + rfkill_set_hw_state(rfkill, !!(status & BIT(bit)));
23 static const struct rfkill_ops dell_rfkill_ops = {