Home | History | Annotate | Download | only in rfcomm

Lines Matching refs:p_mcb

56     tRFC_MCB *p_mcb;
61 if ((p_mcb = rfc_alloc_multiplexer_channel (p_port->bd_addr, TRUE)) == NULL)
68 p_port->rfc.p_mcb = p_mcb;
70 p_mcb->port_inx[p_port->dlci] = p_port->inx;
75 if (p_mcb->state == RFC_MX_STATE_CONNECTED)
77 RFCOMM_ParNegReq (p_mcb, p_port->dlci, p_port->mtu);
79 else if ((p_mcb->state == RFC_MX_STATE_IDLE)
80 ||(p_mcb->state == RFC_MX_STATE_DISC_WAIT_UA))
85 RFCOMM_StartReq (p_mcb);
91 RFCOMM_TRACE_DEBUG1 ("port_open_continue: mx state(%d) mx channel is openning", p_mcb->state);
109 tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
111 if (p_mcb == NULL)
114 RFCOMM_ControlReq (p_mcb, p_port->dlci, &p_port->local_ctrl);
130 tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
132 if (p_mcb == NULL)
135 RFCOMM_PortNegReq (p_mcb, p_port->dlci, &p_port->user_port_pars);
151 tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
174 if ((p_mcb == NULL) || (p_port->rfc.state == RFC_STATE_CLOSED))
184 RFCOMM_DlcReleaseReq (p_mcb, p_port->dlci);
199 void PORT_StartCnf (tRFC_MCB *p_mcb, UINT16 result)
210 if (p_port->rfc.p_mcb == p_mcb)
215 RFCOMM_ParNegReq (p_mcb, p_port->dlci, p_port->mtu);
227 rfc_release_multiplexer_channel (p_mcb);
228 p_port->rfc.p_mcb = NULL;
246 rfc_check_mcb_active (p_mcb);
261 void PORT_StartInd (tRFC_MCB *p_mcb)
271 if ((p_port->rfc.p_mcb == NULL)
272 || (p_port->rfc.p_mcb == p_mcb))
274 RFCOMM_TRACE_DEBUG1("PORT_StartInd, RFCOMM_StartRsp RFCOMM_SUCCESS: p_mcb:%p", p_mcb);
275 RFCOMM_StartRsp (p_mcb, RFCOMM_SUCCESS);
279 RFCOMM_StartRsp (p_mcb, RFCOMM_ERROR);
293 void PORT_ParNegInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
295 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
308 rfc_send_dm(p_mcb, dlci, FALSE);
311 rfc_check_mcb_active( p_mcb );
315 p_mcb->port_inx[dlci] = p_port->inx;
318 memcpy (p_port->bd_addr, p_mcb->bd_addr, BD_ADDR_LEN);
323 p_port->rfc.p_mcb = p_mcb;
331 if (p_mcb->flow == PORT_FC_UNDEFINED)
335 p_mcb->flow = PORT_FC_TS710;
339 p_mcb->flow = PORT_FC_CREDIT;
353 else if (p_mcb->flow == PORT_FC_CREDIT)
369 RFCOMM_ParNegRsp (p_mcb, dlci, p_port->mtu, our_cl, our_k);
384 void PORT_ParNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT8 cl, UINT8 k)
386 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
394 if (p_mcb->flow == PORT_FC_UNDEFINED)
400 rfc_send_disc (p_mcb, p_port->dlci);
407 p_mcb->flow = PORT_FC_CREDIT;
412 p_mcb->flow = PORT_FC_TS710;
422 if (p_mcb->flow == PORT_FC_CREDIT)
428 RFCOMM_DlcEstablishReq (p_mcb, p_port->dlci, p_port->mtu);
445 void PORT_DlcEstablishInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu)
447 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
449 RFCOMM_TRACE_DEBUG4 ("PORT_DlcEstablishInd p_mcb:%p, dlci:%d mtu:%di, p_port:%p", p_mcb, dlci, mtu, p_port);
450 RFCOMM_TRACE_DEBUG6 ("PORT_DlcEstablishInd p_mcb addr:%02x:%02x:%02x:%02x:%02x:%02x",
451 p_mcb->bd_addr[0], p_mcb->bd_addr[1], p_mcb->bd_addr[2],
452 p_mcb->bd_addr[3], p_mcb->bd_addr[4], p_mcb->bd_addr[5]);
460 RFCOMM_DlcEstablishRsp (p_mcb, dlci, 0, RFCOMM_ERROR);
463 p_mcb->port_inx[dlci] = p_port->inx;
471 rfc_timer_stop (p_mcb);
473 p_mcb, dlci, p_port->mtu, RFCOMM_SUCCESS);
497 void PORT_DlcEstablishCnf (tRFC_MCB *p_mcb, UINT8 dlci, UINT16 mtu, UINT16 result)
499 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
518 rfc_timer_stop (p_mcb);
531 RFCOMM_PortNegReq (p_port->rfc.p_mcb, p_port->dlci, NULL);
533 RFCOMM_ControlReq (p_port->rfc.p_mcb, p_port->dlci, &p_port->local_ctrl);
548 void PORT_PortNegInd (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars,
551 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
561 RFCOMM_PortNegRsp (p_mcb, dlci, p_pars, 0);
564 p_mcb->port_inx[dlci] = p_port->inx;
569 RFCOMM_PortNegRsp (p_mcb, dlci, p_pars, param_mask);
581 void PORT_PortNegCnf (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_STATE *p_pars, UINT16 result)
583 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
597 RFCOMM_DlcReleaseReq (p_mcb, p_port->dlci);
605 RFCOMM_ControlReq (p_port->rfc.p_mcb, p_port->dlci, &p_port->local_ctrl);
622 void PORT_ControlInd (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
624 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
640 RFCOMM_ControlReq (p_port->rfc.p_mcb, p_port->dlci, &p_port->local_ctrl);
681 void PORT_ControlCnf (tRFC_MCB *p_mcb, UINT8 dlci, tPORT_CTRL *p_pars)
683 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
718 void PORT_LineStatusInd (tRFC_MCB *p_mcb, UINT8 dlci, UINT8 line_status)
720 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
752 void PORT_DlcReleaseInd (tRFC_MCB *p_mcb, UINT8 dlci)
754 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
773 void PORT_CloseInd (tRFC_MCB *p_mcb)
783 if (p_port->rfc.p_mcb == p_mcb)
788 rfc_release_multiplexer_channel (p_mcb);
799 void Port_TimeOutCloseMux (tRFC_MCB *p_mcb)
809 if (p_port->rfc.p_mcb == p_mcb)
825 void PORT_DataInd (tRFC_MCB *p_mcb, UINT8 dlci, BT_HDR *p_buf)
827 tPORT *p_port = port_find_mcb_dlci_port (p_mcb, dlci);
833 RFCOMM_TRACE_EVENT4("PORT_DataInd with data length %d, p_mcb:%p,p_port:%p,dlci:%d",
834 p_buf->len, p_mcb, p_port, dlci);
870 RFCOMM_LineStatusReq (p_mcb, dlci, LINE_STATUS_OVERRUN);
926 void PORT_FlowInd (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN enable_data)
936 p_mcb->peer_ready = enable_data;
940 if ((p_port = port_find_mcb_dlci_port (p_mcb, dlci)) == NULL)
953 || (p_port->rfc.p_mcb != p_mcb)
995 while (!p_port->tx.peer_fc && p_port->rfc.p_mcb && p_port->rfc.p_mcb->peer_ready)
1008 RFCOMM_DataReq (p_port->rfc.p_mcb, p_port->dlci, p_buf);
1045 tRFC_MCB *p_mcb = p_port->rfc.p_mcb;
1055 if (p_mcb)
1057 p_mcb->port_inx[p_port->dlci] = 0;
1060 rfc_check_mcb_active (p_mcb);
1061 p_port->rfc.p_mcb = NULL;