Home
last modified time | relevance | path

Searched refs:p_tcb (Results 1 – 13 of 13) sorted by relevance

/system/bt/stack/gatt/
Dgatt_main.cc66 static void gatt_send_conn_cback(tGATT_TCB* p_tcb);
211 bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb, in gatt_connect() argument
214 if (gatt_get_ch_state(p_tcb) != GATT_CH_OPEN) in gatt_connect()
215 gatt_set_ch_state(p_tcb, GATT_CH_CONN); in gatt_connect()
218 p_tcb->att_lcid = L2CA_ConnectReq2(BT_PSM_ATT, rem_bda, BTM_SEC_NONE); in gatt_connect()
219 return p_tcb->att_lcid != 0; in gatt_connect()
223 if (gatt_get_ch_state(p_tcb) == GATT_CH_OPEN) { in gatt_connect()
224 gatt_update_app_use_link_flag(gatt_if, p_tcb, true, true); in gatt_connect()
228 p_tcb->att_lcid = L2CAP_ATT_CID; in gatt_connect()
244 bool gatt_disconnect(tGATT_TCB* p_tcb) { in gatt_disconnect() argument
[all …]
Dgatt_auth.cc52 uint16_t payload_size = p_clcb->p_tcb->payload_size; in gatt_sign_data()
57 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); in gatt_sign_data()
74 p_clcb->p_tcb->peer_bda, p_data, in gatt_sign_data()
78 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); in gatt_sign_data()
135 if (p_clcb && p_clcb->p_tcb && p_clcb->p_tcb->pending_enc_clcb.empty()) { in gatt_sec_check_complete()
136 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NONE); in gatt_sec_check_complete()
159 tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(*bd_addr, transport); in gatt_enc_cmpl_cback() local
160 if (!p_tcb) { in gatt_enc_cmpl_cback()
166 if (gatt_get_sec_act(p_tcb) == GATT_SEC_ENC_PENDING) return; in gatt_enc_cmpl_cback()
168 if (p_tcb->pending_enc_clcb.empty()) { in gatt_enc_cmpl_cback()
[all …]
Dgatt_utils.cc94 void gatt_free_pending_ind(tGATT_TCB* p_tcb) { in gatt_free_pending_ind() argument
97 if (p_tcb->pending_ind_q == NULL) return; in gatt_free_pending_ind()
100 while (!fixed_queue_is_empty(p_tcb->pending_ind_q)) in gatt_free_pending_ind()
101 osi_free(fixed_queue_try_dequeue(p_tcb->pending_ind_q)); in gatt_free_pending_ind()
102 fixed_queue_free(p_tcb->pending_ind_q, NULL); in gatt_free_pending_ind()
103 p_tcb->pending_ind_q = NULL; in gatt_free_pending_ind()
164 void gatt_add_pending_ind(tGATT_TCB* p_tcb, tGATT_VALUE* p_ind) { in gatt_add_pending_ind() argument
169 fixed_queue_enqueue(p_tcb->pending_ind_q, p_buf); in gatt_add_pending_ind()
283 bool gatt_is_srv_chg_ind_pending(tGATT_TCB* p_tcb) { in gatt_is_srv_chg_ind_pending() argument
285 << " is_queue_empty=" << fixed_queue_is_empty(p_tcb->pending_ind_q); in gatt_is_srv_chg_ind_pending()
[all …]
Dgatt_api.cc442 tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx); in GATTS_HandleValueIndication() local
445 if ((p_reg == NULL) || (p_tcb == NULL)) { in GATTS_HandleValueIndication()
462 if (!gatt_tcb_get_cid_available_for_indication(p_tcb, p_reg->eatt_support, in GATTS_HandleValueIndication()
465 gatt_add_pending_ind(p_tcb, &indication); in GATTS_HandleValueIndication()
472 attp_build_sr_msg(*p_tcb, GATT_HANDLE_VALUE_IND, &gatt_sr_msg); in GATTS_HandleValueIndication()
475 tGATT_STATUS cmd_status = attp_send_sr_msg(*p_tcb, cid, p_msg); in GATTS_HandleValueIndication()
478 gatt_start_conf_timer(p_tcb, cid); in GATTS_HandleValueIndication()
505 tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx); in GATTS_HandleValueNotification() local
509 if ((p_reg == NULL) || (p_tcb == NULL)) { in GATTS_HandleValueNotification()
528 uint16_t cid = gatt_tcb_get_att_cid(*p_tcb, p_reg->eatt_support); in GATTS_HandleValueNotification()
[all …]
Dgatt_int.h337 tGATT_TCB* p_tcb; /* associated TCB of this CLCB */ member
442 extern bool gatt_disconnect(tGATT_TCB* p_tcb);
445 extern bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb,
448 extern void gatt_data_process(tGATT_TCB& p_tcb, uint16_t cid, BT_HDR* p_buf);
449 extern void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
453 extern void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state);
454 extern tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb);
499 extern void gatt_start_conf_timer(tGATT_TCB* p_tcb, uint16_t cid);
505 extern void gatt_stop_ind_ack_timer(tGATT_TCB* p_tcb, uint16_t cid);
510 extern bool gatt_is_srv_chg_ind_pending(tGATT_TCB* p_tcb);
[all …]
Dgatt_cl.cc129 tGATT_STATUS st = attp_send_cl_msg(*p_clcb->p_tcb, p_clcb, op_code, &cl_req); in gatt_act_discovery()
146 tGATT_TCB& tcb = *p_clcb->p_tcb; in gatt_act_read()
217 tGATT_TCB& tcb = *p_clcb->p_tcb; in gatt_act_write()
/system/bt/test/mock/
Dmock_stack_gatt_main.cc48 bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb, in gatt_connect() argument
54 bool gatt_disconnect(tGATT_TCB* p_tcb) { in gatt_disconnect() argument
58 bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_hold_link_status() argument
63 tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb) { in gatt_get_ch_state() argument
105 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) { in gatt_set_ch_state() argument
108 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
Dmock_stack_gatt_auth.cc42 tGATT_SEC_ACTION gatt_get_sec_act(tGATT_TCB* p_tcb) { in gatt_get_sec_act() argument
61 void gatt_set_sec_act(tGATT_TCB* p_tcb, tGATT_SEC_ACTION sec_act) { in gatt_set_sec_act() argument
/system/bt/stack/test/common/
Dmock_gatt_main.cc47 bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb, in gatt_connect() argument
53 bool gatt_disconnect(tGATT_TCB* p_tcb) { in gatt_disconnect() argument
57 bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_hold_link_status() argument
62 tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb) { in gatt_get_ch_state() argument
105 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) { in gatt_set_ch_state() argument
108 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
/system/bt/bta/gatt/
Dbta_gattc_utils.cc286 tBTA_GATTC_SERV *p_tcb = &bta_gattc_cb.known_server[0], *p_recycle = NULL; in bta_gattc_srcb_alloc() local
290 for (i = 0; i < ble_acceptlist_size(); i++, p_tcb++) { in bta_gattc_srcb_alloc()
291 if (!p_tcb->in_use) { in bta_gattc_srcb_alloc()
294 } else if (!p_tcb->connected) { in bta_gattc_srcb_alloc()
295 p_recycle = p_tcb; in bta_gattc_srcb_alloc()
301 p_tcb = NULL; in bta_gattc_srcb_alloc()
303 p_tcb = p_recycle; in bta_gattc_srcb_alloc()
305 if (p_tcb != NULL) { in bta_gattc_srcb_alloc()
307 p_tcb->gatt_database.Clear(); in bta_gattc_srcb_alloc()
308 p_tcb->pending_discovery.Clear(); in bta_gattc_srcb_alloc()
[all …]
/system/bt/stack/test/gatt/
Dmock_gatt_utils_ref.cc64 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
67 bool gatt_disconnect(tGATT_TCB* p_tcb) { return false; } in gatt_disconnect() argument
68 tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb) { return GATT_CH_CLOSE; } in gatt_get_ch_state() argument
69 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) {} in gatt_set_ch_state() argument
Dgatt_sr_test.cc93 bool gatt_disconnect(tGATT_TCB* p_tcb) { return false; } in gatt_disconnect() argument
94 tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb) { return GATT_CH_CLOSE; } in gatt_get_ch_state() argument
102 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) {} in gatt_set_ch_state() argument
129 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb, in gatt_update_app_use_link_flag() argument
165 void gatt_sr_init_cl_status(tGATT_TCB& p_tcb) {} in gatt_sr_init_cl_status() argument
166 void gatt_sr_update_cl_status(tGATT_TCB& p_tcb, bool chg_aware) { in gatt_sr_update_cl_status() argument
167 p_tcb.is_robust_cache_change_aware = chg_aware; in gatt_sr_update_cl_status()
/system/bt/stack/eatt/
Deatt_impl.h451 tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(channel->bda_, BT_TRANSPORT_LE); in eatt_ind_ack_timeout() local
454 attp_send_cl_confirmation_msg(*p_tcb, channel->cid_); in eatt_ind_ack_timeout()
459 tGATT_TCB* p_tcb = gatt_find_tcb_by_addr(channel->bda_, BT_TRANSPORT_LE); in eatt_ind_confirmation_timeout() local
462 gatt_disconnect(p_tcb); in eatt_ind_confirmation_timeout()