Lines Matching refs:p_mcb
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()
131 p_mcb->lcid = lcid; in RFCOMM_ConnectInd()
133 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_CONN_IND, &id); in RFCOMM_ConnectInd()
148 tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid); in RFCOMM_ConnectCnf() local
150 if (!p_mcb) in RFCOMM_ConnectCnf()
156 if (p_mcb->pending_lcid) in RFCOMM_ConnectCnf()
164 …RFCOMM_TRACE_DEBUG ("RFCOMM_ConnectCnf retry as acceptor on pending LCID(0x%x)", p_mcb->pending_lc… in RFCOMM_ConnectCnf()
167 rfc_save_lcid_mcb (NULL, p_mcb->lcid); in RFCOMM_ConnectCnf()
169 p_mcb->lcid = p_mcb->pending_lcid; in RFCOMM_ConnectCnf()
170 p_mcb->is_initiator = FALSE; in RFCOMM_ConnectCnf()
171 p_mcb->state = RFC_MX_STATE_IDLE; in RFCOMM_ConnectCnf()
174 rfc_save_lcid_mcb (p_mcb, p_mcb->lcid); in RFCOMM_ConnectCnf()
179 if ((idx = p_mcb->port_inx[i]) != 0) in RFCOMM_ConnectCnf()
181 p_mcb->port_inx[i] = 0; in RFCOMM_ConnectCnf()
182 p_mcb->port_inx[i+1] = idx; in RFCOMM_ConnectCnf()
188 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_CONN_IND, &(p_mcb->pending_id)); in RFCOMM_ConnectCnf()
193 … RFCOMM_TRACE_DEBUG ("RFCOMM_ConnectCnf peer gave up pending LCID(0x%x)", p_mcb->pending_lcid); in RFCOMM_ConnectCnf()
196 …L2CA_ConnectRsp (p_mcb->bd_addr, p_mcb->pending_id, p_mcb->pending_lcid, L2CAP_CONN_NO_RESOURCES, … in RFCOMM_ConnectCnf()
198 p_mcb->pending_lcid = 0; in RFCOMM_ConnectCnf()
203 p_mcb->lcid = lcid; in RFCOMM_ConnectCnf()
205 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_CONN_CNF, &result); in RFCOMM_ConnectCnf()
220 tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid); in RFCOMM_ConfigInd() local
222 if (!p_mcb) in RFCOMM_ConfigInd()
228 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_CONF_IND, (void *)p_cfg); in RFCOMM_ConfigInd()
243 tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid); in RFCOMM_ConfigCnf() local
245 if (!p_mcb) in RFCOMM_ConfigCnf()
251 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_CONF_CNF, (void *)p_cfg); in RFCOMM_ConfigCnf()
279 tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid); in RFCOMM_DisconnectInd() local
286 if (!p_mcb) in RFCOMM_DisconnectInd()
292 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_DISC_IND, NULL); in RFCOMM_DisconnectInd()
308 tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid); in RFCOMM_BufDataInd() local
313 if (!p_mcb) in RFCOMM_BufDataInd()
320 event = rfc_parse_data (p_mcb, &rfc_cb.rfc.rx_frame, p_buf); in RFCOMM_BufDataInd()
334 rfc_process_mx_message (p_mcb, p_buf); in RFCOMM_BufDataInd()
339 rfc_mx_sm_execute (p_mcb, event, NULL); in RFCOMM_BufDataInd()
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()
351 if (( p_mcb->is_initiator && !rfc_cb.rfc.rx_frame.cr) in RFCOMM_BufDataInd()
352 || (!p_mcb->is_initiator && rfc_cb.rfc.rx_frame.cr)) in RFCOMM_BufDataInd()
353 rfc_send_dm (p_mcb, rfc_cb.rfc.rx_frame.dlci, rfc_cb.rfc.rx_frame.pf); in RFCOMM_BufDataInd()
360 rfc_send_dm (p_mcb, rfc_cb.rfc.rx_frame.dlci, TRUE); 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()
395 tRFC_MCB *p_mcb = rfc_find_lcid_mcb (lcid); in RFCOMM_CongestionStatusInd() local
397 if (!p_mcb) in RFCOMM_CongestionStatusInd()
406 rfc_process_l2cap_congestion (p_mcb, is_congested); in RFCOMM_CongestionStatusInd()
418 tRFC_MCB *p_mcb; in rfc_find_lcid_mcb() local
427 if ((p_mcb = rfc_cb.rfc.p_rfc_lcid_mcb[lcid - L2CAP_BASE_APPL_CID]) != NULL) in rfc_find_lcid_mcb()
429 if (p_mcb->lcid != lcid) in rfc_find_lcid_mcb()
431 … RFCOMM_TRACE_WARNING ("rfc_find_lcid_mcb LCID reused LCID:0x%x current:0x%x", lcid, p_mcb->lcid); in rfc_find_lcid_mcb()
436 return (p_mcb); in rfc_find_lcid_mcb()
447 void rfc_save_lcid_mcb(tRFC_MCB *p_mcb, UINT16 lcid) in rfc_save_lcid_mcb() argument
451 rfc_cb.rfc.p_rfc_lcid_mcb[lcid - L2CAP_BASE_APPL_CID] = p_mcb; in rfc_save_lcid_mcb()