• Home
  • Raw
  • Download

Lines Matching refs:p_buf

1192     BT_HDR          *p_buf;  in avdt_msg_send()  local
1224 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1236 if ((p_buf = (BT_HDR *) GKI_getpoolbuf(AVDT_CMD_POOL_ID)) == NULL) in avdt_msg_send()
1244 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avdt_msg_send()
1245 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send()
1246 memcpy((UINT8 *)(p_buf + 1) + p_buf->offset, in avdt_msg_send()
1247 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send()
1257 if ((p_buf = (BT_HDR *) GKI_getpoolbuf(AVDT_CMD_POOL_ID)) == NULL) in avdt_msg_send()
1265 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avdt_msg_send()
1266 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send()
1267 memcpy((UINT8 *)(p_buf + 1) + p_buf->offset, in avdt_msg_send()
1268 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send()
1275 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1285 curr_msg_len -= p_buf->len; in avdt_msg_send()
1309 p_ccb->p_curr_msg->len -= p_buf->len; in avdt_msg_send()
1310 p_ccb->p_curr_msg->offset += p_buf->len; in avdt_msg_send()
1314 p_buf->len += hdr_len; in avdt_msg_send()
1315 p_buf->offset -= hdr_len; in avdt_msg_send()
1316 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_send()
1330 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf); in avdt_msg_send()
1346 BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf) in avdt_msg_asmbl() argument
1354 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_asmbl()
1358 if (p_buf->len < avdt_msg_pkt_type_len[pkt_type]) in avdt_msg_asmbl()
1360 GKI_freebuf(p_buf); in avdt_msg_asmbl()
1374 p_ret = p_buf; in avdt_msg_asmbl()
1385 p_ccb->p_rx_msg = p_buf; in avdt_msg_asmbl()
1404 GKI_freebuf(p_buf); in avdt_msg_asmbl()
1414 p_buf->offset += AVDT_LEN_TYPE_CONT; in avdt_msg_asmbl()
1415 p_buf->len -= AVDT_LEN_TYPE_CONT; in avdt_msg_asmbl()
1418 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) in avdt_msg_asmbl()
1423 GKI_freebuf(p_buf); in avdt_msg_asmbl()
1430 (UINT8 *)(p_buf + 1) + p_buf->offset, p_buf->len); in avdt_msg_asmbl()
1435 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1441 p_ccb->p_rx_msg->offset += p_buf->len; in avdt_msg_asmbl()
1442 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1445 GKI_freebuf(p_buf); in avdt_msg_asmbl()
1469 BT_HDR *p_buf; in avdt_msg_send_cmd() local
1474 p_buf = (BT_HDR *) GKI_getpoolbuf(AVDT_CMD_POOL_ID); in avdt_msg_send_cmd()
1475 if (p_buf == NULL) in avdt_msg_send_cmd()
1482 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_cmd()
1483 p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_send_cmd()
1489 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_cmd()
1494 p = (UINT8 *)(p_buf + 1); in avdt_msg_send_cmd()
1499 memcpy(p, (UINT8 *) p_scb, p_buf->len); in avdt_msg_send_cmd()
1509 p_buf->event = sig_id; in avdt_msg_send_cmd()
1510 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label); in avdt_msg_send_cmd()
1516 GKI_enqueue(&p_ccb->cmd_q, p_buf); in avdt_msg_send_cmd()
1538 BT_HDR *p_buf; in avdt_msg_send_rsp() local
1543 p_buf = (BT_HDR *) GKI_getpoolbuf(AVDT_CMD_POOL_ID); in avdt_msg_send_rsp()
1544 if (p_buf == NULL) return; in avdt_msg_send_rsp()
1547 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_rsp()
1548 p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_send_rsp()
1554 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_rsp()
1557 p_buf->event = sig_id; in avdt_msg_send_rsp()
1558 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_RSP, p_params->hdr.label); in avdt_msg_send_rsp()
1561 GKI_enqueue(&p_ccb->rsp_q, p_buf); in avdt_msg_send_rsp()
1583 BT_HDR *p_buf; in avdt_msg_send_rej() local
1588 p_buf = (BT_HDR *) GKI_getpoolbuf(AVDT_CMD_POOL_ID); in avdt_msg_send_rej()
1589 if (p_buf == NULL) return; in avdt_msg_send_rej()
1592 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_rej()
1593 p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_send_rej()
1616 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_rej()
1619 p_buf->event = sig_id; in avdt_msg_send_rej()
1620 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_REJ, p_params->hdr.label); in avdt_msg_send_rej()
1623 GKI_enqueue(&p_ccb->rsp_q, p_buf); in avdt_msg_send_rej()
1644 BT_HDR *p_buf; in avdt_msg_send_grej() local
1649 p_buf = (BT_HDR *) GKI_getpoolbuf(AVDT_CMD_POOL_ID); in avdt_msg_send_grej()
1650 if (p_buf == NULL) return; in avdt_msg_send_grej()
1653 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_grej()
1654 p_start = p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_send_grej()
1657 p_buf->len = (UINT16) (p - p_start); in avdt_msg_send_grej()
1660 p_buf->event = sig_id; in avdt_msg_send_grej()
1661 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_GRJ, p_params->hdr.label); in avdt_msg_send_grej()
1667 GKI_enqueue(&p_ccb->rsp_q, p_buf); in avdt_msg_send_grej()
1684 void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf) in avdt_msg_ind() argument
1702 if ((p_buf = avdt_msg_asmbl(p_ccb, p_buf)) == NULL) in avdt_msg_ind()
1707 p = (UINT8 *)(p_buf + 1) + p_buf->offset; in avdt_msg_ind()
1724 else if ((msg_type == AVDT_MSG_TYPE_REJ) && (p_buf->len == AVDT_LEN_GEN_REJ)) in avdt_msg_ind()
1756 p_buf->len -= AVDT_LEN_TYPE_SINGLE; in avdt_msg_ind()
1790 msg.hdr.err_code = err = (*avdt_msg_prs_cmd[sig - 1])(&msg, p, p_buf->len); in avdt_msg_ind()
1795 msg.hdr.err_code = err = (*avdt_msg_prs_rsp[sig - 1])(&msg, p, p_buf->len); in avdt_msg_ind()
1882 GKI_freebuf(p_buf); in avdt_msg_ind()