Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90353bc2 authored by Chris Manton's avatar Chris Manton
Browse files

Use new API stack/acl/btm_acl::acl_link_role

stack/btm/btm_sec::BTM_SetEncryption

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If9095d86bd45519cbeb4d063c1f531cf44a29265
parent b555d21a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1188,9 +1188,9 @@ tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr,
      p_dev_rec->security_required, p_dev_rec, p_callback);

  if (transport == BT_TRANSPORT_LE) {
    tACL_CONN* p_acl = btm_bda_to_acl(bd_addr, transport);
    if (p_acl) {
      rc = btm_ble_set_encryption(bd_addr, sec_act, p_acl->link_role);
    if (BTM_IsAclConnectionUp(bd_addr, transport)) {
      rc = btm_ble_set_encryption(bd_addr, sec_act,
                                  acl_link_role(bd_addr, transport));
    } else {
      rc = BTM_WRONG_MODE;
      BTM_TRACE_WARNING("%s: cannot call btm_ble_set_encryption, p is NULL",