Home | History | Annotate | Download | only in avdt

Lines Matching full:p_tbl

110     tAVDT_TC_TBL    *p_tbl = avdt_cb.ad.tc_tbl;
114 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
116 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU;
137 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
143 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
146 if ((p_tbl->tcid == 0) &&
147 (p_tbl->state == state))
157 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
162 if ((p_tbl->tcid == 0) &&
163 (p_tbl->ccb_idx == ccb_idx) &&
164 (p_tbl->state == state))
172 if ((p_tbl->tcid > 0) &&
173 (p_tbl->ccb_idx == ccb_idx) &&
174 (p_tbl->state == state))
185 p_tbl = NULL;
188 return p_tbl;
234 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
240 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
242 if ((p_tbl->tcid == tcid) && (p_tbl->ccb_idx == ccb_idx))
250 return p_tbl;
267 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
270 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
272 if (p_tbl->state == AVDT_AD_ST_UNUSED)
282 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU;
283 p_tbl->cfg_flags = 0;
284 p_tbl->ccb_idx = avdt_ccb_to_idx(p_ccb);
285 p_tbl->state = AVDT_AD_ST_IDLE;
287 return p_tbl;
300 UINT8 avdt_ad_tc_tbl_to_idx(tAVDT_TC_TBL *p_tbl)
302 AVDT_TRACE_DEBUG("avdt_ad_tc_tbl_to_idx: %d", (p_tbl - avdt_cb.ad.tc_tbl));
304 return (UINT8) (p_tbl - avdt_cb.ad.tc_tbl);
321 void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl, UINT16 reason)
328 close.old_tc_state = p_tbl->state;
330 p_tbl->state = AVDT_AD_ST_UNUSED;
331 p_tbl->cfg_flags = 0;
332 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU;
335 p_tbl->tcid, close.old_tc_state);
337 if (p_tbl->tcid == 0)
339 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
346 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
349 close.tcid = p_tbl->tcid;
350 close.type = avdt_ad_tcid_to_type(p_tbl->tcid);
368 void avdt_ad_tc_open_ind(tAVDT_TC_TBL *p_tbl)
375 p_tbl->state = AVDT_AD_ST_OPEN;
378 if (p_tbl->tcid == 0)
381 L2CA_SetTxPriority(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][AVDT_CHAN_SIG].lcid, L2CAP_CHNL_PRIORITY_HIGH);
383 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
387 if(p_tbl->cfg_flags & AVDT_L2C_CFG_CONN_ACP)
397 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
402 open.peer_mtu = p_tbl->peer_mtu;
403 open.lcid = avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].lcid;
404 open.hdr.err_code = avdt_ad_tcid_to_type(p_tbl->tcid);
425 void avdt_ad_tc_cong_ind(tAVDT_TC_TBL *p_tbl, BOOLEAN is_congested)
431 if (p_tbl->tcid == 0)
433 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
440 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
461 void avdt_ad_tc_data_ind(tAVDT_TC_TBL *p_tbl, BT_HDR *p_buf)
467 p_buf->layer_specific = avdt_ad_tcid_to_type(p_tbl->tcid);
471 if (p_tbl->tcid == 0)
473 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
479 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
537 tAVDT_TC_TBL *p_tbl;
540 p_tbl = avdt_ad_tc_tbl_alloc(p_ccb);
542 p_tbl->tcid = avdt_ad_type_to_tcid(type, p_scb);
544 type, role, p_tbl->tcid);
549 p_tbl->my_mtu = avdt_cb.rcb.ctrl_mtu;
550 p_tbl->my_flush_to = L2CAP_DEFAULT_FLUSH_TO;
555 p_tbl->my_mtu = p_scb->cs.mtu;
556 p_tbl->my_flush_to = p_scb->cs.flush_to;
559 avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl = avdt_scb_to_hdl(p_scb);
561 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
568 p_tbl->state = AVDT_AD_ST_ACP;
573 p_tbl->state = AVDT_AD_ST_CONN;
579 avdt_cb.ad.lcid_tbl[lcid - L2CAP_BASE_APPL_CID] = avdt_ad_tc_tbl_to_idx(p_tbl);
581 (lcid - L2CAP_BASE_APPL_CID), avdt_ad_tc_tbl_to_idx(p_tbl));
583 avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].lcid = lcid;
585 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
591 avdt_ad_tc_close_ind(p_tbl, 0);
611 tAVDT_TC_TBL *p_tbl;
613 p_tbl = avdt_ad_tc_tbl_by_type(type, p_ccb, p_scb);
614 AVDT_TRACE_DEBUG("avdt_ad_close_req state: %d", p_tbl->state);
616 switch(p_tbl->state)
623 avdt_ad_tc_close_ind(p_tbl, 0);