BT: 1.set USE_CONTROLLER_BDADDR FALSE
authorLongjian Lin <llj@rock-chips.com>
Thu, 9 Aug 2018 09:52:54 +0000 (05:52 -0400)
committerLongjian Lin <llj@rock-chips.com>
Thu, 9 Aug 2018 11:57:48 +0000 (07:57 -0400)
    2.add use config addr function

    if want to use rand mac or mac from vendor storage,should use this commit

Change-Id: I1c200f0048eae3b3c3ecd9c859e2e166c85d87fe

rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h
rtkbt/code/libbt-vendor/src/hardware_uart.c

index b027fd9747300607150f5e1ba5a6eadb4d8f762e..5ca3ec6fd9be6c29fc77afbde9117f7d0be3af30 100755 (executable)
  *  firmware patchram (.hcd) file.
  */
 #ifndef USE_CONTROLLER_BDADDR
-#define USE_CONTROLLER_BDADDR   TRUE //FALSE
+#define USE_CONTROLLER_BDADDR   FALSE
 #endif
 
 /* sleep mode
index d92630b81d7e050feb5456c965287d431d2e7522..f4888a786a770924202c732f17e761bd822b6e25 100755 (executable)
@@ -583,6 +583,21 @@ static uint32_t rtk_parse_config_file(unsigned char** config_buf, size_t* filele
                 }
                 break;
             }
+#if (USE_CONTROLLER_BDADDR == FALSE)
+            case 0x44:
+            case 0x3c:
+            {
+                 int j=0;
+                 for (j=0; j<entry->entry_len; j++)
+                     entry->entry_data[j] = bt_addr[entry->entry_len - 1- j];
+                 ALOGI("rtk_parse_config_file: DO NOT USE_CONTROLLER_BDADDR, config has bdaddr");
+                 ALOGI("rtk_parse_config_file : CONFIG_ADDR is: %02X:%02X:%02X:%02X:%02X:%02X",
+                    bt_addr[0], bt_addr[1],
+                    bt_addr[2], bt_addr[3],
+                    bt_addr[4], bt_addr[5]);
+                 break;
+            }
+#endif
             default:
                 ALOGI("config offset(0x%x),length(0x%x)", entry->offset, entry->entry_len);
                 break;