• Home
  • Raw
  • Download

Lines Matching refs:p_buf

1148     BT_HDR     *p_buf;  in PORT_Purge()  local
1173 while ((p_buf = (BT_HDR *)GKI_dequeue (&p_port->rx.queue)) != NULL) in PORT_Purge()
1174 GKI_freebuf (p_buf); in PORT_Purge()
1189 while ((p_buf = (BT_HDR *)GKI_dequeue (&p_port->tx.queue)) != NULL) in PORT_Purge()
1190 GKI_freebuf (p_buf); in PORT_Purge()
1226 BT_HDR *p_buf; in PORT_ReadData() local
1252 p_buf = (BT_HDR *)GKI_getfirst (&p_port->rx.queue); in PORT_ReadData()
1253 if (!p_buf) in PORT_ReadData()
1258 while (max_len && p_buf) in PORT_ReadData()
1260 if (p_buf->len > max_len) in PORT_ReadData()
1262 memcpy (p_data, (UINT8 *)(p_buf + 1) + p_buf->offset, max_len); in PORT_ReadData()
1263 p_buf->offset += max_len; in PORT_ReadData()
1264 p_buf->len -= max_len; in PORT_ReadData()
1278 memcpy (p_data, (UINT8 *)(p_buf + 1) + p_buf->offset, p_buf->len); in PORT_ReadData()
1280 *p_len += p_buf->len; in PORT_ReadData()
1281 max_len -= p_buf->len; in PORT_ReadData()
1285 p_port->rx.queue_size -= p_buf->len; in PORT_ReadData()
1289 p_data += p_buf->len; in PORT_ReadData()
1290 p_buf = (BT_HDR *)GKI_getnext (p_buf); in PORT_ReadData()
1332 BT_HDR *p_buf; in PORT_Read() local
1355 p_buf = (BT_HDR *)GKI_dequeue (&p_port->rx.queue); in PORT_Read()
1356 if (p_buf) in PORT_Read()
1358 p_port->rx.queue_size -= p_buf->len; in PORT_Read()
1371 *pp_buf = p_buf; in PORT_Read()
1387 static int port_write (tPORT *p_port, BT_HDR *p_buf) in port_write() argument
1392 GKI_freebuf (p_buf); in port_write()
1412 GKI_freebuf (p_buf); in port_write()
1426 GKI_enqueue (&p_port->tx.queue, p_buf); in port_write()
1427 p_port->tx.queue_size += p_buf->len; in port_write()
1435 RFCOMM_DataReq (p_port->rfc.p_mcb, p_port->dlci, p_buf); in port_write()
1451 int PORT_Write (UINT16 handle, BT_HDR *p_buf) in PORT_Write() argument
1462 GKI_freebuf (p_buf); in PORT_Write()
1470 GKI_freebuf (p_buf); in PORT_Write()
1478 GKI_freebuf (p_buf); in PORT_Write()
1482 rc = port_write (p_port, p_buf); in PORT_Write()
1520 BT_HDR *p_buf; in PORT_WriteDataCO() local
1564 if (((p_buf = (BT_HDR *)GKI_getlast(&p_port->tx.queue)) != NULL) in PORT_WriteDataCO()
1565 && (((int)p_buf->len + available) <= (int)p_port->peer_mtu) in PORT_WriteDataCO()
1566 && (((int)p_buf->len + available) <= (int)length)) in PORT_WriteDataCO()
1569 if(p_port->p_data_co_callback(handle, (UINT8 *)(p_buf + 1) + p_buf->offset + p_buf->len, in PORT_WriteDataCO()
1581 p_buf->len += (UINT16)available; in PORT_WriteDataCO()
1608 p_buf = (BT_HDR *)GKI_getpoolbuf (RFCOMM_DATA_POOL_ID); in PORT_WriteDataCO()
1609 if (!p_buf) in PORT_WriteDataCO()
1612 p_buf->offset = L2CAP_MIN_OFFSET + RFCOMM_MIN_OFFSET; in PORT_WriteDataCO()
1613 p_buf->layer_specific = handle; in PORT_WriteDataCO()
1619 p_buf->len = length; in PORT_WriteDataCO()
1620 p_buf->event = BT_EVT_TO_BTU_SP_DATA; in PORT_WriteDataCO()
1624 if(p_port->p_data_co_callback(handle, (UINT8 *)(p_buf + 1) + p_buf->offset, length, in PORT_WriteDataCO()
1634 rc = port_write (p_port, p_buf); in PORT_WriteDataCO()
1679 BT_HDR *p_buf; in PORT_WriteData() local
1715 if (((p_buf = (BT_HDR *)GKI_getlast(&p_port->tx.queue)) != NULL) in PORT_WriteData()
1716 && ((p_buf->len + max_len) <= p_port->peer_mtu) in PORT_WriteData()
1717 && ((p_buf->len + max_len) <= length)) in PORT_WriteData()
1719 memcpy ((UINT8 *)(p_buf + 1) + p_buf->offset + p_buf->len, p_data, max_len); in PORT_WriteData()
1723 p_buf->len += max_len; in PORT_WriteData()
1740 p_buf = (BT_HDR *)GKI_getpoolbuf (RFCOMM_DATA_POOL_ID); in PORT_WriteData()
1741 if (!p_buf) in PORT_WriteData()
1744 p_buf->offset = L2CAP_MIN_OFFSET + RFCOMM_MIN_OFFSET; in PORT_WriteData()
1745 p_buf->layer_specific = handle; in PORT_WriteData()
1751 p_buf->len = length; in PORT_WriteData()
1752 p_buf->event = BT_EVT_TO_BTU_SP_DATA; in PORT_WriteData()
1754 memcpy ((UINT8 *)(p_buf + 1) + p_buf->offset, p_data, length); in PORT_WriteData()
1758 rc = port_write (p_port, p_buf); in PORT_WriteData()
1801 BT_HDR *p_buf; in PORT_Test() local
1822 if ((p_buf = (BT_HDR *)GKI_getpoolbuf (RFCOMM_CMD_POOL_ID)) != NULL) in PORT_Test()
1825 p_buf->offset = L2CAP_MIN_OFFSET + RFCOMM_MIN_OFFSET + 2; in PORT_Test()
1826 p_buf->len = len; in PORT_Test()
1828 memcpy ((UINT8 *)(p_buf + 1) + p_buf->offset, p_data, p_buf->len); in PORT_Test()
1830 rfc_send_test (p_port->rfc.p_mcb, TRUE, p_buf); in PORT_Test()