summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-02-11 10:16:31 -0800
committerLinux Build Service Account <lnxbuild@localhost>2016-02-11 10:16:31 -0800
commit4dfd861985a52837d20affe34c80a9e267c19694 (patch)
tree0f96d5a1655f0a18025842a0e04d8251c2a5cfe0
parent61c2177f38a26577890d722ede10bc3ebba88c5e (diff)
parentd0dda498b56f3a2544b2f536f29ef3cc6e126153 (diff)
downloadandroid_hardware_qcom_bt-4dfd861985a52837d20affe34c80a9e267c19694.tar.gz
android_hardware_qcom_bt-4dfd861985a52837d20affe34c80a9e267c19694.tar.bz2
android_hardware_qcom_bt-4dfd861985a52837d20affe34c80a9e267c19694.zip
Promotion of bt.lnx.1.0-00043.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 964802 I41f9dae5ec4c771e078d09213b0d19f23ec9de1f Fixed the problem of ADSP crash while Fuzzing BT Change-Id: Idf9b160ad7a999de56a357c5c38e26ffcf822998 CRs-Fixed: 964802
-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 d1ca184..0a36ad6 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
@@ -1093,13 +1094,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*/
@@ -1150,6 +1157,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),