aboutsummaryrefslogtreecommitdiff
blob: a49e015bb861aff053c17c60b7aba2902b4fa05f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From e262a200a31ffc0bb90772cbb3fbb84a940eb121 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario_limonciello@dell.com>
Date: Fri, 24 Oct 2008 10:38:24 +0200
Subject: [PATCH 27/48] fix Dell bluetooth killswitch

Fixed Dell Bluetooth killswitch handling to not use the --sw_bt command.

From http://thread.gmane.org/gmane.comp.freedesktop.hal/12283:

[Mario Limonciello <mario_limonciello@dell.com>]:
> I've been trying to track down why on some machines the hardware BT
> switch suddenly stops working periodically and then figured out what's
> actually happening.  HAL is turning it off every time.  Well
> unfortunately, on a lot of Dell platforms, the software switch simply
> doesn't work.  This is a BIOS limitation on those platforms.  What
> happens then is somehow this kill switch interface gets triggered, turns
> off the hardware switch, and suddenly the user has no way to turn
> bluetooth back on.  I feel the better solution is to only turn off via
> the software switch.  If the platform ends up supporting it, it will
> work, if not, nothing happens.

[Michael_E_Brown@dell.com]:
> I wrote dellWirelessCtl a long time ago and I remember running into
> one limitation with setting switch settings, but I dont remember the
> exact details (a BIOS limitation). Something like changing the switch
> settings always turned BT on or off. It was a BIOS bug or limitation
> or whatever you want to call it. But the solution would most likely be
> to adjust what HAL is doing as suggested by Mario. I've been messing
> with it on my system for a little bit to try to remember what the
> problem was, but I cant get the exact sequence that hits what I
> remember hitting.
---
 tools/linux/hal-system-killswitch-set-power-linux |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/linux/hal-system-killswitch-set-power-linux b/tools/linux/hal-system-killswitch-set-power-linux
index bc2ed38..d485a70 100755
--- a/tools/linux/hal-system-killswitch-set-power-linux
+++ b/tools/linux/hal-system-killswitch-set-power-linux
@@ -25,14 +25,12 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
 	exit 0
     elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
 	if [ -x "$DELL_WCTL" ]; then
-	    # As a side effect we disable the physical kill switch
-
 	    # TODO: write our own binary that links with libsmbios?
 	    if [ "$value" = "true" ]; then
-	        $DELL_WCTL --sw_bt 0 --bt 1
+	        $DELL_WCTL --bt 1
 	        ret=$?
 	    else
-	        $DELL_WCTL --sw_bt 0 --bt 0
+	        $DELL_WCTL --bt 0
 	        ret=$?
 	    fi
 	    if [ "$ret" != "0" ]; then
-- 
1.6.1.2