Home
last modified time | relevance | path

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

/system/bt/stack/l2cap/
Dl2c_link.cc46 static bool l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
60 tL2C_LCB* p_lcb; in l2c_link_hci_conn_req() local
66 p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
69 if (!p_lcb) { in l2c_link_hci_conn_req()
70 p_lcb = l2cu_allocate_lcb(bd_addr, false, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
71 if (!p_lcb) { in l2c_link_hci_conn_req()
82 if (p_lcb_cur == p_lcb) continue; in l2c_link_hci_conn_req()
86 p_lcb->link_role = HCI_ROLE_MASTER; in l2c_link_hci_conn_req()
93 p_lcb->link_role = HCI_ROLE_SLAVE; in l2c_link_hci_conn_req()
95 p_lcb->link_role = l2cu_get_conn_role(p_lcb); in l2c_link_hci_conn_req()
[all …]
Dl2c_ble.cc46 static void l2cble_start_conn_update(tL2C_LCB* p_lcb);
60 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_CancelBleConnectReq() local
64 if (p_lcb != NULL && p_lcb->link_state == LST_CONNECTING) { in L2CA_CancelBleConnectReq()
74 if (p_lcb != NULL && in L2CA_CancelBleConnectReq()
75 !(p_lcb->link_role == HCI_ROLE_SLAVE && in L2CA_CancelBleConnectReq()
77 p_lcb->disc_reason = L2CAP_CONN_CANCEL; in L2CA_CancelBleConnectReq()
78 l2cu_release_lcb(p_lcb); in L2CA_CancelBleConnectReq()
98 tL2C_LCB* p_lcb; in L2CA_UpdateBleConnParams() local
102 p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_UpdateBleConnParams()
105 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.cc140 tL2C_LCB* p_lcb; in L2CA_Deregister() local
147 p_lcb = &l2cb.lcb_pool[0]; in L2CA_Deregister()
148 for (ii = 0; ii < MAX_L2CAP_LINKS; ii++, p_lcb++) { in L2CA_Deregister()
149 if (p_lcb->in_use) { in L2CA_Deregister()
150 p_ccb = p_lcb->ccb_queue.p_first_ccb; in L2CA_Deregister()
151 if ((p_ccb == NULL) || (p_lcb->link_state == LST_DISCONNECTING)) { in L2CA_Deregister()
353 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(p_bd_addr, BT_TRANSPORT_BR_EDR); in L2CA_ErtmConnectReq() local
354 if (p_lcb == nullptr) { in L2CA_ErtmConnectReq()
356 p_lcb = l2cu_allocate_lcb(p_bd_addr, false, BT_TRANSPORT_BR_EDR); in L2CA_ErtmConnectReq()
358 if ((p_lcb == nullptr) || (!l2cu_create_conn_br_edr(p_lcb))) { in L2CA_ErtmConnectReq()
[all …]
Dl2c_main.cc46 static void process_l2cap_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len);
94 tL2C_LCB* p_lcb = l2cu_find_lcb_by_handle(handle); in l2c_rcv_acl_data() local
95 if (!p_lcb) { in l2c_rcv_acl_data()
144 if (p_lcb && p_lcb->transport == BT_TRANSPORT_LE && in l2c_rcv_acl_data()
145 p_lcb->link_state != LST_DISCONNECTING) { in l2c_rcv_acl_data()
148 l2cble_notify_le_connection(p_lcb->remote_bd_addr); in l2c_rcv_acl_data()
154 p_ccb = l2cu_find_ccb_by_cid(p_lcb, rcv_cid); in l2c_rcv_acl_data()
174 process_l2cap_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
186 l2cble_process_sig_cmd(p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
198 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.h284 struct t_l2c_linkcb* p_lcb; /* Link this CCB is assigned to */ member
592 extern void l2cu_release_lcb(tL2C_LCB* p_lcb);
607 extern tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid);
609 extern tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* p_lcb, uint16_t local_cid);
610 extern tL2C_CCB* l2cu_find_ccb_by_remote_cid(tL2C_LCB* p_lcb,
612 extern void l2cu_adj_id(tL2C_LCB* p_lcb, uint8_t adj_mask);
613 extern bool l2c_is_cmd_rejected(uint8_t cmd_code, uint8_t id, tL2C_LCB* p_lcb);
615 extern void l2cu_send_peer_cmd_reject(tL2C_LCB* p_lcb, uint16_t reason,
625 extern void l2cu_send_peer_disc_rsp(tL2C_LCB* p_lcb, uint8_t remote_id,
627 extern void l2cu_send_peer_echo_req(tL2C_LCB* p_lcb, uint8_t* p_data,
[all …]
Dl2c_fcr.cc386 if ((p_ccb->p_lcb->sent_not_acked < 2) && in l2c_fcr_is_flow_controlled()
582 l2c_link_check_send_pkts(p_ccb->p_lcb, NULL, p_buf); in l2c_fcr_send_S_frame()
803 l2c_link_check_send_pkts(p_ccb->p_lcb, NULL, NULL); in l2c_fcr_proc_pdu()
1510 p_ccb->p_lcb->remote_bd_addr, p_buf); in do_sar_reassembly()
1589 for (list_node_t* node_tmp = list_begin(p_ccb->p_lcb->link_xmit_data_q); in retransmit_i_frames()
1590 node_tmp != list_end(p_ccb->p_lcb->link_xmit_data_q);) { in retransmit_i_frames()
1596 list_remove(p_ccb->p_lcb->link_xmit_data_q, p_tmp); in retransmit_i_frames()
1624 l2c_link_check_send_pkts(p_ccb->p_lcb, NULL, NULL); in retransmit_i_frames()
1883 if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_ENH_RETRANS)) in l2c_fcr_chk_chan_modes()
2210 p_ccb->p_lcb->w4_info_rsp = in l2c_fcr_process_peer_cfg_req()
/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.cc146 tAVCT_LCB* p_lcb; in AVCT_CreateConn() local
161 p_lcb = avct_lcb_by_bd(peer_addr); in AVCT_CreateConn()
162 if (p_lcb == NULL) { in AVCT_CreateConn()
163 p_lcb = avct_lcb_alloc(peer_addr); in AVCT_CreateConn()
164 if (p_lcb == NULL) { in AVCT_CreateConn()
171 else if (avct_lcb_has_pid(p_lcb, p_cc->pid)) { in AVCT_CreateConn()
178 p_ccb->p_lcb = p_lcb; in AVCT_CreateConn()
179 AVCT_TRACE_DEBUG("ch_state: %d", p_lcb->ch_state); in AVCT_CreateConn()
182 avct_lcb_event(p_lcb, AVCT_LCB_UL_BIND_EVT, &avct_lcb_evt); in AVCT_CreateConn()
214 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.cc459 tBTA_AV_LCB* p_lcb = NULL; in bta_av_find_lcb() local
466 p_lcb = &p_cb->lcb[xx]; in bta_av_find_lcb()
474 return p_lcb; in bta_av_find_lcb()
491 tBTA_AV_LCB* p_lcb; in bta_av_rc_opened() local
551 p_lcb = &p_cb->lcb[BTA_AV_NUM_LINKS]; in bta_av_rc_opened()
552 p_lcb->addr = p_data->rc_conn_chg.peer_addr; in bta_av_rc_opened()
553 p_lcb->lidx = BTA_AV_NUM_LINKS + 1; in bta_av_rc_opened()
554 p_cb->rcb[i].lidx = p_lcb->lidx; in bta_av_rc_opened()
555 p_lcb->conn_msk = 1; in bta_av_rc_opened()
557 __func__, p_lcb->addr.ToString().c_str(), i, in bta_av_rc_opened()
[all …]
/system/bt/stack/btm/
Dbtm_acl.cc796 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bda, BT_TRANSPORT_LE); in btm_use_preferred_conn_params() local
800 if ((p_lcb != NULL) && (p_dev_rec != NULL) && in btm_use_preferred_conn_params()
808 ((p_lcb->min_interval < p_dev_rec->conn_params.min_conn_int && in btm_use_preferred_conn_params()
810 (p_lcb->min_interval > p_dev_rec->conn_params.max_conn_int) || in btm_use_preferred_conn_params()
811 (p_lcb->latency > p_dev_rec->conn_params.slave_latency) || in btm_use_preferred_conn_params()
812 (p_lcb->timeout > p_dev_rec->conn_params.supervision_tout))) { in btm_use_preferred_conn_params()
816 __func__, p_lcb->handle, p_dev_rec->conn_params.min_conn_int, in btm_use_preferred_conn_params()
821 p_lcb->min_interval = p_dev_rec->conn_params.min_conn_int; in btm_use_preferred_conn_params()
822 p_lcb->max_interval = p_dev_rec->conn_params.max_conn_int; in btm_use_preferred_conn_params()
823 p_lcb->timeout = p_dev_rec->conn_params.supervision_tout; in btm_use_preferred_conn_params()
[all …]
Dbtm_pm.cc750 tL2C_LCB* p_lcb; in btm_pm_proc_mode_change() local
767 p_lcb = l2cu_find_lcb_by_bd_addr(p->remote_addr, BT_TRANSPORT_BR_EDR); in btm_pm_proc_mode_change()
768 if (p_lcb != NULL) { in btm_pm_proc_mode_change()
774 l2c_link_check_send_pkts(p_lcb, NULL, NULL); in btm_pm_proc_mode_change()
Dbtm_sec.cc2527 tL2C_LCB* p_lcb = in btm_sec_dd_create_conn() local
2529 if (p_lcb && (p_lcb->link_state == LST_CONNECTED || in btm_sec_dd_create_conn()
2530 p_lcb->link_state == LST_CONNECTING)) { in btm_sec_dd_create_conn()
2537 if (!p_lcb && (p_lcb = l2cu_allocate_lcb(p_dev_rec->bd_addr, true, in btm_sec_dd_create_conn()
2548 if (!l2cu_create_conn_br_edr(p_lcb)) { in btm_sec_dd_create_conn()
2552 l2cu_release_lcb(p_lcb); in btm_sec_dd_create_conn()
Dbtm_ble.cc1137 tL2C_LCB* p_lcb = l2cu_find_lcb_by_bd_addr(bd_addr, BT_TRANSPORT_LE); in btm_ble_start_sec_check() local
1138 p_lcb->sec_act = sec_act; in btm_ble_start_sec_check()
/system/bt/hci/src/
Dbtsnoop.cc318 filter_list[p_ccb->p_lcb->handle].addRfcDlci(dlci); in whitelist_rfc_dlci()