Lines Matching full:p_buf
294 BT_HDR *p_buf;
302 p_buf = (BT_HDR *)GKI_getfirst (&p_ccb->rx_queue);
303 if (!p_buf)
308 while (max_len && p_buf)
310 copy_len = (p_buf->len > max_len)?max_len:p_buf->len;
315 memcpy (p_data, (UINT8 *)(p_buf + 1) + p_buf->offset, copy_len);
319 if (p_buf->len > copy_len)
321 p_buf->offset += copy_len;
322 p_buf->len -= copy_len;
329 p_buf = (BT_HDR *)GKI_getnext (p_buf);
400 BT_HDR *p_buf;
405 p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->rx_queue);
407 if (p_buf)
409 *pp_buf = p_buf;
411 p_ccb->rx_queue_size -= p_buf->len;
429 ** p_buf - pointer to address of buffer with data,
436 UINT16 GAP_ConnBTWrite (UINT16 gap_handle, BT_HDR *p_buf)
442 GKI_freebuf (p_buf);
448 GKI_freebuf (p_buf);
452 if (p_buf->offset < L2CAP_MIN_OFFSET)
454 GKI_freebuf (p_buf);
458 GKI_enqueue (&p_ccb->tx_queue, p_buf);
469 while ((p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->tx_queue)) != NULL)
471 p_buf);
507 BT_HDR *p_buf;
521 if ((p_buf = (BT_HDR *)GKI_getpoolbuf (p_ccb->ertm_info.user_tx_pool_id)) == NULL)
526 if ((p_buf = (BT_HDR *)GKI_getpoolbuf (GAP_DATA_POOL_ID)) == NULL)
530 p_buf->offset = L2CAP_MIN_OFFSET;
531 p_buf->len = (p_ccb->rem_mtu_size < max_len) ? p_ccb->rem_mtu_size : max_len;
532 p_buf->event = BT_EVT_TO_BTU_SP_DATA;
534 memcpy ((UINT8 *)(p_buf + 1) + p_buf->offset, p_data, p_buf->len);
536 *p_len += p_buf->len;
537 max_len -= p_buf->len;
538 p_data += p_buf->len;
540 GAP_TRACE_EVENT1 ("GAP_WriteData %d bytes", p_buf->len);
542 GKI_enqueue (&p_ccb->tx_queue, p_buf);
554 while ((p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->tx_queue)) != NULL)
556 UINT8 status = L2CA_DATA_WRITE (p_ccb->connection_id, p_buf);
1034 BT_HDR *p_buf;
1051 while ((p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->tx_queue)) != NULL)
1053 status = L2CA_DATA_WRITE (p_ccb->connection_id, p_buf);
1236 BT_HDR *p_buf;
1255 while ((p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->tx_queue)) != NULL)
1257 status = L2CA_DATA_WRITE (p_ccb->connection_id, p_buf);