diff options
author | pramod kotreshappa <kpramod@codeaurora.org> | 2015-05-28 10:22:29 -0700 |
---|---|---|
committer | pramod kotreshappa <kpramod@codeaurora.org> | 2015-09-10 14:47:13 -0700 |
commit | 04e5f767d104bd3cca80b4ad8521e7e1b14f3a19 (patch) | |
tree | 53618e3735c20c4a12dd31d427fba2b3375912bc | |
parent | 83b2e4f1a7ffa0ae24a19464c26062a82a64e15f (diff) | |
download | android_hardware_qcom_bt-04e5f767d104bd3cca80b4ad8521e7e1b14f3a19.tar.gz android_hardware_qcom_bt-04e5f767d104bd3cca80b4ad8521e7e1b14f3a19.tar.bz2 android_hardware_qcom_bt-04e5f767d104bd3cca80b4ad8521e7e1b14f3a19.zip |
Bluetooth: Add parameter to indicate reason for ssr_cleanup
Add parameter to distinguish the reason for ssr cleanup to obtain
FW crash dump in case of command timeout.
Change-Id: I78d1a747f27a33485f5ea0ebc758b5ce36d0d473
-rw-r--r-- | libbt-vendor/src/bt_vendor_qcom.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c index cd17077..e898112 100644 --- a/libbt-vendor/src/bt_vendor_qcom.c +++ b/libbt-vendor/src/bt_vendor_qcom.c @@ -49,6 +49,7 @@ #define BT_VND_FILTER_START "wc_transport.start_hci" #endif +#define CMD_TIMEOUT 0x22 /****************************************************************************** ** Externs ******************************************************************************/ @@ -1045,7 +1046,7 @@ static int op(bt_vendor_opcode_t opcode, void *param) return retval; } -static void ssr_cleanup(void) { +static void ssr_cleanup(int reason) { int pwr_state=BT_VND_PWR_OFF; int ret; unsigned char trig_ssr = 0xEE; @@ -1061,9 +1062,12 @@ static void ssr_cleanup(void) { #ifdef ENABLE_ANT //Indicate to filter by sending //special byte - 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)); + if (reason == CMD_TIMEOUT) { + 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; + } /*Close both ANT channel*/ op(BT_VND_OP_ANT_USERIAL_CLOSE, NULL); #endif |