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

Commit ef8c1446 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I889bcc37,I5c801477,Ic77c6f95 am: 2f13d0b0 am: 0fdf08b4

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1519359

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2901c53fa2dc11113e473e5796790e382da68cd8
parents 54518c71 0fdf08b4
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());
+3 −0
Original line number Diff line number Diff line
@@ -80,7 +80,10 @@ typedef struct {

typedef struct {
  BD_FEATURES peer_le_features;
  bool peer_le_features_valid;
  BD_FEATURES peer_lmp_feature_pages[HCI_EXT_FEATURES_PAGE_MAX + 1];
  bool peer_lmp_feature_valid[HCI_EXT_FEATURES_PAGE_MAX + 1];

  RawAddress active_remote_addr;
  RawAddress conn_addr;
  RawAddress remote_addr;
+12 −6
Original line number Diff line number Diff line
@@ -327,18 +327,18 @@ void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
  p_acl->link_up_issued = false;
  p_acl->remote_addr = bda;
  p_acl->sca = 0xFF;
  p_acl->transport = transport;
  p_acl->switch_role_failed_attempts = 0;
  p_acl->reset_switch_role();
  acl_initialize_power_mode(*p_acl);

  LOG_DEBUG("Created new ACL connection");
  btm_set_link_policy(p_acl, btm_cb.acl_cb_.btm_def_link_policy);

  p_acl->transport = transport;
  if (transport == BT_TRANSPORT_LE) {
    btm_ble_refresh_local_resolvable_private_addr(
        bda, btm_cb.ble_ctr_cb.addr_mgnt_cb.private_addr);
  }
  p_acl->switch_role_failed_attempts = 0;
  p_acl->reset_switch_role();

  acl_initialize_power_mode(*p_acl);

  /* if BR/EDR do something more */
  if (transport == BT_TRANSPORT_BR_EDR) {
    btsnd_hcic_read_rmt_clk_offset(hci_handle);
@@ -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",