Set wc_transport.stack_bdaddr property

This property is used by wcnss filter to set BD address. If not
set, BD address are all zeros, leading to connection failures.

CRs-Fixed: 1064473
Change-Id: Ie5f7eae873655e35d7beaf927f3c88ab61ba818f
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