• Home
  • Raw
  • Download

Lines Matching refs:p_mcb

138     tRFC_MCB *p_mcb = NULL;  in rfc_alloc_multiplexer_channel()  local
171 p_mcb = &rfc_cb.port.rfc_mcb[j]; in rfc_alloc_multiplexer_channel()
175 alarm_free(p_mcb->mcb_timer); in rfc_alloc_multiplexer_channel()
176 fixed_queue_free(p_mcb->cmd_q, NULL); in rfc_alloc_multiplexer_channel()
177 memset (p_mcb, 0, sizeof (tRFC_MCB)); in rfc_alloc_multiplexer_channel()
178 memcpy (p_mcb->bd_addr, bd_addr, BD_ADDR_LEN); in rfc_alloc_multiplexer_channel()
182 p_mcb->mcb_timer = alarm_new("rfcomm_mcb.mcb_timer"); in rfc_alloc_multiplexer_channel()
183 p_mcb->cmd_q = fixed_queue_new(SIZE_MAX); in rfc_alloc_multiplexer_channel()
185 p_mcb->is_initiator = is_initiator; in rfc_alloc_multiplexer_channel()
187 rfc_timer_start (p_mcb, RFC_MCB_INIT_INACT_TIMER); in rfc_alloc_multiplexer_channel()
190 return (p_mcb); in rfc_alloc_multiplexer_channel()
204 void rfc_release_multiplexer_channel (tRFC_MCB *p_mcb) in rfc_release_multiplexer_channel() argument
207 rfc_save_lcid_mcb(NULL, p_mcb->lcid); in rfc_release_multiplexer_channel()
211 if (rfc_cb.port.port[i].rfc.p_mcb == p_mcb) in rfc_release_multiplexer_channel()
212 rfc_cb.port.port[i].rfc.p_mcb = NULL; in rfc_release_multiplexer_channel()
215 rfc_timer_stop (p_mcb); in rfc_release_multiplexer_channel()
216 alarm_free(p_mcb->mcb_timer); in rfc_release_multiplexer_channel()
218 fixed_queue_free(p_mcb->cmd_q, osi_free); in rfc_release_multiplexer_channel()
220 memset (p_mcb, 0, sizeof (tRFC_MCB)); in rfc_release_multiplexer_channel()
221 p_mcb->state = RFC_MX_STATE_IDLE; in rfc_release_multiplexer_channel()
232 void rfc_timer_start(tRFC_MCB *p_mcb, UINT16 timeout) in rfc_timer_start() argument
237 alarm_set_on_queue(p_mcb->mcb_timer, interval_ms, in rfc_timer_start()
238 rfcomm_mcb_timer_timeout, p_mcb, in rfc_timer_start()
250 void rfc_timer_stop(tRFC_MCB *p_mcb) in rfc_timer_stop() argument
254 alarm_cancel(p_mcb->mcb_timer); in rfc_timer_stop()
300 void rfc_check_mcb_active (tRFC_MCB *p_mcb) in rfc_check_mcb_active() argument
306 if (p_mcb->port_inx[i] != 0) in rfc_check_mcb_active()
308 p_mcb->is_disc_initiator = FALSE; in rfc_check_mcb_active()
314 if (p_mcb->is_disc_initiator) in rfc_check_mcb_active()
316 p_mcb->is_disc_initiator = FALSE; in rfc_check_mcb_active()
317 rfc_mx_sm_execute (p_mcb, RFC_MX_EVENT_CLOSE_REQ, NULL); in rfc_check_mcb_active()
320 rfc_timer_start (p_mcb, RFC_MCB_RELEASE_INACT_TIMER); in rfc_check_mcb_active()
332 tRFC_MCB *p_mcb = (tRFC_MCB *)data; in rfcomm_mcb_timer_timeout() local
334 rfc_mx_sm_execute(p_mcb, RFC_EVENT_TIMEOUT, NULL); in rfcomm_mcb_timer_timeout()
376 tRFC_MCB *p_mcb = p_port->rfc.p_mcb; in rfc_port_closed() local
385 if (p_mcb) in rfc_port_closed()
387 p_mcb->port_inx[p_port->dlci] = 0; in rfc_port_closed()
390 rfc_check_mcb_active (p_mcb); in rfc_port_closed()
410 if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT) in rfc_inc_credit()
417 PORT_FlowInd(p_port->rfc.p_mcb, p_port->dlci, TRUE); in rfc_inc_credit()
434 if (p_port->rfc.p_mcb->flow == PORT_FC_CREDIT) in rfc_dec_credit()
455 void rfc_check_send_cmd(tRFC_MCB *p_mcb, BT_HDR *p_buf) in rfc_check_send_cmd() argument
459 if (p_mcb->cmd_q == NULL) { in rfc_check_send_cmd()
461 __func__, p_mcb, p_mcb->lcid, in rfc_check_send_cmd()
462 rfc_find_lcid_mcb(p_mcb->lcid)); in rfc_check_send_cmd()
464 fixed_queue_enqueue(p_mcb->cmd_q, p_buf); in rfc_check_send_cmd()
468 while (p_mcb->l2cap_congested == FALSE) { in rfc_check_send_cmd()
469 BT_HDR *p = (BT_HDR *)fixed_queue_try_dequeue(p_mcb->cmd_q); in rfc_check_send_cmd()
472 L2CA_DataWrite(p_mcb->lcid, p); in rfc_check_send_cmd()