summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-09-18 07:41:16 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-09-18 07:41:16 -0700
commit8170e1b31b373911f7b242b8dbec28227a972ce8 (patch)
treebfb11d4ca7661341528a13fc7cd29bb26050fbdb
parentdbad760278fba66129f19907f4b11233554f0a16 (diff)
parent04e5f767d104bd3cca80b4ad8521e7e1b14f3a19 (diff)
downloadandroid_hardware_qcom_bt-8170e1b31b373911f7b242b8dbec28227a972ce8.tar.gz
android_hardware_qcom_bt-8170e1b31b373911f7b242b8dbec28227a972ce8.tar.bz2
android_hardware_qcom_bt-8170e1b31b373911f7b242b8dbec28227a972ce8.zip
Merge "Bluetooth: Add parameter to indicate reason for ssr_cleanup"
-rw-r--r--libbt-vendor/src/bt_vendor_qcom.c12
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