• Home
  • Raw
  • Download

Lines Matching refs:p_bcb

46 void bnepu_process_peer_multicast_filter_set(tBNEP_CONN* p_bcb,
48 void bnepu_send_peer_multicast_filter_rsp(tBNEP_CONN* p_bcb,
63 tBNEP_CONN* p_bcb; in bnepu_find_bcb_by_cid() local
66 for (xx = 0, p_bcb = bnep_cb.bcb; xx < BNEP_MAX_CONNECTIONS; xx++, p_bcb++) { in bnepu_find_bcb_by_cid()
67 if ((p_bcb->con_state != BNEP_STATE_IDLE) && (p_bcb->l2cap_cid == cid)) in bnepu_find_bcb_by_cid()
68 return (p_bcb); in bnepu_find_bcb_by_cid()
87 tBNEP_CONN* p_bcb; in bnepu_find_bcb_by_bd_addr() local
90 for (xx = 0, p_bcb = bnep_cb.bcb; xx < BNEP_MAX_CONNECTIONS; xx++, p_bcb++) { in bnepu_find_bcb_by_bd_addr()
91 if (p_bcb->con_state != BNEP_STATE_IDLE) { in bnepu_find_bcb_by_bd_addr()
92 if (p_bcb->rem_bda == p_bda) return (p_bcb); in bnepu_find_bcb_by_bd_addr()
111 tBNEP_CONN* p_bcb; in bnepu_allocate_bcb() local
114 for (xx = 0, p_bcb = bnep_cb.bcb; xx < BNEP_MAX_CONNECTIONS; xx++, p_bcb++) { in bnepu_allocate_bcb()
115 if (p_bcb->con_state == BNEP_STATE_IDLE) { in bnepu_allocate_bcb()
116 alarm_free(p_bcb->conn_timer); in bnepu_allocate_bcb()
117 memset((uint8_t*)p_bcb, 0, sizeof(tBNEP_CONN)); in bnepu_allocate_bcb()
118 p_bcb->conn_timer = alarm_new("bnep.conn_timer"); in bnepu_allocate_bcb()
120 p_bcb->rem_bda = p_rem_bda; in bnepu_allocate_bcb()
121 p_bcb->handle = xx + 1; in bnepu_allocate_bcb()
122 p_bcb->xmit_q = fixed_queue_new(SIZE_MAX); in bnepu_allocate_bcb()
124 return (p_bcb); in bnepu_allocate_bcb()
141 void bnepu_release_bcb(tBNEP_CONN* p_bcb) { in bnepu_release_bcb() argument
143 alarm_free(p_bcb->conn_timer); in bnepu_release_bcb()
144 p_bcb->conn_timer = NULL; in bnepu_release_bcb()
147 p_bcb->con_state = BNEP_STATE_IDLE; in bnepu_release_bcb()
148 osi_free_and_reset((void**)&p_bcb->p_pending_data); in bnepu_release_bcb()
151 while (!fixed_queue_is_empty(p_bcb->xmit_q)) { in bnepu_release_bcb()
152 osi_free(fixed_queue_try_dequeue(p_bcb->xmit_q)); in bnepu_release_bcb()
154 fixed_queue_free(p_bcb->xmit_q, NULL); in bnepu_release_bcb()
155 p_bcb->xmit_q = NULL; in bnepu_release_bcb()
167 void bnep_send_conn_req(tBNEP_CONN* p_bcb) { in bnep_send_conn_req() argument
172 p_bcb->dst_uuid.ToString().c_str()); in bnep_send_conn_req()
183 int len = std::max(p_bcb->dst_uuid.GetShortestRepresentationSize(), in bnep_send_conn_req()
184 p_bcb->src_uuid.GetShortestRepresentationSize()); in bnep_send_conn_req()
189 UINT16_TO_BE_STREAM(p, p_bcb->dst_uuid.As16Bit()); in bnep_send_conn_req()
190 UINT16_TO_BE_STREAM(p, p_bcb->src_uuid.As16Bit()); in bnep_send_conn_req()
192 UINT32_TO_BE_STREAM(p, p_bcb->dst_uuid.As32Bit()); in bnep_send_conn_req()
193 UINT32_TO_BE_STREAM(p, p_bcb->src_uuid.As32Bit()); in bnep_send_conn_req()
195 memcpy(p, p_bcb->dst_uuid.To128BitBE().data(), Uuid::kNumBytes128); in bnep_send_conn_req()
197 memcpy(p, p_bcb->src_uuid.To128BitBE().data(), Uuid::kNumBytes128); in bnep_send_conn_req()
201 p_bcb->dst_uuid.ToString().c_str(), in bnep_send_conn_req()
202 p_bcb->dst_uuid.GetShortestRepresentationSize()); in bnep_send_conn_req()
207 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_req()
219 void bnep_send_conn_responce(tBNEP_CONN* p_bcb, uint16_t resp_code) { in bnep_send_conn_responce() argument
224 p_bcb->l2cap_cid); in bnep_send_conn_responce()
239 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_responce()
251 void bnepu_send_peer_our_filters(tBNEP_CONN* p_bcb) { in bnepu_send_peer_our_filters() argument
267 UINT16_TO_BE_STREAM(p, (4 * p_bcb->sent_num_filters)); in bnepu_send_peer_our_filters()
268 for (xx = 0; xx < p_bcb->sent_num_filters; xx++) { in bnepu_send_peer_our_filters()
269 UINT16_TO_BE_STREAM(p, p_bcb->sent_prot_filter_start[xx]); in bnepu_send_peer_our_filters()
270 UINT16_TO_BE_STREAM(p, p_bcb->sent_prot_filter_end[xx]); in bnepu_send_peer_our_filters()
273 p_buf->len = 4 + (4 * p_bcb->sent_num_filters); in bnepu_send_peer_our_filters()
275 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_our_filters()
277 p_bcb->con_flags |= BNEP_FLAGS_FILTER_RESP_PEND; in bnepu_send_peer_our_filters()
280 alarm_set_on_mloop(p_bcb->conn_timer, BNEP_FILTER_SET_TIMEOUT_MS, in bnepu_send_peer_our_filters()
281 bnep_conn_timer_timeout, p_bcb); in bnepu_send_peer_our_filters()
293 void bnepu_send_peer_our_multi_filters(tBNEP_CONN* p_bcb) { in bnepu_send_peer_our_multi_filters() argument
309 UINT16_TO_BE_STREAM(p, (2 * BD_ADDR_LEN * p_bcb->sent_mcast_filters)); in bnepu_send_peer_our_multi_filters()
310 for (xx = 0; xx < p_bcb->sent_mcast_filters; xx++) { in bnepu_send_peer_our_multi_filters()
311 memcpy(p, p_bcb->sent_mcast_filter_start[xx].address, BD_ADDR_LEN); in bnepu_send_peer_our_multi_filters()
313 memcpy(p, p_bcb->sent_mcast_filter_end[xx].address, BD_ADDR_LEN); in bnepu_send_peer_our_multi_filters()
317 p_buf->len = 4 + (2 * BD_ADDR_LEN * p_bcb->sent_mcast_filters); in bnepu_send_peer_our_multi_filters()
319 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_our_multi_filters()
321 p_bcb->con_flags |= BNEP_FLAGS_MULTI_RESP_PEND; in bnepu_send_peer_our_multi_filters()
324 alarm_set_on_mloop(p_bcb->conn_timer, BNEP_FILTER_SET_TIMEOUT_MS, in bnepu_send_peer_our_multi_filters()
325 bnep_conn_timer_timeout, p_bcb); in bnepu_send_peer_our_multi_filters()
337 void bnepu_send_peer_filter_rsp(tBNEP_CONN* p_bcb, uint16_t response_code) { in bnepu_send_peer_filter_rsp() argument
356 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_filter_rsp()
368 void bnep_send_command_not_understood(tBNEP_CONN* p_bcb, uint8_t cmd_code) { in bnep_send_command_not_understood() argument
374 p_bcb->l2cap_cid, cmd_code); in bnep_send_command_not_understood()
389 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_command_not_understood()
403 void bnepu_check_send_packet(tBNEP_CONN* p_bcb, BT_HDR* p_buf) { in bnepu_check_send_packet() argument
405 p_bcb->l2cap_cid); in bnepu_check_send_packet()
406 if (p_bcb->con_flags & BNEP_FLAGS_L2CAP_CONGESTED) { in bnepu_check_send_packet()
407 if (fixed_queue_length(p_bcb->xmit_q) >= BNEP_MAX_XMITQ_DEPTH) { in bnepu_check_send_packet()
409 p_bcb->l2cap_cid); in bnepu_check_send_packet()
413 fixed_queue_enqueue(p_bcb->xmit_q, p_buf); in bnepu_check_send_packet()
416 L2CA_DataWrite(p_bcb->l2cap_cid, p_buf); in bnepu_check_send_packet()
431 void bnepu_build_bnep_hdr(tBNEP_CONN* p_bcb, BT_HDR* p_buf, uint16_t protocol, in bnepu_build_bnep_hdr() argument
443 if (*p_dest_addr != p_bcb->rem_bda) in bnepu_build_bnep_hdr()
532 void bnep_process_setup_conn_req(tBNEP_CONN* p_bcb, uint8_t* p_setup, in bnep_process_setup_conn_req() argument
534 BNEP_TRACE_EVENT("BNEP - %s for CID: 0x%x", __func__, p_bcb->l2cap_cid); in bnep_process_setup_conn_req()
536 if (p_bcb->con_state != BNEP_STATE_CONN_SETUP && in bnep_process_setup_conn_req()
537 p_bcb->con_state != BNEP_STATE_SEC_CHECKING && in bnep_process_setup_conn_req()
538 p_bcb->con_state != BNEP_STATE_CONNECTED) { in bnep_process_setup_conn_req()
539 BNEP_TRACE_ERROR("BNEP - setup request in bad state %d", p_bcb->con_state); in bnep_process_setup_conn_req()
540 bnep_send_conn_responce(p_bcb, BNEP_SETUP_CONN_NOT_ALLOWED); in bnep_process_setup_conn_req()
546 if (p_bcb->con_flags & BNEP_FLAGS_SETUP_RCVD) { in bnep_process_setup_conn_req()
553 if (p_bcb->con_state != BNEP_STATE_CONNECTED && in bnep_process_setup_conn_req()
554 (!(p_bcb->con_flags & BNEP_FLAGS_SETUP_RCVD)) && in bnep_process_setup_conn_req()
555 (p_bcb->con_flags & BNEP_FLAGS_IS_ORIG)) { in bnep_process_setup_conn_req()
557 p_bcb->con_state); in bnep_process_setup_conn_req()
558 bnep_send_conn_responce(p_bcb, BNEP_SETUP_CONN_NOT_ALLOWED); in bnep_process_setup_conn_req()
562 if (p_bcb->con_state == BNEP_STATE_CONNECTED) { in bnep_process_setup_conn_req()
563 p_bcb->prv_src_uuid = p_bcb->src_uuid; in bnep_process_setup_conn_req()
564 p_bcb->prv_dst_uuid = p_bcb->dst_uuid; in bnep_process_setup_conn_req()
572 p_bcb->src_uuid = Uuid::From16Bit(tmp); in bnep_process_setup_conn_req()
575 p_bcb->dst_uuid = Uuid::From16Bit(tmp); in bnep_process_setup_conn_req()
578 if (p_bcb->con_state == BNEP_STATE_CONNECTED && in bnep_process_setup_conn_req()
579 p_bcb->src_uuid == p_bcb->prv_src_uuid && in bnep_process_setup_conn_req()
580 p_bcb->dst_uuid == p_bcb->prv_dst_uuid) { in bnep_process_setup_conn_req()
581 bnep_send_conn_responce(p_bcb, BNEP_SETUP_CONN_OK); in bnep_process_setup_conn_req()
588 p_bcb->src_uuid = Uuid::From32Bit(tmp); in bnep_process_setup_conn_req()
591 p_bcb->dst_uuid = Uuid::From32Bit(tmp); in bnep_process_setup_conn_req()
593 p_bcb->src_uuid = Uuid::From128BitBE(p_setup); in bnep_process_setup_conn_req()
596 p_bcb->dst_uuid = Uuid::From128BitBE(p_setup); in bnep_process_setup_conn_req()
600 bnep_send_conn_responce(p_bcb, BNEP_SETUP_INVALID_UUID_SIZE); in bnep_process_setup_conn_req()
604 p_bcb->con_state = BNEP_STATE_SEC_CHECKING; in bnep_process_setup_conn_req()
605 p_bcb->con_flags |= BNEP_FLAGS_SETUP_RCVD; in bnep_process_setup_conn_req()
609 p_bcb->src_uuid.ToString().c_str()); in bnep_process_setup_conn_req()
611 if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED) in bnep_process_setup_conn_req()
612 bnep_sec_check_complete(p_bcb->rem_bda, p_bcb, BTM_SUCCESS); in bnep_process_setup_conn_req()
615 btm_sec_mx_access_request(p_bcb->rem_bda, BT_PSM_BNEP, false, in bnep_process_setup_conn_req()
616 BTM_SEC_PROTO_BNEP, p_bcb->src_uuid.As32Bit(), in bnep_process_setup_conn_req()
617 &bnep_sec_check_complete, p_bcb); in bnep_process_setup_conn_req()
633 void bnep_process_setup_conn_responce(tBNEP_CONN* p_bcb, uint8_t* p_setup) { in bnep_process_setup_conn_responce() argument
639 if (p_bcb->con_state != BNEP_STATE_CONN_SETUP) { in bnep_process_setup_conn_responce()
641 BNEP_TRACE_ERROR("BNEP - setup response in bad state %d", p_bcb->con_state); in bnep_process_setup_conn_responce()
646 if (!(p_bcb->con_flags & BNEP_FLAGS_IS_ORIG)) { in bnep_process_setup_conn_responce()
648 p_bcb->con_state); in bnep_process_setup_conn_responce()
675 if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED) { in bnep_process_setup_conn_responce()
679 p_bcb->con_state = BNEP_STATE_CONNECTED; in bnep_process_setup_conn_responce()
680 p_bcb->con_flags &= (~BNEP_FLAGS_SETUP_RCVD); in bnep_process_setup_conn_responce()
681 p_bcb->src_uuid = p_bcb->prv_src_uuid; in bnep_process_setup_conn_responce()
682 p_bcb->dst_uuid = p_bcb->prv_dst_uuid; in bnep_process_setup_conn_responce()
685 alarm_cancel(p_bcb->conn_timer); in bnep_process_setup_conn_responce()
686 p_bcb->re_transmits = 0; in bnep_process_setup_conn_responce()
690 (*bnep_cb.p_conn_state_cb)(p_bcb->handle, p_bcb->rem_bda, resp, true); in bnep_process_setup_conn_responce()
696 L2CA_DisconnectReq(p_bcb->l2cap_cid); in bnep_process_setup_conn_responce()
699 if ((p_bcb->con_flags & BNEP_FLAGS_IS_ORIG) && (bnep_cb.p_conn_state_cb)) in bnep_process_setup_conn_responce()
700 (*bnep_cb.p_conn_state_cb)(p_bcb->handle, p_bcb->rem_bda, resp, false); in bnep_process_setup_conn_responce()
702 bnepu_release_bcb(p_bcb); in bnep_process_setup_conn_responce()
708 bnep_connected(p_bcb); in bnep_process_setup_conn_responce()
722 uint8_t* bnep_process_control_packet(tBNEP_CONN* p_bcb, uint8_t* p, in bnep_process_control_packet() argument
779 if (!is_ext) bnep_process_setup_conn_req(p_bcb, p, (uint8_t)len); in bnep_process_control_packet()
791 if (!is_ext) bnep_process_setup_conn_responce(p_bcb, p); in bnep_process_control_packet()
811 bnepu_process_peer_filter_set(p_bcb, p, len); in bnep_process_control_packet()
823 bnepu_process_peer_filter_rsp(p_bcb, p); in bnep_process_control_packet()
843 bnepu_process_peer_multicast_filter_set(p_bcb, p, len); in bnep_process_control_packet()
855 bnepu_process_multicast_filter_rsp(p_bcb, p); in bnep_process_control_packet()
863 bnep_send_command_not_understood(p_bcb, control_type); in bnep_process_control_packet()
893 void bnepu_process_peer_filter_set(tBNEP_CONN* p_bcb, uint8_t* p_filters, in bnepu_process_peer_filter_set() argument
900 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in bnepu_process_peer_filter_set()
901 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) { in bnepu_process_peer_filter_set()
911 bnepu_send_peer_filter_rsp(p_bcb, BNEP_FILTER_CRL_BAD_RANGE); in bnepu_process_peer_filter_set()
933 bnepu_send_peer_filter_rsp(p_bcb, resp_code); in bnepu_process_peer_filter_set()
938 (*bnep_cb.p_filter_ind_cb)(p_bcb->handle, true, 0, len, p_filters); in bnepu_process_peer_filter_set()
940 p_bcb->rcvd_num_filters = num_filters; in bnepu_process_peer_filter_set()
945 p_bcb->rcvd_prot_filter_start[xx] = start; in bnepu_process_peer_filter_set()
946 p_bcb->rcvd_prot_filter_end[xx] = end; in bnepu_process_peer_filter_set()
949 bnepu_send_peer_filter_rsp(p_bcb, resp_code); in bnepu_process_peer_filter_set()
962 void bnepu_process_peer_filter_rsp(tBNEP_CONN* p_bcb, uint8_t* p_data) { in bnepu_process_peer_filter_rsp() argument
968 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in bnepu_process_peer_filter_rsp()
969 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) { in bnepu_process_peer_filter_rsp()
971 p_bcb->con_state); in bnepu_process_peer_filter_rsp()
976 if (!(p_bcb->con_flags & BNEP_FLAGS_FILTER_RESP_PEND)) { in bnepu_process_peer_filter_rsp()
982 alarm_cancel(p_bcb->conn_timer); in bnepu_process_peer_filter_rsp()
983 p_bcb->con_flags &= ~BNEP_FLAGS_FILTER_RESP_PEND; in bnepu_process_peer_filter_rsp()
984 p_bcb->re_transmits = 0; in bnepu_process_peer_filter_rsp()
992 (*bnep_cb.p_filter_ind_cb)(p_bcb->handle, false, result, 0, NULL); in bnepu_process_peer_filter_rsp()
1005 void bnepu_process_multicast_filter_rsp(tBNEP_CONN* p_bcb, uint8_t* p_data) { in bnepu_process_multicast_filter_rsp() argument
1011 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in bnepu_process_multicast_filter_rsp()
1012 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) { in bnepu_process_multicast_filter_rsp()
1014 p_bcb->con_state); in bnepu_process_multicast_filter_rsp()
1019 if (!(p_bcb->con_flags & BNEP_FLAGS_MULTI_RESP_PEND)) { in bnepu_process_multicast_filter_rsp()
1025 alarm_cancel(p_bcb->conn_timer); in bnepu_process_multicast_filter_rsp()
1026 p_bcb->con_flags &= ~BNEP_FLAGS_MULTI_RESP_PEND; in bnepu_process_multicast_filter_rsp()
1027 p_bcb->re_transmits = 0; in bnepu_process_multicast_filter_rsp()
1035 (*bnep_cb.p_mfilter_ind_cb)(p_bcb->handle, false, result, 0, NULL); in bnepu_process_multicast_filter_rsp()
1049 void bnepu_process_peer_multicast_filter_set(tBNEP_CONN* p_bcb, in bnepu_process_peer_multicast_filter_set() argument
1055 if ((p_bcb->con_state != BNEP_STATE_CONNECTED) && in bnepu_process_peer_multicast_filter_set()
1056 (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED))) { in bnepu_process_peer_multicast_filter_set()
1065 bnepu_send_peer_multicast_filter_rsp(p_bcb, BNEP_FILTER_CRL_BAD_RANGE); in bnepu_process_peer_multicast_filter_set()
1071 bnepu_send_peer_multicast_filter_rsp(p_bcb, BNEP_FILTER_CRL_MAX_REACHED); in bnepu_process_peer_multicast_filter_set()
1084 bnepu_send_peer_multicast_filter_rsp(p_bcb, BNEP_FILTER_CRL_BAD_RANGE); in bnepu_process_peer_multicast_filter_set()
1092 p_bcb->rcvd_mcast_filters = num_filters; in bnepu_process_peer_multicast_filter_set()
1094 memcpy(p_bcb->rcvd_mcast_filter_start[xx].address, p_filters, BD_ADDR_LEN); in bnepu_process_peer_multicast_filter_set()
1095 memcpy(p_bcb->rcvd_mcast_filter_end[xx].address, p_filters + BD_ADDR_LEN, in bnepu_process_peer_multicast_filter_set()
1101 if ((memcmp(null_bda, p_bcb->rcvd_mcast_filter_start[xx].address, in bnepu_process_peer_multicast_filter_set()
1103 (memcmp(null_bda, p_bcb->rcvd_mcast_filter_end[xx].address, in bnepu_process_peer_multicast_filter_set()
1105 p_bcb->rcvd_mcast_filters = 0xFFFF; in bnepu_process_peer_multicast_filter_set()
1110 BNEP_TRACE_EVENT("BNEP multicast filters %d", p_bcb->rcvd_mcast_filters); in bnepu_process_peer_multicast_filter_set()
1111 bnepu_send_peer_multicast_filter_rsp(p_bcb, resp_code); in bnepu_process_peer_multicast_filter_set()
1114 (*bnep_cb.p_mfilter_ind_cb)(p_bcb->handle, true, 0, len, p_filters); in bnepu_process_peer_multicast_filter_set()
1126 void bnepu_send_peer_multicast_filter_rsp(tBNEP_CONN* p_bcb, in bnepu_send_peer_multicast_filter_rsp() argument
1146 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_multicast_filter_rsp()
1162 tBNEP_CONN* p_bcb = (tBNEP_CONN*)p_ref_data; in bnep_sec_check_complete() local
1167 if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED) in bnep_sec_check_complete()
1173 if (p_bcb->con_state != BNEP_STATE_SEC_CHECKING) { in bnep_sec_check_complete()
1176 p_bcb->con_state); in bnep_sec_check_complete()
1181 if (!(p_bcb->con_flags & BNEP_FLAGS_SETUP_RCVD)) { in bnep_sec_check_complete()
1183 if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED) { in bnep_sec_check_complete()
1186 (*bnep_cb.p_conn_state_cb)(p_bcb->handle, p_bcb->rem_bda, in bnep_sec_check_complete()
1189 p_bcb->con_state = BNEP_STATE_CONNECTED; in bnep_sec_check_complete()
1190 p_bcb->src_uuid = p_bcb->prv_src_uuid; in bnep_sec_check_complete()
1191 p_bcb->dst_uuid = p_bcb->prv_dst_uuid; in bnep_sec_check_complete()
1195 L2CA_DisconnectReq(p_bcb->l2cap_cid); in bnep_sec_check_complete()
1199 (*bnep_cb.p_conn_state_cb)(p_bcb->handle, p_bcb->rem_bda, in bnep_sec_check_complete()
1202 bnepu_release_bcb(p_bcb); in bnep_sec_check_complete()
1208 p_bcb->con_state = BNEP_STATE_CONN_SETUP; in bnep_sec_check_complete()
1210 bnep_send_conn_req(p_bcb); in bnep_sec_check_complete()
1211 alarm_set_on_mloop(p_bcb->conn_timer, BNEP_CONN_TIMEOUT_MS, in bnep_sec_check_complete()
1212 bnep_conn_timer_timeout, p_bcb); in bnep_sec_check_complete()
1218 bnep_send_conn_responce(p_bcb, BNEP_SETUP_CONN_NOT_ALLOWED); in bnep_sec_check_complete()
1219 if (p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED) { in bnep_sec_check_complete()
1222 p_bcb->con_state = BNEP_STATE_CONNECTED; in bnep_sec_check_complete()
1223 p_bcb->con_flags &= (~BNEP_FLAGS_SETUP_RCVD); in bnep_sec_check_complete()
1224 p_bcb->src_uuid = p_bcb->prv_src_uuid; in bnep_sec_check_complete()
1225 p_bcb->dst_uuid = p_bcb->prv_dst_uuid; in bnep_sec_check_complete()
1229 L2CA_DisconnectReq(p_bcb->l2cap_cid); in bnep_sec_check_complete()
1231 bnepu_release_bcb(p_bcb); in bnep_sec_check_complete()
1236 p_bcb->con_state = BNEP_STATE_CONN_SETUP; in bnep_sec_check_complete()
1237 (*bnep_cb.p_conn_ind_cb)(p_bcb->handle, p_bcb->rem_bda, p_bcb->dst_uuid, in bnep_sec_check_complete()
1238 p_bcb->src_uuid, is_role_change); in bnep_sec_check_complete()
1241 bnep_send_conn_responce(p_bcb, resp_code); in bnep_sec_check_complete()
1242 bnep_connected(p_bcb); in bnep_sec_check_complete()
1259 tBNEP_RESULT bnep_is_packet_allowed(tBNEP_CONN* p_bcb, in bnep_is_packet_allowed() argument
1263 if (p_bcb->rcvd_num_filters) { in bnep_is_packet_allowed()
1293 for (i = 0; i < p_bcb->rcvd_num_filters; i++) { in bnep_is_packet_allowed()
1294 if ((p_bcb->rcvd_prot_filter_start[i] <= proto) && in bnep_is_packet_allowed()
1295 (proto <= p_bcb->rcvd_prot_filter_end[i])) in bnep_is_packet_allowed()
1299 if (i == p_bcb->rcvd_num_filters) { in bnep_is_packet_allowed()
1306 if ((p_dest_addr.address[0] & 0x01) && p_bcb->rcvd_mcast_filters) { in bnep_is_packet_allowed()
1310 if (p_bcb->rcvd_mcast_filters != 0xFFFF) { in bnep_is_packet_allowed()
1312 for (i = 0; i < p_bcb->rcvd_mcast_filters; i++) { in bnep_is_packet_allowed()
1313 if ((memcmp(p_bcb->rcvd_mcast_filter_start[i].address, in bnep_is_packet_allowed()
1315 (memcmp(p_bcb->rcvd_mcast_filter_end[i].address, in bnep_is_packet_allowed()
1326 if ((p_bcb->rcvd_mcast_filters == 0xFFFF) || in bnep_is_packet_allowed()
1327 (i == p_bcb->rcvd_mcast_filters)) { in bnep_is_packet_allowed()