/external/bluetooth/bluedroid/stack/rfcomm/ |
D | rfc_mx_fsm.c | 42 static void rfc_mx_sm_state_idle (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 43 static void rfc_mx_sm_state_wait_conn_cnf (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 44 static void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 45 static void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 46 static void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 47 static void rfc_mx_sm_state_connected (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 48 static void rfc_mx_sm_state_disc_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 50 static void rfc_mx_send_config_req (tRFC_MCB *p_mcb); 51 static void rfc_mx_conf_ind (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg); 52 static void rfc_mx_conf_cnf (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg); [all …]
|
D | rfc_l2cap_if.c | 89 tRFC_MCB *p_mcb = rfc_alloc_multiplexer_channel(bd_addr, FALSE); in RFCOMM_ConnectInd() local 91 if ((p_mcb)&&(p_mcb->state != RFC_MX_STATE_IDLE)) in RFCOMM_ConnectInd() 94 if ((p_mcb->is_initiator)&&(p_mcb->state == RFC_MX_STATE_WAIT_CONN_CNF)) in RFCOMM_ConnectInd() 96 p_mcb->pending_lcid = lcid; in RFCOMM_ConnectInd() 97 p_mcb->pending_id = id; in RFCOMM_ConnectInd() 103 p_mcb->lcid, p_mcb->pending_lcid); in RFCOMM_ConnectInd() 105 rfc_timer_start(p_mcb, (UINT16)(GKI_get_tick_count()%10 + 2)); in RFCOMM_ConnectInd() 112 p_mcb = NULL; in RFCOMM_ConnectInd() 118 rfc_save_lcid_mcb (p_mcb, lcid); in RFCOMM_ConnectInd() 121 if (p_mcb == NULL) in RFCOMM_ConnectInd() [all …]
|
D | rfc_port_if.c | 50 void RFCOMM_StartReq (tRFC_MCB *p_mcb) in RFCOMM_StartReq() argument 52 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_START_REQ, NULL); in RFCOMM_StartReq() 65 void RFCOMM_StartRsp (tRFC_MCB *p_mcb, UINT16 result) in RFCOMM_StartRsp() argument 67 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_START_RSP, &result); in RFCOMM_StartRsp() 82 void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu) in RFCOMM_DlcEstablishReq() argument 84 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci); in RFCOMM_DlcEstablishReq() 86 if (p_mcb->state != RFC_MX_STATE_CONNECTED) in RFCOMM_DlcEstablishReq() 88 PORT_DlcEstablishCnf (p_mcb, dlci, 0, RFCOMM_ERROR); in RFCOMM_DlcEstablishReq() 104 void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result) in RFCOMM_DlcEstablishRsp() argument 106 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci); in RFCOMM_DlcEstablishRsp() [all …]
|
D | port_rfc.c | 56 tRFC_MCB *p_mcb; in port_open_continue() local 61 if ((p_mcb = rfc_alloc_multiplexer_channel (p_port->bd_addr, TRUE)) == NULL) in port_open_continue() 68 p_port->rfc.p_mcb = p_mcb; in port_open_continue() 70 p_mcb->port_inx[p_port->dlci] = p_port->inx; in port_open_continue() 75 if (p_mcb->state == RFC_MX_STATE_CONNECTED) in port_open_continue() 77 RFCOMM_ParNegReq (p_mcb, p_port->dlci, p_port->mtu); in port_open_continue() 79 else if ((p_mcb->state == RFC_MX_STATE_IDLE) in port_open_continue() 80 ||(p_mcb->state == RFC_MX_STATE_DISC_WAIT_UA)) in port_open_continue() 85 RFCOMM_StartReq (p_mcb); in port_open_continue() 91 … RFCOMM_TRACE_DEBUG1 ("port_open_continue: mx state(%d) mx channel is openning", p_mcb->state); in port_open_continue() [all …]
|
D | rfc_port_fsm.c | 114 btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, TRUE, in rfc_port_sm_state_closed() 131 rfc_timer_stop(p_port->rfc.p_mcb ); in rfc_port_sm_state_closed() 135 btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, FALSE, in rfc_port_sm_state_closed() 149 rfc_send_dm (p_port->rfc.p_mcb, p_port->dlci, FALSE); in rfc_port_sm_state_closed() 153 rfc_send_dm (p_port->rfc.p_mcb, p_port->dlci, FALSE); in rfc_port_sm_state_closed() 157 Port_TimeOutCloseMux( p_port->rfc.p_mcb ) ; in rfc_port_sm_state_closed() 187 rfc_send_disc (p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua() 203 …PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_S… in rfc_port_sm_sabme_wait_ua() 207 p_port->rfc.p_mcb->is_disc_initiator = TRUE; in rfc_port_sm_sabme_wait_ua() 208 …PORT_DlcEstablishCnf (p_port->rfc.p_mcb, p_port->dlci, p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_E… in rfc_port_sm_sabme_wait_ua() [all …]
|
D | rfc_utils.c | 135 tRFC_MCB *p_mcb = NULL; in rfc_alloc_multiplexer_channel() local 168 p_mcb = &rfc_cb.port.rfc_mcb[j]; in rfc_alloc_multiplexer_channel() 172 memset (p_mcb, 0, sizeof (tRFC_MCB)); in rfc_alloc_multiplexer_channel() 173 memcpy (p_mcb->bd_addr, bd_addr, BD_ADDR_LEN); in rfc_alloc_multiplexer_channel() 177 GKI_init_q(&p_mcb->cmd_q); in rfc_alloc_multiplexer_channel() 179 p_mcb->is_initiator = is_initiator; in rfc_alloc_multiplexer_channel() 181 rfc_timer_start (p_mcb, RFC_MCB_INIT_INACT_TIMER); in rfc_alloc_multiplexer_channel() 184 return (p_mcb); in rfc_alloc_multiplexer_channel() 199 void rfc_release_multiplexer_channel (tRFC_MCB *p_mcb) in rfc_release_multiplexer_channel() argument 203 rfc_timer_stop (p_mcb); in rfc_release_multiplexer_channel() [all …]
|
D | rfc_int.h | 48 extern void RFCOMM_StartReq (tRFC_MCB *p_mcb); 49 extern void RFCOMM_StartRsp (tRFC_MCB *p_mcb, UINT16 result); 51 extern void RFCOMM_DlcEstablishReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu); 52 extern void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result); 54 extern void RFCOMM_DataReq (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf); 56 extern void RFCOMM_DlcReleaseReq (tRFC_MCB *p_mcb, UINT8 dlci); 58 extern void RFCOMM_ParNegReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu); 59 extern void RFCOMM_ParNegRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k); 66 extern void RFCOMM_FlowReq (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 state); 68 extern void RFCOMM_PortNegReq (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars); [all …]
|
D | rfc_ts_frames.c | 39 void rfc_send_sabme (tRFC_MCB *p_mcb, UINT8 dlci) in rfc_send_sabme() argument 43 UINT8 cr = RFCOMM_CR(p_mcb->is_initiator, TRUE); in rfc_send_sabme() 60 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_sabme() 71 void rfc_send_ua (tRFC_MCB *p_mcb, UINT8 dlci) in rfc_send_ua() argument 75 UINT8 cr = RFCOMM_CR(p_mcb->is_initiator, FALSE); in rfc_send_ua() 92 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_ua() 103 void rfc_send_dm (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN pf) in rfc_send_dm() argument 107 UINT8 cr = RFCOMM_CR(p_mcb->is_initiator, FALSE); in rfc_send_dm() 124 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_dm() 135 void rfc_send_disc (tRFC_MCB *p_mcb, UINT8 dlci) in rfc_send_disc() argument [all …]
|
D | port_utils.c | 233 if (p_port->rfc.p_mcb) in port_release_port() 235 p_port->rfc.p_mcb->port_inx[p_port->dlci] = 0; in port_release_port() 238 rfc_check_mcb_active (p_port->rfc.p_mcb); in port_release_port() 258 p_port->rfc.p_mcb = NULL; in port_release_port() 317 tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, UINT8 dlci) in port_find_mcb_dlci_port() argument 321 if (!p_mcb) in port_find_mcb_dlci_port() 327 inx = p_mcb->port_inx[dlci]; in port_find_mcb_dlci_port() 330 … RFCOMM_TRACE_DEBUG2("port_find_mcb_dlci_port: p_mcb:%p, port_inx[dlci:%d] is 0", p_mcb, dlci); in port_find_mcb_dlci_port() 356 if (p_port->in_use && (p_port->rfc.p_mcb == NULL)) in port_find_dlci_port() 420 || !p_port->rfc.p_mcb in port_flow_control_user() [all …]
|
D | port_api.c | 84 tRFC_MCB *p_mcb = port_find_mcb (bd_addr); in RFCOMM_CreateConnection() local 101 if (p_mcb && !p_mcb->is_initiator && !is_server) in RFCOMM_CreateConnection() 106 scn, dlci, is_server, mtu, p_mcb); in RFCOMM_CreateConnection() 116 p_port->state, p_port->rfc.state, p_port->rfc.p_mcb ? p_port->rfc.p_mcb->state : 0); in RFCOMM_CreateConnection() 127 scn, dlci, is_server, mtu, p_mcb, p_port); in RFCOMM_CreateConnection() 480 if (!p_port->rfc.p_mcb in PORT_CheckConnection() 481 || !p_port->rfc.p_mcb->peer_ready in PORT_CheckConnection() 487 memcpy (bd_addr, p_port->rfc.p_mcb->bd_addr, BD_ADDR_LEN); in PORT_CheckConnection() 489 *p_lcid = p_port->rfc.p_mcb->lcid; in PORT_CheckConnection() 508 tRFC_MCB *p_mcb = NULL; in PORT_IsOpening() local [all …]
|
D | port_int.h | 135 tRFC_MCB *p_mcb; member 230 extern tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, UINT8 dlci);
|
/external/bluetooth/bluedroid/bta/hl/ |
D | bta_hl_act.c | 88 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_dch_mca_cong_change() local 101 evt_data.dch_cong_ind.mcl_handle = p_mcb->mcl_handle; in bta_hl_dch_mca_cong_change() 122 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_dch_echo_test() local 132 bta_hl_co_get_echo_data(p_acb->app_id, p_mcb->mcl_handle, in bta_hl_dch_echo_test() 150 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_dch_sdp_init() local 156 if ( p_mcb->sdp_oper == BTA_HL_SDP_OP_NONE) in bta_hl_dch_sdp_init() 158 p_mcb->sdp_mdl_idx = mdl_idx; in bta_hl_dch_sdp_init() 161 p_mcb->sdp_oper = BTA_HL_SDP_OP_DCH_OPEN_INIT; in bta_hl_dch_sdp_init() 166 p_mcb->sdp_oper = BTA_HL_SDP_OP_DCH_RECONNECT_INIT; in bta_hl_dch_sdp_init() 169 if (bta_hl_init_sdp(p_mcb->sdp_oper, app_idx, mcl_idx, mdl_idx) != BTA_HL_STATUS_OK) in bta_hl_dch_sdp_init() [all …]
|
D | bta_hl_main.c | 804 tBTA_HL_MCL_CB *p_mcb; in bta_hl_api_cch_open() local 813 p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_api_cch_open() 814 p_mcb->in_use = TRUE; in bta_hl_api_cch_open() 815 p_mcb->req_ctrl_psm = p_data->api_cch_open.ctrl_psm; in bta_hl_api_cch_open() 816 p_mcb->sec_mask = p_data->api_cch_open.sec_mask; in bta_hl_api_cch_open() 817 bdcpy(p_mcb->bd_addr, p_data->api_cch_open.bd_addr); in bta_hl_api_cch_open() 818 p_mcb->cch_oper = BTA_HL_CCH_OP_LOCAL_OPEN; in bta_hl_api_cch_open() 831 p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_api_cch_open() 836 p_mcb->mcl_handle, in bta_hl_api_cch_open() 902 tBTA_HL_MCL_CB *p_mcb; in bta_hl_api_cch_close() local [all …]
|
D | bta_hl_utils.c | 54 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_set_ctrl_psm_for_dch() local 57 if (p_mcb->sdp.num_recs) in bta_hl_set_ctrl_psm_for_dch() 59 if (p_mcb->ctrl_psm != ctrl_psm) in bta_hl_set_ctrl_psm_for_dch() 73 p_mcb->ctrl_psm = ctrl_psm; in bta_hl_set_ctrl_psm_for_dch() 81 p_mcb->sdp.num_recs, success, update_ctrl_psm, ctrl_psm ); in bta_hl_set_ctrl_psm_for_dch() 336 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_find_service_in_db() local 343 if ((*pp_rec = SDP_FindServiceInDb(p_mcb->p_db, service_uuid, in bta_hl_find_service_in_db() 350 if (((*pp_rec = bta_hl_find_sink_or_src_srv_class_in_db(p_mcb->p_db, in bta_hl_find_service_in_db() 522 tBTA_HL_MCL_CB *p_mcb; in bta_hl_find_cch_cb_indexes() local 547 p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_find_cch_cb_indexes() [all …]
|
/external/bluetooth/bluedroid/btif/src/ |
D | btif_hl.c | 185 btif_hl_mcl_cb_t *p_mcb; in btif_hl_if_channel_setup_pending() local 195 p_mcb = BTIF_HL_GET_MCL_CB_PTR(i, j); in btif_hl_if_channel_setup_pending() 196 if (p_mcb->in_use && in btif_hl_if_channel_setup_pending() 197 p_mcb->is_connected && p_mcb->pcb.channel_id == channel_id ) in btif_hl_if_channel_setup_pending() 225 btif_hl_mcl_cb_t *p_mcb; in btif_hl_num_dchs_in_use() local 243 p_mcb = &p_acb->mcb[j]; in btif_hl_num_dchs_in_use() 247 if (p_mcb->mdl[x].in_use) in btif_hl_num_dchs_in_use() 271 btif_hl_mcl_cb_t *p_mcb; in btif_hl_tmr_hdlr() local 279 p_mcb =BTIF_HL_GET_MCL_CB_PTR(i,j); in btif_hl_tmr_hdlr() 281 if (p_mcb->cch_timer_active) in btif_hl_tmr_hdlr() [all …]
|