• Home
  • Raw
  • Download

Lines Matching refs:p_buf

53 static BT_HDR *avct_lcb_msg_asmbl(tAVCT_LCB *p_lcb, BT_HDR *p_buf)  in avct_lcb_msg_asmbl()  argument
60 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avct_lcb_msg_asmbl()
64 if (p_buf->len < avct_lcb_pkt_type_len[pkt_type]) in avct_lcb_msg_asmbl()
66 osi_free(p_buf); in avct_lcb_msg_asmbl()
79 p_ret = p_buf; in avct_lcb_msg_asmbl()
96 memcpy(p_lcb->p_rx_msg, p_buf, in avct_lcb_msg_asmbl()
97 sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avct_lcb_msg_asmbl()
100 osi_free(p_buf); in avct_lcb_msg_asmbl()
122 osi_free(p_buf); in avct_lcb_msg_asmbl()
136 p_buf->offset += AVCT_HDR_LEN_CONT; in avct_lcb_msg_asmbl()
137 p_buf->len -= AVCT_HDR_LEN_CONT; in avct_lcb_msg_asmbl()
140 if ((p_lcb->p_rx_msg->offset + p_buf->len) > buf_len) { in avct_lcb_msg_asmbl()
144 osi_free(p_buf); in avct_lcb_msg_asmbl()
149 (UINT8 *)(p_buf + 1) + p_buf->offset, p_buf->len); in avct_lcb_msg_asmbl()
154 p_lcb->p_rx_msg->len += p_buf->len; in avct_lcb_msg_asmbl()
160 p_lcb->p_rx_msg->offset += p_buf->len; in avct_lcb_msg_asmbl()
161 p_lcb->p_rx_msg->len += p_buf->len; in avct_lcb_msg_asmbl()
164 osi_free(p_buf); in avct_lcb_msg_asmbl()
473 BT_HDR *p_buf; in avct_lcb_cong_ind() local
481 (p_buf = (BT_HDR *)fixed_queue_try_dequeue(p_lcb->tx_q)) != NULL) in avct_lcb_cong_ind()
483 if (L2CA_DataWrite(p_lcb->ch_lcid, p_buf) == L2CAP_DW_CONGESTED) in avct_lcb_cong_ind()
515 osi_free_and_reset((void **)&p_data->ul_msg.p_buf); in avct_lcb_discard_msg()
540 curr_msg_len = p_data->ul_msg.p_buf->len; in avct_lcb_send_msg()
558 BT_HDR *p_buf; in avct_lcb_send_msg() local
564 if (p_data->ul_msg.p_buf->len > (p_lcb->peer_mtu - hdr_len)) in avct_lcb_send_msg()
567 p_buf = (BT_HDR *)osi_malloc(buf_size); in avct_lcb_send_msg()
570 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avct_lcb_send_msg()
571 p_buf->len = p_lcb->peer_mtu - hdr_len; in avct_lcb_send_msg()
573 memcpy((UINT8 *)(p_buf + 1) + p_buf->offset, in avct_lcb_send_msg()
574 (UINT8 *)(p_data->ul_msg.p_buf + 1) + p_data->ul_msg.p_buf->offset, p_buf->len); in avct_lcb_send_msg()
576 p_data->ul_msg.p_buf->offset += p_buf->len; in avct_lcb_send_msg()
577 p_data->ul_msg.p_buf->len -= p_buf->len; in avct_lcb_send_msg()
581 p_buf = p_data->ul_msg.p_buf; in avct_lcb_send_msg()
584 curr_msg_len -= p_buf->len; in avct_lcb_send_msg()
587 p_buf->len += hdr_len; in avct_lcb_send_msg()
588 p_buf->offset -= hdr_len; in avct_lcb_send_msg()
589 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avct_lcb_send_msg()
604 fixed_queue_enqueue(p_lcb->tx_q, p_buf); in avct_lcb_send_msg()
610 if (L2CA_DataWrite(p_lcb->ch_lcid, p_buf) == L2CAP_DW_CONGESTED) in avct_lcb_send_msg()
648 osi_free_and_reset((void **)&p_data->p_buf); in avct_lcb_free_msg_ind()
671 p_data->p_buf->layer_specific = AVCT_DATA_CTRL; in avct_lcb_msg_ind()
674 if ((p_data->p_buf = avct_lcb_msg_asmbl(p_lcb, p_data->p_buf)) == NULL) in avct_lcb_msg_ind()
679 p = (UINT8 *)(p_data->p_buf + 1) + p_data->p_buf->offset; in avct_lcb_msg_ind()
689 osi_free_and_reset((void **)&p_data->p_buf); in avct_lcb_msg_ind()
698 p_data->p_buf->offset += AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
699 p_data->p_buf->len -= AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
700 (*p_ccb->cc.p_msg_cback)(avct_ccb_to_idx(p_ccb), label, cr_ipid, p_data->p_buf); in avct_lcb_msg_ind()
706 osi_free_and_reset((void **)&p_data->p_buf); in avct_lcb_msg_ind()
711 BT_HDR *p_buf = (BT_HDR *)osi_malloc(AVCT_CMD_BUF_SIZE); in avct_lcb_msg_ind() local
712 p_buf->len = AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
713 p_buf->offset = AVCT_MSG_OFFSET - AVCT_HDR_LEN_SINGLE; in avct_lcb_msg_ind()
714 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avct_lcb_msg_ind()
717 L2CA_DataWrite(p_lcb->ch_lcid, p_buf); in avct_lcb_msg_ind()