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

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

Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_features_complete

Towards encapsulation

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

Change-Id: Id19aa6c9dd0c5bb010345e8706a55be05b04fcc0
parent 0502033c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -900,14 +900,12 @@ void btm_read_remote_features_complete_raw(uint8_t* p) {
}

void btm_read_remote_features_complete(uint16_t handle, uint8_t* features) {
  uint16_t acl_idx = btm_handle_to_acl_index(handle);
  if (acl_idx >= MAX_L2CAP_LINKS) {
  tACL_CONN* p_acl_cb = internal_.acl_get_connection_from_handle(handle);
  if (p_acl_cb == nullptr) {
    LOG_WARN("Unable to find active acl");
    return;
  }

  tACL_CONN* p_acl_cb = &btm_cb.acl_cb_.acl_db[acl_idx];

  /* Copy the received features page */
  STREAM_TO_ARRAY(p_acl_cb->peer_lmp_feature_pages[0], features,
                  HCI_FEATURE_BYTES_PER_PAGE);