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

Commit 0502033c authored by Chris Manton's avatar Chris Manton
Browse files

Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_ext_features_complete

Towards encapsulation

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

Change-Id: I8daa6e06248eb28463b1ef552bbfe3ff547f6d3a
parent 1e4533af
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -979,15 +979,12 @@ void btm_read_remote_ext_features_complete(uint16_t handle, uint8_t page_num,
                                           uint8_t max_page,
                                           uint8_t* features) {
  /* Validate parameters */
  uint16_t acl_idx = btm_handle_to_acl_index(handle);

  if (acl_idx >= MAX_L2CAP_LINKS) {
  auto* p_acl_cb = internal_.acl_get_connection_from_handle(handle);
  if (p_acl_cb == nullptr) {
    LOG_WARN("Unable to find active acl");
    return;
  }

  auto* 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[page_num], features,
                  HCI_FEATURE_BYTES_PER_PAGE);