/**
* 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);
/*******************************************************************************
*
- * 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
*
* Description Other layers call this function to register for L2CAP
/* 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;
/* 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);
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
* Function L2CA_ConnectReq
*
* Description Higher layers call this function to create an L2CAP
- * connection. Note that the connection is not established at
- * this time, but connection establishment gets started. The
- * callback function will be invoked when connection
- * establishes or fails.
+ * connection.
+ * 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
*
return bluetooth::shim::L2CA_ConnectReq(psm, p_bd_addr);
}
- return L2CA_ErtmConnectReq(psm, p_bd_addr, nullptr);
-}
-
-uint16_t L2CA_ErtmConnectReq2(uint16_t psm, const RawAddress& p_bd_addr,
- tL2CAP_ERTM_INFO* p_ertm_info,
- uint16_t sec_level) {
- BTM_SetSecurityLevel(true, "", 0, sec_level, psm, 0, 0);
- return L2CA_ErtmConnectReq(psm, p_bd_addr, p_ertm_info);
-}
-
-/*******************************************************************************
- *
- * Function L2CA_ErtmConnectReq
- *
- * Description Higher layers call this function to create an L2CAP
- * connection. Note that the connection is not established at
- * this time, but connection establishment gets started. The
- * callback function will be invoked when connection
- * establishes or fails.
- *
- * Parameters: PSM: L2CAP PSM for the connection
- * BD address of the peer
- * Enhaced retransmission mode configurations
-
- * 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) {
- if (bluetooth::shim::is_gd_shim_enabled()) {
- return bluetooth::shim::L2CA_ErtmConnectReq(psm, p_bd_addr, p_ertm_info);
- }
-
VLOG(1) << __func__ << "BDA " << p_bd_addr
- << StringPrintf(" PSM: 0x%04x preferred:%d", psm,
- (p_ertm_info) ? p_ertm_info->preferred_mode : 0);
+ << StringPrintf(" PSM: 0x%04x", psm);
/* Fail if we have not established communications with the controller */
if (!BTM_IsDeviceUp()) {