summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhtop.kim <jhtop.kim@samsung.com>2011-07-29 14:54:17 +0900
committerJaikumar Ganesh <jaikumar@google.com>2011-07-29 09:40:25 -0700
commitcd60add87bf628e96d3a91dc96d4bf945a0ccb17 (patch)
treeeb0a5eb7c2fa244536c6b3199d0ec2b140497449
parent9bb0edea288194e6777514b8aca5923f6c5c1268 (diff)
downloadbluetooth-cd60add87bf628e96d3a91dc96d4bf945a0ccb17.tar.gz
Bluetooth: fix for the unrecoverable state after BT on is failed
- When bt_enable() is called ,device try to turn on hci device. if timeout happened after 10 seconds try,set_bluetooth_power() is called. but hciattach is still running state, so turning on BT will fail. it is unrecoverable before device reboot. - add code for hciattach stop Signed-off-by: jhtop.kim <jhtop.kim@samsung.com> Change-Id: Id210995eb4e811994d40e1a5f567606f2b9a0207
-rw-r--r--bluedroid/bluetooth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bluedroid/bluetooth.c b/bluedroid/bluetooth.c
index bf188be..252bdc4 100644
--- a/bluedroid/bluetooth.c
+++ b/bluedroid/bluetooth.c
@@ -177,6 +177,9 @@ int bt_enable() {
if (attempt == 0) {
LOGE("%s: Timeout waiting for HCI device to come up, error- %d, ",
__FUNCTION__, ret);
+ if (property_set("ctl.stop", "hciattach") < 0) {
+ LOGE("Error stopping hciattach");
+ }
set_bluetooth_power(0);
goto out;
}