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

Commit 531635fb authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Remove L2CA_ErtmConnectReq

Now that the p_ertm_info parameter is unused, just use L2CA_ConnectReq.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I458e0d8bcc2809c8bc2d295be29516be05bf05ba
parent 12ceaf8d
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -98,12 +98,6 @@ void bluetooth::shim::L2CA_FreeLePSM(uint16_t psm) {
/**
 * Classic Connection Oriented Channel APIS
 */
uint16_t bluetooth::shim::L2CA_ErtmConnectReq(uint16_t psm,
                                              const RawAddress& raw_address,
                                              tL2CAP_ERTM_INFO* p_ertm_info) {
  return shim_l2cap.CreateConnection(psm, raw_address);
}

uint16_t bluetooth::shim::L2CA_ConnectReq(uint16_t psm,
                                          const RawAddress& raw_address) {
  return shim_l2cap.CreateConnection(psm, raw_address);
+0 −16
Original line number Diff line number Diff line
@@ -118,22 +118,6 @@ uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr);
bool L2CA_ConnectRsp(const RawAddress& p_bd_addr, uint8_t id, uint16_t lcid,
                     uint16_t result, uint16_t status);

/*******************************************************************************
 *
 * Function         L2CA_ErtmConnectReq
 *
 * Description      Higher layers call this function to create an L2CAP
 *                  connection that needs to use Enhanced Retransmission Mode.
 *                  Note that the connection is not established at this time,
 *                  but connection establishment gets started. The callback
 *                  will be invoked when connection establishes or fails.
 *
 * Returns          the CID of the connection, or 0 if it failed to start
 *
 ******************************************************************************/
uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr,
                             tL2CAP_ERTM_INFO* p_ertm_info);

/*******************************************************************************
 *
 * Function         L2CA_RegisterLECoc
+2 −2
Original line number Diff line number Diff line
@@ -110,8 +110,8 @@ void avct_bcb_chnl_open(tAVCT_BCB* p_bcb, UNUSED_ATTR tAVCT_LCB_EVT* p_data) {

  /* call l2cap connect req */
  p_bcb->ch_state = AVCT_CH_CONN;
  p_bcb->ch_lcid = L2CA_ErtmConnectReq2(AVCT_BR_PSM, p_lcb->peer_addr,
                                        &ertm_info, BTA_SEC_AUTHENTICATE);
  p_bcb->ch_lcid =
      L2CA_ConnectReq2(AVCT_BR_PSM, p_lcb->peer_addr, BTA_SEC_AUTHENTICATE);
  if (p_bcb->ch_lcid == 0) {
    /* if connect req failed, send ourselves close event */
    tAVCT_LCB_EVT avct_lcb_evt;
+1 −2
Original line number Diff line number Diff line
@@ -274,8 +274,7 @@ uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id,

    /* Check if L2CAP started the connection process */
    if (p_rem_bda && (transport == BT_TRANSPORT_BR_EDR)) {
      cid = L2CA_ErtmConnectReq2(p_ccb->psm, *p_rem_bda, &p_ccb->ertm_info,
                                 security);
      cid = L2CA_ConnectReq2(p_ccb->psm, *p_rem_bda, security);
      if (cid != 0) {
        p_ccb->connection_id = cid;
        return (p_ccb->gap_handle);
+0 −20
Original line number Diff line number Diff line
@@ -373,26 +373,6 @@ extern uint16_t L2CA_ConnectReq(uint16_t psm, const RawAddress& p_bd_addr);
extern bool L2CA_ConnectRsp(const RawAddress& p_bd_addr, uint8_t id,
                            uint16_t lcid, uint16_t result, uint16_t status);

uint16_t L2CA_ErtmConnectReq2(uint16_t psm, const RawAddress& p_bd_addr,
                              tL2CAP_ERTM_INFO* p_ertm_info,
                              uint16_t sec_level);

/*******************************************************************************
 *
 * Function         L2CA_ErtmConnectReq
 *
 * Description      Higher layers call this function to create an L2CAP
 *                  connection that needs to use Enhanced Retransmission Mode.
 *                  Note that the connection is not established at this time,
 *                  but connection establishment gets started. The callback
 *                  will be invoked when connection establishes or fails.
 *
 * Returns          the CID of the connection, or 0 if it failed to start
 *
 ******************************************************************************/
extern uint16_t L2CA_ErtmConnectReq(uint16_t psm, const RawAddress& p_bd_addr,
                                    tL2CAP_ERTM_INFO* p_ertm_info);

/*******************************************************************************
 *
 * Function         L2CA_RegisterLECoc
Loading