diff --git a/components/bt/host/bluedroid/common/include/common/bt_target.h b/components/bt/host/bluedroid/common/include/common/bt_target.h index ad1308072a..598fa92774 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -258,10 +258,10 @@ #define BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT UC_BT_BLE_ESTAB_LINK_CONN_TOUT #endif -#if (SOC_BLE_UPDATE_OWN_RPA) -#define BLE_UPDATE_BLE_ADDR_TYPE_RPA TRUE -#else +#ifdef SOC_BLE_DONT_UPDATE_OWN_RPA #define BLE_UPDATE_BLE_ADDR_TYPE_RPA FALSE +#else +#define BLE_UPDATE_BLE_ADDR_TYPE_RPA TRUE #endif //------------------Added from bdroid_buildcfg.h--------------------- #ifndef L2CAP_EXTFEA_SUPPORTED_MASK diff --git a/components/bt/host/bluedroid/stack/btm/btm_sec.c b/components/bt/host/bluedroid/stack/btm/btm_sec.c index 41ae31f3aa..73f8e85de0 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_sec.c +++ b/components/bt/host/bluedroid/stack/btm/btm_sec.c @@ -240,6 +240,12 @@ BOOLEAN BTM_SecRegister(tBTM_APPL_INFO *p_cb_info) if (memcmp(btm_cb.devcb.id_keys.ir, &temp_value, sizeof(BT_OCTET16)) == 0) { btm_ble_reset_id(); } +#if (!BLE_UPDATE_BLE_ADDR_TYPE_RPA) + BD_ADDR peer_addr = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; + BT_OCTET16 peer_irk = {0x0}; + /* add local irk to controller */ + btsnd_hcic_ble_add_device_resolving_list (BLE_ADDR_PUBLIC, peer_addr, peer_irk, btm_cb.devcb.id_keys.irk); +#endif } else { BTM_TRACE_WARNING("%s p_cb_info->p_le_callback == NULL\n", __func__); } diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index 0225e6bb76..1f29701fed 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -277,4 +277,4 @@ #endif /*------------------------------ BLE --------------------------------------------*/ -#define SOC_BLE_UPDATE_OWN_RPA (0) +#define SOC_BLE_DONT_UPDATE_OWN_RPA (1) diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index 883601cf98..110c15c83c 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -267,6 +267,3 @@ #define SOC_PM_SUPPORT_WIFI_PD (1) #define SOC_PM_SUPPORT_BT_PD (1) - -/*------------------------------ BLE --------------------------------------------*/ -#define SOC_BLE_UPDATE_OWN_RPA (1) diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index c90cc5e23c..05ccb0a54e 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -182,6 +182,3 @@ #define SOC_SPI_MEM_SUPPORT_SW_SUSPEND (1) /*-------------------------- COEXISTENCE HARDWARE PTI CAPS -------------------------------*/ #define SOC_COEX_HW_PTI (1) - -/*------------------------------ BLE --------------------------------------------*/ -#define SOC_BLE_UPDATE_OWN_RPA (1)