Lines Matching refs:p_ccb
148 tL2C_CCB* p_ccb = NULL; in l2c_rcv_acl_data() local
150 p_ccb = l2cu_find_ccb_by_cid(p_lcb, rcv_cid); in l2c_rcv_acl_data()
151 if (!p_ccb) { in l2c_rcv_acl_data()
204 p_ccb = p_lcb->p_fixed_ccbs[rcv_cid - L2CAP_FIRST_FIXED_CHNL]; in l2c_rcv_acl_data()
206 if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_BASIC_MODE) in l2c_rcv_acl_data()
207 l2c_fcr_proc_pdu(p_ccb, p_msg); in l2c_rcv_acl_data()
215 if (!p_ccb) { in l2c_rcv_acl_data()
221 l2c_lcc_proc_pdu(p_ccb, p_msg); in l2c_rcv_acl_data()
224 --p_ccb->remote_credit_count; in l2c_rcv_acl_data()
227 if (p_ccb->remote_credit_count <= L2CAP_LE_CREDIT_THRESHOLD) { in l2c_rcv_acl_data()
228 uint16_t credits = L2CAP_LE_CREDIT_DEFAULT - p_ccb->remote_credit_count; in l2c_rcv_acl_data()
229 p_ccb->remote_credit_count = L2CAP_LE_CREDIT_DEFAULT; in l2c_rcv_acl_data()
232 l2c_csm_execute(p_ccb, L2CEVT_L2CA_SEND_FLOW_CONTROL_CREDIT, &credits); in l2c_rcv_acl_data()
236 if (p_ccb->peer_cfg.fcr.mode == L2CAP_FCR_BASIC_MODE) in l2c_rcv_acl_data()
237 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_DATA, p_msg); in l2c_rcv_acl_data()
240 if ((p_ccb->chnl_state == CST_OPEN) || (p_ccb->chnl_state == CST_CONFIG)) in l2c_rcv_acl_data()
241 l2c_fcr_proc_pdu(p_ccb, p_msg); in l2c_rcv_acl_data()
345 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
346 if ((p_ccb != NULL) && (p_ccb->remote_cid == rcid)) { in process_l2cap_cmd()
348 l2c_csm_execute(p_ccb, L2CEVT_LP_DISCONNECT_IND, NULL); in process_l2cap_cmd()
363 for (tL2C_CCB* p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; in process_l2cap_cmd() local
364 p_ccb = p_ccb->p_next_ccb) { in process_l2cap_cmd()
365 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_INFO_RSP, &ci); in process_l2cap_cmd()
390 tL2C_CCB* p_ccb = l2cu_allocate_ccb(p_lcb, 0); in process_l2cap_cmd() local
391 if (!p_ccb) { in process_l2cap_cmd()
396 p_ccb->remote_id = id; in process_l2cap_cmd()
397 p_ccb->p_rcb = p_rcb; in process_l2cap_cmd()
398 p_ccb->remote_cid = rcid; in process_l2cap_cmd()
402 p_lcb->handle, p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
405 p_lcb->handle, p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
408 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_REQ, &con_info); in process_l2cap_cmd()
420 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
421 if (!p_ccb) { in process_l2cap_cmd()
426 if (p_ccb->local_id != id) { in process_l2cap_cmd()
428 p_ccb->local_id, id); in process_l2cap_cmd()
433 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_RSP, &con_info); in process_l2cap_cmd()
435 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_RSP_PND, &con_info); in process_l2cap_cmd()
437 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_RSP_NEG, &con_info); in process_l2cap_cmd()
439 tL2C_RCB* p_rcb = p_ccb->p_rcb; in process_l2cap_cmd()
442 p_lcb->handle, p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
445 p_lcb->handle, p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
587 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
588 if (p_ccb) { in process_l2cap_cmd()
589 p_ccb->remote_id = id; in process_l2cap_cmd()
592 p_ccb, p_cfg_start, (uint16_t)(cmd_len - L2CAP_CONFIG_REQ_LEN), in process_l2cap_cmd()
595 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONFIG_REQ, &cfg_info); in process_l2cap_cmd()
677 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
678 if (p_ccb) { in process_l2cap_cmd()
679 if (p_ccb->local_id != id) { in process_l2cap_cmd()
681 p_ccb->local_id, id); in process_l2cap_cmd()
686 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONFIG_RSP, &cfg_info); in process_l2cap_cmd()
688 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONFIG_RSP_NEG, &cfg_info); in process_l2cap_cmd()
702 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
703 if (p_ccb) { in process_l2cap_cmd()
704 if (p_ccb->remote_cid == rcid) { in process_l2cap_cmd()
705 p_ccb->remote_id = id; in process_l2cap_cmd()
706 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_DISCONNECT_REQ, &con_info); in process_l2cap_cmd()
720 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
721 if (p_ccb) { in process_l2cap_cmd()
722 if ((p_ccb->remote_cid == rcid) && (p_ccb->local_id == id)) { in process_l2cap_cmd()
723 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_DISCONNECT_RSP, &con_info); in process_l2cap_cmd()
797 for (tL2C_CCB* p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; in process_l2cap_cmd() local
798 p_ccb = p_ccb->p_next_ccb) { in process_l2cap_cmd()
799 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_INFO_RSP, &ci); in process_l2cap_cmd()
931 tL2C_CCB* p_ccb = (tL2C_CCB*)data; in l2c_ccb_timer_timeout() local
933 l2c_csm_execute(p_ccb, L2CEVT_TIMEOUT, NULL); in l2c_ccb_timer_timeout()
937 tL2C_CCB* p_ccb = (tL2C_CCB*)data; in l2c_fcrb_ack_timer_timeout() local
939 l2c_csm_execute(p_ccb, L2CEVT_ACK_TIMEOUT, NULL); in l2c_fcrb_ack_timer_timeout()
963 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in l2c_data_write() local
964 if (!p_ccb) { in l2c_data_write()
975 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) in l2c_data_write()
976 mtu = p_ccb->peer_conn_cfg.mtu; in l2c_data_write()
978 mtu = p_ccb->peer_cfg.mtu; in l2c_data_write()
994 if (p_ccb->cong_sent) { in l2c_data_write()
998 p_ccb->local_cid, fixed_queue_length(p_ccb->xmit_hold_q), in l2c_data_write()
999 p_ccb->buff_quota); in l2c_data_write()
1005 l2c_csm_execute(p_ccb, L2CEVT_L2CA_DATA_WRITE, p_data); in l2c_data_write()
1007 if (p_ccb->cong_sent) return (L2CAP_DW_CONGESTED); in l2c_data_write()