From eaa9897386a79019099aaafbc5ff47bf9086e05f Mon Sep 17 00:00:00 2001 From: chenjianhua Date: Thu, 18 Aug 2022 16:08:27 +0800 Subject: [PATCH 1/3] Revert "Fixed ESP32 BLE can't resolve the peer address when enable white list" This reverts commit 1cc0f6aac578b5eb9e731d644d82efc66cc8270a. --- .../bt/host/bluedroid/common/include/common/bt_target.h | 6 ------ components/bt/host/bluedroid/stack/btm/btm_ble_gap.c | 2 -- components/soc/esp32/include/soc/soc_caps.h | 3 --- 3 files changed, 11 deletions(-) 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 66688ba13e..35a9104ea1 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -21,7 +21,6 @@ #define BT_TARGET_H #include -#include "soc/soc_caps.h" #ifndef BUILDCFG #define BUILDCFG @@ -278,11 +277,6 @@ #define BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT UC_BT_BLE_ESTAB_LINK_CONN_TOUT #endif -#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 #define L2CAP_EXTFEA_SUPPORTED_MASK (L2CAP_EXTFEA_ENH_RETRANS | L2CAP_EXTFEA_STREAM_MODE | L2CAP_EXTFEA_NO_CRC | L2CAP_EXTFEA_FIXED_CHNLS) diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index 6976996e75..ab7c1a5e28 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -1018,9 +1018,7 @@ uint32_t BTM_BleUpdateOwnType(uint8_t *own_bda_type, tBTM_START_ADV_CMPL_CBACK * } } else if(*own_bda_type == BLE_ADDR_PUBLIC_ID || *own_bda_type == BLE_ADDR_RANDOM_ID) { if((btm_cb.ble_ctr_cb.addr_mgnt_cb.exist_addr_bit & BTM_BLE_GAP_ADDR_BIT_RESOLVABLE) == BTM_BLE_GAP_ADDR_BIT_RESOLVABLE) { -#if (BLE_UPDATE_BLE_ADDR_TYPE_RPA) *own_bda_type = BLE_ADDR_RANDOM; -#endif btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type = BLE_ADDR_RANDOM; memcpy(btm_cb.ble_ctr_cb.addr_mgnt_cb.private_addr, btm_cb.ble_ctr_cb.addr_mgnt_cb.resolvale_addr, BD_ADDR_LEN); btsnd_hcic_ble_set_random_addr(btm_cb.ble_ctr_cb.addr_mgnt_cb.resolvale_addr); diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index e9fa2b4228..c8f4d3409d 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -376,9 +376,6 @@ #define SOC_SDMMC_USE_IOMUX 1 #define SOC_SDMMC_NUM_SLOTS 2 -/*------------------------------ BLE --------------------------------------------*/ -#define SOC_BLE_DONT_UPDATE_OWN_RPA (1) - /*-------------------------- WI-FI HARDWARE CAPS -------------------------------*/ #define SOC_WIFI_HW_TSF (0) /*!< Hardware TSF is not supported */ #define SOC_WIFI_FTM_SUPPORT (0) /*!< FTM is not supported */ From 0067c28013bd7d8ecfe8dd61f42ecf0c0833f78b Mon Sep 17 00:00:00 2001 From: chenjianhua Date: Thu, 18 Aug 2022 16:11:28 +0800 Subject: [PATCH 2/3] Revert "component/bt: add local irk to controller" This reverts commit 95c35288bc92880a2e7cb406e8c08d6072153fd4. --- components/bt/host/bluedroid/stack/btm/btm_sec.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/components/bt/host/bluedroid/stack/btm/btm_sec.c b/components/bt/host/bluedroid/stack/btm/btm_sec.c index c52d65a263..cd61d6388d 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_sec.c +++ b/components/bt/host/bluedroid/stack/btm/btm_sec.c @@ -240,12 +240,6 @@ 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 (0, 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__); } From e6b9b2fe96bca8deea711cacbf16e9df0afcffdd Mon Sep 17 00:00:00 2001 From: chenjianhua Date: Fri, 19 Aug 2022 11:15:20 +0800 Subject: [PATCH 3/3] soc: remove soc ble config from Kconfig --- components/soc/esp32/include/soc/Kconfig.soc_caps.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/soc/esp32/include/soc/Kconfig.soc_caps.in b/components/soc/esp32/include/soc/Kconfig.soc_caps.in index c4466d4269..7cb43134eb 100644 --- a/components/soc/esp32/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32/include/soc/Kconfig.soc_caps.in @@ -695,10 +695,6 @@ config SOC_SDMMC_NUM_SLOTS int default 2 -config SOC_BLE_DONT_UPDATE_OWN_RPA - bool - default y - config SOC_WIFI_HW_TSF bool default n