diff --git a/components/bt/host/bluedroid/stack/btu/btu_hcif.c b/components/bt/host/bluedroid/stack/btu/btu_hcif.c index 82e786a164..61b6c5e389 100644 --- a/components/bt/host/bluedroid/stack/btu/btu_hcif.c +++ b/components/bt/host/bluedroid/stack/btu/btu_hcif.c @@ -2071,6 +2071,8 @@ static void btu_ble_ext_adv_report_evt(UINT8 *p, UINT16 evt_len) UINT8 num_reports = {0}; //UINT8 legacy_event_type = 0; UINT16 evt_type = 0; + uint8_t addr_type; + BD_ADDR bda; if (!p) { HCI_TRACE_ERROR("%s, Invalid params.", __func__); @@ -2102,8 +2104,13 @@ static void btu_ble_ext_adv_report_evt(UINT8 *p, UINT16 evt_len) } } - STREAM_TO_UINT8(ext_adv_report.addr_type, p); - STREAM_TO_BDADDR(ext_adv_report.addr, p); + STREAM_TO_UINT8(addr_type, p); + STREAM_TO_BDADDR(bda, p); +#if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE) + btm_identity_addr_to_random_pseudo(bda, &addr_type, FALSE); +#endif + ext_adv_report.addr_type = addr_type; + memcpy(ext_adv_report.addr, bda, 6); STREAM_TO_UINT8(ext_adv_report.primary_phy, p); STREAM_TO_UINT8(ext_adv_report.secondry_phy, p); STREAM_TO_UINT8(ext_adv_report.sid, p); diff --git a/components/bt/host/bluedroid/stack/l2cap/l2c_ble.c b/components/bt/host/bluedroid/stack/l2cap/l2c_ble.c index b0dd90a99f..3080c4484a 100644 --- a/components/bt/host/bluedroid/stack/l2cap/l2c_ble.c +++ b/components/bt/host/bluedroid/stack/l2cap/l2c_ble.c @@ -829,7 +829,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb) #endif // (!CONTROLLER_RPA_LIST_ENABLE) -#if (CONTROLLER_RPA_LIST_ENABLE && CONFIG_BT_CTRL_ESP32) +#if (CONTROLLER_RPA_LIST_ENABLE) if (p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) { if (btm_cb.ble_ctr_cb.privacy_mode >= BTM_PRIVACY_1_2) {