• Home
  • Raw
  • Download

Lines Matching refs:p_tbl

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