Lines Matching refs:p_bcb
131 tBNEP_CONN* p_bcb = bnepu_find_bcb_by_bd_addr(p_rem_bda); in BNEP_Connect() local
137 if (!p_bcb) { in BNEP_Connect()
138 p_bcb = bnepu_allocate_bcb(p_rem_bda); in BNEP_Connect()
139 if (p_bcb == NULL) return (BNEP_NO_RESOURCES); in BNEP_Connect()
140 } else if (p_bcb->con_state != BNEP_STATE_CONNECTED) in BNEP_Connect()
144 p_bcb->prv_src_uuid = p_bcb->src_uuid; in BNEP_Connect()
145 p_bcb->prv_dst_uuid = p_bcb->dst_uuid; in BNEP_Connect()
149 p_bcb->con_flags |= BNEP_FLAGS_IS_ORIG; in BNEP_Connect()
151 p_bcb->src_uuid = src_uuid; in BNEP_Connect()
152 p_bcb->dst_uuid = dst_uuid; in BNEP_Connect()
154 if (p_bcb->con_state == BNEP_STATE_CONNECTED) { in BNEP_Connect()
157 p_bcb->con_state = BNEP_STATE_SEC_CHECKING; in BNEP_Connect()
160 p_bcb->src_uuid.ToString().c_str()); in BNEP_Connect()
163 btm_sec_mx_access_request(p_bcb->rem_bda, BT_PSM_BNEP, true, in BNEP_Connect()
165 &bnep_sec_check_complete, p_bcb); in BNEP_Connect()
167 bnep_sec_check_complete(p_bcb->rem_bda, p_bcb, BTM_SUCCESS); in BNEP_Connect()
173 p_bcb->con_state = BNEP_STATE_CONN_START; in BNEP_Connect()
175 cid = L2CA_ConnectReq(BT_PSM_BNEP, p_bcb->rem_bda); in BNEP_Connect()
177 p_bcb->l2cap_cid = cid; in BNEP_Connect()
182 (*bnep_cb.p_conn_state_cb)(p_bcb->handle, p_bcb->rem_bda, in BNEP_Connect()
184 bnepu_release_bcb(p_bcb); in BNEP_Connect()
189 alarm_set_on_mloop(p_bcb->conn_timer, BNEP_CONN_TIMEOUT_MS, in BNEP_Connect()
190 bnep_conn_timer_timeout, p_bcb); in BNEP_Connect()
193 *p_handle = p_bcb->handle; in BNEP_Connect()
213 tBNEP_CONN* p_bcb; in BNEP_ConnectResp() local
218 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_ConnectResp()
220 if (p_bcb->con_state != BNEP_STATE_CONN_SETUP || in BNEP_ConnectResp()
221 (!(p_bcb->con_flags & BNEP_FLAGS_SETUP_RCVD))) in BNEP_ConnectResp()
239 bnep_send_conn_responce(p_bcb, resp_code); in BNEP_ConnectResp()
240 p_bcb->con_flags &= (~BNEP_FLAGS_SETUP_RCVD); in BNEP_ConnectResp()
243 bnep_connected(p_bcb); in BNEP_ConnectResp()
244 else if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED) { in BNEP_ConnectResp()
246 p_bcb->con_state = BNEP_STATE_CONNECTED; in BNEP_ConnectResp()
247 p_bcb->con_flags &= (~BNEP_FLAGS_SETUP_RCVD); in BNEP_ConnectResp()
249 p_bcb->src_uuid = p_bcb->prv_src_uuid; in BNEP_ConnectResp()
250 p_bcb->dst_uuid = p_bcb->prv_dst_uuid; in BNEP_ConnectResp()
254 if (p_bcb->p_pending_data) { in BNEP_ConnectResp()
258 rem_len = p_bcb->p_pending_data->len; in BNEP_ConnectResp()
259 p = (uint8_t*)(p_bcb->p_pending_data + 1) + p_bcb->p_pending_data->offset; in BNEP_ConnectResp()
268 p = bnep_process_control_packet(p_bcb, p, &rem_len, true); in BNEP_ConnectResp()
271 osi_free_and_reset((void**)&p_bcb->p_pending_data); in BNEP_ConnectResp()
289 tBNEP_CONN* p_bcb; in BNEP_Disconnect() local
293 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_Disconnect()
295 if (p_bcb->con_state == BNEP_STATE_IDLE) return (BNEP_WRONG_HANDLE); in BNEP_Disconnect()
299 L2CA_DisconnectReq(p_bcb->l2cap_cid); in BNEP_Disconnect()
301 bnepu_release_bcb(p_bcb); in BNEP_Disconnect()
332 tBNEP_CONN* p_bcb; in BNEP_WriteBuf() local
340 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_WriteBuf()
351 if (bnep_is_packet_allowed(p_bcb, p_dest_addr, protocol, fw_ext_present, in BNEP_WriteBuf()
398 if (fixed_queue_length(p_bcb->xmit_q) >= BNEP_MAX_XMITQ_DEPTH) { in BNEP_WriteBuf()
404 bnepu_build_bnep_hdr(p_bcb, p_buf, protocol, p_src_addr, &p_dest_addr, in BNEP_WriteBuf()
408 bnepu_check_send_packet(p_bcb, p_buf); in BNEP_WriteBuf()
440 tBNEP_CONN* p_bcb; in BNEP_Write() local
452 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_Write()
455 if (bnep_is_packet_allowed(p_bcb, p_dest_addr, protocol, fw_ext_present, in BNEP_Write()
498 if (fixed_queue_length(p_bcb->xmit_q) >= BNEP_MAX_XMITQ_DEPTH) in BNEP_Write()
511 bnepu_build_bnep_hdr(p_bcb, p_buf, protocol, p_src_addr, &p_dest_addr, in BNEP_Write()
515 bnepu_check_send_packet(p_bcb, p_buf); in BNEP_Write()
543 tBNEP_CONN* p_bcb; in BNEP_SetProtocolFilters() local
547 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_SetProtocolFilters()
550 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in BNEP_SetProtocolFilters()
551 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) in BNEP_SetProtocolFilters()
562 p_bcb->sent_prot_filter_start[xx] = *p_start_array++; in BNEP_SetProtocolFilters()
563 p_bcb->sent_prot_filter_end[xx] = *p_end_array++; in BNEP_SetProtocolFilters()
566 p_bcb->sent_num_filters = num_filters; in BNEP_SetProtocolFilters()
568 bnepu_send_peer_our_filters(p_bcb); in BNEP_SetProtocolFilters()
599 tBNEP_CONN* p_bcb; in BNEP_SetMulticastFilters() local
603 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_SetMulticastFilters()
606 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in BNEP_SetMulticastFilters()
607 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) in BNEP_SetMulticastFilters()
618 memcpy(p_bcb->sent_mcast_filter_start[xx].address, p_start_array, in BNEP_SetMulticastFilters()
620 memcpy(p_bcb->sent_mcast_filter_end[xx].address, p_end_array, BD_ADDR_LEN); in BNEP_SetMulticastFilters()
626 p_bcb->sent_mcast_filters = num_filters; in BNEP_SetMulticastFilters()
628 bnepu_send_peer_our_multi_filters(p_bcb); in BNEP_SetMulticastFilters()
665 tBNEP_CONN* p_bcb; in BNEP_GetStatus() local
671 p_bcb = &(bnep_cb.bcb[handle - 1]); in BNEP_GetStatus()
674 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in BNEP_GetStatus()
675 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) in BNEP_GetStatus()
680 p_status->l2cap_cid = p_bcb->l2cap_cid; in BNEP_GetStatus()
681 p_status->rem_mtu_size = p_bcb->rem_mtu_size; in BNEP_GetStatus()
682 p_status->xmit_q_depth = fixed_queue_length(p_bcb->xmit_q); in BNEP_GetStatus()
683 p_status->sent_num_filters = p_bcb->sent_num_filters; in BNEP_GetStatus()
684 p_status->sent_mcast_filters = p_bcb->sent_mcast_filters; in BNEP_GetStatus()
685 p_status->rcvd_num_filters = p_bcb->rcvd_num_filters; in BNEP_GetStatus()
686 p_status->rcvd_mcast_filters = p_bcb->rcvd_mcast_filters; in BNEP_GetStatus()
688 p_status->rem_bda = p_bcb->rem_bda; in BNEP_GetStatus()
689 p_status->src_uuid = p_bcb->src_uuid; in BNEP_GetStatus()
690 p_status->dst_uuid = p_bcb->dst_uuid; in BNEP_GetStatus()