• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

1047 bool avdt_msg_send(AvdtpCcb* p_ccb, BT_HDR* p_msg) {  in avdt_msg_send()  argument
1060 p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL); in avdt_msg_send()
1064 p_ccb->p_curr_msg = p_msg; in avdt_msg_send()
1068 curr_msg_len = p_ccb->p_curr_msg->len; in avdt_msg_send()
1071 while ((!p_ccb->cong) && (p_ccb->p_curr_msg != NULL)) { in avdt_msg_send()
1077 if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) && in avdt_msg_send()
1078 (p_ccb->p_curr_msg->len <= p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE)) { in avdt_msg_send()
1081 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1084 else if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) && in avdt_msg_send()
1085 (p_ccb->p_curr_msg->len > in avdt_msg_send()
1089 nosp = (p_ccb->p_curr_msg->len + AVDT_LEN_TYPE_START - p_tbl->peer_mtu) / in avdt_msg_send()
1100 (uint8_t*)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, in avdt_msg_send()
1104 else if ((p_ccb->p_curr_msg->offset > AVDT_MSG_OFFSET) && in avdt_msg_send()
1105 (p_ccb->p_curr_msg->len > in avdt_msg_send()
1117 (uint8_t*)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, in avdt_msg_send()
1124 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1128 label = AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_msg->layer_specific); in avdt_msg_send()
1129 msg = AVDT_LAYERSPEC_MSG(p_ccb->p_curr_msg->layer_specific); in avdt_msg_send()
1130 sig = (uint8_t)p_ccb->p_curr_msg->event; in avdt_msg_send()
1137 p_ccb->p_curr_msg = NULL; in avdt_msg_send()
1144 alarm_cancel(p_ccb->idle_ccb_timer); in avdt_msg_send()
1145 alarm_cancel(p_ccb->ret_ccb_timer); in avdt_msg_send()
1147 alarm_set_on_mloop(p_ccb->rsp_ccb_timer, interval_ms, in avdt_msg_send()
1148 avdt_ccb_rsp_ccb_timer_timeout, p_ccb); in avdt_msg_send()
1150 alarm_cancel(p_ccb->idle_ccb_timer); in avdt_msg_send()
1151 alarm_cancel(p_ccb->rsp_ccb_timer); in avdt_msg_send()
1153 alarm_set_on_mloop(p_ccb->ret_ccb_timer, interval_ms, in avdt_msg_send()
1154 avdt_ccb_ret_ccb_timer_timeout, p_ccb); in avdt_msg_send()
1159 p_ccb->p_curr_msg->len -= p_buf->len; in avdt_msg_send()
1160 p_ccb->p_curr_msg->offset += p_buf->len; in avdt_msg_send()
1179 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf); in avdt_msg_send()
1181 return (p_ccb->cong); in avdt_msg_send()
1195 BT_HDR* avdt_msg_asmbl(AvdtpCcb* p_ccb, BT_HDR* p_buf) { in avdt_msg_asmbl() argument
1221 if (p_ccb->p_rx_msg != NULL) in avdt_msg_asmbl()
1224 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in avdt_msg_asmbl()
1231 if (p_ccb->p_rx_msg != NULL) in avdt_msg_asmbl()
1234 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in avdt_msg_asmbl()
1241 p_ccb->p_rx_msg = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE); in avdt_msg_asmbl()
1242 memcpy(p_ccb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avdt_msg_asmbl()
1248 p = (uint8_t*)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset; in avdt_msg_asmbl()
1254 p_ccb->p_rx_msg->offset += p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1257 p_ccb->p_rx_msg->len -= 1; in avdt_msg_asmbl()
1264 if (p_ccb->p_rx_msg == NULL) { in avdt_msg_asmbl()
1281 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) { in avdt_msg_asmbl()
1284 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in avdt_msg_asmbl()
1289 memcpy((uint8_t*)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset, in avdt_msg_asmbl()
1293 p_ccb->p_rx_msg->offset -= p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1294 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1295 p_ret = p_ccb->p_rx_msg; in avdt_msg_asmbl()
1296 p_ccb->p_rx_msg = NULL; in avdt_msg_asmbl()
1298 p_ccb->p_rx_msg->offset += p_buf->len; in avdt_msg_asmbl()
1299 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1324 void avdt_msg_send_cmd(AvdtpCcb* p_ccb, void* p_scb, uint8_t sig_id, in avdt_msg_send_cmd() argument
1356 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label); in avdt_msg_send_cmd()
1359 p_ccb->label = (p_ccb->label + 1) % 16; in avdt_msg_send_cmd()
1362 fixed_queue_enqueue(p_ccb->cmd_q, p_buf); in avdt_msg_send_cmd()
1363 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_cmd()
1381 void avdt_msg_send_rsp(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { in avdt_msg_send_rsp() argument
1402 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_rsp()
1403 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_rsp()
1421 void avdt_msg_send_rej(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { in avdt_msg_send_rej() argument
1453 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_rej()
1454 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_rej()
1472 void avdt_msg_send_grej(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { in avdt_msg_send_grej() argument
1491 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_grej()
1492 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_grej()
1508 void avdt_msg_ind(AvdtpCcb* p_ccb, BT_HDR* p_buf) { in avdt_msg_ind() argument
1526 p_buf = avdt_msg_asmbl(p_ccb, p_buf); in avdt_msg_ind()
1539 msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb); in avdt_msg_ind()
1550 if (p_ccb->p_curr_cmd != NULL) { in avdt_msg_ind()
1551 msg.hdr.sig_id = sig = (uint8_t)p_ccb->p_curr_cmd->event; in avdt_msg_ind()
1567 avdt_msg_send_grej(p_ccb, sig, &msg); in avdt_msg_ind()
1579 msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO*)p_ccb->p_proc_data; in avdt_msg_ind()
1580 msg.discover_rsp.num_seps = p_ccb->proc_param; in avdt_msg_ind()
1584 msg.svccap.p_cfg = (AvdtpSepConfig*)p_ccb->p_proc_data; in avdt_msg_ind()
1620 avdt_msg_send_rej(p_ccb, sig, &msg); in avdt_msg_ind()
1631 if ((p_ccb->p_curr_cmd != NULL) && (p_ccb->p_curr_cmd->event == sig) && in avdt_msg_ind()
1632 (AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_cmd->layer_specific) == label)) { in avdt_msg_ind()
1634 alarm_cancel(p_ccb->idle_ccb_timer); in avdt_msg_ind()
1635 alarm_cancel(p_ccb->ret_ccb_timer); in avdt_msg_ind()
1636 alarm_cancel(p_ccb->rsp_ccb_timer); in avdt_msg_ind()
1639 p_ccb->ret_count = 0; in avdt_msg_ind()
1655 avdt_ccb_event(p_ccb, (uint8_t)(evt & ~AVDT_CCB_MKR), &avdt_ccb_evt); in avdt_msg_ind()
1665 scb_hdl = *((uint8_t*)(p_ccb->p_curr_cmd + 1)); in avdt_msg_ind()
1689 avdt_ccb_event(p_ccb, AVDT_CCB_RCVRSP_EVT, NULL); in avdt_msg_ind()