Lines Matching refs:pcb
296 tPAN_CONN* pcb = pan_get_pcb_by_addr(rem_bda); in PAN_Connect() local
301 if ((pan_cb.num_conns > 1) || (pan_cb.num_conns && (!pcb))) { in PAN_Connect()
325 if (pan_cb.num_conns && pan_cb.active_role == PAN_ROLE_CLIENT && !pcb) { in PAN_Connect()
347 if (!pcb) pcb = pan_allocate_pcb(rem_bda, BNEP_INVALID_HANDLE); in PAN_Connect()
348 if (!pcb) { in PAN_Connect()
355 if (pcb->con_state == PAN_STATE_IDLE) { in PAN_Connect()
357 } else if (pcb->con_state == PAN_STATE_CONNECTED) { in PAN_Connect()
358 pcb->con_flags |= PAN_FLAGS_CONN_COMPLETED; in PAN_Connect()
363 pcb->con_state = PAN_STATE_CONN_START; in PAN_Connect()
364 pcb->prv_src_uuid = pcb->src_uuid; in PAN_Connect()
365 pcb->prv_dst_uuid = pcb->dst_uuid; in PAN_Connect()
367 pcb->src_uuid = src_uuid; in PAN_Connect()
368 pcb->dst_uuid = dst_uuid; in PAN_Connect()
371 Uuid::From16Bit(dst_uuid), &(pcb->handle)); in PAN_Connect()
373 pan_release_pcb(pcb); in PAN_Connect()
380 *handle = pcb->handle; in PAN_Connect()
398 tPAN_CONN* pcb; in PAN_Disconnect() local
402 pcb = pan_get_pcb_by_handle(handle); in PAN_Disconnect()
403 if (!pcb) { in PAN_Disconnect()
408 result = BNEP_Disconnect(pcb->handle); in PAN_Disconnect()
409 if (pcb->con_state != PAN_STATE_IDLE) pan_cb.num_conns--; in PAN_Disconnect()
411 if (pan_cb.pan_bridge_req_cb && pcb->src_uuid == UUID_SERVCLASS_NAP) in PAN_Disconnect()
412 (*pan_cb.pan_bridge_req_cb)(pcb->rem_bda, false); in PAN_Disconnect()
414 pan_release_pcb(pcb); in PAN_Disconnect()
463 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED) in PAN_Write()
464 BNEP_Write(pan_cb.pcb[i].handle, dst, p_data, len, protocol, &src, ext); in PAN_Write()
504 tPAN_CONN* pcb; in PAN_WriteBuf() local
518 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED) in PAN_WriteBuf()
519 BNEP_Write(pan_cb.pcb[i].handle, dst, data, p_buf->len, protocol, &src, in PAN_WriteBuf()
530 if (pan_cb.pcb[i].con_state == PAN_STATE_CONNECTED && in PAN_WriteBuf()
531 pan_cb.pcb[i].src_uuid == UUID_SERVCLASS_PANU) in PAN_WriteBuf()
542 BNEP_WriteBuf(pan_cb.pcb[i].handle, dst, p_buf, protocol, &src, ext); in PAN_WriteBuf()
556 pcb = pan_get_pcb_by_handle(handle); in PAN_WriteBuf()
557 if (!pcb) { in PAN_WriteBuf()
563 if (pcb->con_state != PAN_STATE_CONNECTED) { in PAN_WriteBuf()
569 result = BNEP_WriteBuf(pcb->handle, dst, p_buf, protocol, &src, ext); in PAN_WriteBuf()
601 tPAN_CONN* pcb; in PAN_SetProtocolFilters() local
605 pcb = pan_get_pcb_by_handle(handle); in PAN_SetProtocolFilters()
606 if (!pcb) { in PAN_SetProtocolFilters()
611 result = BNEP_SetProtocolFilters(pcb->handle, num_filters, p_start_array, in PAN_SetProtocolFilters()
642 tPAN_CONN* pcb; in PAN_SetMulticastFilters() local
646 pcb = pan_get_pcb_by_handle(handle); in PAN_SetMulticastFilters()
647 if (!pcb) { in PAN_SetMulticastFilters()
652 result = BNEP_SetMulticastFilters(pcb->handle, num_mcast_filters, in PAN_SetMulticastFilters()