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

Commit aab4d1d9 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Remove unused data length API

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: I5ac24f146dfee55b6e15f8bce80f034e6ff7c3c9
parent 94e692e6
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -822,13 +822,6 @@ extern void L2CA_AdjustConnectionIntervals(uint16_t* min_interval,
                                           uint16_t* max_interval,
                                           uint16_t floor_interval);

/**
 * Update max fixed channel tx data length if applicable
 */
extern void L2CA_SetLeFixedChannelTxDataLength(const RawAddress& remote_bda,
                                               uint16_t fix_cid,
                                               uint16_t tx_mtu);

/**
 * Check whether an ACL or LE link to the remote device is established
 */
+0 −40
Original line number Diff line number Diff line
@@ -1351,41 +1351,6 @@ void l2cble_process_data_length_change_event(uint16_t handle,
  /* ignore rx_data len for now */
}

/*******************************************************************************
 *
 * Function         l2cble_set_fixed_channel_tx_data_length
 *
 * Description      This function update max fixed channel tx data length if
 *                  applicable
 *
 * Returns          void
 *
 ******************************************************************************/
void l2cble_set_fixed_channel_tx_data_length(const RawAddress& remote_bda,
                                             uint16_t fix_cid,
                                             uint16_t tx_mtu) {
  tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(remote_bda, BT_TRANSPORT_LE);
  uint16_t cid = fix_cid - L2CAP_FIRST_FIXED_CHNL;

  L2CAP_TRACE_DEBUG("%s TX MTU = %d", __func__, tx_mtu);

  if (!controller_get_interface()->supports_ble_packet_extension()) {
    L2CAP_TRACE_WARNING("%s, request not supported", __func__);
    return;
  }

  /* See if we have a link control block for the connection */
  if (p_lcb == NULL) return;

  if (p_lcb->p_fixed_ccbs[cid] != NULL) {
    if (tx_mtu > BTM_BLE_DATA_SIZE_MAX) tx_mtu = BTM_BLE_DATA_SIZE_MAX;

    p_lcb->p_fixed_ccbs[cid]->tx_data_len = tx_mtu;
  }

  l2cble_update_data_length(p_lcb);
}

/*******************************************************************************
 *
 * Function         l2cble_credit_based_conn_req
@@ -1637,11 +1602,6 @@ void L2CA_AdjustConnectionIntervals(uint16_t* min_interval,
  }
}

void L2CA_SetLeFixedChannelTxDataLength(const RawAddress& remote_bda,
                                        uint16_t fix_cid, uint16_t tx_mtu) {
  l2cble_set_fixed_channel_tx_data_length(remote_bda, fix_cid, tx_mtu);
}

void l2cble_use_preferred_conn_params(const RawAddress& bda) {
  tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bda, BT_TRANSPORT_LE);
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda);
+0 −2
Original line number Diff line number Diff line
@@ -802,8 +802,6 @@ extern tL2CAP_LE_RESULT_CODE l2ble_sec_access_req(const RawAddress& bd_addr,
                                                  void* p_ref_data);

extern void l2cble_update_data_length(tL2C_LCB* p_lcb);
extern void l2cble_set_fixed_channel_tx_data_length(
    const RawAddress& remote_bda, uint16_t fix_cid, uint16_t tx_mtu);

extern void l2cu_process_fixed_disc_cback(tL2C_LCB* p_lcb);

+0 −5
Original line number Diff line number Diff line
@@ -179,11 +179,6 @@ tBTM_STATUS bluetooth::shim::BTM_SecBondCancel(const RawAddress& bd_addr) {
  mock_function_count_map[__func__]++;
  return 0;
}
tBTM_STATUS bluetooth::shim::BTM_SetBleDataLength(const RawAddress& bd_addr,
                                                  uint16_t tx_pdu_length) {
  mock_function_count_map[__func__]++;
  return 0;
}
tBTM_STATUS bluetooth::shim::BTM_SetConnectability(uint16_t page_mode,
                                                   uint16_t window,
                                                   uint16_t interval) {
+5 −0
Original line number Diff line number Diff line
@@ -76,6 +76,11 @@ bool bluetooth::shim::L2CA_IsLinkEstablished(const RawAddress& bd_addr,
  mock_function_count_map[__func__]++;
  return false;
}
uint16_t bluetooth::shim::L2CA_GetLeHandle(uint16_t cid,
                                           const RawAddress& bd_addr) {
  mock_function_count_map[__func__]++;
  return 0;
}
bool bluetooth::shim::L2CA_IsLeLink(uint16_t) {
  mock_function_count_map[__func__]++;
  return false;