summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-04-08 12:46:01 -0700
committerSteve Kondik <steve@cyngn.com>2016-04-08 12:46:01 -0700
commitdec5d09d04c991a41c6c085ae05ae8c28bb05549 (patch)
tree426550f6fbdfbe8d6362e90691d1b575e871e94b
parent1aafa739c36735306a2c197477aae5673750fb3f (diff)
parent8d45c59708eeb47953c0d071e71dc4fd292c3be5 (diff)
downloadandroid_hardware_qcom_bt-dec5d09d04c991a41c6c085ae05ae8c28bb05549.tar.gz
android_hardware_qcom_bt-dec5d09d04c991a41c6c085ae05ae8c28bb05549.tar.bz2
android_hardware_qcom_bt-dec5d09d04c991a41c6c085ae05ae8c28bb05549.zip
Merge branch 'LA.BF.1.1.3_rb1.12' of git://codeaurora.org/platform/hardware/qcom/bt into cm-13.0
-rw-r--r--libbt-vendor/src/bt_vendor_qcom.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
index 0dbb612..aa81c94 100644
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -52,6 +52,7 @@
#define CMD_TIMEOUT 0x22
static void wait_for_patch_download(bool is_ant_req);
+static bool is_debug_force_special_bytes(void);
/******************************************************************************
** Externs
@@ -1089,13 +1090,19 @@ static void ssr_cleanup(int reason) {
trig_ssr = 0xEE;
ret = write (vnd_userial.fd, &trig_ssr, 1);
ALOGI("Trig_ssr is being sent to BT socket, retval(%d) :errno: %s", ret, strerror(errno));
- return;
+
+ if (is_debug_force_special_bytes()) {
+ //Then we should send special byte to crash SOC in WCNSS_Filter, so we do not
+ //need to power off UART here.
+ return;
+ }
}
+
/*Close both ANT channel*/
op(BT_VND_OP_ANT_USERIAL_CLOSE, NULL);
#endif
#endif
- /*Close both ANT channel*/
+ /*Close both BT channel*/
op(BT_VND_OP_USERIAL_CLOSE, NULL);
/*CTRL OFF twice to make sure hw
* turns off*/
@@ -1146,6 +1153,22 @@ void wait_for_patch_download(bool is_ant_req) {
}
}
+static bool is_debug_force_special_bytes() {
+ int ret = 0;
+ char value[PROPERTY_VALUE_MAX] = {'\0'};
+ bool enabled = false;
+
+ ret = property_get("wc_transport.force_special_byte", value, NULL);
+
+ if (ret) {
+ enabled = (strcmp(value, "false") ==0) ? false : true;
+ ALOGV("%s: wc_transport.force_special_byte: %s, enabled: %d ",
+ __func__, value, enabled);
+ }
+
+ return enabled;
+}
+
// Entry point of DLib
const bt_vendor_interface_t BLUETOOTH_VENDOR_LIB_INTERFACE = {
sizeof(bt_vendor_interface_t),