Home
last modified time | relevance | path

Searched refs:p_mcb (Results 1 – 11 of 11) sorted by relevance

/system/bt/stack/rfcomm/
Drfc_mx_fsm.cc43 static void rfc_mx_sm_state_idle(tRFC_MCB* p_mcb, uint16_t event, void* p_data);
44 static void rfc_mx_sm_state_wait_conn_cnf(tRFC_MCB* p_mcb, uint16_t event,
46 static void rfc_mx_sm_state_configure(tRFC_MCB* p_mcb, uint16_t event,
48 static void rfc_mx_sm_sabme_wait_ua(tRFC_MCB* p_mcb, uint16_t event,
50 static void rfc_mx_sm_state_wait_sabme(tRFC_MCB* p_mcb, uint16_t event,
52 static void rfc_mx_sm_state_connected(tRFC_MCB* p_mcb, uint16_t event,
54 static void rfc_mx_sm_state_disc_wait_ua(tRFC_MCB* p_mcb, uint16_t event,
57 static void rfc_mx_send_config_req(tRFC_MCB* p_mcb);
58 static void rfc_mx_conf_ind(tRFC_MCB* p_mcb, tL2CAP_CFG_INFO* p_cfg);
59 static void rfc_mx_conf_cnf(tRFC_MCB* p_mcb, tL2CAP_CFG_INFO* p_cfg);
[all …]
Drfc_l2cap_if.cc92 tRFC_MCB* p_mcb = rfc_alloc_multiplexer_channel(bd_addr, false); in RFCOMM_ConnectInd() local
94 if ((p_mcb) && (p_mcb->state != RFC_MX_STATE_IDLE)) { in RFCOMM_ConnectInd()
96 if ((p_mcb->is_initiator) && (p_mcb->state == RFC_MX_STATE_WAIT_CONN_CNF)) { in RFCOMM_ConnectInd()
97 p_mcb->pending_lcid = lcid; in RFCOMM_ConnectInd()
98 p_mcb->pending_id = id; in RFCOMM_ConnectInd()
108 p_mcb->lcid, p_mcb->pending_lcid); in RFCOMM_ConnectInd()
111 p_mcb, in RFCOMM_ConnectInd()
117 p_mcb = nullptr; in RFCOMM_ConnectInd()
121 rfc_save_lcid_mcb(p_mcb, lcid); in RFCOMM_ConnectInd()
124 if (p_mcb == nullptr) { in RFCOMM_ConnectInd()
[all …]
Drfc_utils.cc136 tRFC_MCB* p_mcb = NULL; in rfc_alloc_multiplexer_channel() local
166 p_mcb = &rfc_cb.port.rfc_mcb[j]; in rfc_alloc_multiplexer_channel()
169 alarm_free(p_mcb->mcb_timer); in rfc_alloc_multiplexer_channel()
170 fixed_queue_free(p_mcb->cmd_q, NULL); in rfc_alloc_multiplexer_channel()
171 memset(p_mcb, 0, sizeof(tRFC_MCB)); in rfc_alloc_multiplexer_channel()
172 p_mcb->bd_addr = bd_addr; in rfc_alloc_multiplexer_channel()
178 p_mcb->mcb_timer = alarm_new("rfcomm_mcb.mcb_timer"); in rfc_alloc_multiplexer_channel()
179 p_mcb->cmd_q = fixed_queue_new(SIZE_MAX); in rfc_alloc_multiplexer_channel()
181 p_mcb->is_initiator = is_initiator; in rfc_alloc_multiplexer_channel()
183 rfc_timer_start(p_mcb, RFC_MCB_INIT_INACT_TIMER); in rfc_alloc_multiplexer_channel()
[all …]
Drfc_port_if.cc49 void RFCOMM_StartReq(tRFC_MCB* p_mcb) { in RFCOMM_StartReq() argument
50 rfc_mx_sm_execute(p_mcb, RFC_MX_EVENT_START_REQ, nullptr); in RFCOMM_StartReq()
62 void RFCOMM_StartRsp(tRFC_MCB* p_mcb, uint16_t result) { in RFCOMM_StartRsp() argument
63 rfc_mx_sm_execute(p_mcb, RFC_MX_EVENT_START_RSP, &result); in RFCOMM_StartRsp()
77 void RFCOMM_DlcEstablishReq(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_DlcEstablishReq() argument
79 if (p_mcb->state != RFC_MX_STATE_CONNECTED) { in RFCOMM_DlcEstablishReq()
80 PORT_DlcEstablishCnf(p_mcb, dlci, 0, RFCOMM_ERROR); in RFCOMM_DlcEstablishReq()
84 tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci); in RFCOMM_DlcEstablishReq()
101 void RFCOMM_DlcEstablishRsp(tRFC_MCB* p_mcb, uint8_t dlci, in RFCOMM_DlcEstablishRsp() argument
103 if ((p_mcb->state != RFC_MX_STATE_CONNECTED) && (result == RFCOMM_SUCCESS)) { in RFCOMM_DlcEstablishRsp()
[all …]
Dport_rfc.cc62 tRFC_MCB* p_mcb = rfc_alloc_multiplexer_channel(p_port->bd_addr, true); in port_open_continue() local
63 if (p_mcb == nullptr) { 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()
76 if (p_mcb->state == RFC_MX_STATE_CONNECTED) { in port_open_continue()
77 RFCOMM_ParameterNegotiationRequest(p_mcb, p_port->dlci, p_port->mtu); in port_open_continue()
78 } else if ((p_mcb->state == RFC_MX_STATE_IDLE) || in port_open_continue()
79 (p_mcb->state == RFC_MX_STATE_DISC_WAIT_UA)) { in port_open_continue()
83 RFCOMM_StartReq(p_mcb); in port_open_continue()
89 p_mcb->state); in port_open_continue()
[all …]
Drfc_port_fsm.cc123 p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, true, BTM_SEC_PROTO_RFCOMM, in rfc_port_sm_state_closed()
140 rfc_timer_stop(p_port->rfc.p_mcb); in rfc_port_sm_state_closed()
144 btm_sec_mx_access_request(p_port->rfc.p_mcb->bd_addr, BT_PSM_RFCOMM, in rfc_port_sm_state_closed()
161 rfc_send_dm(p_port->rfc.p_mcb, p_port->dlci, false); in rfc_port_sm_state_closed()
165 rfc_send_dm(p_port->rfc.p_mcb, p_port->dlci, false); in rfc_port_sm_state_closed()
169 Port_TimeOutCloseMux(p_port->rfc.p_mcb); in rfc_port_sm_state_closed()
199 rfc_send_disc(p_port->rfc.p_mcb, p_port->dlci); in rfc_port_sm_sabme_wait_ua()
220 btsnoop_get_interface()->whitelist_rfc_dlci(p_port->rfc.p_mcb->lcid, in rfc_port_sm_sabme_wait_ua()
224 PORT_DlcEstablishCnf(p_port->rfc.p_mcb, p_port->dlci, in rfc_port_sm_sabme_wait_ua()
225 p_port->rfc.p_mcb->peer_l2cap_mtu, RFCOMM_SUCCESS); in rfc_port_sm_sabme_wait_ua()
[all …]
Drfc_int.h48 extern void RFCOMM_StartReq(tRFC_MCB* p_mcb);
49 extern void RFCOMM_StartRsp(tRFC_MCB* p_mcb, uint16_t result);
51 extern void RFCOMM_DlcEstablishReq(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu);
52 extern void RFCOMM_DlcEstablishRsp(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu,
55 extern void RFCOMM_DataReq(tRFC_MCB* p_mcb, uint8_t dlci, BT_HDR* p_buf);
57 extern void RFCOMM_DlcReleaseReq(tRFC_MCB* p_mcb, uint8_t dlci);
59 extern void RFCOMM_ParameterNegotiationRequest(tRFC_MCB* p_mcb, uint8_t dlci,
61 extern void RFCOMM_ParameterNegotiationResponse(tRFC_MCB* p_mcb, uint8_t dlci,
67 extern void RFCOMM_FlowReq(tRFC_MCB* p_mcb, uint8_t dlci, bool state);
69 extern void RFCOMM_PortParameterNegotiationRequest(tRFC_MCB* p_mcb,
[all …]
Drfc_ts_frames.cc42 void rfc_send_sabme(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_sabme() argument
44 uint8_t 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()
70 void rfc_send_ua(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_ua() argument
72 uint8_t cr = RFCOMM_CR(p_mcb->is_initiator, false); in rfc_send_ua()
87 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_ua()
97 void rfc_send_dm(tRFC_MCB* p_mcb, uint8_t dlci, bool pf) { in rfc_send_dm() argument
99 uint8_t cr = RFCOMM_CR(p_mcb->is_initiator, false); in rfc_send_dm()
114 rfc_check_send_cmd(p_mcb, p_buf); in rfc_send_dm()
124 void rfc_send_disc(tRFC_MCB* p_mcb, uint8_t dlci) { in rfc_send_disc() argument
[all …]
Dport_utils.cc227 if (p_port->rfc.p_mcb) { in port_release_port()
228 p_port->rfc.p_mcb->port_handles[p_port->dlci] = 0; in port_release_port()
231 rfc_check_mcb_active(p_port->rfc.p_mcb); in port_release_port()
261 p_port->rfc.p_mcb = nullptr; in port_release_port()
307 tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci) { in port_find_mcb_dlci_port() argument
308 if (!p_mcb) { in port_find_mcb_dlci_port()
315 << " is too large, bd_addr=" << p_mcb->bd_addr in port_find_mcb_dlci_port()
316 << ", p_mcb=" << p_mcb; in port_find_mcb_dlci_port()
320 uint8_t handle = p_mcb->port_handles[dlci]; in port_find_mcb_dlci_port()
323 << std::to_string(dlci) << " on " << p_mcb->bd_addr in port_find_mcb_dlci_port()
[all …]
Dport_api.cc122 tRFC_MCB* p_mcb = port_find_mcb(bd_addr); in RFCOMM_CreateConnection() local
123 if (p_mcb && !p_mcb->is_initiator && !is_server) { in RFCOMM_CreateConnection()
141 << (p_port->rfc.p_mcb ? p_port->rfc.p_mcb->state : 0) in RFCOMM_CreateConnection()
145 << ", p_mcb=" << p_mcb in RFCOMM_CreateConnection()
448 __func__, handle, p_port->in_use, p_port->state, p_port->rfc.p_mcb, in PORT_CheckConnection()
449 (p_port->rfc.p_mcb ? p_port->rfc.p_mcb->peer_ready : -1), in PORT_CheckConnection()
456 if (!p_port->rfc.p_mcb || !p_port->rfc.p_mcb->peer_ready || in PORT_CheckConnection()
461 *bd_addr = p_port->rfc.p_mcb->bd_addr; in PORT_CheckConnection()
462 if (p_lcid) *p_lcid = p_port->rfc.p_mcb->lcid; in PORT_CheckConnection()
492 if (port.rfc.p_mcb == &multiplexer_cb) { in PORT_IsOpening()
[all …]
Dport_int.h116 tRFC_MCB* p_mcb; member
205 extern tPORT* port_find_mcb_dlci_port(tRFC_MCB* p_mcb, uint8_t dlci);