Home
last modified time | relevance | path

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

/system/bt/stack/l2cap/
Dl2c_link.cc56 static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf);
57 static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb);
68 tL2C_LCB* p_lcb; in l2c_link_hci_conn_req() local
74 p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
77 if (!p_lcb) { in l2c_link_hci_conn_req()
78 p_lcb = l2cu_allocate_lcb(bd_addr, false, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
79 if (!p_lcb) { in l2c_link_hci_conn_req()
90 if (p_lcb_cur == p_lcb) continue; in l2c_link_hci_conn_req()
94 p_lcb->SetLinkRoleAsCentral(); in l2c_link_hci_conn_req()
101 p_lcb->SetLinkRoleAsPeripheral(); in l2c_link_hci_conn_req()
[all …]
Dl2c_ble.cc55 static void l2cble_start_conn_update(tL2C_LCB* p_lcb);
81 tL2C_LCB* p_lcb; in L2CA_UpdateBleConnParams() local
84 p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_UpdateBleConnParams()
87 if (!p_lcb || !BTM_IsAclConnectionUp(rem_bda, BT_TRANSPORT_LE)) { in L2CA_UpdateBleConnParams()
92 if (p_lcb->transport != BT_TRANSPORT_LE) { in L2CA_UpdateBleConnParams()
101 p_lcb->min_interval = min_int; in L2CA_UpdateBleConnParams()
102 p_lcb->max_interval = max_int; in L2CA_UpdateBleConnParams()
103 p_lcb->latency = latency; in L2CA_UpdateBleConnParams()
104 p_lcb->timeout = timeout; in L2CA_UpdateBleConnParams()
105 p_lcb->conn_update_mask |= L2C_BLE_NEW_CONN_PARAM; in L2CA_UpdateBleConnParams()
[all …]
Dl2c_utils.cc45 tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb); // TODO Move
59 tL2C_LCB* p_lcb = &l2cb.lcb_pool[0]; in l2cu_allocate_lcb() local
61 for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++) { in l2cu_allocate_lcb()
62 if (!p_lcb->in_use) { in l2cu_allocate_lcb()
63 alarm_free(p_lcb->l2c_lcb_timer); in l2cu_allocate_lcb()
64 alarm_free(p_lcb->info_resp_timer); in l2cu_allocate_lcb()
65 memset(p_lcb, 0, sizeof(tL2C_LCB)); in l2cu_allocate_lcb()
67 p_lcb->remote_bd_addr = p_bd_addr; in l2cu_allocate_lcb()
69 p_lcb->in_use = true; in l2cu_allocate_lcb()
70 p_lcb->link_state = LST_DISCONNECTED; in l2cu_allocate_lcb()
[all …]
Dl2c_api.cc165 tL2C_LCB* p_lcb; in L2CA_Deregister() local
172 p_lcb = &l2cb.lcb_pool[0]; in L2CA_Deregister()
173 for (ii = 0; ii < MAX_L2CAP_LINKS; ii++, p_lcb++) { in L2CA_Deregister()
174 if (p_lcb->in_use) { in L2CA_Deregister()
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()
316 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_BR_EDR); in L2CA_ConnectReq() local
317 if (p_lcb == nullptr) { in L2CA_ConnectReq()
319 p_lcb = l2cu_allocate_lcb(p_bd_addr, false, BT_TRANSPORT_BR_EDR); in L2CA_ConnectReq()
321 if (p_lcb == nullptr) { in L2CA_ConnectReq()
[all …]
Dl2c_main.cc43 static void process_l2cap_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len);
91 tL2C_LCB* p_lcb = l2cu_find_lcb_by_handle(handle); in l2c_rcv_acl_data() local
92 if (!p_lcb) { in l2c_rcv_acl_data()
141 if (p_lcb && p_lcb->transport == BT_TRANSPORT_LE && in l2c_rcv_acl_data()
142 p_lcb->link_state != LST_DISCONNECTING) { in l2c_rcv_acl_data()
145 l2cble_notify_le_connection(p_lcb->remote_bd_addr); in l2c_rcv_acl_data()
151 p_ccb = l2cu_find_ccb_by_cid(p_lcb, rcv_cid); in l2c_rcv_acl_data()
171 process_l2cap_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
183 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.cc94 p_ccb->p_lcb->remote_bd_addr, p_ccb->local_cid, p_ccb->p_rcb->psm, in l2c_csm_indicate_connection_open()
97 if (p_ccb->chnl_state == CST_OPEN && !p_ccb->p_lcb->is_transport_ble()) { in l2c_csm_indicate_connection_open()
201 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in l2c_csm_closed()
203 l2ble_sec_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
207 btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, in l2c_csm_closed()
215 btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr); in l2c_csm_closed()
224 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in l2c_csm_closed()
226 l2ble_sec_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
229 if (!BTM_SetLinkPolicyActiveMode(p_ccb->p_lcb->remote_bd_addr)) { in l2c_csm_closed()
235 p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, true, in l2c_csm_closed()
[all …]
Dl2c_int.h300 struct t_l2c_linkcb* p_lcb; /* Link this CCB is assigned to */ member
433 friend void l2cu_set_lcb_handle(struct t_l2c_linkcb& p_lcb, uint16_t handle);
674 extern void l2cu_release_lcb(tL2C_LCB* p_lcb);
687 extern tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid);
689 extern tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* p_lcb, uint16_t local_cid);
690 extern tL2C_CCB* l2cu_find_ccb_by_remote_cid(tL2C_LCB* p_lcb,
692 extern bool l2c_is_cmd_rejected(uint8_t cmd_code, uint8_t id, tL2C_LCB* p_lcb);
694 extern void l2cu_send_peer_cmd_reject(tL2C_LCB* p_lcb, uint16_t reason,
704 extern void l2cu_send_peer_disc_rsp(tL2C_LCB* p_lcb, uint8_t remote_id,
706 extern void l2cu_send_peer_echo_rsp(tL2C_LCB* p_lcb, uint8_t id,
[all …]
Dl2c_fcr.cc452 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2c_fcr_send_S_frame()
663 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, NULL); in l2c_fcr_proc_pdu()
1247 p_ccb->p_lcb->remote_bd_addr, p_buf); in do_sar_reassembly()
1325 for (list_node_t* node_tmp = list_begin(p_ccb->p_lcb->link_xmit_data_q); in retransmit_i_frames()
1326 node_tmp != list_end(p_ccb->p_lcb->link_xmit_data_q);) { in retransmit_i_frames()
1332 list_remove(p_ccb->p_lcb->link_xmit_data_q, p_tmp); in retransmit_i_frames()
1360 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, NULL); in retransmit_i_frames()
1599 if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_ENH_RETRANS) && in l2c_fcr_chk_chan_modes()
1788 p_ccb->p_lcb->w4_info_rsp = in l2c_fcr_process_peer_cfg_req()
/system/bt/stack/avct/
Davct_l2c.cc65 static bool avct_l2c_is_passive(tAVCT_LCB* p_lcb) { in avct_l2c_is_passive() argument
71 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb)) { in avct_l2c_is_passive()
94 tAVCT_LCB* p_lcb; in avct_l2c_connect_ind_cback() local
98 p_lcb = avct_lcb_by_bd(bd_addr); in avct_l2c_connect_ind_cback()
99 if (p_lcb == NULL) { in avct_l2c_connect_ind_cback()
101 p_lcb = avct_lcb_alloc(bd_addr); in avct_l2c_connect_ind_cback()
102 if (p_lcb == NULL) { in avct_l2c_connect_ind_cback()
109 if (!avct_l2c_is_passive(p_lcb) || (p_lcb->ch_state == AVCT_CH_OPEN)) { in avct_l2c_connect_ind_cback()
115 p_lcb->conflict_lcid = p_lcb->ch_lcid; in avct_l2c_connect_ind_cback()
117 p_lcb->conflict_lcid); in avct_l2c_connect_ind_cback()
[all …]
Davct_lcb_act.cc54 static BT_HDR* avct_lcb_msg_asmbl(tAVCT_LCB* p_lcb, BT_HDR* p_buf) { in avct_lcb_msg_asmbl() argument
78 if (p_lcb->p_rx_msg != NULL) in avct_lcb_msg_asmbl()
81 osi_free_and_reset((void**)&p_lcb->p_rx_msg); in avct_lcb_msg_asmbl()
88 if (p_lcb->p_rx_msg != NULL) in avct_lcb_msg_asmbl()
91 osi_free(p_lcb->p_rx_msg); in avct_lcb_msg_asmbl()
98 p_lcb->p_rx_msg = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE); in avct_lcb_msg_asmbl()
99 memcpy(p_lcb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avct_lcb_msg_asmbl()
105 p = (uint8_t*)(p_lcb->p_rx_msg + 1) + p_lcb->p_rx_msg->offset; in avct_lcb_msg_asmbl()
111 p_lcb->p_rx_msg->offset += p_lcb->p_rx_msg->len; in avct_lcb_msg_asmbl()
114 p_lcb->p_rx_msg->len -= 1; in avct_lcb_msg_asmbl()
[all …]
Davct_l2c_br.cc68 tAVCT_LCB* p_lcb; in avct_l2c_br_connect_ind_cback() local
73 p_lcb = avct_lcb_by_bd(bd_addr); in avct_l2c_br_connect_ind_cback()
74 if (p_lcb != NULL) { in avct_l2c_br_connect_ind_cback()
76 p_bcb = avct_bcb_by_lcb(p_lcb); in avct_l2c_br_connect_ind_cback()
83 p_bcb->allocated = p_lcb->allocated; /* copy the index from lcb */ in avct_l2c_br_connect_ind_cback()
109 tAVCT_BCB* p_lcb = avct_bcb_by_lcid(lcid); in avct_br_on_l2cap_error() local
110 if (p_lcb == nullptr) return; in avct_br_on_l2cap_error()
113 p_lcb->ch_result = result; in avct_br_on_l2cap_error()
130 tAVCT_BCB* p_lcb; in avct_l2c_br_connect_cfm_cback() local
133 p_lcb = avct_bcb_by_lcid(lcid); 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.h105 tAVCT_LCB* p_lcb; /* Associated LCB */ member
142 extern void avct_lcb_event(tAVCT_LCB* p_lcb, uint8_t event,
146 extern void avct_close_bcb(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
148 extern tAVCT_BCB* avct_bcb_by_lcb(tAVCT_LCB* p_lcb);
154 extern void avct_lcb_dealloc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
156 extern tAVCT_CCB* avct_lcb_has_pid(tAVCT_LCB* p_lcb, uint16_t pid);
157 extern bool avct_lcb_last_ccb(tAVCT_LCB* p_lcb, tAVCT_CCB* p_ccb_last);
160 extern void avct_lcb_chnl_open(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
161 extern void avct_lcb_unbind_disc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
162 extern void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data);
[all …]
Davct_api.cc123 tAVCT_LCB* p_lcb; in AVCT_CreateConn() local
138 p_lcb = avct_lcb_by_bd(peer_addr); in AVCT_CreateConn()
139 if (p_lcb == NULL) { in AVCT_CreateConn()
140 p_lcb = avct_lcb_alloc(peer_addr); in AVCT_CreateConn()
141 if (p_lcb == NULL) { in AVCT_CreateConn()
148 else if (avct_lcb_has_pid(p_lcb, p_cc->pid)) { in AVCT_CreateConn()
155 p_ccb->p_lcb = p_lcb; in AVCT_CreateConn()
156 AVCT_TRACE_DEBUG("ch_state: %d", p_lcb->ch_state); in AVCT_CreateConn()
159 avct_lcb_event(p_lcb, AVCT_LCB_UL_BIND_EVT, &avct_lcb_evt); in AVCT_CreateConn()
191 else if (p_ccb->p_lcb == NULL) { in AVCT_RemoveConn()
[all …]
Davct_bcb_act.cc107 tAVCT_LCB* p_lcb = avct_lcb_by_bcb(p_bcb); in avct_bcb_chnl_open() local
116 L2CA_ConnectReq2(AVCT_BR_PSM, p_lcb->peer_addr, BTA_SEC_AUTHENTICATE); in avct_bcb_chnl_open()
169 0, &p_ccb->p_lcb->peer_addr); in avct_bcb_open_ind()
174 (p_ccb->p_lcb != NULL) && in avct_bcb_open_ind()
175 p_bcb->peer_addr == p_ccb->p_lcb->peer_addr) { in avct_bcb_open_ind()
181 0, &p_ccb->p_lcb->peer_addr); in avct_bcb_open_ind()
243 tAVCT_LCB* p_lcb = avct_lcb_by_bcb(p_bcb); in avct_bcb_close_ind() local
250 &p_lcb->peer_addr); in avct_bcb_close_ind()
291 if (p_ccb->p_lcb == NULL) avct_ccb_dealloc(p_ccb, AVCT_NO_EVT, 0, NULL); in avct_bcb_close_cfm()
309 tAVCT_LCB* p_lcb = avct_lcb_by_bcb(p_bcb); in avct_bcb_bind_conn() local
[all …]
Davct_ccb.cc87 p_ccb->p_lcb = NULL; in avct_ccb_dealloc()
/system/bt/test/mock/
Dmock_stack_l2cap_utils.cc36 BT_HDR* l2cu_build_header(tL2C_LCB* p_lcb, uint16_t len, uint8_t cmd, in l2cu_build_header() argument
41 bool l2c_is_cmd_rejected(uint8_t cmd_code, uint8_t signal_id, tL2C_LCB* p_lcb) { in l2c_is_cmd_rejected() argument
45 bool l2cu_create_conn_le(tL2C_LCB* p_lcb) { in l2cu_create_conn_le() argument
49 bool l2cu_create_conn_le(tL2C_LCB* p_lcb, uint8_t initiating_phys) { in l2cu_create_conn_le() argument
53 bool l2cu_initialize_fixed_ccb(tL2C_LCB* p_lcb, uint16_t fixed_cid) { in l2cu_initialize_fixed_ccb() argument
74 tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid) { in l2cu_allocate_ccb() argument
78 tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* p_lcb, uint16_t local_cid) { in l2cu_find_ccb_by_cid() argument
82 tL2C_CCB* l2cu_find_ccb_by_remote_cid(tL2C_LCB* p_lcb, uint16_t remote_cid) { in l2cu_find_ccb_by_remote_cid() argument
128 void l2cu_adj_id(tL2C_LCB* p_lcb) { mock_function_count_map[__func__]++; } in l2cu_adj_id() argument
138 void l2cu_create_conn_after_switch(tL2C_LCB* p_lcb) { in l2cu_create_conn_after_switch() argument
[all …]
Dmock_stack_l2cap_ble.h157 std::function<void(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len)> body{
158 [](tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) {}};
159 void operator()(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) { in operator()
160 body(p_lcb, p, pkt_len); in operator()
168 std::function<bool(tL2C_LCB* p_lcb)> body{
169 [](tL2C_LCB* p_lcb) { return false; }};
170 bool operator()(tL2C_LCB* p_lcb) { return body(p_lcb); }; in operator()
209 std::function<void(tL2C_LCB* p_lcb)> body{[](tL2C_LCB* p_lcb) {}};
210 void operator()(tL2C_LCB* p_lcb) { body(p_lcb); }; in operator()
Dmock_stack_l2cap_link.cc29 BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb) { in l2cu_get_next_buffer_to_send() argument
41 tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb) { in l2cu_get_next_channel_in_rr() argument
55 void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, in l2c_link_check_send_pkts() argument
87 void l2c_link_timeout(tL2C_LCB* p_lcb) { mock_function_count_map[__func__]++; } in l2c_link_timeout() argument
Dmock_stack_l2cap_ble.cc124 void l2cble_process_sig_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) { in l2cble_process_sig_cmd() argument
126 test::mock::stack_l2cap_ble::l2cble_process_sig_cmd(p_lcb, p, pkt_len); in l2cble_process_sig_cmd()
128 bool l2cble_create_conn(tL2C_LCB* p_lcb) { in l2cble_create_conn() argument
130 return test::mock::stack_l2cap_ble::l2cble_create_conn(p_lcb); in l2cble_create_conn()
147 void l2cble_update_data_length(tL2C_LCB* p_lcb) { in l2cble_update_data_length() argument
149 test::mock::stack_l2cap_ble::l2cble_update_data_length(p_lcb); in l2cble_update_data_length()
/system/bt/stack/test/common/
Dmock_stack_l2cap_link.cc29 BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb) { in l2cu_get_next_buffer_to_send() argument
41 tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb) { in l2cu_get_next_channel_in_rr() argument
55 void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid, in l2c_link_check_send_pkts() argument
87 void l2c_link_timeout(tL2C_LCB* p_lcb) { mock_function_count_map[__func__]++; } in l2c_link_timeout() argument
/system/bt/bta/av/
Dbta_av_act.cc453 tBTA_AV_LCB* p_lcb = NULL; in bta_av_find_lcb() local
460 p_lcb = &p_cb->lcb[xx]; in bta_av_find_lcb()
468 return p_lcb; in bta_av_find_lcb()
485 tBTA_AV_LCB* p_lcb; in bta_av_rc_opened() local
545 p_lcb = &p_cb->lcb[BTA_AV_NUM_LINKS]; in bta_av_rc_opened()
546 p_lcb->addr = p_data->rc_conn_chg.peer_addr; in bta_av_rc_opened()
547 p_lcb->lidx = BTA_AV_NUM_LINKS + 1; in bta_av_rc_opened()
548 p_cb->rcb[i].lidx = p_lcb->lidx; in bta_av_rc_opened()
549 p_lcb->conn_msk = 1; in bta_av_rc_opened()
551 __func__, p_lcb->addr.ToString().c_str(), i, in bta_av_rc_opened()
[all …]
/system/bt/hci/src/
Dbtsnoop.cc318 filter_list[p_ccb->p_lcb->Handle()].addRfcDlci(dlci); in allowlist_rfc_dlci()