• Home
  • Raw
  • Download

Lines Matching refs:p_buf

54 static BT_HDR* avct_lcb_msg_asmbl(tAVCT_LCB* p_lcb, BT_HDR* p_buf) {  in avct_lcb_msg_asmbl()  argument
59 if (p_buf->len < 1) { in avct_lcb_msg_asmbl()
60 osi_free(p_buf); in avct_lcb_msg_asmbl()
66 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avct_lcb_msg_asmbl()
70 if (p_buf->len < avct_lcb_pkt_type_len[pkt_type]) { in avct_lcb_msg_asmbl()
71 osi_free(p_buf); in avct_lcb_msg_asmbl()
83 p_ret = p_buf; in avct_lcb_msg_asmbl()
99 memcpy(p_lcb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avct_lcb_msg_asmbl()
102 osi_free(p_buf); in avct_lcb_msg_asmbl()
122 osi_free(p_buf); in avct_lcb_msg_asmbl()
134 p_buf->offset += AVCT_HDR_LEN_CONT; in avct_lcb_msg_asmbl()
135 p_buf->len -= AVCT_HDR_LEN_CONT; in avct_lcb_msg_asmbl()
138 if ((p_lcb->p_rx_msg->offset + p_buf->len) > buf_len) { in avct_lcb_msg_asmbl()
142 osi_free(p_buf); in avct_lcb_msg_asmbl()
147 (uint8_t*)(p_buf + 1) + p_buf->offset, p_buf->len); in avct_lcb_msg_asmbl()
151 p_lcb->p_rx_msg->len += p_buf->len; in avct_lcb_msg_asmbl()
155 p_lcb->p_rx_msg->offset += p_buf->len; in avct_lcb_msg_asmbl()
156 p_lcb->p_rx_msg->len += p_buf->len; in avct_lcb_msg_asmbl()
159 osi_free(p_buf); in avct_lcb_msg_asmbl()
422 BT_HDR* p_buf; in avct_lcb_cong_ind() local
429 (p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_lcb->tx_q)) != NULL) { in avct_lcb_cong_ind()
430 if (L2CA_DataWrite(p_lcb->ch_lcid, p_buf) == L2CAP_DW_CONGESTED) { in avct_lcb_cong_ind()
457 osi_free_and_reset((void**)&p_data->ul_msg.p_buf); in avct_lcb_discard_msg()
480 curr_msg_len = p_data->ul_msg.p_buf->len; in avct_lcb_send_msg()
494 BT_HDR* p_buf; in avct_lcb_send_msg() local
500 if (p_data->ul_msg.p_buf->len > (p_lcb->peer_mtu - hdr_len)) { in avct_lcb_send_msg()
502 p_buf = (BT_HDR*)osi_malloc(buf_size); in avct_lcb_send_msg()
505 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avct_lcb_send_msg()
506 p_buf->len = p_lcb->peer_mtu - hdr_len; in avct_lcb_send_msg()
509 (uint8_t*)(p_buf + 1) + p_buf->offset, in avct_lcb_send_msg()
510 (uint8_t*)(p_data->ul_msg.p_buf + 1) + p_data->ul_msg.p_buf->offset, in avct_lcb_send_msg()
511 p_buf->len); in avct_lcb_send_msg()
513 p_data->ul_msg.p_buf->offset += p_buf->len; in avct_lcb_send_msg()
514 p_data->ul_msg.p_buf->len -= p_buf->len; in avct_lcb_send_msg()
516 p_buf = p_data->ul_msg.p_buf; in avct_lcb_send_msg()
519 curr_msg_len -= p_buf->len; in avct_lcb_send_msg()
522 p_buf->len += hdr_len; in avct_lcb_send_msg()
523 p_buf->offset -= hdr_len; in avct_lcb_send_msg()
524 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avct_lcb_send_msg()
537 fixed_queue_enqueue(p_lcb->tx_q, p_buf); in avct_lcb_send_msg()
542 if (L2CA_DataWrite(p_lcb->ch_lcid, p_buf) == L2CAP_DW_CONGESTED) { in avct_lcb_send_msg()
573 osi_free_and_reset((void**)&p_data->p_buf); in avct_lcb_free_msg_ind()
595 p_data->p_buf->layer_specific = AVCT_DATA_CTRL; in avct_lcb_msg_ind()
599 p_data->p_buf = avct_lcb_msg_asmbl(p_lcb, p_data->p_buf); in avct_lcb_msg_ind()
600 if (p_data->p_buf == NULL) { in avct_lcb_msg_ind()
604 p = (uint8_t*)(p_data->p_buf + 1) + p_data->p_buf->offset; in avct_lcb_msg_ind()
612 osi_free_and_reset((void**)&p_data->p_buf); in avct_lcb_msg_ind()
621 p_data->p_buf->offset += AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
622 p_data->p_buf->len -= AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
624 p_data->p_buf); in avct_lcb_msg_ind()
630 osi_free_and_reset((void**)&p_data->p_buf); in avct_lcb_msg_ind()
634 BT_HDR* p_buf = (BT_HDR*)osi_malloc(AVCT_CMD_BUF_SIZE); in avct_lcb_msg_ind() local
635 p_buf->len = AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
636 p_buf->offset = AVCT_MSG_OFFSET - AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
637 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avct_lcb_msg_ind()
640 L2CA_DataWrite(p_lcb->ch_lcid, p_buf); in avct_lcb_msg_ind()