Lines Matching refs:p_tbl
109 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
113 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
115 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU;
136 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
142 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
145 if ((p_tbl->tcid == 0) &&
146 (p_tbl->state == state))
156 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
161 if ((p_tbl->tcid == 0) &&
162 (p_tbl->ccb_idx == ccb_idx) &&
163 (p_tbl->state == state))
171 if ((p_tbl->tcid > 0) &&
172 (p_tbl->ccb_idx == ccb_idx) &&
173 (p_tbl->state == state))
184 p_tbl = NULL;
187 return p_tbl;
233 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
239 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
241 if ((p_tbl->tcid == tcid) && (p_tbl->ccb_idx == ccb_idx))
249 return p_tbl;
266 tAVDT_TC_TBL *p_tbl = avdt_cb.ad.tc_tbl;
269 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++)
271 if (p_tbl->state == AVDT_AD_ST_UNUSED)
281 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU;
282 p_tbl->cfg_flags = 0;
283 p_tbl->ccb_idx = avdt_ccb_to_idx(p_ccb);
284 p_tbl->state = AVDT_AD_ST_IDLE;
286 return p_tbl;
299 UINT8 avdt_ad_tc_tbl_to_idx(tAVDT_TC_TBL *p_tbl)
301 AVDT_TRACE_DEBUG1("avdt_ad_tc_tbl_to_idx: %d", (p_tbl - avdt_cb.ad.tc_tbl));
303 return (UINT8) (p_tbl - avdt_cb.ad.tc_tbl);
320 void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl, UINT16 reason)
326 close.old_tc_state = p_tbl->state;
328 p_tbl->state = AVDT_AD_ST_UNUSED;
329 p_tbl->cfg_flags = 0;
330 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU;
333 p_tbl->tcid, close.old_tc_state);
335 if (p_tbl->tcid == 0)
337 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
344 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
347 close.tcid = p_tbl->tcid;
348 close.type = avdt_ad_tcid_to_type(p_tbl->tcid);
366 void avdt_ad_tc_open_ind(tAVDT_TC_TBL *p_tbl)
373 p_tbl->state = AVDT_AD_ST_OPEN;
376 if (p_tbl->tcid == 0)
379 L2CA_SetTxPriority(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][AVDT_CHAN_SIG].lcid, L2CAP_CHNL_PRIORITY_HIGH);
381 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
385 if(p_tbl->cfg_flags & AVDT_L2C_CFG_CONN_ACP)
395 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
400 open.peer_mtu = p_tbl->peer_mtu;
401 open.lcid = avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].lcid;
402 open.hdr.err_code = avdt_ad_tcid_to_type(p_tbl->tcid);
423 void avdt_ad_tc_cong_ind(tAVDT_TC_TBL *p_tbl, BOOLEAN is_congested)
429 if (p_tbl->tcid == 0)
431 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
438 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
459 void avdt_ad_tc_data_ind(tAVDT_TC_TBL *p_tbl, BT_HDR *p_buf)
465 p_buf->layer_specific = avdt_ad_tcid_to_type(p_tbl->tcid);
469 if (p_tbl->tcid == 0)
471 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
477 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
532 tAVDT_TC_TBL *p_tbl;
535 p_tbl = avdt_ad_tc_tbl_alloc(p_ccb);
537 p_tbl->tcid = avdt_ad_type_to_tcid(type, p_scb);
539 type, role, p_tbl->tcid);
544 p_tbl->my_mtu = avdt_cb.rcb.ctrl_mtu;
545 p_tbl->my_flush_to = L2CAP_DEFAULT_FLUSH_TO;
550 p_tbl->my_mtu = p_scb->cs.mtu;
551 p_tbl->my_flush_to = p_scb->cs.flush_to;
554 avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl = avdt_scb_to_hdl(p_scb);
556 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
563 p_tbl->state = AVDT_AD_ST_ACP;
568 p_tbl->state = AVDT_AD_ST_CONN;
574 avdt_cb.ad.lcid_tbl[lcid - L2CAP_BASE_APPL_CID] = avdt_ad_tc_tbl_to_idx(p_tbl);
576 (lcid - L2CAP_BASE_APPL_CID), avdt_ad_tc_tbl_to_idx(p_tbl));
578 avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].lcid = lcid;
580 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
586 avdt_ad_tc_close_ind(p_tbl, 0);
606 tAVDT_TC_TBL *p_tbl;
608 p_tbl = avdt_ad_tc_tbl_by_type(type, p_ccb, p_scb);
609 AVDT_TRACE_DEBUG1("avdt_ad_close_req state: %d", p_tbl->state);
611 switch(p_tbl->state)
618 avdt_ad_tc_close_ind(p_tbl, 0);