summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Kapdi <sunnyk@codeaurora.org>2015-08-26 14:56:48 -0700
committerVineeta Srivastava <vsrivastava@google.com>2015-08-26 22:55:02 -0700
commitf2169748daa2d42d833831d240dfad98161f3c32 (patch)
treeb71ed21fb8cfdc816a5f14369bfc950dd978cfe5
parent791b9d0cc9f2f4f354c11db6e5618eb9640a5560 (diff)
downloadplatform_hardware_qcom_bt-marshmallow-mr1-release.tar.gz
platform_hardware_qcom_bt-marshmallow-mr1-release.tar.bz2
platform_hardware_qcom_bt-marshmallow-mr1-release.zip
BD_ADDR is passed by the stack and is not required to be fetched from libbtnv Change-Id: If77f1f96c11d6c78544428fec487da6dbb076b52
-rw-r--r--msm8992/libbt-vendor/Android.mk15
-rw-r--r--msm8992/libbt-vendor/include/bt_vendor_persist.h8
-rw-r--r--msm8992/libbt-vendor/src/bt_vendor_qcom.c4
3 files changed, 20 insertions, 7 deletions
diff --git a/msm8992/libbt-vendor/Android.mk b/msm8992/libbt-vendor/Android.mk
index 2a512f0..ee4c0b8 100644
--- a/msm8992/libbt-vendor/Android.mk
+++ b/msm8992/libbt-vendor/Android.mk
@@ -28,8 +28,10 @@ LOCAL_SRC_FILES := \
src/hci_uart.c \
src/hci_smd.c \
src/hw_rome.c \
- src/hw_ar3k.c \
- src/bt_vendor_persist.cpp
+ src/hw_ar3k.c
+
+# if read from bt nv
+# src/bt_vendor_persist.cpp
ifeq ($(QCOM_BT_USE_SIBS),true)
LOCAL_CFLAGS += -DQCOM_BT_SIBS_ENABLE
@@ -55,15 +57,18 @@ endif #WIFI_BT_STATUS_SYNC
LOCAL_SHARED_LIBRARIES := \
libcutils \
- liblog \
- libbtnv
+ liblog
+
+
+# if read from bt nv
+# libbtnv
+#LOCAL_CFLAGS += -DBT_NV_SUPPORT
LOCAL_MODULE := libbt-vendor
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_OWNER := qcom
-LOCAL_CFLAGS += -DBT_NV_SUPPORT
#LOCAL_CFLAGS += -DREAD_BT_ADDR_FROM_PROP
#include $(LOCAL_PATH)/vnd_buildcfg.mk
diff --git a/msm8992/libbt-vendor/include/bt_vendor_persist.h b/msm8992/libbt-vendor/include/bt_vendor_persist.h
index 4f2e8ee..78a245b 100644
--- a/msm8992/libbt-vendor/include/bt_vendor_persist.h
+++ b/msm8992/libbt-vendor/include/bt_vendor_persist.h
@@ -27,6 +27,8 @@
#ifndef BT_VENDOR_PERSIST_H_
#define BT_VENDOR_PERSIST_H_
+#ifdef BT_NV_SUPPORT
+
#ifdef __cplusplus
extern "C"
{
@@ -34,9 +36,9 @@ extern "C"
#include <stdio.h>
-#ifdef BT_NV_SUPPORT
+//#ifdef BT_NV_SUPPORT
-#endif /* BT_NV_SUPPORT */
+//#endif /* BT_NV_SUPPORT */
typedef unsigned char boolean;
/*===========================================================================
FUNCTION bt_vendor_nv_read
@@ -65,5 +67,7 @@ extern uint8_t bt_vendor_nv_read
}
#endif
+#endif /* BT_NV_SUPPORT */
+
#endif /* BT_VENDOR_PERSIST_H_ */
diff --git a/msm8992/libbt-vendor/src/bt_vendor_qcom.c b/msm8992/libbt-vendor/src/bt_vendor_qcom.c
index b5d8bfa..4d16678 100644
--- a/msm8992/libbt-vendor/src/bt_vendor_qcom.c
+++ b/msm8992/libbt-vendor/src/bt_vendor_qcom.c
@@ -37,7 +37,9 @@
#include <sys/socket.h>
#include <cutils/sockets.h>
#include <linux/un.h>
+#ifdef BT_NV_SUPPORT
#include "bt_vendor_persist.h"
+#endif
#include "hw_rome.h"
#define WAIT_TIMEOUT 200000
@@ -798,12 +800,14 @@ static int op(bt_vendor_opcode_t opcode, void *param)
ignore_boot_prop = TRUE;
}
#endif //READ_BT_ADDR_FROM_PROP
+#ifdef BT_NV_SUPPORT
/* Always read BD address from NV file */
if(ignore_boot_prop && !bt_vendor_nv_read(1, vnd_local_bd_addr))
{
/* Since the BD address is configured in boot time We should not be here */
ALOGI("Failed to read BD address. Use the one from bluedroid stack/ftm");
}
+#endif //BT_NV_SUPPORT
if(rome_soc_init(fd,vnd_local_bd_addr)<0) {
retval = -1;
userial_clock_operation(fd, USERIAL_OP_CLK_OFF);