Lines Matching refs:p_buf
1064 BT_HDR* p_buf; in avdt_msg_send() local
1093 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1106 p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send()
1109 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avdt_msg_send()
1110 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send()
1111 memcpy((uint8_t*)(p_buf + 1) + p_buf->offset, in avdt_msg_send()
1113 p_buf->len); in avdt_msg_send()
1123 p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send()
1126 p_buf->offset = L2CAP_MIN_OFFSET + hdr_len; in avdt_msg_send()
1127 p_buf->len = p_tbl->peer_mtu - hdr_len; in avdt_msg_send()
1128 memcpy((uint8_t*)(p_buf + 1) + p_buf->offset, in avdt_msg_send()
1130 p_buf->len); in avdt_msg_send()
1136 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1146 curr_msg_len -= p_buf->len; in avdt_msg_send()
1171 p_ccb->p_curr_msg->len -= p_buf->len; in avdt_msg_send()
1172 p_ccb->p_curr_msg->offset += p_buf->len; in avdt_msg_send()
1176 p_buf->len += hdr_len; in avdt_msg_send()
1177 p_buf->offset -= hdr_len; in avdt_msg_send()
1178 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_send()
1191 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf); in avdt_msg_send()
1207 BT_HDR* avdt_msg_asmbl(AvdtpCcb* p_ccb, BT_HDR* p_buf) { in avdt_msg_asmbl() argument
1213 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_asmbl()
1216 if (p_buf->len < 1) { in avdt_msg_asmbl()
1218 osi_free(p_buf); in avdt_msg_asmbl()
1225 if (p_buf->len < avdt_msg_pkt_type_len[pkt_type]) { in avdt_msg_asmbl()
1226 osi_free(p_buf); in avdt_msg_asmbl()
1238 p_ret = p_buf; in avdt_msg_asmbl()
1254 memcpy(p_ccb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avdt_msg_asmbl()
1257 osi_free(p_buf); in avdt_msg_asmbl()
1277 osi_free(p_buf); in avdt_msg_asmbl()
1289 p_buf->offset += AVDT_LEN_TYPE_CONT; in avdt_msg_asmbl()
1290 p_buf->len -= AVDT_LEN_TYPE_CONT; in avdt_msg_asmbl()
1293 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) { in avdt_msg_asmbl()
1297 osi_free(p_buf); in avdt_msg_asmbl()
1302 (uint8_t*)(p_buf + 1) + p_buf->offset, p_buf->len); in avdt_msg_asmbl()
1306 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1310 p_ccb->p_rx_msg->offset += p_buf->len; in avdt_msg_asmbl()
1311 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1314 osi_free(p_buf); in avdt_msg_asmbl()
1340 BT_HDR* p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send_cmd() local
1343 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_cmd()
1344 p_start = p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_send_cmd()
1350 p_buf->len = (uint16_t)(p - p_start); in avdt_msg_send_cmd()
1354 p = (uint8_t*)(p_buf + 1); in avdt_msg_send_cmd()
1358 memcpy(p, (uint8_t*)p_scb, p_buf->len); in avdt_msg_send_cmd()
1367 p_buf->event = sig_id; in avdt_msg_send_cmd()
1368 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label); in avdt_msg_send_cmd()
1374 fixed_queue_enqueue(p_ccb->cmd_q, p_buf); in avdt_msg_send_cmd()
1396 BT_HDR* p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send_rsp() local
1399 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_rsp()
1400 p_start = p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_send_rsp()
1406 p_buf->len = (uint16_t)(p - p_start); in avdt_msg_send_rsp()
1409 p_buf->event = sig_id; in avdt_msg_send_rsp()
1410 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_RSP, in avdt_msg_send_rsp()
1414 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_rsp()
1436 BT_HDR* p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send_rej() local
1439 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_rej()
1440 p_start = p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_send_rej()
1457 p_buf->len = (uint16_t)(p - p_start); in avdt_msg_send_rej()
1460 p_buf->event = sig_id; in avdt_msg_send_rej()
1461 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_REJ, in avdt_msg_send_rej()
1465 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_rej()
1487 BT_HDR* p_buf = (BT_HDR*)osi_malloc(AVDT_CMD_BUF_SIZE); in avdt_msg_send_grej() local
1490 p_buf->offset = AVDT_MSG_OFFSET; in avdt_msg_send_grej()
1491 p_start = p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_send_grej()
1494 p_buf->len = (uint16_t)(p - p_start); in avdt_msg_send_grej()
1497 p_buf->event = sig_id; in avdt_msg_send_grej()
1498 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_GRJ, in avdt_msg_send_grej()
1503 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_grej()
1520 void avdt_msg_ind(AvdtpCcb* p_ccb, BT_HDR* p_buf) { in avdt_msg_ind() argument
1538 p_buf = avdt_msg_asmbl(p_ccb, p_buf); in avdt_msg_ind()
1539 if (p_buf == NULL) { in avdt_msg_ind()
1543 p = (uint8_t*)(p_buf + 1) + p_buf->offset; in avdt_msg_ind()
1560 (p_buf->len == AVDT_LEN_GEN_REJ)) { in avdt_msg_ind()
1586 p_buf->len -= AVDT_LEN_TYPE_SINGLE; in avdt_msg_ind()
1611 (*avdt_msg_prs_cmd[sig - 1])(&msg, p, p_buf->len); in avdt_msg_ind()
1615 (*avdt_msg_prs_rsp[sig - 1])(&msg, p, p_buf->len); in avdt_msg_ind()
1619 err = avdt_msg_prs_rej(&msg, p, p_buf->len, sig); in avdt_msg_ind()
1695 osi_free(p_buf); in avdt_msg_ind()