• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

164   tL2C_CCB* p_ccb;  in L2CA_Deregister()  local
175 p_ccb = p_lcb->ccb_queue.p_first_ccb; in L2CA_Deregister()
176 if ((p_ccb == NULL) || (p_lcb->link_state == LST_DISCONNECTING)) { in L2CA_Deregister()
180 if ((p_ccb->in_use) && in L2CA_Deregister()
181 ((p_ccb->chnl_state == CST_W4_L2CAP_DISCONNECT_RSP) || in L2CA_Deregister()
182 (p_ccb->chnl_state == CST_W4_L2CA_DISCONNECT_RSP))) { in L2CA_Deregister()
186 if (p_ccb->p_rcb == p_rcb) { in L2CA_Deregister()
187 l2c_csm_execute(p_ccb, L2CEVT_L2CA_DISCONNECT_REQ, NULL); in L2CA_Deregister()
331 tL2C_CCB* p_ccb = l2cu_allocate_ccb(p_lcb, 0); in L2CA_ConnectReq() local
332 if (p_ccb == nullptr) { in L2CA_ConnectReq()
338 p_ccb->p_rcb = p_rcb; in L2CA_ConnectReq()
340 p_ccb->connection_initiator = L2CAP_INITIATOR_LOCAL; in L2CA_ConnectReq()
344 l2c_csm_execute(p_ccb, L2CEVT_L2CA_CONNECT_REQ, nullptr); in L2CA_ConnectReq()
355 p_lcb->p_pending_ccb = p_ccb; in L2CA_ConnectReq()
359 psm, p_ccb->local_cid); in L2CA_ConnectReq()
362 return p_ccb->local_cid; in L2CA_ConnectReq()
470 tL2C_CCB* p_ccb = p_lcb->ccb_queue.p_first_ccb; in L2CA_DeregisterLECoc() local
471 if ((p_ccb == NULL) || (p_lcb->link_state == LST_DISCONNECTING)) continue; in L2CA_DeregisterLECoc()
473 if (p_ccb->in_use && (p_ccb->chnl_state == CST_W4_L2CAP_DISCONNECT_RSP || in L2CA_DeregisterLECoc()
474 p_ccb->chnl_state == CST_W4_L2CA_DISCONNECT_RSP)) in L2CA_DeregisterLECoc()
477 if (p_ccb->p_rcb == p_rcb) in L2CA_DeregisterLECoc()
478 l2c_csm_execute(p_ccb, L2CEVT_L2CA_DISCONNECT_REQ, NULL); in L2CA_DeregisterLECoc()
540 tL2C_CCB* p_ccb = l2cu_allocate_ccb(p_lcb, 0); in L2CA_ConnectLECocReq() local
541 if (p_ccb == NULL) { in L2CA_ConnectLECocReq()
547 p_ccb->p_rcb = p_rcb; in L2CA_ConnectLECocReq()
549 p_ccb->connection_initiator = L2CAP_INITIATOR_LOCAL; in L2CA_ConnectLECocReq()
553 p_ccb->local_conn_cfg = *p_cfg; in L2CA_ConnectLECocReq()
554 p_ccb->remote_credit_count = p_cfg->credits; in L2CA_ConnectLECocReq()
559 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in L2CA_ConnectLECocReq()
561 l2c_csm_execute(p_ccb, L2CEVT_L2CA_CONNECT_REQ, NULL); in L2CA_ConnectLECocReq()
575 p_lcb->p_pending_ccb = p_ccb; in L2CA_ConnectLECocReq()
579 p_ccb->local_cid); in L2CA_ConnectLECocReq()
582 return p_ccb->local_cid; in L2CA_ConnectLECocReq()
605 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(NULL, lcid); in L2CA_GetPeerLECocConfig() local
606 if (p_ccb == NULL) { in L2CA_GetPeerLECocConfig()
612 memcpy(peer_cfg, &p_ccb->peer_conn_cfg, sizeof(tL2CAP_LE_CFG_INFO)); in L2CA_GetPeerLECocConfig()
655 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, p_lcb->pending_lead_cid); in L2CA_ConnectCreditBasedRsp() local
671 if (p_ccb->remote_id != id) { in L2CA_ConnectCreditBasedRsp()
673 p_ccb->remote_id, id); in L2CA_ConnectCreditBasedRsp()
683 l2c_csm_execute(p_ccb, L2CEVT_L2CA_CREDIT_BASED_CONNECT_RSP, &conn_info); in L2CA_ConnectCreditBasedRsp()
685 l2c_csm_execute(p_ccb, L2CEVT_L2CA_CREDIT_BASED_CONNECT_RSP_NEG, in L2CA_ConnectCreditBasedRsp()
754 tL2C_CCB* p_ccb = l2cu_allocate_ccb(p_lcb, 0); in L2CA_ConnectCreditBasedReq() local
755 if (p_ccb == NULL) { in L2CA_ConnectCreditBasedReq()
764 p_ccb->ecoc = true; in L2CA_ConnectCreditBasedReq()
765 p_ccb->local_conn_cfg = *p_cfg; in L2CA_ConnectCreditBasedReq()
766 p_ccb->remote_credit_count = p_cfg->credits; in L2CA_ConnectCreditBasedReq()
768 p_ccb->p_rcb = p_rcb; in L2CA_ConnectCreditBasedReq()
770 p_ccb_primary = p_ccb; in L2CA_ConnectCreditBasedReq()
777 p_ccb->chnl_state = CST_W4_L2CAP_CONNECT_RSP; in L2CA_ConnectCreditBasedReq()
780 allocated_cids.push_back(p_ccb->local_cid); in L2CA_ConnectCreditBasedReq()
815 tL2C_CCB* p_ccb; in L2CA_ReconfigCreditBasedConnsReq() local
825 p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in L2CA_ReconfigCreditBasedConnsReq()
827 if (!p_ccb) { in L2CA_ReconfigCreditBasedConnsReq()
832 if ((p_ccb->local_conn_cfg.mtu > p_cfg->mtu) || in L2CA_ReconfigCreditBasedConnsReq()
833 (p_ccb->local_conn_cfg.mps > p_cfg->mps)) { in L2CA_ReconfigCreditBasedConnsReq()
847 p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in L2CA_ReconfigCreditBasedConnsReq()
848 if (!p_ccb) { in L2CA_ReconfigCreditBasedConnsReq()
852 p_ccb->reconfig_started = true; in L2CA_ReconfigCreditBasedConnsReq()
855 tL2C_LCB* p_lcb = p_ccb->p_lcb; in L2CA_ReconfigCreditBasedConnsReq()
861 for (p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; p_ccb = p_ccb->p_next_ccb) in L2CA_ReconfigCreditBasedConnsReq()
862 if ((p_ccb->in_use) && (p_ccb->ecoc) && (p_ccb->reconfig_started)) { in L2CA_ReconfigCreditBasedConnsReq()
863 p_ccb->p_lcb->pending_ecoc_reconfig_cfg = *p_cfg; in L2CA_ReconfigCreditBasedConnsReq()
864 p_ccb->p_lcb->pending_ecoc_reconfig_cnt = lcids.size(); in L2CA_ReconfigCreditBasedConnsReq()
868 l2c_csm_execute(p_ccb, L2CEVT_L2CA_CREDIT_BASED_RECONFIG_REQ, p_cfg); in L2CA_ReconfigCreditBasedConnsReq()
887 tL2C_CCB* p_ccb; in L2CA_DisconnectReq() local
890 p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in L2CA_DisconnectReq()
891 if (p_ccb == NULL) { in L2CA_DisconnectReq()
898 l2c_csm_execute(p_ccb, L2CEVT_L2CA_DISCONNECT_REQ, NULL); in L2CA_DisconnectReq()
1026 tL2C_CCB* p_ccb; in L2CA_SetTxPriority() local
1032 p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in L2CA_SetTxPriority()
1033 if (p_ccb == NULL) { in L2CA_SetTxPriority()
1040 l2cu_change_pri_ccb(p_ccb, priority); in L2CA_SetTxPriority()
1374 tL2C_CCB* p_ccb; in L2CA_RemoveFixedChnl() local
1404 p_ccb = p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]; in L2CA_RemoveFixedChnl()
1418 l2cu_release_ccb(p_ccb); in L2CA_RemoveFixedChnl()
1511 tL2C_CCB* p_ccb; in L2CA_SetChnlFlushability() local
1514 p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in L2CA_SetChnlFlushability()
1515 if (p_ccb == NULL) { in L2CA_SetChnlFlushability()
1521 p_ccb->is_flushable = is_flushable; in L2CA_SetChnlFlushability()
1548 tL2C_CCB* p_ccb; in L2CA_FlushChannel() local
1552 p_ccb = l2cu_find_ccb_by_cid(NULL, lcid); in L2CA_FlushChannel()
1554 if (!p_ccb || (p_ccb->p_lcb == NULL)) { in L2CA_FlushChannel()
1559 p_lcb = p_ccb->p_lcb; in L2CA_FlushChannel()
1565 lcid, num_to_flush, fixed_queue_length(p_ccb->xmit_hold_q), in L2CA_FlushChannel()
1566 fixed_queue_try_peek_first(p_ccb->xmit_hold_q)); in L2CA_FlushChannel()
1572 if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_ERTM_MODE) { in L2CA_FlushChannel()
1601 while ((num_to_flush != 0) && (!fixed_queue_is_empty(p_ccb->xmit_hold_q))) { in L2CA_FlushChannel()
1602 BT_HDR* p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->xmit_hold_q); in L2CA_FlushChannel()
1609 if ((p_ccb->p_rcb) && (p_ccb->p_rcb->api.pL2CA_TxComplete_Cb) && in L2CA_FlushChannel()
1611 (*p_ccb->p_rcb->api.pL2CA_TxComplete_Cb)(p_ccb->local_cid, num_flushed2); in L2CA_FlushChannel()
1621 num_left += fixed_queue_length(p_ccb->xmit_hold_q); in L2CA_FlushChannel()
1628 l2cu_check_channel_congestion(p_ccb); in L2CA_FlushChannel()