/system/bt/stack/rfcomm/ |
D | rfc_mx_fsm.c | 43 static void rfc_mx_sm_state_idle (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 44 static void rfc_mx_sm_state_wait_conn_cnf (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 45 static void rfc_mx_sm_state_configure (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 46 static void rfc_mx_sm_sabme_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 47 static void rfc_mx_sm_state_wait_sabme (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 48 static void rfc_mx_sm_state_connected (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 49 static void rfc_mx_sm_state_disc_wait_ua (tRFC_MCB *p_mcb, UINT16 event, void *p_data); 51 static void rfc_mx_send_config_req (tRFC_MCB *p_mcb); 52 static void rfc_mx_conf_ind (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg); 53 static void rfc_mx_conf_cnf (tRFC_MCB *p_mcb, tL2CAP_CFG_INFO *p_cfg); [all …]
|
D | rfc_l2cap_if.c | 93 tRFC_MCB *p_mcb = rfc_alloc_multiplexer_channel(bd_addr, FALSE); in RFCOMM_ConnectInd() local 96 if ((p_mcb)&&(p_mcb->state != RFC_MX_STATE_IDLE)) in RFCOMM_ConnectInd() 99 if ((p_mcb->is_initiator)&&(p_mcb->state == RFC_MX_STATE_WAIT_CONN_CNF)) in RFCOMM_ConnectInd() 101 p_mcb->pending_lcid = lcid; in RFCOMM_ConnectInd() 102 p_mcb->pending_id = id; in RFCOMM_ConnectInd() 108 p_mcb->lcid, p_mcb->pending_lcid); in RFCOMM_ConnectInd() 110 rfc_timer_start(p_mcb, (UINT16)(time_get_os_boottime_ms() % 10 + 2)); in RFCOMM_ConnectInd() 117 p_mcb = NULL; in RFCOMM_ConnectInd() 123 rfc_save_lcid_mcb (p_mcb, lcid); in RFCOMM_ConnectInd() 126 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 85 if (p_mcb->state != RFC_MX_STATE_CONNECTED) in RFCOMM_DlcEstablishReq() 87 PORT_DlcEstablishCnf (p_mcb, dlci, 0, RFCOMM_ERROR); in RFCOMM_DlcEstablishReq() 91 tPORT *p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq() 110 void RFCOMM_DlcEstablishRsp (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result) in RFCOMM_DlcEstablishRsp() argument 113 if ((p_mcb->state != RFC_MX_STATE_CONNECTED) && (result == RFCOMM_SUCCESS)) in RFCOMM_DlcEstablishRsp() [all …]
|
D | rfc_utils.c | 138 tRFC_MCB *p_mcb = NULL; in rfc_alloc_multiplexer_channel() local 171 p_mcb = &rfc_cb.port.rfc_mcb[j]; in rfc_alloc_multiplexer_channel() 175 alarm_free(p_mcb->mcb_timer); in rfc_alloc_multiplexer_channel() 176 fixed_queue_free(p_mcb->cmd_q, NULL); in rfc_alloc_multiplexer_channel() 177 memset (p_mcb, 0, sizeof (tRFC_MCB)); in rfc_alloc_multiplexer_channel() 178 memcpy (p_mcb->bd_addr, bd_addr, BD_ADDR_LEN); in rfc_alloc_multiplexer_channel() 182 p_mcb->mcb_timer = alarm_new("rfcomm_mcb.mcb_timer"); in rfc_alloc_multiplexer_channel() 183 p_mcb->cmd_q = fixed_queue_new(SIZE_MAX); in rfc_alloc_multiplexer_channel() 185 p_mcb->is_initiator = is_initiator; in rfc_alloc_multiplexer_channel() 187 rfc_timer_start (p_mcb, RFC_MCB_INIT_INACT_TIMER); in rfc_alloc_multiplexer_channel() [all …]
|
D | port_rfc.c | 59 tRFC_MCB *p_mcb; in port_open_continue() local 64 if ((p_mcb = rfc_alloc_multiplexer_channel (p_port->bd_addr, TRUE)) == NULL) in port_open_continue() 71 p_port->rfc.p_mcb = p_mcb; in port_open_continue() 73 p_mcb->port_inx[p_port->dlci] = p_port->inx; in port_open_continue() 78 if (p_mcb->state == RFC_MX_STATE_CONNECTED) in port_open_continue() 80 RFCOMM_ParNegReq (p_mcb, p_port->dlci, p_port->mtu); in port_open_continue() 82 else if ((p_mcb->state == RFC_MX_STATE_IDLE) in port_open_continue() 83 ||(p_mcb->state == RFC_MX_STATE_DISC_WAIT_UA)) in port_open_continue() 88 RFCOMM_StartReq (p_mcb); in port_open_continue() 94 … RFCOMM_TRACE_DEBUG ("port_open_continue: mx state(%d) mx channel is openning", p_mcb->state); in port_open_continue() [all …]
|
D | rfc_port_fsm.c | 115 btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, TRUE, in rfc_port_sm_state_closed() 132 rfc_timer_stop(p_port->rfc.p_mcb ); in rfc_port_sm_state_closed() 136 btm_sec_mx_access_request (p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, FALSE, in rfc_port_sm_state_closed() 150 rfc_send_dm (p_port->rfc.p_mcb, p_port->dlci, FALSE); in rfc_port_sm_state_closed() 154 rfc_send_dm (p_port->rfc.p_mcb, p_port->dlci, FALSE); in rfc_port_sm_state_closed() 158 Port_TimeOutCloseMux( p_port->rfc.p_mcb ) ; in rfc_port_sm_state_closed() 188 rfc_send_disc (p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua() 204 …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() 208 p_port->rfc.p_mcb->is_disc_initiator = TRUE; in rfc_port_sm_sabme_wait_ua() 209 …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_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 | 41 void rfc_send_sabme (tRFC_MCB *p_mcb, UINT8 dlci) in rfc_send_sabme() argument 44 UINT8 cr = RFCOMM_CR(p_mcb->is_initiator, TRUE); in rfc_send_sabme() 59 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_sabme() 70 void rfc_send_ua (tRFC_MCB *p_mcb, UINT8 dlci) in rfc_send_ua() argument 73 UINT8 cr = RFCOMM_CR(p_mcb->is_initiator, FALSE); in rfc_send_ua() 88 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_ua() 99 void rfc_send_dm (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN pf) in rfc_send_dm() argument 102 UINT8 cr = RFCOMM_CR(p_mcb->is_initiator, FALSE); in rfc_send_dm() 117 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_dm() 128 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() 265 p_port->rfc.p_mcb = NULL; in port_release_port() 322 tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, UINT8 dlci) in port_find_mcb_dlci_port() argument 326 if (!p_mcb) in port_find_mcb_dlci_port() 332 inx = p_mcb->port_inx[dlci]; in port_find_mcb_dlci_port() 335 … RFCOMM_TRACE_DEBUG("port_find_mcb_dlci_port: p_mcb:%p, port_inx[dlci:%d] is 0", p_mcb, dlci); in port_find_mcb_dlci_port() 361 if (p_port->in_use && (p_port->rfc.p_mcb == NULL)) in port_find_dlci_port() 425 || !p_port->rfc.p_mcb in port_flow_control_user() [all …]
|
D | port_api.c | 119 tRFC_MCB *p_mcb = port_find_mcb (bd_addr); in RFCOMM_CreateConnection() local 137 if (p_mcb && !p_mcb->is_initiator && !is_server) in RFCOMM_CreateConnection() 142 scn, dlci, is_server, mtu, p_mcb); in RFCOMM_CreateConnection() 152 p_port->state, p_port->rfc.state, p_port->rfc.p_mcb ? p_port->rfc.p_mcb->state : 0); in RFCOMM_CreateConnection() 164 scn, dlci, is_server, mtu, p_mcb, p_port); in RFCOMM_CreateConnection() 514 if (!p_port->rfc.p_mcb in PORT_CheckConnection() 515 || !p_port->rfc.p_mcb->peer_ready in PORT_CheckConnection() 521 memcpy (bd_addr, p_port->rfc.p_mcb->bd_addr, BD_ADDR_LEN); in PORT_CheckConnection() 523 *p_lcid = p_port->rfc.p_mcb->lcid; in PORT_CheckConnection() 542 tRFC_MCB *p_mcb = NULL; in PORT_IsOpening() local [all …]
|
D | port_int.h | 136 tRFC_MCB *p_mcb; member 229 extern tPORT *port_find_mcb_dlci_port (tRFC_MCB *p_mcb, UINT8 dlci);
|
/system/bt/bta/hl/ |
D | bta_hl_act.c | 87 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_dch_mca_cong_change() local 100 evt_data.dch_cong_ind.mcl_handle = p_mcb->mcl_handle; in bta_hl_dch_mca_cong_change() 121 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 | 803 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 | 52 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 56 if (p_mcb->sdp.num_recs) in bta_hl_set_ctrl_psm_for_dch() 58 if (p_mcb->ctrl_psm != ctrl_psm) in bta_hl_set_ctrl_psm_for_dch() 72 p_mcb->ctrl_psm = ctrl_psm; in bta_hl_set_ctrl_psm_for_dch() 80 p_mcb->sdp.num_recs, success, update_ctrl_psm, ctrl_psm ); in bta_hl_set_ctrl_psm_for_dch() 299 tBTA_HL_MCL_CB *p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_find_service_in_db() local 306 if ((*pp_rec = SDP_FindServiceInDb(p_mcb->p_db, service_uuid, in bta_hl_find_service_in_db() 313 if (((*pp_rec = bta_hl_find_sink_or_src_srv_class_in_db(p_mcb->p_db, in bta_hl_find_service_in_db() 485 tBTA_HL_MCL_CB *p_mcb; in bta_hl_find_cch_cb_indexes() local 510 p_mcb = BTA_HL_GET_MCL_CB_PTR(app_idx, mcl_idx); in bta_hl_find_cch_cb_indexes() [all …]
|
/system/bt/btif/src/ |
D | btif_hl.c | 187 btif_hl_mcl_cb_t *p_mcb; in btif_hl_if_channel_setup_pending() local 200 p_mcb = BTIF_HL_GET_MCL_CB_PTR(i, j); in btif_hl_if_channel_setup_pending() 201 if (p_mcb->in_use && in btif_hl_if_channel_setup_pending() 202 p_mcb->is_connected && p_mcb->pcb.channel_id == channel_id ) in btif_hl_if_channel_setup_pending() 230 btif_hl_mcl_cb_t *p_mcb; in btif_hl_num_dchs_in_use() local 248 p_mcb = &p_acb->mcb[j]; in btif_hl_num_dchs_in_use() 252 if (p_mcb->mdl[x].in_use) in btif_hl_num_dchs_in_use() 276 btif_hl_mcl_cb_t *p_mcb = (btif_hl_mcl_cb_t *)data; in btif_hl_timer_timeout() local 279 if (p_mcb->is_connected) { in btif_hl_timer_timeout() 281 p_mcb->mcl_handle); in btif_hl_timer_timeout() [all …]
|