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

Commit 62dbe248 authored by Chris Manton's avatar Chris Manton
Browse files

Add private stack/acl/btm_acl::acl_get_connection_from_handle

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idb6410d3d36c2cfc83c8725ad8d59a263471c897
parent 0b66a3a9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ static void btm_process_remote_ext_features(tACL_CONN* p_acl_cb,
                                            uint8_t num_read_pages);
static void btm_sec_set_peer_sec_caps(tACL_CONN* p_acl_cb,
                                      tBTM_SEC_DEV_REC* p_dev_rec);
static tACL_CONN* acl_get_connection_from_handle(uint16_t handle);
static tBTM_STATUS btm_set_packet_types(tACL_CONN* p, uint16_t pkt_types);

void BTIF_dm_report_inquiry_status_change(uint8_t busy_level_flags);
@@ -207,6 +208,12 @@ uint8_t btm_handle_to_acl_index(uint16_t hci_handle) {
  return (xx);
}

tACL_CONN* acl_get_connection_from_handle(uint16_t hci_handle) {
  uint8_t index = btm_handle_to_acl_index(hci_handle);
  if (index >= MAX_L2CAP_LINKS) return nullptr;
  return &btm_cb.acl_cb_.acl_db[index];
}

#if (BLE_PRIVACY_SPT == TRUE)
/*******************************************************************************
 *