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

Commit 5ac4b918 authored by Chris Manton's avatar Chris Manton
Browse files

Use stack/acl/btm_acl::hci_btm_set_link_supervision_timeout

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I5fa26134ddd5485d940d7f18a7d26bbd27959a31
parent d06e1bd2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1429,7 +1429,11 @@ void StackAclBtmAcl::btm_acl_role_changed(tHCI_STATUS hci_status,
    /* Reload LSTO: link supervision timeout is reset in the LM after a role
     * switch */
    if (new_role == HCI_ROLE_CENTRAL) {
      BTM_SetLinkSuperTout(p_acl->remote_addr, p_acl->link_super_tout);
      uint16_t supervisor_timeout =
          (p_acl->link_super_tout == 0)  // uninitialized
              ? (btm_cb.acl_cb_.DefaultSupervisorTimeout())
              : (p_acl->link_super_tout);
      hci_btm_set_link_supervision_timeout(*p_acl, supervisor_timeout);
    }
  } else {
    new_role = p_acl->link_role;