• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

1059 bool avdt_msg_send(AvdtpCcb* p_ccb, BT_HDR* p_msg) {  in avdt_msg_send()  argument
1072 p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL); in avdt_msg_send()
1076 p_ccb->p_curr_msg = p_msg; in avdt_msg_send()
1080 curr_msg_len = p_ccb->p_curr_msg->len; in avdt_msg_send()
1083 while ((!p_ccb->cong) && (p_ccb->p_curr_msg != NULL)) { in avdt_msg_send()
1089 if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) && in avdt_msg_send()
1090 (p_ccb->p_curr_msg->len <= p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE)) { in avdt_msg_send()
1093 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1096 else if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) && in avdt_msg_send()
1097 (p_ccb->p_curr_msg->len > in avdt_msg_send()
1101 nosp = (p_ccb->p_curr_msg->len + AVDT_LEN_TYPE_START - p_tbl->peer_mtu) / in avdt_msg_send()
1112 (uint8_t*)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, in avdt_msg_send()
1116 else if ((p_ccb->p_curr_msg->offset > AVDT_MSG_OFFSET) && in avdt_msg_send()
1117 (p_ccb->p_curr_msg->len > in avdt_msg_send()
1129 (uint8_t*)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, in avdt_msg_send()
1136 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1140 label = AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_msg->layer_specific); in avdt_msg_send()
1141 msg = AVDT_LAYERSPEC_MSG(p_ccb->p_curr_msg->layer_specific); in avdt_msg_send()
1142 sig = (uint8_t)p_ccb->p_curr_msg->event; in avdt_msg_send()
1149 p_ccb->p_curr_msg = NULL; in avdt_msg_send()
1156 alarm_cancel(p_ccb->idle_ccb_timer); in avdt_msg_send()
1157 alarm_cancel(p_ccb->ret_ccb_timer); in avdt_msg_send()
1159 alarm_set_on_mloop(p_ccb->rsp_ccb_timer, interval_ms, in avdt_msg_send()
1160 avdt_ccb_rsp_ccb_timer_timeout, p_ccb); in avdt_msg_send()
1162 alarm_cancel(p_ccb->idle_ccb_timer); in avdt_msg_send()
1163 alarm_cancel(p_ccb->rsp_ccb_timer); in avdt_msg_send()
1165 alarm_set_on_mloop(p_ccb->ret_ccb_timer, interval_ms, in avdt_msg_send()
1166 avdt_ccb_ret_ccb_timer_timeout, p_ccb); 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()
1191 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf); in avdt_msg_send()
1193 return (p_ccb->cong); in avdt_msg_send()
1207 BT_HDR* avdt_msg_asmbl(AvdtpCcb* p_ccb, BT_HDR* p_buf) { in avdt_msg_asmbl() argument
1233 if (p_ccb->p_rx_msg != NULL) in avdt_msg_asmbl()
1236 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in avdt_msg_asmbl()
1243 if (p_ccb->p_rx_msg != NULL) in avdt_msg_asmbl()
1246 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in avdt_msg_asmbl()
1253 p_ccb->p_rx_msg = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE); 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()
1260 p = (uint8_t*)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset; in avdt_msg_asmbl()
1266 p_ccb->p_rx_msg->offset += p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1269 p_ccb->p_rx_msg->len -= 1; in avdt_msg_asmbl()
1276 if (p_ccb->p_rx_msg == NULL) { in avdt_msg_asmbl()
1293 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) { in avdt_msg_asmbl()
1296 osi_free_and_reset((void**)&p_ccb->p_rx_msg); in avdt_msg_asmbl()
1301 memcpy((uint8_t*)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset, in avdt_msg_asmbl()
1305 p_ccb->p_rx_msg->offset -= p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1306 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1307 p_ret = p_ccb->p_rx_msg; in avdt_msg_asmbl()
1308 p_ccb->p_rx_msg = NULL; 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()
1336 void avdt_msg_send_cmd(AvdtpCcb* p_ccb, void* p_scb, uint8_t sig_id, in avdt_msg_send_cmd() argument
1368 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label); in avdt_msg_send_cmd()
1371 p_ccb->label = (p_ccb->label + 1) % 16; in avdt_msg_send_cmd()
1374 fixed_queue_enqueue(p_ccb->cmd_q, p_buf); in avdt_msg_send_cmd()
1375 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_cmd()
1393 void avdt_msg_send_rsp(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { in avdt_msg_send_rsp() argument
1414 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_rsp()
1415 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_rsp()
1433 void avdt_msg_send_rej(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { in avdt_msg_send_rej() argument
1465 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_rej()
1466 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_rej()
1484 void avdt_msg_send_grej(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { in avdt_msg_send_grej() argument
1503 fixed_queue_enqueue(p_ccb->rsp_q, p_buf); in avdt_msg_send_grej()
1504 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); 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()
1551 msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb); in avdt_msg_ind()
1562 if (p_ccb->p_curr_cmd != NULL) { in avdt_msg_ind()
1563 msg.hdr.sig_id = sig = (uint8_t)p_ccb->p_curr_cmd->event; in avdt_msg_ind()
1579 avdt_msg_send_grej(p_ccb, sig, &msg); in avdt_msg_ind()
1591 msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO*)p_ccb->p_proc_data; in avdt_msg_ind()
1592 msg.discover_rsp.num_seps = p_ccb->proc_param; in avdt_msg_ind()
1596 msg.svccap.p_cfg = (AvdtpSepConfig*)p_ccb->p_proc_data; in avdt_msg_ind()
1632 avdt_msg_send_rej(p_ccb, sig, &msg); in avdt_msg_ind()
1643 if ((p_ccb->p_curr_cmd != NULL) && (p_ccb->p_curr_cmd->event == sig) && in avdt_msg_ind()
1644 (AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_cmd->layer_specific) == label)) { in avdt_msg_ind()
1646 alarm_cancel(p_ccb->idle_ccb_timer); in avdt_msg_ind()
1647 alarm_cancel(p_ccb->ret_ccb_timer); in avdt_msg_ind()
1648 alarm_cancel(p_ccb->rsp_ccb_timer); in avdt_msg_ind()
1651 p_ccb->ret_count = 0; in avdt_msg_ind()
1667 avdt_ccb_event(p_ccb, (uint8_t)(evt & ~AVDT_CCB_MKR), &avdt_ccb_evt); in avdt_msg_ind()
1677 scb_hdl = *((uint8_t*)(p_ccb->p_curr_cmd + 1)); in avdt_msg_ind()
1701 avdt_ccb_event(p_ccb, AVDT_CCB_RCVRSP_EVT, NULL); in avdt_msg_ind()