Home
last modified time | relevance | path

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

/system/bt/stack/l2cap/
Dl2c_link.c44 static BOOLEAN l2c_link_send_to_lower (tL2C_LCB *p_lcb, BT_HDR *p_buf);
58 tL2C_LCB *p_lcb; in l2c_link_hci_conn_req() local
64 p_lcb = l2cu_find_lcb_by_bd_addr (bd_addr, BT_TRANSPORT_BR_EDR); in l2c_link_hci_conn_req()
67 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()
82 if (p_lcb_cur == p_lcb) in l2c_link_hci_conn_req()
88 p_lcb->link_role = HCI_ROLE_MASTER; in l2c_link_hci_conn_req()
96 p_lcb->link_role = HCI_ROLE_SLAVE; in l2c_link_hci_conn_req()
98 p_lcb->link_role = l2cu_get_conn_role(p_lcb); in l2c_link_hci_conn_req()
[all …]
Dl2c_ble.c36 static void l2cble_start_conn_update (tL2C_LCB *p_lcb);
51 tL2C_LCB *p_lcb; in L2CA_CancelBleConnectReq() local
72 p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_CancelBleConnectReq()
74 if (p_lcb != NULL && in L2CA_CancelBleConnectReq()
75 !(p_lcb->link_role == HCI_ROLE_SLAVE && BTM_ACL_IS_CONNECTED(rem_bda))) in L2CA_CancelBleConnectReq()
77 p_lcb->disc_reason = L2CAP_CONN_CANCEL; in L2CA_CancelBleConnectReq()
78 l2cu_release_lcb (p_lcb); in L2CA_CancelBleConnectReq()
103 tL2C_LCB *p_lcb; in L2CA_UpdateBleConnParams() local
107 p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_LE); in L2CA_UpdateBleConnParams()
110 if (!p_lcb || !p_acl_cb) in L2CA_UpdateBleConnParams()
[all …]
Dl2c_utils.c56 tL2C_LCB *p_lcb = &l2cb.lcb_pool[0]; in l2cu_allocate_lcb() local
58 for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p_lcb++) in l2cu_allocate_lcb()
60 if (!p_lcb->in_use) in l2cu_allocate_lcb()
62 memset (p_lcb, 0, sizeof (tL2C_LCB)); in l2cu_allocate_lcb()
64 memcpy (p_lcb->remote_bd_addr, p_bd_addr, BD_ADDR_LEN); in l2cu_allocate_lcb()
66 p_lcb->in_use = TRUE; in l2cu_allocate_lcb()
67 p_lcb->link_state = LST_DISCONNECTED; in l2cu_allocate_lcb()
68 p_lcb->handle = HCI_INVALID_HANDLE; in l2cu_allocate_lcb()
69 p_lcb->link_flush_tout = 0xFFFF; in l2cu_allocate_lcb()
70 p_lcb->timer_entry.param = (TIMER_PARAM_TYPE)p_lcb; in l2cu_allocate_lcb()
[all …]
Dl2c_api.c131 tL2C_LCB *p_lcb; in L2CA_Deregister() local
138 p_lcb = &l2cb.lcb_pool[0]; in L2CA_Deregister()
139 for (ii = 0; ii < MAX_L2CAP_LINKS; ii++, p_lcb++) in L2CA_Deregister()
141 if (p_lcb->in_use) in L2CA_Deregister()
143 if (((p_ccb = p_lcb->ccb_queue.p_first_ccb) == NULL) in L2CA_Deregister()
144 || (p_lcb->link_state == LST_DISCONNECTING)) in L2CA_Deregister()
241 tL2C_LCB *p_lcb; in L2CA_ErtmConnectReq() local
267 if ((p_lcb = l2cu_find_lcb_by_bd_addr (p_bd_addr, BT_TRANSPORT_BR_EDR)) == NULL) in L2CA_ErtmConnectReq()
270 if ( ((p_lcb = l2cu_allocate_lcb (p_bd_addr, FALSE, BT_TRANSPORT_BR_EDR)) == NULL) in L2CA_ErtmConnectReq()
272 || (l2cu_create_conn(p_lcb, BT_TRANSPORT_BR_EDR) == FALSE) ) in L2CA_ErtmConnectReq()
[all …]
Dl2c_ucd.c328 tL2C_LCB *p_lcb; in L2CA_UcdDiscover() local
346 if (((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_BR_EDR)) == NULL) in L2CA_UcdDiscover()
347 ||((p_ccb = l2cu_find_ccb_by_cid (p_lcb, L2CAP_CONNECTIONLESS_CID)) == NULL)) in L2CA_UcdDiscover()
364 if ((p_lcb)&&(p_lcb->link_state == LST_CONNECTED)) in L2CA_UcdDiscover()
368 p_ccb = l2cu_find_ccb_by_cid (p_lcb, L2CAP_CONNECTIONLESS_CID); in L2CA_UcdDiscover()
394 tL2C_LCB *p_lcb; in L2CA_UcdDataWrite() local
414 if (((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_BR_EDR)) == NULL) in L2CA_UcdDataWrite()
415 ||((p_ccb = l2cu_find_ccb_by_cid (p_lcb, L2CAP_CONNECTIONLESS_CID)) == NULL)) in L2CA_UcdDataWrite()
424 if (((p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_BR_EDR)) == NULL) in L2CA_UcdDataWrite()
425 || ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, L2CAP_CONNECTIONLESS_CID)) == NULL)) in L2CA_UcdDataWrite()
[all …]
Dl2c_main.c44 static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len);
127 tL2C_LCB *p_lcb; in l2c_rcv_acl_data() local
141 if ((p_lcb = l2cu_find_lcb_by_handle (handle)) == NULL) in l2c_rcv_acl_data()
191 if (p_lcb && p_lcb->transport == BT_TRANSPORT_LE && p_lcb->link_state != LST_DISCONNECTING) in l2c_rcv_acl_data()
193 l2cble_notify_le_connection(p_lcb->remote_bd_addr); in l2c_rcv_acl_data()
199 if ((p_ccb = l2cu_find_ccb_by_cid (p_lcb, rcv_cid)) == NULL) in l2c_rcv_acl_data()
233 process_l2cap_cmd (p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
246 if ( l2c_ucd_check_rx_pkts( p_lcb, p_msg ) ) in l2c_rcv_acl_data()
259 l2cble_process_sig_cmd (p_lcb, p, l2cap_len); in l2c_rcv_acl_data()
270 if (p_lcb && in l2c_rcv_acl_data()
[all …]
Dl2c_int.h260 struct t_l2c_linkcb *p_lcb; /* Link this CCB is assigned to */ member
560 extern void l2cu_release_lcb (tL2C_LCB *p_lcb);
572 extern tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid);
574 extern tL2C_CCB *l2cu_find_ccb_by_cid (tL2C_LCB *p_lcb, UINT16 local_cid);
575 extern tL2C_CCB *l2cu_find_ccb_by_remote_cid (tL2C_LCB *p_lcb, UINT16 remote_cid);
576 extern void l2cu_adj_id (tL2C_LCB *p_lcb, UINT8 adj_mask);
577 extern BOOLEAN l2c_is_cmd_rejected (UINT8 cmd_code, UINT8 id, tL2C_LCB *p_lcb);
579 extern void l2cu_send_peer_cmd_reject (tL2C_LCB *p_lcb, UINT16 reason,
587 extern void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid, UINT16…
588 extern void l2cu_send_peer_echo_req (tL2C_LCB *p_lcb, UINT8 *p_data, UINT16 data_len);
[all …]
Dl2c_csm.c170 btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
171 p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb); in l2c_csm_closed()
177 || !btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr)) in l2c_csm_closed()
200 BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings); in l2c_csm_closed()
204 if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
205 … p_ccb->p_lcb->handle, TRUE, &l2c_link_sec_comp, p_ccb) == BTM_CMD_STARTED) in l2c_csm_closed()
213 if (!p_ccb->p_lcb->w4_info_rsp) in l2c_csm_closed()
237 btu_stop_timer (&p_ccb->p_lcb->timer_entry); in l2c_csm_closed()
253 BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings); in l2c_csm_closed()
257 if (btm_sec_l2cap_access_req (p_ccb->p_lcb->remote_bd_addr, p_ccb->p_rcb->psm, in l2c_csm_closed()
[all …]
Dl2c_fcr.c391 if ((p_ccb->p_lcb->sent_not_acked < 2)&&(l2cb.controller_xmit_window > 0)) in l2c_fcr_is_flow_controlled()
596 l2c_link_check_send_pkts (p_ccb->p_lcb, NULL, p_buf); in l2c_fcr_send_S_frame()
828 l2c_link_check_send_pkts (p_ccb->p_lcb, NULL, NULL); in l2c_fcr_proc_pdu()
1481 (p_ccb->local_cid, p_ccb->p_lcb->remote_bd_addr, p_buf); in do_sar_reassembly()
1552 for (const list_node_t *node = list_begin(p_ccb->p_lcb->link_xmit_data_q); in retransmit_i_frames()
1553 node != list_end(p_ccb->p_lcb->link_xmit_data_q);) { in retransmit_i_frames()
1559 list_remove(p_ccb->p_lcb->link_xmit_data_q, p_buf); in retransmit_i_frames()
1588 l2c_link_check_send_pkts (p_ccb->p_lcb, NULL, NULL); in retransmit_i_frames()
1802 if (!(p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_ENH_RETRANS)) in l2c_fcr_chk_chan_modes()
1805 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.c73 static BOOLEAN avct_l2c_is_passive (tAVCT_LCB *p_lcb) in avct_l2c_is_passive() argument
81 if (p_ccb->allocated && (p_ccb->p_lcb == p_lcb)) in avct_l2c_is_passive()
106 tAVCT_LCB *p_lcb; in avct_l2c_connect_ind_cback() local
112 if ((p_lcb = avct_lcb_by_bd(bd_addr)) == NULL) in avct_l2c_connect_ind_cback()
115 if ((p_lcb = avct_lcb_alloc(bd_addr)) == NULL) in avct_l2c_connect_ind_cback()
124 if (!avct_l2c_is_passive (p_lcb) || (p_lcb->ch_state == AVCT_CH_OPEN)) in avct_l2c_connect_ind_cback()
132 p_lcb->conflict_lcid = p_lcb->ch_lcid; in avct_l2c_connect_ind_cback()
133 AVCT_TRACE_DEBUG("avct_l2c_connect_ind_cback conflict_lcid:0x%x", p_lcb->conflict_lcid); in avct_l2c_connect_ind_cback()
137 if(p_lcb) in avct_l2c_connect_ind_cback()
140 lcid, result, p_lcb->ch_state); in avct_l2c_connect_ind_cback()
[all …]
Davct_lcb_act.c53 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()
77 GKI_freebuf(p_lcb->p_rx_msg); in avct_lcb_msg_asmbl()
78 p_lcb->p_rx_msg = NULL; in avct_lcb_msg_asmbl()
87 if (p_lcb->p_rx_msg != NULL) in avct_lcb_msg_asmbl()
89 GKI_freebuf(p_lcb->p_rx_msg); in avct_lcb_msg_asmbl()
96 p_lcb->p_rx_msg = (BT_HDR*)GKI_getbuf(GKI_MAX_BUF_SIZE); in avct_lcb_msg_asmbl()
97 if (p_lcb->p_rx_msg == NULL) in avct_lcb_msg_asmbl()
104 memcpy (p_lcb->p_rx_msg, p_buf, in avct_lcb_msg_asmbl()
110 p = (UINT8 *)(p_lcb->p_rx_msg + 1) + p_lcb->p_rx_msg->offset; in avct_lcb_msg_asmbl()
[all …]
Davct_lcb.c194 void avct_lcb_event(tAVCT_LCB *p_lcb, UINT8 event, tAVCT_LCB_EVT *p_data) in avct_lcb_event() argument
201 …TRACE_EVENT("LCB lcb=%d event=%s state=%s", p_lcb->allocated, avct_lcb_evt_str[event], avct_lcb_st… in avct_lcb_event()
203 AVCT_TRACE_EVENT("LCB lcb=%d event=%d state=%d", p_lcb->allocated, event, p_lcb->state); in avct_lcb_event()
207 state_table = avct_lcb_st_tbl[p_lcb->state]; in avct_lcb_event()
210 p_lcb->state = state_table[event][AVCT_LCB_NEXT_STATE]; in avct_lcb_event()
217 (*avct_lcb_action[action])(p_lcb, p_data); in avct_lcb_event()
282 tAVCT_LCB *p_lcb = &avct_cb.lcb[0]; in avct_lcb_by_bd() local
285 for (i = 0; i < AVCT_NUM_LINKS; i++, p_lcb++) in avct_lcb_by_bd()
288 if (p_lcb->allocated && (!memcmp(p_lcb->peer_addr, bd_addr, BD_ADDR_LEN))) in avct_lcb_by_bd()
297 p_lcb = NULL; in avct_lcb_by_bd()
[all …]
Davct_int.h106 tAVCT_LCB *p_lcb; /* Associated LCB */ member
145 extern void avct_lcb_event(tAVCT_LCB *p_lcb, UINT8 event, tAVCT_LCB_EVT *p_data);
148 extern void avct_close_bcb(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data);
150 extern tAVCT_BCB *avct_bcb_by_lcb(tAVCT_LCB *p_lcb);
156 extern void avct_lcb_dealloc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data);
158 extern tAVCT_CCB *avct_lcb_has_pid(tAVCT_LCB *p_lcb, UINT16 pid);
159 extern BOOLEAN avct_lcb_last_ccb(tAVCT_LCB *p_lcb, tAVCT_CCB *p_ccb_last);
162 extern void avct_lcb_chnl_open(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data);
163 extern void avct_lcb_unbind_disc(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data);
164 extern void avct_lcb_open_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data);
[all …]
Davct_api.c137 tAVCT_LCB *p_lcb; in AVCT_CreateConn() local
155 if ((p_lcb = avct_lcb_by_bd(peer_addr)) == NULL) in AVCT_CreateConn()
157 if ((p_lcb = avct_lcb_alloc(peer_addr)) == NULL) in AVCT_CreateConn()
165 else if (avct_lcb_has_pid(p_lcb, p_cc->pid)) in AVCT_CreateConn()
174 p_ccb->p_lcb = p_lcb; in AVCT_CreateConn()
175 AVCT_TRACE_DEBUG("ch_state: %d", p_lcb->ch_state); in AVCT_CreateConn()
176 avct_lcb_event(p_lcb, AVCT_LCB_UL_BIND_EVT, (tAVCT_LCB_EVT *) &p_ccb); in AVCT_CreateConn()
209 else if (p_ccb->p_lcb == NULL) in AVCT_RemoveConn()
216 avct_lcb_event(p_ccb->p_lcb, AVCT_LCB_UL_UNBIND_EVT, (tAVCT_LCB_EVT *) &p_ccb); in AVCT_RemoveConn()
265 if ((p_ccb->p_lcb == NULL) || (p_ccb->p_lcb->allocated == 0)) in AVCT_CreateBrowse()
[all …]
Davct_ccb.c90 p_ccb->p_lcb = NULL; in avct_ccb_dealloc()
/system/bt/bta/av/
Dbta_av_act.c459 tBTA_AV_LCB *p_lcb = NULL; in bta_av_find_lcb() local
466 p_lcb = &p_cb->lcb[xx]; in bta_av_find_lcb()
475 return p_lcb; in bta_av_find_lcb()
493 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 bdcpy(p_lcb->addr, p_data->rc_conn_chg.peer_addr); in bta_av_rc_opened()
553 p_lcb->addr[0], p_lcb->addr[1], in bta_av_rc_opened()
554 p_lcb->addr[2], p_lcb->addr[3], in bta_av_rc_opened()
555 p_lcb->addr[4], p_lcb->addr[5]); in bta_av_rc_opened()
556 p_lcb->lidx = BTA_AV_NUM_LINKS + 1; in bta_av_rc_opened()
[all …]
/system/bt/stack/btm/
Dbtm_pm.c791 tL2C_LCB *p_lcb; in btm_pm_proc_mode_change() local
807 if ((p_lcb = l2cu_find_lcb_by_bd_addr(p->remote_addr, BT_TRANSPORT_BR_EDR)) != NULL) in btm_pm_proc_mode_change()
814 l2c_link_check_send_pkts(p_lcb, NULL, NULL); in btm_pm_proc_mode_change()
Dbtm_sec.c3020 tL2C_LCB *p_lcb = l2cu_find_lcb_by_bd_addr(p_dev_rec->bd_addr, BT_TRANSPORT_BR_EDR); in btm_sec_dd_create_conn() local
3021 if (p_lcb && (p_lcb->link_state == LST_CONNECTED || p_lcb->link_state == LST_CONNECTING)) in btm_sec_dd_create_conn()
3028 … if (!p_lcb && (p_lcb = l2cu_allocate_lcb (p_dev_rec->bd_addr, TRUE, BT_TRANSPORT_BR_EDR)) == NULL) in btm_sec_dd_create_conn()
3040 if (l2cu_create_conn(p_lcb, BT_TRANSPORT_BR_EDR) == FALSE) in btm_sec_dd_create_conn()
3046 l2cu_release_lcb(p_lcb); in btm_sec_dd_create_conn()