Home
last modified time | relevance | path

Searched refs:p_lcb (Results 1 – 22 of 22) sorted by relevance

/system/bt/stack/l2cap/
Dl2c_link.cc45 static bool l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
59 tL2C_LCB* p_lcb; in l2c_link_hci_conn_req() local
65 p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
68 if (!p_lcb) { in l2c_link_hci_conn_req()
69 p_lcb = l2cu_allocate_lcb(bd_addr, false, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
70 if (!p_lcb) { in l2c_link_hci_conn_req()
81 if (p_lcb_cur == p_lcb) continue; in l2c_link_hci_conn_req()
85 p_lcb->link_role = HCI_ROLE_MASTER; in l2c_link_hci_conn_req()
92 p_lcb->link_role = HCI_ROLE_SLAVE; in l2c_link_hci_conn_req()
94 p_lcb->link_role = l2cu_get_conn_role(p_lcb); in l2c_link_hci_conn_req()
[all …]
Dl2c_ble.cc45 static void l2cble_start_conn_update(tL2C_LCB* p_lcb);
59 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_CancelBleConnectReq() local
63 if (p_lcb != NULL && p_lcb->link_state == LST_CONNECTING) { in L2CA_CancelBleConnectReq()
73 if (p_lcb != NULL && in L2CA_CancelBleConnectReq()
74 !(p_lcb->link_role == HCI_ROLE_SLAVE && in L2CA_CancelBleConnectReq()
76 p_lcb->disc_reason = L2CAP_CONN_CANCEL; in L2CA_CancelBleConnectReq()
77 l2cu_release_lcb(p_lcb); in L2CA_CancelBleConnectReq()
97 tL2C_LCB* p_lcb; in L2CA_UpdateBleConnParams() local
101 p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_UpdateBleConnParams()
104 if (!p_lcb || !p_acl_cb) { in L2CA_UpdateBleConnParams()
[all …]
Dl2c_utils.cc71 tL2C_LCB* p_lcb = &l2cb.lcb_pool[0]; in l2cu_allocate_lcb() local
73 for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++) { in l2cu_allocate_lcb()
74 if (!p_lcb->in_use) { in l2cu_allocate_lcb()
75 alarm_free(p_lcb->l2c_lcb_timer); in l2cu_allocate_lcb()
76 alarm_free(p_lcb->info_resp_timer); in l2cu_allocate_lcb()
77 memset(p_lcb, 0, sizeof(tL2C_LCB)); in l2cu_allocate_lcb()
79 p_lcb->remote_bd_addr = p_bd_addr; in l2cu_allocate_lcb()
81 p_lcb->in_use = true; in l2cu_allocate_lcb()
82 p_lcb->link_state = LST_DISCONNECTED; in l2cu_allocate_lcb()
83 p_lcb->handle = HCI_INVALID_HANDLE; in l2cu_allocate_lcb()
[all …]
Dl2c_api.cc128 tL2C_LCB* p_lcb; in L2CA_Deregister() local
135 p_lcb = &l2cb.lcb_pool[0]; in L2CA_Deregister()
136 for (ii = 0; ii < MAX_L2CAP_LINKS; ii++, p_lcb++) { in L2CA_Deregister()
137 if (p_lcb->in_use) { in L2CA_Deregister()
138 p_ccb = p_lcb->ccb_queue.p_first_ccb; in L2CA_Deregister()
139 if ((p_ccb == NULL) || (p_lcb->link_state == LST_DISCONNECTING)) { in L2CA_Deregister()
321 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_BR_EDR); in L2CA_ErtmConnectReq() local
322 if (p_lcb == nullptr) { in L2CA_ErtmConnectReq()
324 p_lcb = l2cu_allocate_lcb(p_bd_addr, false, BT_TRANSPORT_BR_EDR); in L2CA_ErtmConnectReq()
326 if ((p_lcb == nullptr) || (!l2cu_create_conn_br_edr(p_lcb))) { in L2CA_ErtmConnectReq()
[all …]
Dl2c_main.cc47 static void process_l2cap_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len);
95 tL2C_LCB* p_lcb = l2cu_find_lcb_by_handle(handle); in l2c_rcv_acl_data() local
96 if (!p_lcb) { in l2c_rcv_acl_data()
140 if (p_lcb && p_lcb->transport == BT_TRANSPORT_LE && in l2c_rcv_acl_data()
141 p_lcb->link_state != LST_DISCONNECTING) { in l2c_rcv_acl_data()
144 l2cble_notify_le_connection(p_lcb->remote_bd_addr); in l2c_rcv_acl_data()
150 p_ccb = l2cu_find_ccb_by_cid(p_lcb, rcv_cid); in l2c_rcv_acl_data()
170 process_l2cap_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
182 l2cble_process_sig_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
194 if (!p_lcb || p_lcb->link_state == LST_DISCONNECTING || in l2c_rcv_acl_data()
[all …]
Dl2c_csm.cc158 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in l2c_csm_closed()
160 l2ble_sec_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
164 btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, in l2c_csm_closed()
165 p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, true, in l2c_csm_closed()
173 !btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr)) { in l2c_csm_closed()
183 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in l2c_csm_closed()
185 l2ble_sec_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
193 BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, in l2c_csm_closed()
198 if (btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, in l2c_csm_closed()
199 p_ccb->p_rcb->psm, p_ccb->p_lcb->handle, in l2c_csm_closed()
[all …]
Dl2c_int.h285 struct t_l2c_linkcb* p_lcb; /* Link this CCB is assigned to */ member
593 extern void l2cu_release_lcb(tL2C_LCB* p_lcb);
608 extern tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid);
610 extern tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* p_lcb, uint16_t local_cid);
611 extern tL2C_CCB* l2cu_find_ccb_by_remote_cid(tL2C_LCB* p_lcb,
613 extern void l2cu_adj_id(tL2C_LCB* p_lcb, uint8_t adj_mask);
614 extern bool l2c_is_cmd_rejected(uint8_t cmd_code, uint8_t id, tL2C_LCB* p_lcb);
616 extern void l2cu_send_peer_cmd_reject(tL2C_LCB* p_lcb, uint16_t reason,
626 extern void l2cu_send_peer_disc_rsp(tL2C_LCB* p_lcb, uint8_t remote_id,
628 extern void l2cu_send_peer_echo_req(tL2C_LCB* p_lcb, uint8_t* p_data,
[all …]
Dl2c_fcr.cc388 if ((p_ccb->p_lcb->sent_not_acked < 2) && in l2c_fcr_is_flow_controlled()
584 l2c_link_check_send_pkts(p_ccb->p_lcb, NULL, p_buf); in l2c_fcr_send_S_frame()
809 l2c_link_check_send_pkts(p_ccb->p_lcb, NULL, NULL); in l2c_fcr_proc_pdu()
1537 p_ccb->p_lcb->remote_bd_addr, p_buf); in do_sar_reassembly()
1616 for (list_node_t* node_tmp = list_begin(p_ccb->p_lcb->link_xmit_data_q); in retransmit_i_frames()
1617 node_tmp != list_end(p_ccb->p_lcb->link_xmit_data_q);) { in retransmit_i_frames()
1623 list_remove(p_ccb->p_lcb->link_xmit_data_q, p_tmp); in retransmit_i_frames()
1651 l2c_link_check_send_pkts(p_ccb->p_lcb, NULL, NULL); in retransmit_i_frames()
1910 if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_ENH_RETRANS)) in l2c_fcr_chk_chan_modes()
1913 if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_STREAM_MODE)) in l2c_fcr_chk_chan_modes()
[all …]
/system/bt/stack/avct/
Davct_l2c.cc74 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()
[all …]
Davct_lcb_act.cc51 static BT_HDR* avct_lcb_msg_asmbl(tAVCT_LCB* p_lcb, BT_HDR* p_buf) { in avct_lcb_msg_asmbl() argument
75 if (p_lcb->p_rx_msg != NULL) in avct_lcb_msg_asmbl()
78 osi_free_and_reset((void**)&p_lcb->p_rx_msg); in avct_lcb_msg_asmbl()
85 if (p_lcb->p_rx_msg != NULL) in avct_lcb_msg_asmbl()
88 osi_free(p_lcb->p_rx_msg); in avct_lcb_msg_asmbl()
95 p_lcb->p_rx_msg = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE); in avct_lcb_msg_asmbl()
96 memcpy(p_lcb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avct_lcb_msg_asmbl()
102 p = (uint8_t*)(p_lcb->p_rx_msg + 1) + p_lcb->p_rx_msg->offset; in avct_lcb_msg_asmbl()
108 p_lcb->p_rx_msg->offset += p_lcb->p_rx_msg->len; in avct_lcb_msg_asmbl()
111 p_lcb->p_rx_msg->len -= 1; in avct_lcb_msg_asmbl()
[all …]
Davct_l2c_br.cc121 tAVCT_LCB* p_lcb; in avct_l2c_br_connect_ind_cback() local
130 p_lcb = avct_lcb_by_bd(bd_addr); in avct_l2c_br_connect_ind_cback()
131 if (p_lcb != NULL) { in avct_l2c_br_connect_ind_cback()
133 p_bcb = avct_bcb_by_lcb(p_lcb); in avct_l2c_br_connect_ind_cback()
140 p_bcb->allocated = p_lcb->allocated; /* copy the index from lcb */ in avct_l2c_br_connect_ind_cback()
186 tAVCT_BCB* p_lcb; in avct_l2c_br_connect_cfm_cback() local
190 p_lcb = avct_bcb_by_lcid(lcid); in avct_l2c_br_connect_cfm_cback()
191 if ((p_lcb == NULL) || (p_lcb->ch_state != AVCT_CH_CONN)) return; in avct_l2c_br_connect_cfm_cback()
197 avct_bcb_event(p_lcb, AVCT_LCB_LL_CLOSE_EVT, &avct_lcb_evt); in avct_l2c_br_connect_cfm_cback()
203 p_lcb->ch_state = AVCT_CH_CFG; in avct_l2c_br_connect_cfm_cback()
[all …]
Davct_lcb.cc164 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()
[all …]
Davct_int.h108 tAVCT_LCB* p_lcb; /* Associated LCB */ member
147 extern void avct_lcb_event(tAVCT_LCB* p_lcb, uint8_t event,
151 extern void avct_close_bcb(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
153 extern tAVCT_BCB* avct_bcb_by_lcb(tAVCT_LCB* p_lcb);
159 extern void avct_lcb_dealloc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
161 extern tAVCT_CCB* avct_lcb_has_pid(tAVCT_LCB* p_lcb, uint16_t pid);
162 extern bool avct_lcb_last_ccb(tAVCT_LCB* p_lcb, tAVCT_CCB* p_ccb_last);
165 extern void avct_lcb_chnl_open(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
166 extern void avct_lcb_unbind_disc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
167 extern void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
[all …]
Davct_api.cc138 tAVCT_LCB* p_lcb; in AVCT_CreateConn() local
153 p_lcb = avct_lcb_by_bd(peer_addr); in AVCT_CreateConn()
154 if (p_lcb == NULL) { in AVCT_CreateConn()
155 p_lcb = avct_lcb_alloc(peer_addr); in AVCT_CreateConn()
156 if (p_lcb == NULL) { in AVCT_CreateConn()
163 else if (avct_lcb_has_pid(p_lcb, p_cc->pid)) { in AVCT_CreateConn()
170 p_ccb->p_lcb = p_lcb; in AVCT_CreateConn()
171 AVCT_TRACE_DEBUG("ch_state: %d", p_lcb->ch_state); in AVCT_CreateConn()
174 avct_lcb_event(p_lcb, AVCT_LCB_UL_BIND_EVT, &avct_lcb_evt); in AVCT_CreateConn()
206 else if (p_ccb->p_lcb == NULL) { in AVCT_RemoveConn()
[all …]
Davct_bcb_act.cc103 tAVCT_LCB* p_lcb = avct_lcb_by_bcb(p_bcb); in avct_bcb_chnl_open() local
106 BTM_SetOutService(p_lcb->peer_addr, BTM_SEC_SERVICE_AVCTP_BROWSE, 0); in avct_bcb_chnl_open()
119 L2CA_ErtmConnectReq(AVCT_BR_PSM, p_lcb->peer_addr, &ertm_info); in avct_bcb_chnl_open()
172 0, &p_ccb->p_lcb->peer_addr); in avct_bcb_open_ind()
177 (p_ccb->p_lcb != NULL) && in avct_bcb_open_ind()
178 p_bcb->peer_addr == p_ccb->p_lcb->peer_addr) { in avct_bcb_open_ind()
184 0, &p_ccb->p_lcb->peer_addr); in avct_bcb_open_ind()
246 tAVCT_LCB* p_lcb = avct_lcb_by_bcb(p_bcb); in avct_bcb_close_ind() local
253 &p_lcb->peer_addr); in avct_bcb_close_ind()
294 if (p_ccb->p_lcb == NULL) avct_ccb_dealloc(p_ccb, AVCT_NO_EVT, 0, NULL); in avct_bcb_close_cfm()
[all …]
Davct_ccb.cc87 p_ccb->p_lcb = NULL; in avct_ccb_dealloc()
/system/bt/bta/av/
Dbta_av_act.cc458 tBTA_AV_LCB* p_lcb = NULL; in bta_av_find_lcb() local
465 p_lcb = &p_cb->lcb[xx]; in bta_av_find_lcb()
473 return p_lcb; in bta_av_find_lcb()
490 tBTA_AV_LCB* p_lcb; in bta_av_rc_opened() local
550 p_lcb = &p_cb->lcb[BTA_AV_NUM_LINKS]; in bta_av_rc_opened()
551 p_lcb->addr = p_data->rc_conn_chg.peer_addr; in bta_av_rc_opened()
552 p_lcb->lidx = BTA_AV_NUM_LINKS + 1; in bta_av_rc_opened()
553 p_cb->rcb[i].lidx = p_lcb->lidx; in bta_av_rc_opened()
554 p_lcb->conn_msk = 1; in bta_av_rc_opened()
556 __func__, p_lcb->addr.ToString().c_str(), i, in bta_av_rc_opened()
[all …]
/system/bt/stack/btm/
Dbtm_pm.cc756 tL2C_LCB* p_lcb; in btm_pm_proc_mode_change() local
773 p_lcb = l2cu_find_lcb_by_bd_addr(p->remote_addr, BT_TRANSPORT_BR_EDR); in btm_pm_proc_mode_change()
774 if (p_lcb != NULL) { in btm_pm_proc_mode_change()
780 l2c_link_check_send_pkts(p_lcb, NULL, NULL); in btm_pm_proc_mode_change()
Dbtm_acl.cc824 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bda, BT_TRANSPORT_LE); in btm_use_preferred_conn_params() local
835 ((p_lcb->min_interval < p_dev_rec->conn_params.min_conn_int && in btm_use_preferred_conn_params()
837 (p_lcb->min_interval > p_dev_rec->conn_params.max_conn_int) || in btm_use_preferred_conn_params()
838 (p_lcb->latency > p_dev_rec->conn_params.slave_latency) || in btm_use_preferred_conn_params()
839 (p_lcb->timeout > p_dev_rec->conn_params.supervision_tout))) { in btm_use_preferred_conn_params()
843 __func__, p_lcb->handle, p_dev_rec->conn_params.min_conn_int, in btm_use_preferred_conn_params()
848 p_lcb->min_interval = p_dev_rec->conn_params.min_conn_int; in btm_use_preferred_conn_params()
849 p_lcb->max_interval = p_dev_rec->conn_params.max_conn_int; in btm_use_preferred_conn_params()
850 p_lcb->timeout = p_dev_rec->conn_params.supervision_tout; in btm_use_preferred_conn_params()
851 p_lcb->latency = p_dev_rec->conn_params.slave_latency; in btm_use_preferred_conn_params()
[all …]
Dbtm_sec.cc2785 tL2C_LCB* p_lcb = in btm_sec_dd_create_conn() local
2787 if (p_lcb && (p_lcb->link_state == LST_CONNECTED || in btm_sec_dd_create_conn()
2788 p_lcb->link_state == LST_CONNECTING)) { in btm_sec_dd_create_conn()
2795 if (!p_lcb && (p_lcb = l2cu_allocate_lcb(p_dev_rec->bd_addr, true, in btm_sec_dd_create_conn()
2806 if (!l2cu_create_conn_br_edr(p_lcb)) { in btm_sec_dd_create_conn()
2810 l2cu_release_lcb(p_lcb); in btm_sec_dd_create_conn()
Dbtm_ble.cc1125 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_LE); in btm_ble_start_sec_check() local
1126 p_lcb->sec_act = sec_act; in btm_ble_start_sec_check()
/system/bt/hci/src/
Dbtsnoop.cc306 filter_list[p_ccb->p_lcb->handle].addRfcDlci(dlci); in whitelist_rfc_dlci()