summaryrefslogtreecommitdiffstats
path: root/libbt-vendor/src/bt_vendor_qcom.c
diff options
context:
space:
mode:
authorpramod kotreshappa <kpramod@codeaurora.org>2015-01-19 14:33:38 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-02-09 17:59:34 -0800
commit576180a57e649e6df1c9b6509c04ad33be3bec5a (patch)
treea57e51d5a16b191c8d99198176213c8a08fd8944 /libbt-vendor/src/bt_vendor_qcom.c
parentaae3b7b0ec4b643b379b45943c1b1c0c6190a897 (diff)
downloadandroid_hardware_qcom_bt-576180a57e649e6df1c9b6509c04ad33be3bec5a.tar.gz
android_hardware_qcom_bt-576180a57e649e6df1c9b6509c04ad33be3bec5a.tar.bz2
android_hardware_qcom_bt-576180a57e649e6df1c9b6509c04ad33be3bec5a.zip
Bluetooth: Fix for ANT enable failure when BT is off
Issue is due to host query for add-on feature supported by SoC during SoC initialization. Add-on feature is BT VS cmd, wcnss filter receives VS event and tries to write on BT socket. Since BT is not enabled, BT socket fd will be null and host is stuck in reading VS event, as a result ANT trun on fails. Issue is fixed by sending add-on feature VS cmd only when BT enable in process. Change-Id: I046c37b0149240560f80d2ee15c2f95be098971f
Diffstat (limited to 'libbt-vendor/src/bt_vendor_qcom.c')
-rw-r--r--libbt-vendor/src/bt_vendor_qcom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
index 09271c7..581c97d 100644
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -697,6 +697,7 @@ static int op(bt_vendor_opcode_t opcode, void *param)
break;
case BT_SOC_ROME:
{
+ property_get("persist.BT3_2.version", bt_version, false);
if (!is_soc_initialized()) {
fd = userial_vendor_open((tUSERIAL_CFG *) &userial_init_cfg);
if (fd < 0) {
@@ -706,7 +707,6 @@ static int op(bt_vendor_opcode_t opcode, void *param)
/* Clock on */
userial_clock_operation(fd, USERIAL_OP_CLK_ON);
ALOGD("userial clock on");
- property_get("persist.BT3_2.version", bt_version, false);
if(strcmp(bt_version, "true") == 0) {
property_get("ro.bluetooth.wipower", wipower_status, false);
if(strcmp(wipower_status, "true") == 0) {
@@ -754,7 +754,7 @@ static int op(bt_vendor_opcode_t opcode, void *param)
if (fd != -1) {
ALOGV("%s: received the socket fd: %d is_ant_req: %d\n",
__func__, fd, is_ant_req);
- if(strcmp(bt_version, "true") == 0) {
+ if((strcmp(bt_version, "true") == 0) && !is_ant_req) {
if (rome_ver >= ROME_VER_3_0) {
/* get rome supported feature request */
ALOGE("%s: %x08 %0x", __FUNCTION__,rome_ver, ROME_VER_3_0);