/system/bt/stack/rfcomm/ |
D | port_rfc.cc | 44 uint32_t port_rfc_send_tx_data(tPORT* p_port); 45 void port_rfc_closed(tPORT* p_port, uint8_t res); 46 void port_get_credits(tPORT* p_port, uint8_t k); 58 int port_open_continue(tPORT* p_port) { in port_open_continue() argument 59 RFCOMM_TRACE_EVENT("port_open_continue, p_port:%p", p_port); in port_open_continue() 62 tRFC_MCB* p_mcb = rfc_alloc_multiplexer_channel(p_port->bd_addr, true); in port_open_continue() 65 port_release_port(p_port); in port_open_continue() 69 p_port->rfc.p_mcb = p_mcb; in port_open_continue() 71 p_mcb->port_handles[p_port->dlci] = p_port->handle; in port_open_continue() 74 port_select_mtu(p_port); in port_open_continue() [all …]
|
D | port_utils.cc | 71 tPORT* p_port = &rfc_cb.port.port[port_index]; in port_allocate_port() local 72 if (!p_port->in_use) { in port_allocate_port() 74 memset(p_port, 0, sizeof(tPORT)); in port_allocate_port() 75 p_port->in_use = true; in port_allocate_port() 77 p_port->handle = port_index + static_cast<uint8_t>(1); in port_allocate_port() 79 port_set_defaults(p_port); in port_allocate_port() 80 p_port->rfc.port_timer = alarm_new("rfcomm_port.port_timer"); in port_allocate_port() 81 p_port->dlci = dlci; in port_allocate_port() 82 p_port->bd_addr = bd_addr; in port_allocate_port() 87 __func__, port_index, p_port, rfc_cb.rfc.last_port_index, in port_allocate_port() [all …]
|
D | port_api.cc | 142 tPORT* p_port; in RFCOMM_CreateConnection() local 144 p_port = port_find_port(dlci, bd_addr); in RFCOMM_CreateConnection() 145 if (p_port != nullptr) { in RFCOMM_CreateConnection() 147 if (!p_port->is_server) { in RFCOMM_CreateConnection() 149 << static_cast<int>(p_port->state) in RFCOMM_CreateConnection() 150 << ", RFC_state=" << static_cast<int>(p_port->rfc.state) in RFCOMM_CreateConnection() 152 << (p_port->rfc.p_mcb ? p_port->rfc.p_mcb->state : 0) in RFCOMM_CreateConnection() 157 << ", port=" << std::to_string(p_port->handle); in RFCOMM_CreateConnection() 158 *p_handle = p_port->handle; in RFCOMM_CreateConnection() 165 p_port = port_allocate_port(dlci, bd_addr); in RFCOMM_CreateConnection() [all …]
|
D | rfc_port_fsm.cc | 48 static void rfc_port_sm_state_closed(tPORT* p_port, uint16_t event, 50 static void rfc_port_sm_sabme_wait_ua(tPORT* p_port, uint16_t event, 52 static void rfc_port_sm_opened(tPORT* p_port, uint16_t event, void* p_data); 53 static void rfc_port_sm_orig_wait_sec_check(tPORT* p_port, uint16_t event, 55 static void rfc_port_sm_term_wait_sec_check(tPORT* p_port, uint16_t event, 57 static void rfc_port_sm_disc_wait_ua(tPORT* p_port, uint16_t event, 60 static void rfc_port_uplink_data(tPORT* p_port, BT_HDR* p_buf); 74 void rfc_port_sm_execute(tPORT* p_port, uint16_t event, void* p_data) { in rfc_port_sm_execute() argument 75 CHECK(p_port != nullptr) << __func__ << ": NULL port event " << event; in rfc_port_sm_execute() 76 VLOG(1) << __func__ << ": BD_ADDR=" << p_port->bd_addr in rfc_port_sm_execute() [all …]
|
D | rfc_port_if.cc | 84 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq() local 85 if (p_port == nullptr) { in RFCOMM_DlcEstablishReq() 90 rfc_port_sm_execute(p_port, RFC_EVENT_OPEN, nullptr); in RFCOMM_DlcEstablishReq() 108 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishRsp() local 109 if (p_port == nullptr) { in RFCOMM_DlcEstablishRsp() 113 rfc_port_sm_execute(p_port, RFC_EVENT_ESTABLISH_RSP, &result); in RFCOMM_DlcEstablishRsp() 133 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_ParameterNegotiationRequest() local 134 if (p_port == nullptr) { in RFCOMM_ParameterNegotiationRequest() 140 p_port->error = PORT_PAR_NEG_FAILED; in RFCOMM_ParameterNegotiationRequest() 152 k = (p_port->credit_rx_max < RFCOMM_K_MAX) ? p_port->credit_rx_max in RFCOMM_ParameterNegotiationRequest() [all …]
|
D | rfc_utils.cc | 253 void rfc_port_timer_start(tPORT* p_port, uint16_t timeout) { in rfc_port_timer_start() argument 257 alarm_set_on_mloop(p_port->rfc.port_timer, interval_ms, in rfc_port_timer_start() 258 rfcomm_port_timer_timeout, p_port); in rfc_port_timer_start() 268 void rfc_port_timer_stop(tPORT* p_port) { in rfc_port_timer_stop() argument 271 alarm_cancel(p_port->rfc.port_timer); in rfc_port_timer_stop() 303 tPORT* p_port = (tPORT*)data; in rfcomm_port_timer_timeout() local 305 rfc_port_sm_execute(p_port, RFC_EVENT_TIMEOUT, NULL); in rfcomm_port_timer_timeout() 327 tPORT* p_port = (tPORT*)p_ref_data; in rfc_sec_check_complete() local 330 if (!p_port->in_use || in rfc_sec_check_complete() 331 ((p_port->rfc.state != RFC_STATE_ORIG_WAIT_SEC_CHECK) && in rfc_sec_check_complete() [all …]
|
D | port_int.h | 219 extern void port_set_defaults(tPORT* p_port); 220 extern void port_select_mtu(tPORT* p_port); 221 extern void port_release_port(tPORT* p_port); 226 extern uint32_t port_get_signal_changes(tPORT* p_port, uint8_t old_signals, 228 extern uint32_t port_flow_control_user(tPORT* p_port); 229 extern void port_flow_control_peer(tPORT* p_port, bool enable, uint16_t count); 234 extern int port_open_continue(tPORT* p_port); 235 extern void port_start_port_open(tPORT* p_port); 236 extern void port_start_par_neg(tPORT* p_port); 237 extern void port_start_control(tPORT* p_port); [all …]
|
D | rfc_l2cap_if.cc | 319 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd() local 320 if (p_port == nullptr || !p_port->rfc.p_mcb) { in RFCOMM_BufDataInd() 337 p_port = port_find_dlci_port(rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd() 338 if (p_port == nullptr) { in RFCOMM_BufDataInd() 349 p_port->handle); in RFCOMM_BufDataInd() 350 p_mcb->port_handles[rfc_cb.rfc.rx_frame.dlci] = p_port->handle; in RFCOMM_BufDataInd() 351 p_port->rfc.p_mcb = p_mcb; in RFCOMM_BufDataInd() 358 rfc_port_sm_execute(p_port, event, p_buf); in RFCOMM_BufDataInd() 364 rfc_inc_credit(p_port, rfc_cb.rfc.rx_frame.credit); in RFCOMM_BufDataInd() 369 rfc_port_sm_execute(p_port, event, nullptr); in RFCOMM_BufDataInd()
|
D | rfc_int.h | 281 extern void rfc_port_sm_execute(tPORT* p_port, uint16_t event, void* p_data); 305 extern void rfc_port_timer_start(tPORT* p_port, uint16_t tout); 306 extern void rfc_port_timer_stop(tPORT* p_port); 313 extern void rfc_port_closed(tPORT* p_port); 317 extern void rfc_inc_credit(tPORT* p_port, uint8_t credit); 318 extern void rfc_dec_credit(tPORT* p_port);
|
/system/bt/stack/test/rfcomm/ |
D | stack_rfcomm_test.cc | 208 void* p_port = nullptr; in ConnectServerPort() local 215 .WillOnce(DoAll(SaveArg<5>(&security_callback), SaveArg<6>(&p_port), in ConnectServerPort() 230 security_callback(&peer_addr, BT_TRANSPORT_BR_EDR, p_port, BTM_SUCCESS); in ConnectServerPort() 352 void* p_port = nullptr; in ConnectClientPort() local 357 .WillOnce(DoAll(SaveArg<5>(&security_callback), SaveArg<6>(&p_port), in ConnectClientPort() 368 security_callback(&peer_addr, BT_TRANSPORT_BR_EDR, p_port, BTM_SUCCESS); in ConnectClientPort() 839 void* p_port = nullptr; in TEST_F() local 844 .WillOnce(DoAll(SaveArg<5>(&security_callback), SaveArg<6>(&p_port), in TEST_F() 860 security_callback(&test_address, BT_TRANSPORT_BR_EDR, p_port, BTM_SUCCESS); in TEST_F()
|