Lines Matching refs:p_buf

42 static uint8_t* bnepu_init_hdr(BT_HDR* p_buf, uint16_t hdr_len,
167 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_conn_req() local
173 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_conn_req()
174 p = p_start = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_req()
204 p_buf->len = (uint16_t)(p - p_start); in bnep_send_conn_req()
206 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_req()
219 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_conn_responce() local
225 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_conn_responce()
226 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_conn_responce()
236 p_buf->len = 4; in bnep_send_conn_responce()
238 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_conn_responce()
251 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_our_filters() local
257 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_our_filters()
258 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnepu_send_peer_our_filters()
272 p_buf->len = 4 + (4 * p_bcb->sent_num_filters); in bnepu_send_peer_our_filters()
274 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_our_filters()
293 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_our_multi_filters() local
299 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_our_multi_filters()
300 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnepu_send_peer_our_multi_filters()
316 p_buf->len = 4 + (2 * BD_ADDR_LEN * p_bcb->sent_mcast_filters); in bnepu_send_peer_our_multi_filters()
318 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_our_multi_filters()
337 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_filter_rsp() local
342 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_filter_rsp()
343 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnepu_send_peer_filter_rsp()
353 p_buf->len = 4; in bnepu_send_peer_filter_rsp()
355 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_filter_rsp()
368 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnep_send_command_not_understood() local
375 p_buf->offset = L2CAP_MIN_OFFSET; in bnep_send_command_not_understood()
376 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnep_send_command_not_understood()
386 p_buf->len = 3; in bnep_send_command_not_understood()
388 bnepu_check_send_packet(p_bcb, p_buf); in bnep_send_command_not_understood()
402 void bnepu_check_send_packet(tBNEP_CONN* p_bcb, BT_HDR* p_buf) { in bnepu_check_send_packet() argument
410 osi_free(p_buf); in bnepu_check_send_packet()
412 fixed_queue_enqueue(p_bcb->xmit_q, p_buf); in bnepu_check_send_packet()
415 L2CA_DataWrite(p_bcb->l2cap_cid, p_buf); in bnepu_check_send_packet()
430 void bnepu_build_bnep_hdr(tBNEP_CONN* p_bcb, BT_HDR* p_buf, uint16_t protocol, in bnepu_build_bnep_hdr() argument
451 p = bnepu_init_hdr(p_buf, 15, in bnepu_build_bnep_hdr()
462 p = bnepu_init_hdr(p_buf, 3, in bnepu_build_bnep_hdr()
468 p_buf, 9, in bnepu_build_bnep_hdr()
477 p_buf, 9, in bnepu_build_bnep_hdr()
497 static uint8_t* bnepu_init_hdr(BT_HDR* p_buf, uint16_t hdr_len, in bnepu_init_hdr() argument
499 uint8_t* p = (uint8_t*)(p_buf + 1) + p_buf->offset; in bnepu_init_hdr()
502 if (p_buf->offset < (hdr_len + L2CAP_MIN_OFFSET)) { in bnepu_init_hdr()
503 uint16_t xx, diff = BNEP_MINIMUM_OFFSET - p_buf->offset; in bnepu_init_hdr()
504 p = p + p_buf->len - 1; in bnepu_init_hdr()
505 for (xx = 0; xx < p_buf->len; xx++, p--) p[diff] = *p; in bnepu_init_hdr()
507 p_buf->offset = BNEP_MINIMUM_OFFSET; in bnepu_init_hdr()
508 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in bnepu_init_hdr()
511 p_buf->len += hdr_len; in bnepu_init_hdr()
512 p_buf->offset -= hdr_len; in bnepu_init_hdr()
1118 BT_HDR* p_buf = (BT_HDR*)osi_malloc(BNEP_BUF_SIZE); in bnepu_send_peer_multicast_filter_rsp() local
1123 p_buf->offset = L2CAP_MIN_OFFSET; in bnepu_send_peer_multicast_filter_rsp()
1124 p = (uint8_t*)(p_buf + 1) + L2CAP_MIN_OFFSET; in bnepu_send_peer_multicast_filter_rsp()
1134 p_buf->len = 4; in bnepu_send_peer_multicast_filter_rsp()
1136 bnepu_check_send_packet(p_bcb, p_buf); in bnepu_send_peer_multicast_filter_rsp()