Skip to content
Snippets Groups Projects
Commit bc3fdfca authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

LE: Fix random address resolution when done in the stack

If the local device does not support random address resolution in the
Bluetooth chip, it has to be performed in the host stack. This patch
fixes some instances where address resolution was not performed
properly, causing device reconnection to fail.

Change-Id: Ifb84a9fa44995caa3680d9a0b4248ef911eb9ad0
parent f4506ab5
No related branches found
No related tags found
No related merge requests found
......@@ -1661,9 +1661,9 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len)
#if (BLE_VND_INCLUDED == TRUE)
match = btm_public_addr_to_random_pseudo (bda, &bda_type);
#endif
/* possiblly receive connection complete with resolvable random on
slave role while the device has been paired */
if (!match && role == HCI_ROLE_SLAVE && BTM_BLE_IS_RESOLVE_BDA(bda))
/* Possibly receiving connection complete with a resolvable random address
for a device that has been paired */
if (!match && BTM_BLE_IS_RESOLVE_BDA(bda))
{
btm_ble_resolve_random_addr(bda, btm_ble_resolve_random_addr_on_conn_cmpl, p_data);
}
......
......@@ -35,10 +35,15 @@
#define L2CA_GET_UPD_ST(x) ((x) & UPD_ST_MASK)
#define L2CA_SET_UPD_ST(x, y) x = (((x) & ~UPD_ST_MASK) | (y))
#if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE)
#include "vendor_ble.h"
#else
#if BLE_PRIVACY_SPT == TRUE
extern BOOLEAN btm_ble_get_acl_remote_addr(tBTM_SEC_DEV_REC *p_dev_rec, BD_ADDR conn_addr,
tBLE_ADDR_TYPE *p_addr_type);
#endif
#endif
/*******************************************************************************
**
** Function L2CA_CancelBleConnectReq
......@@ -649,6 +654,8 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
BTM_BleEnableIRKFeature(TRUE);
btm_random_pseudo_to_public(init_addr, &init_addr_type);
#else
btm_ble_get_acl_remote_addr(p_dev_rec, init_addr, &init_addr_type);
#endif
#endif
if (!btsnd_hcic_ble_create_ll_conn (scan_int,/* UINT16 scan_int */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment