Home
last modified time | relevance | path

Searched refs:p_port (Results 1 – 10 of 10) sorted by relevance

/packages/modules/Bluetooth/system/stack/rfcomm/
Dport_rfc.cc53 uint32_t port_rfc_send_tx_data(tPORT* p_port);
54 void port_rfc_closed(tPORT* p_port, uint8_t res);
55 void port_get_credits(tPORT* p_port, uint8_t k);
67 int port_open_continue(tPORT* p_port) { in port_open_continue() argument
68 log::verbose("port_open_continue, p_port:{}", fmt::ptr(p_port)); in port_open_continue()
71 tRFC_MCB* p_mcb = rfc_alloc_multiplexer_channel(p_port->bd_addr, true); in port_open_continue()
74 port_release_port(p_port); in port_open_continue()
78 p_port->rfc.p_mcb = p_mcb; in port_open_continue()
80 p_mcb->port_handles[p_port->dlci] = p_port->handle; in port_open_continue()
83 port_select_mtu(p_port); in port_open_continue()
[all …]
Dport_utils.cc76 tPORT* p_port = &rfc_cb.port.port[port_index]; in port_allocate_port() local
77 if (!p_port->in_use) { in port_allocate_port()
79 memset(p_port, 0, sizeof(tPORT)); in port_allocate_port()
80 p_port->in_use = true; in port_allocate_port()
82 p_port->handle = port_index + static_cast<uint8_t>(1); in port_allocate_port()
84 port_set_defaults(p_port); in port_allocate_port()
85 p_port->rfc.port_timer = alarm_new("rfcomm_port.port_timer"); in port_allocate_port()
86 p_port->dlci = dlci; in port_allocate_port()
87 p_port->bd_addr = bd_addr; in port_allocate_port()
91 port_index, fmt::ptr(p_port), rfc_cb.rfc.last_port_index, bd_addr); in port_allocate_port()
[all …]
Drfc_port_fsm.cc53 static void rfc_port_sm_state_closed(tPORT* p_port, tRFC_PORT_EVENT event,
55 static void rfc_port_sm_sabme_wait_ua(tPORT* p_port, tRFC_PORT_EVENT event,
57 static void rfc_port_sm_opened(tPORT* p_port, tRFC_PORT_EVENT event,
59 static void rfc_port_sm_orig_wait_sec_check(tPORT* p_port,
62 static void rfc_port_sm_term_wait_sec_check(tPORT* p_port,
65 static void rfc_port_sm_disc_wait_ua(tPORT* p_port, tRFC_PORT_EVENT event,
68 static void rfc_port_uplink_data(tPORT* p_port, BT_HDR* p_buf);
82 void rfc_port_sm_execute(tPORT* p_port, tRFC_PORT_EVENT event, void* p_data) { in rfc_port_sm_execute() argument
83 log::assert_that(p_port != nullptr, "NULL port event {}", event); in rfc_port_sm_execute()
86 if (p_port->rfc.state != RFC_STATE_OPENED) { in rfc_port_sm_execute()
[all …]
Dport_api.cc139 tPORT* p_port{nullptr}; in RFCOMM_CreateConnectionWithSecurity() local
141 p_port = port_find_port(dlci, bd_addr); in RFCOMM_CreateConnectionWithSecurity()
142 if (p_port != nullptr) { in RFCOMM_CreateConnectionWithSecurity()
144 if (!p_port->is_server) { in RFCOMM_CreateConnectionWithSecurity()
149 static_cast<int>(p_port->state), in RFCOMM_CreateConnectionWithSecurity()
150 static_cast<int>(p_port->rfc.state), in RFCOMM_CreateConnectionWithSecurity()
151 p_port->rfc.p_mcb ? p_port->rfc.p_mcb->state : 0, bd_addr, scn, in RFCOMM_CreateConnectionWithSecurity()
152 is_server, mtu, uuid, dlci, fmt::ptr(p_mcb), p_port->handle); in RFCOMM_CreateConnectionWithSecurity()
153 *p_handle = p_port->handle; in RFCOMM_CreateConnectionWithSecurity()
160 p_port = port_allocate_port(dlci, bd_addr); in RFCOMM_CreateConnectionWithSecurity()
[all …]
Drfc_port_if.cc87 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq() local
88 if (p_port == nullptr) { in RFCOMM_DlcEstablishReq()
93 rfc_port_sm_execute(p_port, RFC_PORT_EVENT_OPEN, nullptr); in RFCOMM_DlcEstablishReq()
111 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishRsp() local
112 if (p_port == nullptr) { in RFCOMM_DlcEstablishRsp()
116 rfc_port_sm_execute(p_port, RFC_PORT_EVENT_ESTABLISH_RSP, &result); in RFCOMM_DlcEstablishRsp()
136 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_ParameterNegotiationRequest() local
137 if (p_port == nullptr) { in RFCOMM_ParameterNegotiationRequest()
156 k = (p_port->credit_rx_max < RFCOMM_K_MAX) ? p_port->credit_rx_max in RFCOMM_ParameterNegotiationRequest()
158 p_port->credit_rx = k; in RFCOMM_ParameterNegotiationRequest()
[all …]
Drfc_utils.cc249 void rfc_port_timer_start(tPORT* p_port, uint16_t timeout) { in rfc_port_timer_start() argument
253 alarm_set_on_mloop(p_port->rfc.port_timer, interval_ms, in rfc_port_timer_start()
254 rfcomm_port_timer_timeout, p_port); in rfc_port_timer_start()
264 void rfc_port_timer_stop(tPORT* p_port) { in rfc_port_timer_stop() argument
267 alarm_cancel(p_port->rfc.port_timer); in rfc_port_timer_stop()
299 tPORT* p_port = (tPORT*)data; in rfcomm_port_timer_timeout() local
301 rfc_port_sm_execute(p_port, RFC_PORT_EVENT_TIMEOUT, NULL); in rfcomm_port_timer_timeout()
325 tPORT* p_port = (tPORT*)p_ref_data; in rfc_sec_check_complete() local
328 if (!p_port->in_use || in rfc_sec_check_complete()
329 ((p_port->rfc.state != RFC_STATE_ORIG_WAIT_SEC_CHECK) && in rfc_sec_check_complete()
[all …]
Dport_int.h229 void port_set_defaults(tPORT* p_port);
230 void port_select_mtu(tPORT* p_port);
231 void port_release_port(tPORT* p_port);
236 uint32_t port_get_signal_changes(tPORT* p_port, uint8_t old_signals,
238 uint32_t port_flow_control_user(tPORT* p_port);
239 void port_flow_control_peer(tPORT* p_port, bool enable, uint16_t count);
244 int port_open_continue(tPORT* p_port);
245 void port_start_port_open(tPORT* p_port);
246 void port_start_par_neg(tPORT* p_port);
247 void port_start_control(tPORT* p_port);
[all …]
Drfc_l2cap_if.cc299 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd() local
300 if (p_port == nullptr || !p_port->rfc.p_mcb) { in RFCOMM_BufDataInd()
315 p_port = port_find_dlci_port(rfc_cb.rfc.rx_frame.dlci); in RFCOMM_BufDataInd()
316 if (p_port == nullptr) { in RFCOMM_BufDataInd()
327 p_mcb->port_handles[rfc_cb.rfc.rx_frame.dlci], p_port->handle, in RFCOMM_BufDataInd()
329 p_mcb->port_handles[rfc_cb.rfc.rx_frame.dlci] = p_port->handle; in RFCOMM_BufDataInd()
330 p_port->rfc.p_mcb = p_mcb; in RFCOMM_BufDataInd()
337 rfc_port_sm_execute(p_port, static_cast<tRFC_PORT_EVENT>(event), p_buf); in RFCOMM_BufDataInd()
343 rfc_inc_credit(p_port, rfc_cb.rfc.rx_frame.credit); in RFCOMM_BufDataInd()
348 rfc_port_sm_execute(p_port, static_cast<tRFC_PORT_EVENT>(event), nullptr); in RFCOMM_BufDataInd()
Drfc_int.h209 void rfc_port_sm_execute(tPORT* p_port, tRFC_PORT_EVENT event, void* p_data);
232 void rfc_port_timer_start(tPORT* p_port, uint16_t tout);
233 void rfc_port_timer_stop(tPORT* p_port);
239 void rfc_port_closed(tPORT* p_port);
242 void rfc_inc_credit(tPORT* p_port, uint8_t credit);
243 void rfc_dec_credit(tPORT* p_port);
/packages/modules/Bluetooth/system/stack/test/rfcomm/
Dstack_rfcomm_test.cc211 void* p_port = nullptr; in ConnectServerPort() local
218 .WillOnce(DoAll(SaveArg<5>(&security_callback), SaveArg<6>(&p_port), in ConnectServerPort()
233 security_callback(peer_addr, BT_TRANSPORT_BR_EDR, p_port, BTM_SUCCESS); in ConnectServerPort()
356 void* p_port = nullptr; in ConnectClientPort() local
361 .WillOnce(DoAll(SaveArg<5>(&security_callback), SaveArg<6>(&p_port), in ConnectClientPort()
372 security_callback(peer_addr, BT_TRANSPORT_BR_EDR, p_port, BTM_SUCCESS); in ConnectClientPort()
838 void* p_port = nullptr; in TEST_F() local
843 .WillOnce(DoAll(SaveArg<5>(&security_callback), SaveArg<6>(&p_port), in TEST_F()
859 security_callback(test_address, BT_TRANSPORT_BR_EDR, p_port, BTM_SUCCESS); in TEST_F()