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

Commit 92b06ba1 authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge "Delete unused acl_process_num_completed_pkts"

parents 1ea363d9 1d90c02b
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
@@ -2757,35 +2757,6 @@ void acl_packets_completed(uint16_t handle, uint16_t credits) {
                                                                      credits);
}

static void acl_parse_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
  if (evt_len == 0) {
    LOG_ERROR("Received num completed packets with zero length");
    return;
  }

  uint8_t num_handles{0};
  STREAM_TO_UINT8(num_handles, p);

  if (num_handles > evt_len / (2 * sizeof(uint16_t))) {
    android_errorWriteLog(0x534e4554, "141617601");
    num_handles = evt_len / (2 * sizeof(uint16_t));
  }

  for (uint8_t xx = 0; xx < num_handles; xx++) {
    uint16_t handle{0};
    uint16_t num_packets{0};
    STREAM_TO_UINT16(handle, p);
    handle = HCID_GET_HANDLE(handle);
    STREAM_TO_UINT16(num_packets, p);
    acl_packets_completed(handle, num_packets);
  }
}

void acl_process_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
  acl_parse_num_completed_pkts(p, evt_len);
  bluetooth::hci::IsoManager::GetInstance()->HandleNumComplDataPkts(p, evt_len);
}

void acl_process_supported_features(uint16_t handle, uint64_t features) {
  tACL_CONN* p_acl = internal_.acl_get_connection_from_handle(handle);
  if (p_acl == nullptr) {
+1 −3
Original line number Diff line number Diff line
@@ -282,9 +282,6 @@ void btu_hcif_process_event(UNUSED_ATTR uint8_t controller_id,
    case HCI_HARDWARE_ERROR_EVT:
      btu_hcif_hardware_error_evt(p);
      break;
    case HCI_NUM_COMPL_DATA_PKTS_EVT:
      acl_process_num_completed_pkts(p, hci_evt_len);
      break;
    case HCI_MODE_CHANGE_EVT:
      btu_hcif_mode_change_evt(p);
      break;
@@ -423,6 +420,7 @@ void btu_hcif_process_event(UNUSED_ATTR uint8_t controller_id,
      break;

      // Events now captured by gd::hci_layer module
    case HCI_NUM_COMPL_DATA_PKTS_EVT:  // EventCode::NUMBER_OF_COMPLETED_PACKETS
    case HCI_CONNECTION_COMP_EVT:  // EventCode::CONNECTION_COMPLETE
    case HCI_READ_RMT_FEATURES_COMP_EVT:  // EventCode::READ_REMOTE_SUPPORTED_FEATURES_COMPLETE
    case HCI_READ_RMT_VERSION_COMP_EVT:  // EventCode::READ_REMOTE_VERSION_INFORMATION_COMPLETE
+1 −2
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ void btm_read_tx_power_complete(uint8_t* p, bool is_ble);

void acl_rcv_acl_data(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_packets_completed(uint16_t handle, uint16_t num_packets);
void acl_process_supported_features(uint16_t handle, uint64_t features);
void acl_process_extended_features(uint16_t handle, uint8_t current_page_number,
+0 −5
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ struct acl_disconnect_from_handle acl_disconnect_from_handle;
struct acl_link_segments_xmitted acl_link_segments_xmitted;
struct acl_packets_completed acl_packets_completed;
struct acl_process_extended_features acl_process_extended_features;
struct acl_process_num_completed_pkts acl_process_num_completed_pkts;
struct acl_process_supported_features acl_process_supported_features;
struct acl_rcv_acl_data acl_rcv_acl_data;
struct acl_reject_connection_request acl_reject_connection_request;
@@ -476,10 +475,6 @@ void acl_process_extended_features(uint16_t handle, uint8_t current_page_number,
  test::mock::stack_acl::acl_process_extended_features(
      handle, current_page_number, max_page_number, features);
}
void acl_process_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
  mock_function_count_map[__func__]++;
  test::mock::stack_acl::acl_process_num_completed_pkts(p, evt_len);
}
void acl_process_supported_features(uint16_t handle, uint64_t features) {
  mock_function_count_map[__func__]++;
  test::mock::stack_acl::acl_process_supported_features(handle, features);
+0 −9
Original line number Diff line number Diff line
@@ -751,15 +751,6 @@ struct acl_process_extended_features {
  };
};
extern struct acl_process_extended_features acl_process_extended_features;
// Name: acl_process_num_completed_pkts
// Params: uint8_t* p, uint8_t evt_len
// Returns: void
struct acl_process_num_completed_pkts {
  std::function<void(uint8_t* p, uint8_t evt_len)> body{
      [](uint8_t* p, uint8_t evt_len) { ; }};
  void operator()(uint8_t* p, uint8_t evt_len) { body(p, evt_len); };
};
extern struct acl_process_num_completed_pkts acl_process_num_completed_pkts;
// Name: acl_process_supported_features
// Params: uint16_t handle, uint64_t features
// Returns: void