summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
diff options
context:
space:
mode:
authorPhil Blundell <pb@pbcl.net>2011-07-07 17:04:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-12 15:21:27 +0100
commit5275297b93e9c7aed1619fd607ba52e089c33043 (patch)
treeb89173e684c4e7cb2e48aa2a5161c0110fa4aa0d /meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
parent88c6c7abbfbd57ac984547f7f0fa92b808b3d3a6 (diff)
downloadpoky-5275297b93e9c7aed1619fd607ba52e089c33043.tar.gz
bluez-dtl1-workaround: deleted
(From OE-Core rev: 8b524d44a74b7501e83c6aecde4814ae69617dc8) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh')
-rw-r--r--meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh57
1 files changed, 0 insertions, 57 deletions
diff --git a/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh b/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
deleted file mode 100644
index fefc72e07a..0000000000
--- a/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
+++ /dev/null
@@ -1,57 +0,0 @@
1#!/bin/sh
2
3case "$1" in
4 suspend)
5 if [ "`/sbin/hciconfig`" != "" ]; then
6 #If hciconfig outputs anything then there's probably a Bluetooth
7 # CF card in the slot so shut it down.
8 hcitool dc `hcitool con | grep ACL | sed 's/^.*\([0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}\).*$/\1/'`
9 hciconfig hci0 down
10 killall hciattach > /dev/null 2>&1
11 fi
12 ;;
13
14 resume)
15 #check for kernel version
16 if [ "`uname -r | grep 2.4.`" != "" ]; then
17 k="o"
18 elif [ "`uname -r | grep 2.6.`" != "" ]; then
19 k="ko"
20 else
21 exit 0
22 fi
23
24 if test -e /sbin/cardctl; then
25 CARDCTL=/sbin/cardctl
26 elif test -e /sbin/pccardctl; then
27 CARDCTL=/sbin/pccardctl
28 else
29 exit 0
30 fi
31
32 if [ "`lsmod | grep hci_uart`" != "" ]; then
33 #If the hci_usb module is still loaded then there's a serial based
34 # Bluetooth CF card in the slot, which only needs a resume to get it going
35 # again.
36 rfcomm bind all
37 $CARDCTL resume
38 hciconfig hci0 up
39 else
40 # only works for nokia dtl1 cards
41 for f in /lib/modules/`uname -r`/kernel/drivers/bluetooth/dtl1_cs.$k
42 do
43 #Enumerate all the self-contained Bluetooth CF card drivers
44 f=`echo $f | sed 's/\.'$k'$//'`
45 f=`basename $f`
46 if [ "`lsmod | grep $f`" != "" ]; then
47 #If one of these drivers is still loaded, then there is probably
48 #a non-serial based Bluetooth CF card in the slot that needs
49 #ejecting and reinserting to get it going again
50 rfcomm bind all
51 $CARDCTL eject
52 $CARDCTL insert
53 hciconfig hci0 up
54 fi
55 done
56 fi
57esac