/system/bt/stack/rfcomm/ |
D | port_rfc.c | 42 UINT32 port_rfc_send_tx_data (tPORT *p_port); 43 void port_rfc_closed (tPORT *p_port, UINT8 res); 44 void port_get_credits (tPORT *p_port, UINT8 k); 57 int port_open_continue (tPORT *p_port) in port_open_continue() argument 61 RFCOMM_TRACE_EVENT ("port_open_continue, p_port:%p", p_port); in port_open_continue() 64 if ((p_mcb = rfc_alloc_multiplexer_channel (p_port->bd_addr, TRUE)) == NULL) in port_open_continue() 67 port_release_port (p_port); 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() 76 port_select_mtu (p_port); in port_open_continue() [all …]
|
D | port_utils.c | 67 tPORT *p_port = &rfc_cb.port.port[0]; in port_allocate_port() local 75 p_port = &rfc_cb.port.port[yy]; in port_allocate_port() 76 if (!p_port->in_use) in port_allocate_port() 78 memset(p_port, 0, sizeof (tPORT)); in port_allocate_port() 80 p_port->in_use = TRUE; in port_allocate_port() 81 p_port->inx = yy + 1; in port_allocate_port() 84 port_set_defaults (p_port); in port_allocate_port() 86 p_port->rfc.port_timer = alarm_new("rfcomm_port.port_timer"); in port_allocate_port() 89 p_port->dlci = dlci; in port_allocate_port() 90 memcpy (p_port->bd_addr, bd_addr, BD_ADDR_LEN); in port_allocate_port() [all …]
|
D | port_api.c | 116 tPORT *p_port; in RFCOMM_CreateConnection() local 146 if (!is_server && ((p_port = port_find_port (dlci, bd_addr)) != NULL)) in RFCOMM_CreateConnection() 149 if (p_port->is_server == FALSE) 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() 153 *p_handle = p_port->inx; in RFCOMM_CreateConnection() 158 if ((p_port = port_allocate_port (dlci, bd_addr)) == NULL) in RFCOMM_CreateConnection() 164 scn, dlci, is_server, mtu, p_mcb, p_port); in RFCOMM_CreateConnection() 166 p_port->default_signal_state = (PORT_DTRDSR_ON | PORT_CTSRTS_ON | PORT_DCD_ON); in RFCOMM_CreateConnection() 171 p_port->default_signal_state = PORT_OBEX_DEFAULT_SIGNAL_STATE; in RFCOMM_CreateConnection() 174 p_port->default_signal_state = PORT_SPP_DEFAULT_SIGNAL_STATE; in RFCOMM_CreateConnection() [all …]
|
D | rfc_port_fsm.c | 39 static void rfc_port_sm_state_closed (tPORT *p_port, UINT16 event, void *p_data); 40 static void rfc_port_sm_sabme_wait_ua (tPORT *p_port, UINT16 event, void *p_data); 41 static void rfc_port_sm_opened (tPORT *p_port, UINT16 event, void *p_data); 42 static void rfc_port_sm_orig_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data); 43 static void rfc_port_sm_term_wait_sec_check (tPORT *p_port, UINT16 event, void *p_data); 44 static void rfc_port_sm_disc_wait_ua (tPORT *p_port, UINT16 event, void *p_data); 46 static void rfc_port_uplink_data (tPORT *p_port, BT_HDR *p_buf); 61 void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data) in rfc_port_sm_execute() argument 63 if (!p_port) in rfc_port_sm_execute() 69 switch (p_port->rfc.state) in rfc_port_sm_execute() [all …]
|
D | rfc_port_if.c | 91 tPORT *p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq() local 92 if (p_port == NULL) { in RFCOMM_DlcEstablishReq() 98 rfc_port_sm_execute(p_port, RFC_EVENT_OPEN, NULL); in RFCOMM_DlcEstablishReq() 119 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci); in RFCOMM_DlcEstablishRsp() local 120 if (p_port == NULL) { in RFCOMM_DlcEstablishRsp() 125 rfc_port_sm_execute(p_port, RFC_EVENT_ESTABLISH_RSP, &result); in RFCOMM_DlcEstablishRsp() 146 tPORT *p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_ParNegReq() local 147 if (p_port == NULL) { in RFCOMM_ParNegReq() 155 p_port->error = PORT_PAR_NEG_FAILED; in RFCOMM_ParNegReq() 168 k = (p_port->credit_rx_max < RFCOMM_K_MAX) ? p_port->credit_rx_max : RFCOMM_K_MAX; in RFCOMM_ParNegReq() [all …]
|
D | rfc_utils.c | 265 void rfc_port_timer_start(tPORT *p_port, UINT16 timeout) in rfc_port_timer_start() argument 270 alarm_set_on_queue(p_port->rfc.port_timer, interval_ms, in rfc_port_timer_start() 271 rfcomm_port_timer_timeout, p_port, in rfc_port_timer_start() 282 void rfc_port_timer_stop(tPORT *p_port) in rfc_port_timer_stop() argument 286 alarm_cancel(p_port->rfc.port_timer); in rfc_port_timer_stop() 325 tPORT *p_port = (tPORT *)data; in rfcomm_port_timer_timeout() local 327 rfc_port_sm_execute(p_port, RFC_EVENT_TIMEOUT, NULL); in rfcomm_port_timer_timeout() 349 tPORT *p_port = (tPORT *)p_ref_data; in rfc_sec_check_complete() local 354 if (!p_port->in_use in rfc_sec_check_complete() 355 || ((p_port->rfc.state != RFC_STATE_ORIG_WAIT_SEC_CHECK) in rfc_sec_check_complete() [all …]
|
D | port_int.h | 226 extern void port_set_defaults (tPORT *p_port); 227 extern void port_select_mtu (tPORT *p_port); 228 extern void port_release_port (tPORT *p_port); 233 extern UINT32 port_get_signal_changes (tPORT *p_port, UINT8 old_signals, UINT8 signal); 234 extern UINT32 port_flow_control_user (tPORT *p_port); 235 extern void port_flow_control_peer(tPORT *p_port, BOOLEAN enable, UINT16 count); 240 extern int port_open_continue (tPORT *p_port); 241 extern void port_start_port_open (tPORT *p_port); 242 extern void port_start_par_neg (tPORT *p_port); 243 extern void port_start_control (tPORT *p_port); [all …]
|
D | rfc_l2cap_if.c | 309 tPORT *p_port; in RFCOMM_BufDataInd() local 345 if (((p_port = port_find_mcb_dlci_port (p_mcb, rfc_cb.rfc.rx_frame.dlci)) == NULL) in RFCOMM_BufDataInd() 346 || (!p_port->rfc.p_mcb)) in RFCOMM_BufDataInd() 358 if ((p_port = port_find_dlci_port (rfc_cb.rfc.rx_frame.dlci)) == NULL) in RFCOMM_BufDataInd() 364 p_mcb->port_inx[rfc_cb.rfc.rx_frame.dlci] = p_port->inx; in RFCOMM_BufDataInd() 365 p_port->rfc.p_mcb = p_mcb; in RFCOMM_BufDataInd() 372 rfc_port_sm_execute (p_port, event, p_buf); in RFCOMM_BufDataInd() 377 rfc_inc_credit (p_port, rfc_cb.rfc.rx_frame.credit); in RFCOMM_BufDataInd() 381 rfc_port_sm_execute (p_port, event, NULL); in RFCOMM_BufDataInd()
|
D | rfc_int.h | 287 extern void rfc_port_sm_execute (tPORT *p_port, UINT16 event, void *p_data); 307 extern void rfc_port_timer_start (tPORT *p_port, UINT16 tout); 308 extern void rfc_port_timer_stop (tPORT *p_port); 315 extern void rfc_port_closed (tPORT *p_port); 317 extern void rfc_inc_credit (tPORT *p_port, UINT8 credit); 318 extern void rfc_dec_credit (tPORT *p_port);
|