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

Commit 36dc79e6 authored by Chris Manton's avatar Chris Manton
Browse files

API stack/acl/btm_acl::btm_cont_rswitch_from_handle

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ief98137744650377bfcee59c8106a9a890a61197
parent 62dbe248
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -2225,7 +2225,7 @@ uint8_t BTM_SetTraceLevel(uint8_t new_level) {
 *
 ******************************************************************************/
void btm_cont_rswitch(tACL_CONN* p, tBTM_SEC_DEV_REC* p_dev_rec,
                      uint8_t hci_status) {
                      UNUSED_ATTR uint8_t hci_status) {
  BTM_TRACE_DEBUG("btm_cont_rswitch");
  /* Check to see if encryption needs to be turned off if pending
     change of link key or role switch */
@@ -2254,6 +2254,16 @@ void btm_cont_rswitch(tACL_CONN* p, tBTM_SEC_DEV_REC* p_dev_rec,
  }
}

void btm_cont_rswitch_from_handle(uint16_t hci_handle) {
  BTM_TRACE_DEBUG("%s", __func__);
  tACL_CONN* p_acl = acl_get_connection_from_handle(hci_handle);
  if (p_acl == nullptr) {
    BTM_TRACE_ERROR("%s role switch received but with no active ACL", __func__);
    return;
  }
  btm_cont_rswitch(p_acl, btm_find_dev(p_acl->remote_addr), 0);
}

/*******************************************************************************
 *
 * Function         btm_acl_resubmit_page
+2 −0
Original line number Diff line number Diff line
@@ -276,3 +276,5 @@ void btm_cont_rswitch(tACL_CONN* p, tBTM_SEC_DEV_REC* p_dev_rec,
                      uint8_t hci_status);
void btm_ble_refresh_local_resolvable_private_addr(
    const RawAddress& pseudo_addr, const RawAddress& local_rpa);

void btm_cont_rswitch_from_handle(uint16_t hci_handle);