From 0a5845263a53e02e6e95dee2b02000612a24564e Mon Sep 17 00:00:00 2001 From: Longjian Lin Date: Thu, 9 Aug 2018 05:52:54 -0400 Subject: [PATCH] BT: 1.set USE_CONTROLLER_BDADDR FALSE 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 | 2 +- rtkbt/code/libbt-vendor/src/hardware_uart.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h b/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h index b027fd9..5ca3ec6 100755 --- a/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h +++ b/rtkbt/code/libbt-vendor/include/bt_vendor_rtk.h @@ -114,7 +114,7 @@ * firmware patchram (.hcd) file. */ #ifndef USE_CONTROLLER_BDADDR -#define USE_CONTROLLER_BDADDR TRUE //FALSE +#define USE_CONTROLLER_BDADDR FALSE #endif /* sleep mode diff --git a/rtkbt/code/libbt-vendor/src/hardware_uart.c b/rtkbt/code/libbt-vendor/src/hardware_uart.c index d92630b..f4888a7 100755 --- a/rtkbt/code/libbt-vendor/src/hardware_uart.c +++ b/rtkbt/code/libbt-vendor/src/hardware_uart.c @@ -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; jentry_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; -- 2.20.1