/packages/modules/Bluetooth/system/stack/l2cap/ |
D | l2c_link.cc | 62 static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf, 64 static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, 70 tL2C_LCB* p_lcb; in l2c_link_hci_conn_comp() local 78 p_lcb = l2cu_find_lcb_by_bd_addr(ci.bd_addr, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_comp() 81 if (p_lcb == nullptr) { in l2c_link_hci_conn_comp() 82 p_lcb = l2cu_allocate_lcb(ci.bd_addr, false, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_comp() 83 if (p_lcb == nullptr) { in l2c_link_hci_conn_comp() 88 link_state_text(p_lcb->link_state)); in l2c_link_hci_conn_comp() 89 p_lcb->link_state = LST_CONNECTING; in l2c_link_hci_conn_comp() 92 if ((p_lcb->link_state == LST_CONNECTED) && in l2c_link_hci_conn_comp() [all …]
|
D | l2c_ble_conn_params.cc | 43 void l2cble_start_conn_update(tL2C_LCB* p_lcb); 44 static void l2cble_start_subrate_change(tL2C_LCB* p_lcb); 61 tL2C_LCB* p_lcb; in L2CA_UpdateBleConnParams() local 64 p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_UpdateBleConnParams() 67 if (!p_lcb || !BTM_IsAclConnectionUp(rem_bda, BT_TRANSPORT_LE)) { in L2CA_UpdateBleConnParams() 72 if (p_lcb->transport != BT_TRANSPORT_LE) { in L2CA_UpdateBleConnParams() 81 p_lcb->min_interval = min_int; in L2CA_UpdateBleConnParams() 82 p_lcb->max_interval = max_int; in L2CA_UpdateBleConnParams() 83 p_lcb->latency = latency; in L2CA_UpdateBleConnParams() 84 p_lcb->timeout = timeout; in L2CA_UpdateBleConnParams() [all …]
|
D | l2c_utils.cc | 51 tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb); // TODO Move 65 tL2C_LCB* p_lcb = &l2cb.lcb_pool[0]; in l2cu_allocate_lcb() local 67 for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++) { in l2cu_allocate_lcb() 68 if (!p_lcb->in_use) { in l2cu_allocate_lcb() 69 alarm_free(p_lcb->l2c_lcb_timer); in l2cu_allocate_lcb() 70 alarm_free(p_lcb->info_resp_timer); in l2cu_allocate_lcb() 71 memset(p_lcb, 0, sizeof(tL2C_LCB)); in l2cu_allocate_lcb() 73 p_lcb->remote_bd_addr = p_bd_addr; in l2cu_allocate_lcb() 75 p_lcb->in_use = true; in l2cu_allocate_lcb() 76 p_lcb->with_active_local_clients = false; in l2cu_allocate_lcb() [all …]
|
D | l2c_ble.cc | 71 void l2cble_start_conn_update(tL2C_LCB* p_lcb); 74 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(rpa, BT_TRANSPORT_LE); in L2CA_Consolidate() local 75 if (p_lcb == nullptr) { in L2CA_Consolidate() 80 p_lcb->remote_bd_addr = identity_addr; in L2CA_Consolidate() 84 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_LE); in L2CA_GetBleConnRole() local 85 if (p_lcb == nullptr) { in L2CA_GetBleConnRole() 88 return p_lcb->LinkRole(); in L2CA_GetBleConnRole() 101 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bda, BT_TRANSPORT_LE); in l2cble_notify_le_connection() local 102 if (p_lcb == nullptr) { in l2cble_notify_le_connection() 108 p_lcb->link_state != LST_CONNECTED) { in l2cble_notify_le_connection() [all …]
|
D | l2c_api.cc | 196 tL2C_LCB* p_lcb; in L2CA_Deregister() local 203 p_lcb = &l2cb.lcb_pool[0]; in L2CA_Deregister() 204 for (ii = 0; ii < MAX_L2CAP_LINKS; ii++, p_lcb++) { in L2CA_Deregister() 205 if (p_lcb->in_use) { in L2CA_Deregister() 206 p_ccb = p_lcb->ccb_queue.p_first_ccb; in L2CA_Deregister() 207 if ((p_ccb == NULL) || (p_lcb->link_state == LST_DISCONNECTING)) { in L2CA_Deregister() 333 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_BR_EDR); in L2CA_ConnectReq() local 334 if (p_lcb == nullptr) { in L2CA_ConnectReq() 336 p_lcb = l2cu_allocate_lcb(p_bd_addr, false, BT_TRANSPORT_BR_EDR); in L2CA_ConnectReq() 338 if (p_lcb == nullptr) { in L2CA_ConnectReq() [all …]
|
D | l2c_main.cc | 50 static void process_l2cap_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len); 98 tL2C_LCB* p_lcb = l2cu_find_lcb_by_handle(handle); in l2c_rcv_acl_data() local 99 if (!p_lcb) { in l2c_rcv_acl_data() 111 if (p_lcb && p_lcb->transport == BT_TRANSPORT_LE && in l2c_rcv_acl_data() 112 p_lcb->link_state != LST_DISCONNECTING) { in l2c_rcv_acl_data() 115 l2cble_notify_le_connection(p_lcb->remote_bd_addr); in l2c_rcv_acl_data() 121 p_ccb = l2cu_find_ccb_by_cid(p_lcb, rcv_cid); in l2c_rcv_acl_data() 141 process_l2cap_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data() 153 l2cble_process_sig_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data() 164 if (!p_lcb || p_lcb->link_state == LST_DISCONNECTING || in l2c_rcv_acl_data() [all …]
|
D | l2c_csm.cc | 108 p_ccb->p_lcb->remote_bd_addr, p_ccb->local_cid, p_ccb->p_rcb->psm, in l2c_csm_indicate_connection_open() 114 if (p_ccb->chnl_state == CST_OPEN && !p_ccb->p_lcb->is_transport_ble()) { in l2c_csm_indicate_connection_open() 120 p_ccb->p_lcb->remote_bd_addr); in l2c_csm_indicate_connection_open() 230 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in l2c_csm_closed() 232 l2ble_sec_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed() 236 btm_sec_l2cap_access_req(p_ccb->p_lcb->remote_bd_addr, in l2c_csm_closed() 244 btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr); in l2c_csm_closed() 258 if (p_ccb->p_lcb->transport == BT_TRANSPORT_LE) { in l2c_csm_closed() 260 l2ble_sec_access_req(p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed() 263 if (!BTM_SetLinkPolicyActiveMode(p_ccb->p_lcb->remote_bd_addr)) { in l2c_csm_closed() [all …]
|
D | l2c_int.h | 293 struct t_l2c_linkcb* p_lcb; /* Link this CCB is assigned to */ member 431 friend void l2cu_set_lcb_handle(struct t_l2c_linkcb& p_lcb, uint16_t handle); 709 void l2cu_release_lcb(tL2C_LCB* p_lcb); 722 tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid, 725 tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* p_lcb, uint16_t local_cid); 726 tL2C_CCB* l2cu_find_ccb_by_remote_cid(tL2C_LCB* p_lcb, uint16_t remote_cid); 727 bool l2c_is_cmd_rejected(uint8_t cmd_code, uint8_t id, tL2C_LCB* p_lcb); 729 void l2cu_send_peer_cmd_reject(tL2C_LCB* p_lcb, uint16_t reason, uint8_t rem_id, 739 void l2cu_send_peer_disc_rsp(tL2C_LCB* p_lcb, uint8_t remote_id, 741 void l2cu_send_peer_echo_rsp(tL2C_LCB* p_lcb, uint8_t id, uint8_t* p_data, [all …]
|
D | l2c_fcr.cc | 451 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, p_buf); in l2c_fcr_send_S_frame() 662 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, NULL); in l2c_fcr_proc_pdu() 1252 p_ccb->p_lcb->remote_bd_addr, p_buf); in do_sar_reassembly() 1328 for (list_node_t* node_tmp = list_begin(p_ccb->p_lcb->link_xmit_data_q); in retransmit_i_frames() 1329 node_tmp != list_end(p_ccb->p_lcb->link_xmit_data_q);) { in retransmit_i_frames() 1335 list_remove(p_ccb->p_lcb->link_xmit_data_q, p_tmp); in retransmit_i_frames() 1363 l2c_link_check_send_pkts(p_ccb->p_lcb, 0, NULL); in retransmit_i_frames() 1602 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()
|
/packages/modules/Bluetooth/system/stack/avct/ |
D | avct_l2c.cc | 81 static bool avct_l2c_is_passive(tAVCT_LCB* p_lcb) { in avct_l2c_is_passive() argument 87 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb)) { in avct_l2c_is_passive() 110 tAVCT_LCB* p_lcb; in avct_l2c_connect_ind_cback() local 114 p_lcb = avct_lcb_by_bd(bd_addr); in avct_l2c_connect_ind_cback() 115 if (p_lcb == NULL) { in avct_l2c_connect_ind_cback() 117 p_lcb = avct_lcb_alloc(bd_addr); in avct_l2c_connect_ind_cback() 118 if (p_lcb == NULL) { in avct_l2c_connect_ind_cback() 125 if (!avct_l2c_is_passive(p_lcb) || (p_lcb->ch_state == AVCT_CH_OPEN)) { in avct_l2c_connect_ind_cback() 131 p_lcb->conflict_lcid = p_lcb->ch_lcid; in avct_l2c_connect_ind_cback() 133 p_lcb->conflict_lcid); in avct_l2c_connect_ind_cback() [all …]
|
D | avct_lcb_act.cc | 57 static BT_HDR* avct_lcb_msg_asmbl(tAVCT_LCB* p_lcb, BT_HDR* p_buf) { in avct_lcb_msg_asmbl() argument 82 if (p_lcb->p_rx_msg != NULL) log::warn("Got single during reassembly"); in avct_lcb_msg_asmbl() 84 osi_free_and_reset((void**)&p_lcb->p_rx_msg); in avct_lcb_msg_asmbl() 91 if (p_lcb->p_rx_msg != NULL) log::warn("Got start during reassembly"); in avct_lcb_msg_asmbl() 93 osi_free_and_reset((void**)&p_lcb->p_rx_msg); in avct_lcb_msg_asmbl() 105 p_lcb->p_rx_msg = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE); in avct_lcb_msg_asmbl() 106 memcpy(p_lcb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len); in avct_lcb_msg_asmbl() 112 p = (uint8_t*)(p_lcb->p_rx_msg + 1) + p_lcb->p_rx_msg->offset; in avct_lcb_msg_asmbl() 118 p_lcb->p_rx_msg->offset += p_lcb->p_rx_msg->len; in avct_lcb_msg_asmbl() 121 p_lcb->p_rx_msg->len -= 1; in avct_lcb_msg_asmbl() [all …]
|
D | avct_l2c_br.cc | 83 tAVCT_LCB* p_lcb; in avct_l2c_br_is_passive() local 85 p_lcb = avct_lcb_by_bcb(p_bcb); in avct_l2c_br_is_passive() 89 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb)) { in avct_l2c_br_is_passive() 113 tAVCT_LCB* p_lcb; in avct_l2c_br_connect_ind_cback() local 118 p_lcb = avct_lcb_by_bd(bd_addr); in avct_l2c_br_connect_ind_cback() 119 if (p_lcb != NULL) { in avct_l2c_br_connect_ind_cback() 121 p_bcb = avct_bcb_by_lcb(p_lcb); in avct_l2c_br_connect_ind_cback() 128 p_bcb->allocated = p_lcb->allocated; /* copy the index from lcb */ in avct_l2c_br_connect_ind_cback() 241 tAVCT_BCB* p_lcb; in avct_l2c_br_config_cfm_cback() local 244 p_lcb = avct_bcb_by_lcid(lcid); in avct_l2c_br_config_cfm_cback() [all …]
|
D | avct_lcb.cc | 170 void avct_lcb_event(tAVCT_LCB* p_lcb, uint8_t event, tAVCT_LCB_EVT* p_data) { in avct_lcb_event() argument 175 log::verbose("LCB lcb={} event={} state={}", p_lcb->allocated, in avct_lcb_event() 176 avct_lcb_evt_str[event], avct_lcb_st_str[p_lcb->state]); in avct_lcb_event() 179 state_table = avct_lcb_st_tbl[p_lcb->state]; in avct_lcb_event() 181 if (p_lcb->state == AVCT_LCB_IDLE_ST && event == AVCT_LCB_LL_OPEN_EVT) in avct_lcb_event() 182 DEVICE_IOT_CONFIG_ADDR_INT_ADD_ONE(p_lcb->peer_addr, in avct_lcb_event() 186 p_lcb->state = state_table[event][AVCT_LCB_NEXT_STATE]; in avct_lcb_event() 192 (*avct_lcb_action[action])(p_lcb, p_data); in avct_lcb_event() 245 tAVCT_LCB* p_lcb = &avct_cb.lcb[0]; in avct_lcb_by_bd() local 248 for (i = 0; i < AVCT_NUM_LINKS; i++, p_lcb++) { in avct_lcb_by_bd() [all …]
|
D | avct_int.h | 107 tAVCT_LCB* p_lcb; /* Associated LCB */ member 143 void avct_lcb_event(tAVCT_LCB* p_lcb, uint8_t event, tAVCT_LCB_EVT* p_data); 145 void avct_close_bcb(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data); 147 tAVCT_BCB* avct_bcb_by_lcb(tAVCT_LCB* p_lcb); 152 void avct_lcb_dealloc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data); 154 tAVCT_CCB* avct_lcb_has_pid(tAVCT_LCB* p_lcb, uint16_t pid); 155 bool avct_lcb_last_ccb(tAVCT_LCB* p_lcb, tAVCT_CCB* p_ccb_last); 158 void avct_lcb_chnl_open(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data); 159 void avct_lcb_unbind_disc(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data); 160 void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data); [all …]
|
D | avct_api.cc | 127 tAVCT_LCB* p_lcb; in AVCT_CreateConn() local 142 p_lcb = avct_lcb_by_bd(peer_addr); in AVCT_CreateConn() 143 if (p_lcb == NULL) { in AVCT_CreateConn() 144 p_lcb = avct_lcb_alloc(peer_addr); in AVCT_CreateConn() 145 if (p_lcb == NULL) { in AVCT_CreateConn() 152 else if (avct_lcb_has_pid(p_lcb, p_cc->pid)) { in AVCT_CreateConn() 159 p_ccb->p_lcb = p_lcb; in AVCT_CreateConn() 160 log::verbose("ch_state: {}", p_lcb->ch_state); in AVCT_CreateConn() 163 avct_lcb_event(p_lcb, AVCT_LCB_UL_BIND_EVT, &avct_lcb_evt); in AVCT_CreateConn() 195 else if (p_ccb->p_lcb == NULL) { in AVCT_RemoveConn() [all …]
|
D | avct_bcb_act.cc | 110 tAVCT_LCB* p_lcb = avct_lcb_by_bcb(p_bcb); in avct_bcb_chnl_open() local 118 p_bcb->ch_lcid = L2CA_ConnectReqWithSecurity(AVCT_BR_PSM, p_lcb->peer_addr, 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() 257 &p_lcb->peer_addr); in avct_bcb_close_ind() 295 if (p_ccb->p_lcb == NULL) avct_ccb_dealloc(p_ccb, AVCT_NO_EVT, 0, NULL); in avct_bcb_close_cfm() [all …]
|
D | avct_ccb.cc | 93 p_ccb->p_lcb = NULL; in avct_ccb_dealloc()
|
/packages/modules/Bluetooth/system/bta/av/ |
D | bta_av_act.cc | 495 tBTA_AV_LCB* p_lcb = NULL; in bta_av_find_lcb() local 501 p_lcb = &p_cb->lcb[xx]; in bta_av_find_lcb() 509 return p_lcb; in bta_av_find_lcb() 526 tBTA_AV_LCB* p_lcb; in bta_av_rc_opened() local 584 p_lcb = &p_cb->lcb[BTA_AV_NUM_LINKS]; in bta_av_rc_opened() 585 p_lcb->addr = p_data->rc_conn_chg.peer_addr; in bta_av_rc_opened() 586 p_lcb->lidx = BTA_AV_NUM_LINKS + 1; in bta_av_rc_opened() 587 p_cb->rcb[i].lidx = p_lcb->lidx; in bta_av_rc_opened() 588 p_lcb->conn_msk = 1; in bta_av_rc_opened() 589 log::error("bd_addr: {} rcb[{}].lidx={}, lcb.conn_msk=x{:x}", p_lcb->addr, in bta_av_rc_opened() [all …]
|
/packages/modules/Bluetooth/system/test/mock/ |
D | mock_stack_l2cap_ble.h | 149 std::function<void(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len)> body{ 151 void operator()(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) { in operator() 152 body(p_lcb, p, pkt_len); in operator() 160 std::function<bool(tL2C_LCB* p_lcb)> body{ 162 bool operator()(tL2C_LCB* p_lcb) { return body(p_lcb); }; in operator() 186 std::function<void(tL2C_LCB* p_lcb)> body{[](tL2C_LCB* /* p_lcb */) {}}; 187 void operator()(tL2C_LCB* p_lcb) { body(p_lcb); }; in operator()
|
D | mock_stack_l2cap_ble.cc | 119 void l2cble_process_sig_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) { in l2cble_process_sig_cmd() argument 121 test::mock::stack_l2cap_ble::l2cble_process_sig_cmd(p_lcb, p, pkt_len); in l2cble_process_sig_cmd() 123 bool l2cble_create_conn(tL2C_LCB* p_lcb) { in l2cble_create_conn() argument 125 return test::mock::stack_l2cap_ble::l2cble_create_conn(p_lcb); in l2cble_create_conn() 135 void l2cble_update_data_length(tL2C_LCB* p_lcb) { in l2cble_update_data_length() argument 137 test::mock::stack_l2cap_ble::l2cble_update_data_length(p_lcb); in l2cble_update_data_length()
|
/packages/modules/Bluetooth/system/stack/test/ |
D | stack_l2cap_test.cc | 37 void l2c_link_send_to_lower_br_edr(tL2C_LCB* p_lcb, BT_HDR* p_buf); 38 void l2c_link_send_to_lower_ble(tL2C_LCB* p_lcb, BT_HDR* p_buf); 125 .p_lcb = nullptr, // struct t_l2c_linkcb* Link this CCB is assigned to
|
/packages/modules/Bluetooth/system/stack/rfcomm/ |
D | rfc_port_fsm.cc | 235 p_ccb->p_lcb->Handle(), p_port->rfc.p_mcb->lcid, p_port->dlci); in rfc_port_sm_sabme_wait_ua() 247 ccb->p_lcb->Handle(), lcid, p_port->dlci, p_port->uuid, in rfc_port_sm_sabme_wait_ua() 370 p_ccb->p_lcb->Handle(), p_port->rfc.p_mcb->lcid, p_port->dlci); in rfc_port_sm_term_wait_sec_check() 382 ccb->p_lcb->Handle(), lcid, p_port->dlci, p_port->uuid, in rfc_port_sm_term_wait_sec_check()
|
D | port_rfc.cc | 998 ccb->p_lcb->Handle(), lcid, p_port->dlci, p_port->uuid); in port_rfc_closed()
|
/packages/modules/Bluetooth/system/stack/test/common/ |
D | mock_l2cap_layer.cc | 33 tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* p_lcb, uint16_t local_cid) { in l2cu_find_ccb_by_cid() argument
|