Promotion of bt.lnx.2.1-00010.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1064473 Ie5f7eae873655e35d7beaf927f3c88ab61ba818f Set wc_transport.stack_bdaddr property
Change-Id: Ia84b07a9699333beff34b86d4d5a3eeb55767a09
CRs-Fixed: 1064473
diff --git a/libbt-vendor/include/bt_vendor_qcom.h b/libbt-vendor/include/bt_vendor_qcom.h
index dd956cf..ac8d2fd 100644
--- a/libbt-vendor/include/bt_vendor_qcom.h
+++ b/libbt-vendor/include/bt_vendor_qcom.h
@@ -69,6 +69,7 @@
BT_STATUS_FAIL,
BT_STATUS_INVAL,
BT_STATUS_NOMEM,
+ BT_STATUS_PROP_FAILURE,
};
struct bt_qcom_struct {
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
index 09583d5..cceeb59 100644
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -585,7 +585,7 @@
static int init(const bt_vendor_callbacks_t *cb, unsigned char *bdaddr)
{
- char address[PROPERTY_VALUE_MAX];
+ char prop[PROPERTY_VALUE_MAX] = {0};
struct bt_qcom_struct *temp = NULL;
int ret = BT_STATUS_SUCCESS, i;
@@ -611,8 +611,18 @@
temp->ant_fd = -1;
temp->soc_type = get_bt_soc_type();
soc_init(temp->soc_type);
+
le2bd(bdaddr, temp->bdaddr);
print_bdaddr(temp->bdaddr);
+ snprintf(prop, sizeof(prop), "%02x:%02x:%02x:%02x:%02x:%02x",
+ temp->bdaddr[0], temp->bdaddr[1], temp->bdaddr[2],
+ temp->bdaddr[3], temp->bdaddr[4], temp->bdaddr[5]);
+ ret = property_set("wc_transport.stack_bdaddr", prop);
+ if (ret < 0) {
+ ALOGE("Failed to set wc_transport.stack_bdaddr prop, ret = %d", ret);
+ ret = -BT_STATUS_PROP_FAILURE;
+ goto out;
+ }
/* TODO: Move these fields inside bt_qcom context */
#ifdef WIFI_BT_STATUS_SYNC