Lines Matching refs:p_tbl

120   AvdtpTransportChannel* p_tbl = avdtp_cb.ad.tc_tbl;  in avdt_ad_init()  local
124 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++) { in avdt_ad_init()
125 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU; in avdt_ad_init()
145 AvdtpTransportChannel* p_tbl = avdtp_cb.ad.tc_tbl; in avdt_ad_tc_tbl_by_st() local
150 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++) { in avdt_ad_tc_tbl_by_st()
152 if ((p_tbl->tcid == 0) && (p_tbl->state == state)) { in avdt_ad_tc_tbl_by_st()
159 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++) { in avdt_ad_tc_tbl_by_st()
162 if ((p_tbl->tcid == 0) && (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()
168 if ((p_tbl->tcid > 0) && (p_tbl->ccb_idx == ccb_idx) && in avdt_ad_tc_tbl_by_st()
169 (p_tbl->state == state)) { in avdt_ad_tc_tbl_by_st()
178 p_tbl = NULL; in avdt_ad_tc_tbl_by_st()
181 return p_tbl; in avdt_ad_tc_tbl_by_st()
221 AvdtpTransportChannel* p_tbl = avdtp_cb.ad.tc_tbl; in avdt_ad_tc_tbl_by_type() local
227 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++) { in avdt_ad_tc_tbl_by_type()
228 if ((p_tbl->tcid == tcid) && (p_tbl->ccb_idx == ccb_idx)) { in avdt_ad_tc_tbl_by_type()
235 return p_tbl; in avdt_ad_tc_tbl_by_type()
250 AvdtpTransportChannel* p_tbl = avdtp_cb.ad.tc_tbl; in avdt_ad_tc_tbl_alloc() local
253 for (i = 0; i < AVDT_NUM_TC_TBL; i++, p_tbl++) { in avdt_ad_tc_tbl_alloc()
254 if (p_tbl->state == AVDT_AD_ST_UNUSED) { in avdt_ad_tc_tbl_alloc()
263 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU; in avdt_ad_tc_tbl_alloc()
264 p_tbl->cfg_flags = 0; in avdt_ad_tc_tbl_alloc()
265 p_tbl->ccb_idx = avdt_ccb_to_idx(p_ccb); in avdt_ad_tc_tbl_alloc()
266 p_tbl->state = AVDT_AD_ST_IDLE; in avdt_ad_tc_tbl_alloc()
267 return p_tbl; in avdt_ad_tc_tbl_alloc()
280 uint8_t avdt_ad_tc_tbl_to_idx(AvdtpTransportChannel* p_tbl) { in avdt_ad_tc_tbl_to_idx() argument
281 AVDT_TRACE_DEBUG("avdt_ad_tc_tbl_to_idx: %d", (p_tbl - avdtp_cb.ad.tc_tbl)); in avdt_ad_tc_tbl_to_idx()
283 return (uint8_t)(p_tbl - avdtp_cb.ad.tc_tbl); in avdt_ad_tc_tbl_to_idx()
300 void avdt_ad_tc_close_ind(AvdtpTransportChannel* p_tbl, in avdt_ad_tc_close_ind() argument
306 close.old_tc_state = p_tbl->state; in avdt_ad_tc_close_ind()
308 p_tbl->state = AVDT_AD_ST_UNUSED; in avdt_ad_tc_close_ind()
309 p_tbl->cfg_flags = 0; in avdt_ad_tc_close_ind()
310 p_tbl->peer_mtu = L2CAP_DEFAULT_MTU; in avdt_ad_tc_close_ind()
312 AVDT_TRACE_DEBUG("%s: tcid: %d, old: %d", __func__, p_tbl->tcid, in avdt_ad_tc_close_ind()
315 if (p_tbl->tcid == 0) { in avdt_ad_tc_close_ind()
316 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx); in avdt_ad_tc_close_ind()
322 p_scb = avdtp_cb.ad.LookupAvdtpScb(*p_tbl); in avdt_ad_tc_close_ind()
325 __func__, p_tbl->ccb_idx, p_tbl->tcid); in avdt_ad_tc_close_ind()
328 close.tcid = p_tbl->tcid; in avdt_ad_tc_close_ind()
329 close.type = avdt_ad_tcid_to_type(p_tbl->tcid); in avdt_ad_tc_close_ind()
347 void avdt_ad_tc_open_ind(AvdtpTransportChannel* p_tbl) { in avdt_ad_tc_open_ind() argument
354 __func__, p_tbl, p_tbl->state, p_tbl->ccb_idx, p_tbl->tcid, in avdt_ad_tc_open_ind()
355 avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl); in avdt_ad_tc_open_ind()
357 p_tbl->state = AVDT_AD_ST_OPEN; in avdt_ad_tc_open_ind()
360 if (p_tbl->tcid == 0) { in avdt_ad_tc_open_ind()
362 L2CA_SetTxPriority(avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][AVDT_CHAN_SIG].lcid, in avdt_ad_tc_open_ind()
365 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx); in avdt_ad_tc_open_ind()
369 if (p_tbl->cfg_flags & AVDT_L2C_CFG_CONN_ACP) { in avdt_ad_tc_open_ind()
379 p_scb = avdtp_cb.ad.LookupAvdtpScb(*p_tbl); in avdt_ad_tc_open_ind()
382 __func__, p_tbl->ccb_idx, p_tbl->tcid); in avdt_ad_tc_open_ind()
386 open.peer_mtu = p_tbl->peer_mtu; in avdt_ad_tc_open_ind()
387 open.lcid = avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].lcid; in avdt_ad_tc_open_ind()
388 open.hdr.err_code = avdt_ad_tcid_to_type(p_tbl->tcid); in avdt_ad_tc_open_ind()
408 void avdt_ad_tc_cong_ind(AvdtpTransportChannel* p_tbl, bool is_congested) { in avdt_ad_tc_cong_ind() argument
413 if (p_tbl->tcid == 0) { in avdt_ad_tc_cong_ind()
414 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx); in avdt_ad_tc_cong_ind()
422 p_scb = avdtp_cb.ad.LookupAvdtpScb(*p_tbl); in avdt_ad_tc_cong_ind()
425 __func__, p_tbl->ccb_idx, p_tbl->tcid); in avdt_ad_tc_cong_ind()
445 void avdt_ad_tc_data_ind(AvdtpTransportChannel* p_tbl, BT_HDR* p_buf) { in avdt_ad_tc_data_ind() argument
450 p_buf->layer_specific = avdt_ad_tcid_to_type(p_tbl->tcid); in avdt_ad_tc_data_ind()
453 if (p_tbl->tcid == 0) { in avdt_ad_tc_data_ind()
454 p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx); in avdt_ad_tc_data_ind()
459 p_scb = avdtp_cb.ad.LookupAvdtpScb(*p_tbl); in avdt_ad_tc_data_ind()
462 __func__, p_tbl->ccb_idx, p_tbl->tcid); in avdt_ad_tc_data_ind()
515 AvdtpTransportChannel* p_tbl; in avdt_ad_open_req() local
518 p_tbl = avdt_ad_tc_tbl_alloc(p_ccb); in avdt_ad_open_req()
519 if (p_tbl == NULL) { in avdt_ad_open_req()
524 p_tbl->tcid = avdt_ad_type_to_tcid(type, p_scb); in avdt_ad_open_req()
526 p_tbl->tcid); in avdt_ad_open_req()
530 p_tbl->my_mtu = avdtp_cb.rcb.ctrl_mtu; in avdt_ad_open_req()
531 p_tbl->my_flush_to = L2CAP_DEFAULT_FLUSH_TO; in avdt_ad_open_req()
534 p_tbl->my_mtu = p_scb->stream_config.mtu; in avdt_ad_open_req()
535 p_tbl->my_flush_to = p_scb->stream_config.flush_to; in avdt_ad_open_req()
538 avdtp_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl = in avdt_ad_open_req()
541 avdt_ccb_to_idx(p_ccb), p_tbl->tcid, in avdt_ad_open_req()
547 p_tbl->state = AVDT_AD_ST_ACP; in avdt_ad_open_req()
551 p_tbl->state = AVDT_AD_ST_CONN; in avdt_ad_open_req()
558 avdt_ad_tc_tbl_to_idx(p_tbl); in avdt_ad_open_req()
561 avdt_ad_tc_tbl_to_idx(p_tbl)); in avdt_ad_open_req()
563 avdtp_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].lcid = lcid; in avdt_ad_open_req()
565 avdt_ccb_to_idx(p_ccb), p_tbl->tcid, lcid); in avdt_ad_open_req()
568 avdt_ad_tc_close_ind(p_tbl, 0); in avdt_ad_open_req()
587 AvdtpTransportChannel* p_tbl; in avdt_ad_close_req() local
589 p_tbl = avdt_ad_tc_tbl_by_type(type, p_ccb, p_scb); in avdt_ad_close_req()
590 AVDT_TRACE_DEBUG("avdt_ad_close_req state: %d", p_tbl->state); in avdt_ad_close_req()
592 switch (p_tbl->state) { in avdt_ad_close_req()
598 avdt_ad_tc_close_ind(p_tbl, 0); in avdt_ad_close_req()