• Home
  • Raw
  • Download

Lines Matching refs:p_buf

43 static uint8_t* bnepu_init_hdr(BT_HDR* p_buf, uint16_t hdr_len,
168 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_conn_req() local
174 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_conn_req()
175 p = p_start = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_req()
205 p_buf->len = (uint16_t)(p - p_start); in bnep_send_conn_req()
207 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_req()
220 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_conn_responce() local
226 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_conn_responce()
227 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_responce()
237 p_buf->len = 4; in bnep_send_conn_responce()
239 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_responce()
252 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_our_filters() local
258 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_our_filters()
259 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; 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()
294 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_our_multi_filters() local
300 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_our_multi_filters()
301 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; 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()
338 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_filter_rsp() local
343 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_filter_rsp()
344 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnepu_send_peer_filter_rsp()
354 p_buf->len = 4; in bnepu_send_peer_filter_rsp()
356 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_filter_rsp()
369 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_command_not_understood() local
376 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_command_not_understood()
377 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_command_not_understood()
387 p_buf->len = 3; 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
411 osi_free(p_buf); 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
452 p = bnepu_init_hdr(p_buf, 15, in bnepu_build_bnep_hdr()
463 p = bnepu_init_hdr(p_buf, 3, in bnepu_build_bnep_hdr()
469 p_buf, 9, in bnepu_build_bnep_hdr()
478 p_buf, 9, in bnepu_build_bnep_hdr()
498 static uint8_t* bnepu_init_hdr(BT_HDR* p_buf, uint16_t hdr_len, in bnepu_init_hdr() argument
500 uint8_t* p = (uint8_t*)(p_buf + 1) + p_buf->offset; in bnepu_init_hdr()
503 if (p_buf->offset < (hdr_len + L2CAP_MIN_OFFSET)) { in bnepu_init_hdr()
504 uint16_t xx, diff = BNEP_MINIMUM_OFFSET - p_buf->offset; in bnepu_init_hdr()
505 p = p + p_buf->len - 1; in bnepu_init_hdr()
506 for (xx = 0; xx < p_buf->len; xx++, p--) p[diff] = *p; in bnepu_init_hdr()
508 p_buf->offset = BNEP_MINIMUM_OFFSET; in bnepu_init_hdr()
509 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in bnepu_init_hdr()
512 p_buf->len += hdr_len; in bnepu_init_hdr()
513 p_buf->offset -= hdr_len; in bnepu_init_hdr()
1128 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_multicast_filter_rsp() local
1133 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_multicast_filter_rsp()
1134 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnepu_send_peer_multicast_filter_rsp()
1144 p_buf->len = 4; in bnepu_send_peer_multicast_filter_rsp()
1146 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_multicast_filter_rsp()