• Home
  • Raw
  • Download

Lines Matching refs:p_lcb

164 void avct_lcb_event(tAVCT_LCB* p_lcb, uint8_t event, tAVCT_LCB_EVT* p_data) {  in avct_lcb_event()  argument
169 AVCT_TRACE_EVENT("LCB lcb=%d event=%s state=%s", p_lcb->allocated, in avct_lcb_event()
170 avct_lcb_evt_str[event], avct_lcb_st_str[p_lcb->state]); in avct_lcb_event()
173 state_table = avct_lcb_st_tbl[p_lcb->state]; in avct_lcb_event()
176 p_lcb->state = state_table[event][AVCT_LCB_NEXT_STATE]; in avct_lcb_event()
182 (*avct_lcb_action[action])(p_lcb, p_data); in avct_lcb_event()
235 tAVCT_LCB* p_lcb = &avct_cb.lcb[0]; in avct_lcb_by_bd() local
238 for (i = 0; i < AVCT_NUM_LINKS; i++, p_lcb++) { in avct_lcb_by_bd()
240 if (p_lcb->allocated && p_lcb->peer_addr == bd_addr) { in avct_lcb_by_bd()
247 p_lcb = NULL; in avct_lcb_by_bd()
251 return p_lcb; in avct_lcb_by_bd()
265 tAVCT_LCB* p_lcb = &avct_cb.lcb[0]; in avct_lcb_alloc() local
268 for (i = 0; i < AVCT_NUM_LINKS; i++, p_lcb++) { in avct_lcb_alloc()
269 if (!p_lcb->allocated) { in avct_lcb_alloc()
270 p_lcb->allocated = (uint8_t)(i + 1); in avct_lcb_alloc()
271 p_lcb->peer_addr = bd_addr; in avct_lcb_alloc()
272 AVCT_TRACE_DEBUG("avct_lcb_alloc %d", p_lcb->allocated); in avct_lcb_alloc()
273 p_lcb->tx_q = fixed_queue_new(SIZE_MAX); in avct_lcb_alloc()
274 p_lcb->peer_mtu = L2CAP_LE_MIN_MTU; in avct_lcb_alloc()
281 p_lcb = NULL; in avct_lcb_alloc()
284 return p_lcb; in avct_lcb_alloc()
297 void avct_lcb_dealloc(tAVCT_LCB* p_lcb, UNUSED_ATTR tAVCT_LCB_EVT* p_data) { in avct_lcb_dealloc() argument
298 AVCT_TRACE_DEBUG("%s allocated: %d", __func__, p_lcb->allocated); in avct_lcb_dealloc()
304 if (p_ccb->allocated && p_ccb->p_lcb == p_lcb) { in avct_lcb_dealloc()
313 osi_free(p_lcb->p_rx_msg); in avct_lcb_dealloc()
314 fixed_queue_free(p_lcb->tx_q, NULL); in avct_lcb_dealloc()
315 memset(p_lcb, 0, sizeof(tAVCT_LCB)); in avct_lcb_dealloc()
329 tAVCT_LCB* p_lcb = &avct_cb.lcb[0]; in avct_lcb_by_lcid() local
332 for (i = 0; i < AVCT_NUM_LINKS; i++, p_lcb++) { in avct_lcb_by_lcid()
333 if (p_lcb->allocated && in avct_lcb_by_lcid()
334 ((p_lcb->ch_lcid == lcid) || (p_lcb->conflict_lcid == lcid))) { in avct_lcb_by_lcid()
341 p_lcb = NULL; in avct_lcb_by_lcid()
345 return p_lcb; in avct_lcb_by_lcid()
358 tAVCT_CCB* avct_lcb_has_pid(tAVCT_LCB* p_lcb, uint16_t pid) { in avct_lcb_has_pid() argument
363 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb) && (p_ccb->cc.pid == pid)) { in avct_lcb_has_pid()
380 bool avct_lcb_last_ccb(tAVCT_LCB* p_lcb, tAVCT_CCB* p_ccb_last) { in avct_lcb_last_ccb() argument
387 p_ccb->allocated, p_ccb->p_lcb, p_lcb, p_ccb, in avct_lcb_last_ccb()
389 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb) && (p_ccb != p_ccb_last)) { in avct_lcb_last_ccb()