Home | History | Annotate | Download | only in avdt

Lines Matching refs:p_ccb

1198 BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
1212 p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL);
1217 p_ccb->p_curr_msg = p_msg;
1221 curr_msg_len = p_ccb->p_curr_msg->len;
1224 while ((!p_ccb->cong) && (p_ccb->p_curr_msg != NULL))
1231 if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) &&
1232 (p_ccb->p_curr_msg->len <= p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE))
1236 p_buf = p_ccb->p_curr_msg;
1239 else if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) &&
1240 (p_ccb->p_curr_msg->len > p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE))
1244 nosp = (p_ccb->p_curr_msg->len + AVDT_LEN_TYPE_START - p_tbl->peer_mtu) /
1254 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len);
1257 else if ((p_ccb->p_curr_msg->offset > AVDT_MSG_OFFSET) &&
1258 (p_ccb->p_curr_msg->len > (p_tbl->peer_mtu - AVDT_LEN_TYPE_CONT)))
1270 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len);
1277 p_buf = p_ccb->p_curr_msg;
1281 label = AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_msg->layer_specific);
1282 msg = AVDT_LAYERSPEC_MSG(p_ccb->p_curr_msg->layer_specific);
1283 sig = (UINT8) p_ccb->p_curr_msg->event;
1291 p_ccb->p_curr_msg = NULL;
1300 alarm_cancel(p_ccb->idle_ccb_timer);
1301 alarm_cancel(p_ccb->ret_ccb_timer);
1303 alarm_set_on_queue(p_ccb->rsp_ccb_timer, interval_ms,
1304 avdt_ccb_rsp_ccb_timer_timeout, p_ccb,
1309 alarm_cancel(p_ccb->idle_ccb_timer);
1310 alarm_cancel(p_ccb->rsp_ccb_timer);
1312 alarm_set_on_queue(p_ccb->ret_ccb_timer, interval_ms,
1313 avdt_ccb_ret_ccb_timer_timeout, p_ccb,
1321 p_ccb->p_curr_msg->len -= p_buf->len;
1322 p_ccb->p_curr_msg->offset += p_buf->len;
1342 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf);
1344 return (p_ccb->cong);
1358 BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
1379 if (p_ccb->p_rx_msg != NULL)
1382 osi_free_and_reset((void **)&p_ccb->p_rx_msg);
1390 if (p_ccb->p_rx_msg != NULL)
1393 osi_free_and_reset((void **)&p_ccb->p_rx_msg);
1400 p_ccb->p_rx_msg = (BT_HDR *)osi_malloc(BT_DEFAULT_BUFFER_SIZE);
1401 memcpy(p_ccb->p_rx_msg, p_buf,
1408 p = (UINT8 *)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset;
1414 p_ccb->p_rx_msg->offset += p_ccb->p_rx_msg->len;
1417 p_ccb->p_rx_msg->len -= 1;
1425 if (p_ccb->p_rx_msg == NULL)
1445 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) {
1448 osi_free_and_reset((void **)&p_ccb->p_rx_msg);
1453 memcpy((UINT8 *)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset,
1458 p_ccb->p_rx_msg->offset -= p_ccb->p_rx_msg->len;
1459 p_ccb->p_rx_msg->len += p_buf->len;
1460 p_ret = p_ccb->p_rx_msg;
1461 p_ccb->p_rx_msg = NULL;
1465 p_ccb->p_rx_msg->offset += p_buf->len;
1466 p_ccb->p_rx_msg->len += p_buf->len;
1491 void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, UINT8 sig_id, tAVDT_MSG *p_params)
1526 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label);
1529 p_ccb->label = (p_ccb->label + 1) % 16;
1532 fixed_queue_enqueue(p_ccb->cmd_q, p_buf);
1533 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1552 void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
1573 fixed_queue_enqueue(p_ccb->rsp_q, p_buf);
1574 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1593 void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
1631 fixed_queue_enqueue(p_ccb->rsp_q, p_buf);
1632 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1650 void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
1669 fixed_queue_enqueue(p_ccb->rsp_q, p_buf);
1670 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1686 void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
1704 if ((p_buf = avdt_msg_asmbl(p_ccb, p_buf)) == NULL)
1719 msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb);
1731 if (p_ccb->p_curr_cmd != NULL)
1733 msg.hdr.sig_id = sig = (UINT8) p_ccb->p_curr_cmd->event;
1752 avdt_msg_send_grej(p_ccb, sig, &msg);
1766 msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO *) p_ccb->p_proc_data;
1767 msg.discover_rsp.num_seps = p_ccb->proc_param;
1773 msg.svccap.p_cfg = (tAVDT_CFG *) p_ccb->p_proc_data;
1819 avdt_msg_send_rej(p_ccb, sig, &msg);
1832 if ((p_ccb->p_curr_cmd != NULL) &&
1833 (p_ccb->p_curr_cmd->event == sig) &&
1834 (AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_cmd->layer_specific) == label))
1837 alarm_cancel(p_ccb->idle_ccb_timer);
1838 alarm_cancel(p_ccb->ret_ccb_timer);
1839 alarm_cancel(p_ccb->rsp_ccb_timer);
1842 p_ccb->ret_count = 0;
1860 avdt_ccb_event(p_ccb, (UINT8)(evt & ~AVDT_CCB_MKR), (tAVDT_CCB_EVT *) &msg);
1874 scb_hdl = *((UINT8 *)(p_ccb->p_curr_cmd + 1));
1895 avdt_ccb_event(p_ccb, AVDT_CCB_RCVRSP_EVT, NULL);