• Home
  • Raw
  • Download

Lines Matching refs:p_lcb

74 static bool avct_l2c_is_passive(tAVCT_LCB* p_lcb) {  in avct_l2c_is_passive()  argument
80 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb)) { in avct_l2c_is_passive()
103 tAVCT_LCB* p_lcb; in avct_l2c_connect_ind_cback() local
108 p_lcb = avct_lcb_by_bd(bd_addr); in avct_l2c_connect_ind_cback()
109 if (p_lcb == NULL) { in avct_l2c_connect_ind_cback()
111 p_lcb = avct_lcb_alloc(bd_addr); in avct_l2c_connect_ind_cback()
112 if (p_lcb == NULL) { in avct_l2c_connect_ind_cback()
119 if (!avct_l2c_is_passive(p_lcb) || (p_lcb->ch_state == AVCT_CH_OPEN)) { in avct_l2c_connect_ind_cback()
125 p_lcb->conflict_lcid = p_lcb->ch_lcid; in avct_l2c_connect_ind_cback()
127 p_lcb->conflict_lcid); in avct_l2c_connect_ind_cback()
131 if (p_lcb) { in avct_l2c_connect_ind_cback()
133 lcid, result, p_lcb->ch_state); in avct_l2c_connect_ind_cback()
141 p_lcb->ch_lcid = lcid; in avct_l2c_connect_ind_cback()
144 p_lcb->ch_state = AVCT_CH_CFG; in avct_l2c_connect_ind_cback()
154 if (p_lcb) AVCT_TRACE_DEBUG("ch_state cni: %d ", p_lcb->ch_state); in avct_l2c_connect_ind_cback()
168 tAVCT_LCB* p_lcb; in avct_l2c_connect_cfm_cback() local
172 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_connect_cfm_cback()
173 if (p_lcb != NULL) { in avct_l2c_connect_cfm_cback()
177 lcid, result, p_lcb->ch_state, p_lcb->conflict_lcid); in avct_l2c_connect_cfm_cback()
179 if (p_lcb->ch_state == AVCT_CH_CONN) { in avct_l2c_connect_cfm_cback()
183 p_lcb->ch_state = AVCT_CH_CFG; in avct_l2c_connect_cfm_cback()
195 p_lcb->conflict_lcid); in avct_l2c_connect_cfm_cback()
196 if (p_lcb->conflict_lcid == lcid) { in avct_l2c_connect_cfm_cback()
197 p_lcb->conflict_lcid = 0; in avct_l2c_connect_cfm_cback()
201 avct_lcb_event(p_lcb, AVCT_LCB_LL_CLOSE_EVT, &avct_lcb_evt); in avct_l2c_connect_cfm_cback()
204 } else if (p_lcb->conflict_lcid == lcid) { in avct_l2c_connect_cfm_cback()
208 p_lcb->ch_state, p_lcb->conflict_lcid); in avct_l2c_connect_cfm_cback()
214 p_lcb->conflict_lcid = 0; in avct_l2c_connect_cfm_cback()
216 AVCT_TRACE_DEBUG("ch_state cnc: %d ", p_lcb->ch_state); in avct_l2c_connect_cfm_cback()
231 tAVCT_LCB* p_lcb; in avct_l2c_config_cfm_cback() local
234 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_config_cfm_cback()
235 if (p_lcb != NULL) { in avct_l2c_config_cfm_cback()
237 lcid, p_lcb->ch_state, p_cfg->result); in avct_l2c_config_cfm_cback()
239 if (p_lcb->ch_state == AVCT_CH_CFG) { in avct_l2c_config_cfm_cback()
243 p_lcb->ch_flags |= AVCT_L2C_CFG_CFM_DONE; in avct_l2c_config_cfm_cback()
246 if (p_lcb->ch_flags & AVCT_L2C_CFG_IND_DONE) { in avct_l2c_config_cfm_cback()
247 p_lcb->ch_state = AVCT_CH_OPEN; in avct_l2c_config_cfm_cback()
248 avct_lcb_event(p_lcb, AVCT_LCB_LL_OPEN_EVT, NULL); in avct_l2c_config_cfm_cback()
255 p_lcb->ch_state); in avct_l2c_config_cfm_cback()
257 p_lcb->ch_result = p_cfg->result; in avct_l2c_config_cfm_cback()
263 AVCT_TRACE_DEBUG("ch_state cfc: %d ", p_lcb->ch_state); in avct_l2c_config_cfm_cback()
278 tAVCT_LCB* p_lcb; in avct_l2c_config_ind_cback() local
281 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_config_ind_cback()
282 if (p_lcb != NULL) { in avct_l2c_config_ind_cback()
284 p_lcb->ch_state); in avct_l2c_config_ind_cback()
287 p_lcb->peer_mtu = p_cfg->mtu; in avct_l2c_config_ind_cback()
289 p_lcb->peer_mtu = L2CAP_DEFAULT_MTU; in avct_l2c_config_ind_cback()
298 if ((p_lcb->ch_flags & AVCT_L2C_CFG_IND_DONE) == 0) { in avct_l2c_config_ind_cback()
300 p_lcb->ch_flags |= AVCT_L2C_CFG_IND_DONE; in avct_l2c_config_ind_cback()
303 if (p_lcb->ch_flags & AVCT_L2C_CFG_CFM_DONE) { in avct_l2c_config_ind_cback()
304 p_lcb->ch_state = AVCT_CH_OPEN; in avct_l2c_config_ind_cback()
305 avct_lcb_event(p_lcb, AVCT_LCB_LL_OPEN_EVT, NULL); in avct_l2c_config_ind_cback()
308 AVCT_TRACE_DEBUG("ch_state cfi: %d ", p_lcb->ch_state); in avct_l2c_config_ind_cback()
323 tAVCT_LCB* p_lcb; in avct_l2c_disconnect_ind_cback() local
327 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_disconnect_ind_cback()
328 if (p_lcb != NULL) { in avct_l2c_disconnect_ind_cback()
330 p_lcb->ch_state); in avct_l2c_disconnect_ind_cback()
338 avct_lcb_event(p_lcb, AVCT_LCB_LL_CLOSE_EVT, &avct_lcb_evt); in avct_l2c_disconnect_ind_cback()
339 AVCT_TRACE_DEBUG("ch_state di: %d ", p_lcb->ch_state); in avct_l2c_disconnect_ind_cback()
354 tAVCT_LCB* p_lcb; in avct_l2c_disconnect_cfm_cback() local
358 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_disconnect_cfm_cback()
359 if (p_lcb != NULL) { in avct_l2c_disconnect_cfm_cback()
362 p_lcb->ch_state, result); in avct_l2c_disconnect_cfm_cback()
364 res = (p_lcb->ch_result != 0) ? p_lcb->ch_result : result; in avct_l2c_disconnect_cfm_cback()
365 p_lcb->ch_result = 0; in avct_l2c_disconnect_cfm_cback()
369 avct_lcb_event(p_lcb, AVCT_LCB_LL_CLOSE_EVT, &avct_lcb_evt); in avct_l2c_disconnect_cfm_cback()
370 AVCT_TRACE_DEBUG("ch_state dc: %d ", p_lcb->ch_state); in avct_l2c_disconnect_cfm_cback()
385 tAVCT_LCB* p_lcb; in avct_l2c_congestion_ind_cback() local
389 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_congestion_ind_cback()
390 if (p_lcb != NULL) { in avct_l2c_congestion_ind_cback()
393 avct_lcb_event(p_lcb, AVCT_LCB_LL_CONG_EVT, &avct_lcb_evt); in avct_l2c_congestion_ind_cback()
408 tAVCT_LCB* p_lcb; in avct_l2c_data_ind_cback() local
412 p_lcb = avct_lcb_by_lcid(lcid); in avct_l2c_data_ind_cback()
413 if (p_lcb != NULL) { in avct_l2c_data_ind_cback()
414 avct_lcb_event(p_lcb, AVCT_LCB_LL_MSG_EVT, (tAVCT_LCB_EVT*)&p_buf); in avct_l2c_data_ind_cback()