summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Zhang <lukez@codeaurora.org>2017-08-08 14:37:51 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-10 16:10:14 -0700
commit84afe44e1a2948f37674c6fd0dc89dbee57fef77 (patch)
tree5c73d97753add2203b179007f6d10be64dd2097c
parent69a0af99b2403a1f64b56e849a79703fdb9c045e (diff)
downloadbt-84afe44e1a2948f37674c6fd0dc89dbee57fef77.tar.gz
Reset wcnss_filter flag in case of failure to launch it
In case of failure of launching wcnss_filter, we need to reset its flag so that we can re-launch it next time. Change-Id: I346c29eee7eb011264cfdf18089681fdc8630779
-rwxr-xr-xlibbt-vendor/src/bt_vendor_qcom.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
index 8cbf5d1..7e0e447 100755
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -348,7 +348,7 @@ int start_hci_filter() {
//Filter should have been started OR in the process of initializing
//Make sure of hci_filter_status and return the state based on it
} else {
-
+ property_set("wc_transport.clean_up","0");
property_set("wc_transport.hci_filter_status", "0");
property_set(BT_VND_FILTER_START, "true");
ALOGV("%s: %s set to true ", __func__, BT_VND_FILTER_START );
@@ -993,10 +993,12 @@ userial_open:
property_set("wc_transport.clean_up","0");
if (retval != -1) {
-
retval = start_hci_filter();
if (retval < 0) {
ALOGE("%s: WCNSS_FILTER wouldn't have started in time\n", __func__);
+ property_set("wc_transport.hci_filter_status", "-1");
+ property_set("wc_transport.start_hci", "false");
+ bt_powerup(0);
} else {
#ifdef ENABLE_ANT
if (is_ant_req) {
@@ -1053,9 +1055,16 @@ userial_open:
{
property_get("ro.bluetooth.emb_wp_mode", emb_wp_mode, false);
retval = start_hci_filter();
+
if (retval < 0) {
ALOGE("WCNSS_FILTER wouldn't have started in time\n");
-
+ /*
+ Set the following property to -1 so that the SSR cleanup routine
+ can reset SOC.
+ */
+ property_set("wc_transport.hci_filter_status", "-1");
+ property_set("wc_transport.start_hci", "false");
+ bt_powerup(0);
} else {
#ifdef ENABLE_ANT
if (is_ant_req) {