return p_acl->link_role;
}
-bool acl_is_transport_le_from_handle(uint16_t handle) {
- tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
- if (p_acl == nullptr) {
- return false;
- }
- return p_acl->transport == BT_TRANSPORT_LE;
-}
-
tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle) {
tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
if (p_acl == nullptr) {
if (transport == BT_TRANSPORT_LE) {
if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE)) {
rc = btm_ble_set_encryption(bd_addr, sec_act,
- acl_link_role(bd_addr, transport));
+ L2CA_GetBleConnRole(bd_addr));
} else {
rc = BTM_WRONG_MODE;
BTM_TRACE_WARNING("%s: cannot call btm_ble_set_encryption, p is NULL",
BTM_TRACE_DEBUG("after update p_dev_rec->sec_flags=0x%x",
p_dev_rec->sec_flags);
- if (BTM_IsAclConnectionUpFromHandle(handle)) {
- btm_sec_check_pending_enc_req(
- p_dev_rec, acl_get_transport_from_handle(handle), encr_enable);
- }
+ btm_sec_check_pending_enc_req(
+ p_dev_rec, acl_get_transport_from_handle(handle), encr_enable);
- if (BTM_IsAclConnectionUpFromHandle(handle) &&
- acl_is_transport_le_from_handle(handle)) {
+ if (BTM_IsBleConnection(handle)) {
if (status == HCI_ERR_KEY_MISSING || status == HCI_ERR_AUTH_FAILURE ||
status == HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE) {
p_dev_rec->sec_flags &= ~(BTM_SEC_LE_LINK_KEY_KNOWN);
uint8_t acl_link_role(const RawAddress& remote_bda, tBT_TRANSPORT transport);
uint8_t acl_link_role_from_handle(uint16_t handle);
-bool acl_is_transport_le_from_handle(uint16_t handle);
-
tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle);
uint16_t acl_get_hci_handle_for_hcif(const RawAddress& bd_addr,