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

Commit ebd23b98 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Add stack/acl/btm_acl::acl_process_extended_features am: 08928305 am: 97ba6b75 am: d16c9b26

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

Change-Id: I6a3bd7540dcf3c1284bd5e23fef23d1d39878521
parents a7d5b693 d16c9b26
Loading
Loading
Loading
Loading
+25 −0
Original line number Original line Diff line number Diff line
@@ -2948,3 +2948,28 @@ void acl_process_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
  }
  }
  bluetooth::hci::IsoManager::GetInstance()->HandleNumComplDataPkts(p, evt_len);
  bluetooth::hci::IsoManager::GetInstance()->HandleNumComplDataPkts(p, evt_len);
}
}

void acl_process_extended_features(uint16_t handle, uint8_t current_page_number,
                                   uint8_t max_page_number, uint64_t features) {
  if (current_page_number > HCI_EXT_FEATURES_PAGE_MAX) {
    LOG_WARN("Unable to process current_page_number:%hhu", current_page_number);
    return;
  }
  tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
  if (p_acl == nullptr) {
    LOG_WARN("Unable to find active acl");
    return;
  }
  memcpy(p_acl->peer_lmp_feature_pages[current_page_number],
         (uint8_t*)&features, sizeof(uint64_t));
  LOG_DEBUG(
      "Copied extended feature pages handle:%hu current_page_number:%hhu "
      "max_page_number:%hhu features:%s",
      handle, current_page_number, max_page_number,
      bd_features_text(p_acl->peer_lmp_feature_pages[current_page_number])
          .c_str());

  if (max_page_number == current_page_number) {
    btm_process_remote_ext_features(p_acl, max_page_number);
  }
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -56,3 +56,5 @@ void acl_rcv_acl_data(BT_HDR* p_msg);
void acl_link_segments_xmitted(BT_HDR* p_msg);
void acl_link_segments_xmitted(BT_HDR* p_msg);
void acl_process_num_completed_pkts(uint8_t* p, uint8_t evt_len);
void acl_process_num_completed_pkts(uint8_t* p, uint8_t evt_len);
void acl_packets_completed(uint16_t handle, uint16_t num_packets);
void acl_packets_completed(uint16_t handle, uint16_t num_packets);
void acl_process_extended_features(uint16_t handle, uint8_t current_page_number,
                                   uint8_t max_page_number, uint64_t features);