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

Commit d7e46bae authored by Chris Manton's avatar Chris Manton
Browse files

Use tACL_CONN:: le and lmp feature(s) upon valid

Towards synchronized code

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

Change-Id: I889bcc37c2acce5503e60bf1a842778f8527a8da
parent 329b6b4a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -460,10 +460,12 @@ void DumpsysAcl(int fd) {
    const tBTM_PM_MCB& btm_pm_mcb = acl_cb.pm_mode_db[i];
    if (!acl_conn.in_use) continue;

    LOG_DUMPSYS(fd, "    peer_le_features:%s",
    LOG_DUMPSYS(fd, "    peer_le_features valid:%s data:%s",
                common::ToString(acl_conn.peer_le_features_valid).c_str(),
                bd_features_text(acl_conn.peer_le_features).c_str());
    for (int j = 0; j < HCI_EXT_FEATURES_PAGE_MAX + 1; j++) {
      LOG_DUMPSYS(fd, "    peer_lmp_features[%d]:%s", j,
      LOG_DUMPSYS(fd, "    peer_lmp_features[%d] valid:%s data:%s", j,
                  common::ToString(acl_conn.peer_lmp_feature_valid[j]).c_str(),
                  bd_features_text(acl_conn.peer_lmp_feature_pages[j]).c_str());
    }
    LOG_DUMPSYS(fd, "remote_addr:%s", acl_conn.remote_addr.ToString().c_str());
+6 −0
Original line number Diff line number Diff line
@@ -880,6 +880,7 @@ void btm_read_remote_features_complete(uint16_t handle, uint8_t* features) {
  /* Copy the received features page */
  STREAM_TO_ARRAY(p_acl_cb->peer_lmp_feature_pages[0], features,
                  HCI_FEATURE_BYTES_PER_PAGE);
  p_acl_cb->peer_lmp_feature_valid[0] = true;

  if ((HCI_LMP_EXTENDED_SUPPORTED(p_acl_cb->peer_lmp_feature_pages[0])) &&
      (controller_get_interface()
@@ -959,6 +960,7 @@ void btm_read_remote_ext_features_complete(uint16_t handle, uint8_t page_num,
  /* Copy the received features page */
  STREAM_TO_ARRAY(p_acl_cb->peer_lmp_feature_pages[page_num], features,
                  HCI_FEATURE_BYTES_PER_PAGE);
  p_acl_cb->peer_lmp_feature_valid[page_num] = true;

  /* If there is the next remote features page and
   * we have space to keep this page data - read this page */
@@ -2638,6 +2640,8 @@ bool acl_set_peer_le_features_from_handle(uint16_t hci_handle,
    return false;
  }
  STREAM_TO_ARRAY(p_acl->peer_le_features, p, BD_FEATURES_LEN);
  p_acl->peer_le_features_valid = true;
  LOG_DEBUG("Completed le feature read request");
  return true;
}

@@ -2921,6 +2925,8 @@ void acl_process_extended_features(uint16_t handle, uint8_t current_page_number,
  }
  memcpy(p_acl->peer_lmp_feature_pages[current_page_number],
         (uint8_t*)&features, sizeof(uint64_t));
  p_acl->peer_lmp_feature_valid[current_page_number] = true;

  LOG_DEBUG(
      "Copied extended feature pages handle:%hu current_page_number:%hhu "
      "max_page_number:%hhu features:%s",