Lines Matching refs:p_ccb
149 tL2C_CCB* p_ccb = NULL; in l2c_rcv_acl_data() local
151 p_ccb = l2cu_find_ccb_by_cid(p_lcb, rcv_cid); in l2c_rcv_acl_data()
152 if (!p_ccb) { in l2c_rcv_acl_data()
201 p_ccb = p_lcb->p_fixed_ccbs[rcv_cid - L2CAP_FIRST_FIXED_CHNL]; in l2c_rcv_acl_data()
202 p_ccb->metrics.rx(p_msg->len); in l2c_rcv_acl_data()
204 if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_BASIC_MODE) in l2c_rcv_acl_data()
205 l2c_fcr_proc_pdu(p_ccb, p_msg); in l2c_rcv_acl_data()
212 if (!p_ccb) { in l2c_rcv_acl_data()
218 l2c_lcc_proc_pdu(p_ccb, p_msg); in l2c_rcv_acl_data()
221 --p_ccb->remote_credit_count; in l2c_rcv_acl_data()
224 if (p_ccb->remote_credit_count <= L2CAP_LE_CREDIT_THRESHOLD) { in l2c_rcv_acl_data()
225 uint16_t credits = L2CAP_LE_CREDIT_DEFAULT - p_ccb->remote_credit_count; in l2c_rcv_acl_data()
226 p_ccb->remote_credit_count = L2CAP_LE_CREDIT_DEFAULT; in l2c_rcv_acl_data()
229 l2c_csm_execute(p_ccb, L2CEVT_L2CA_SEND_FLOW_CONTROL_CREDIT, &credits); in l2c_rcv_acl_data()
233 if (p_ccb->peer_cfg.fcr.mode == L2CAP_FCR_BASIC_MODE) in l2c_rcv_acl_data()
234 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_DATA, p_msg); in l2c_rcv_acl_data()
237 if ((p_ccb->chnl_state == CST_OPEN) || (p_ccb->chnl_state == CST_CONFIG)) in l2c_rcv_acl_data()
238 l2c_fcr_proc_pdu(p_ccb, p_msg); in l2c_rcv_acl_data()
357 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
358 if ((p_ccb != NULL) && (p_ccb->remote_cid == rcid)) { in process_l2cap_cmd()
361 l2c_csm_execute(p_ccb, L2CEVT_LP_DISCONNECT_IND, NULL); in process_l2cap_cmd()
376 for (tL2C_CCB* p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; in process_l2cap_cmd() local
377 p_ccb = p_ccb->p_next_ccb) { in process_l2cap_cmd()
378 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_INFO_RSP, &ci); in process_l2cap_cmd()
404 tL2C_CCB* p_ccb = l2cu_allocate_ccb(p_lcb, 0); in process_l2cap_cmd() local
405 if (p_ccb == nullptr) { in process_l2cap_cmd()
410 p_ccb->remote_id = id; in process_l2cap_cmd()
411 p_ccb->p_rcb = p_rcb; in process_l2cap_cmd()
412 p_ccb->remote_cid = rcid; in process_l2cap_cmd()
413 p_ccb->connection_initiator = L2CAP_INITIATOR_REMOTE; in process_l2cap_cmd()
417 p_lcb->Handle(), p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
420 p_lcb->Handle(), p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
423 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_REQ, &con_info); in process_l2cap_cmd()
438 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
439 if (!p_ccb) { in process_l2cap_cmd()
444 if (p_ccb->local_id != id) { in process_l2cap_cmd()
445 LOG_WARN("con rsp - bad ID. Exp: %d Got: %d", p_ccb->local_id, id); in process_l2cap_cmd()
450 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_RSP, &con_info); in process_l2cap_cmd()
452 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_RSP_PND, &con_info); in process_l2cap_cmd()
454 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONNECT_RSP_NEG, &con_info); in process_l2cap_cmd()
456 tL2C_RCB* p_rcb = p_ccb->p_rcb; in process_l2cap_cmd()
459 p_lcb->Handle(), p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
462 p_lcb->Handle(), p_ccb->local_cid, p_ccb->remote_cid); in process_l2cap_cmd()
610 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
611 if (p_ccb) { in process_l2cap_cmd()
612 p_ccb->remote_id = id; in process_l2cap_cmd()
615 p_ccb, p_cfg_start, (uint16_t)(cmd_len - L2CAP_CONFIG_REQ_LEN), in process_l2cap_cmd()
618 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONFIG_REQ, &cfg_info); in process_l2cap_cmd()
724 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
725 if (p_ccb) { in process_l2cap_cmd()
726 if (p_ccb->local_id != id) { in process_l2cap_cmd()
727 LOG_WARN("cfg rsp - bad ID. Exp: %d Got: %d", p_ccb->local_id, id); in process_l2cap_cmd()
731 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONFIG_RSP, &cfg_info); in process_l2cap_cmd()
733 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_CONFIG_RSP_NEG, &cfg_info); in process_l2cap_cmd()
750 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
751 if (p_ccb) { in process_l2cap_cmd()
752 if (p_ccb->remote_cid == rcid) { in process_l2cap_cmd()
753 p_ccb->remote_id = id; in process_l2cap_cmd()
754 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_DISCONNECT_REQ, &con_info); in process_l2cap_cmd()
771 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(p_lcb, lcid); in process_l2cap_cmd() local
772 if (p_ccb) { in process_l2cap_cmd()
773 if ((p_ccb->remote_cid == rcid) && (p_ccb->local_id == id)) { in process_l2cap_cmd()
774 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_DISCONNECT_RSP, &con_info); in process_l2cap_cmd()
841 for (tL2C_CCB* p_ccb = p_lcb->ccb_queue.p_first_ccb; p_ccb; in process_l2cap_cmd() local
842 p_ccb = p_ccb->p_next_ccb) { in process_l2cap_cmd()
843 l2c_csm_execute(p_ccb, L2CEVT_L2CAP_INFO_RSP, &ci); in process_l2cap_cmd()
973 tL2C_CCB* p_ccb = (tL2C_CCB*)data; in l2c_ccb_timer_timeout() local
975 l2c_csm_execute(p_ccb, L2CEVT_TIMEOUT, NULL); in l2c_ccb_timer_timeout()
979 tL2C_CCB* p_ccb = (tL2C_CCB*)data; in l2c_fcrb_ack_timer_timeout() local
981 l2c_csm_execute(p_ccb, L2CEVT_ACK_TIMEOUT, NULL); in l2c_fcrb_ack_timer_timeout()
1004 tL2C_CCB* p_ccb = l2cu_find_ccb_by_cid(NULL, cid); in l2c_data_write() local
1005 if (!p_ccb) { in l2c_data_write()
1014 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) in l2c_data_write()
1015 mtu = p_ccb->peer_conn_cfg.mtu; in l2c_data_write()
1017 mtu = p_ccb->peer_cfg.mtu; in l2c_data_write()
1032 if (p_ccb->cong_sent) { in l2c_data_write()
1036 p_ccb->local_cid, fixed_queue_length(p_ccb->xmit_hold_q), in l2c_data_write()
1037 p_ccb->buff_quota); in l2c_data_write()
1043 l2c_csm_execute(p_ccb, L2CEVT_L2CA_DATA_WRITE, p_data); in l2c_data_write()
1045 if (p_ccb->cong_sent) return (L2CAP_DW_CONGESTED); in l2c_data_write()