Home
last modified time | relevance | path

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

/hal_espressif-latest/components/bt/host/bluedroid/stack/gatt/
Dgatt_main.c60 static void gatt_send_conn_cback (tGATT_TCB *p_tcb);
176 tGATT_TCB *p_tcb = NULL; in gatt_free() local
178 p_tcb = list_node(p_node); in gatt_free()
179 fixed_queue_free(p_tcb->pending_enc_clcb, NULL); in gatt_free()
180 p_tcb->pending_enc_clcb = NULL; in gatt_free()
182 fixed_queue_free(p_tcb->pending_ind_q, NULL); in gatt_free()
183 p_tcb->pending_ind_q = NULL; in gatt_free()
185 btu_free_timer(&p_tcb->conf_timer_ent); in gatt_free()
186 memset(&p_tcb->conf_timer_ent, 0, sizeof(TIMER_LIST_ENT)); in gatt_free()
188 btu_free_timer(&p_tcb->ind_ack_timer_ent); in gatt_free()
[all …]
Dgatt_auth.c48 UINT16 payload_size = p_clcb->p_tcb->payload_size; in gatt_sign_data()
53 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); in gatt_sign_data()
69 if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda, in gatt_sign_data()
74 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); in gatt_sign_data()
100 void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf) in gatt_verify_signature() argument
118 if (BTM_BleVerifySignature(p_tcb->peer_bda, p_orig, cmd_len, counter, p)) { in gatt_verify_signature()
121 gatt_server_handle_client_req (p_tcb, op_code, (UINT16)(p_buf->len - 1), p_orig); in gatt_verify_signature()
143 if (p_clcb && p_clcb->p_tcb) { in gatt_sec_check_complete()
144 if (fixed_queue_is_empty(p_clcb->p_tcb->pending_enc_clcb)) { in gatt_sec_check_complete()
145 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NONE); in gatt_sec_check_complete()
[all …]
Dgatt_sr.c47 tGATT_STATUS gatt_send_packet (tGATT_TCB *p_tcb, UINT8 *p_data, UINT16 len) in gatt_send_packet() argument
54 if (len > p_tcb->payload_size){ in gatt_send_packet()
58 buf_len = (UINT16)(sizeof(BT_HDR) + p_tcb->payload_size + L2CAP_MIN_OFFSET); in gatt_send_packet()
68 status = attp_send_sr_msg(p_tcb, p_msg); in gatt_send_packet()
82 UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle) in gatt_sr_enqueue_cmd() argument
84 tGATT_SR_CMD *p_cmd = &p_tcb->sr_cmd; in gatt_sr_enqueue_cmd()
93 trans_id = ++p_tcb->trans_id; in gatt_sr_enqueue_cmd()
95 p_cmd->trans_id = ++p_tcb->trans_id; in gatt_sr_enqueue_cmd()
99 p_tcb->trans_id %= GATT_TRANS_ID_MAX; in gatt_sr_enqueue_cmd()
116 BOOLEAN gatt_sr_cmd_empty (tGATT_TCB *p_tcb) in gatt_sr_cmd_empty() argument
[all …]
Dgatt_utils.c92 void gatt_free_pending_ind(tGATT_TCB *p_tcb) in gatt_free_pending_ind() argument
95 if (p_tcb->pending_ind_q == NULL) { 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_dequeue(p_tcb->pending_ind_q, 0)); in gatt_free_pending_ind()
103 fixed_queue_free(p_tcb->pending_ind_q, NULL); in gatt_free_pending_ind()
104 p_tcb->pending_ind_q = NULL; in gatt_free_pending_ind()
116 void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb) in gatt_free_pending_enc_queue() argument
119 if (p_tcb->pending_enc_clcb == NULL) { in gatt_free_pending_enc_queue()
124 while (!fixed_queue_is_empty(p_tcb->pending_enc_clcb)) { in gatt_free_pending_enc_queue()
125 osi_free(fixed_queue_dequeue(p_tcb->pending_enc_clcb, 0)); in gatt_free_pending_enc_queue()
[all …]
Dgatt_api.c133 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(i); in gatt_update_for_database_change() local
134 if (p_tcb && p_tcb->in_use) { in gatt_update_for_database_change()
135 gatt_sr_update_cl_status(p_tcb, false); in gatt_update_for_database_change()
602 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); in GATTS_HandleValueIndication() local
606 if ( (p_reg == NULL) || (p_tcb == NULL)) { in GATTS_HandleValueIndication()
611 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in GATTS_HandleValueIndication()
626 if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle)) { in GATTS_HandleValueIndication()
639 …if ( (p_msg = attp_build_sr_msg (p_tcb, GATT_HANDLE_VALUE_IND, (tGATT_SR_MSG *)&indication)) != NU… in GATTS_HandleValueIndication()
640 cmd_status = attp_send_sr_msg (p_tcb, p_msg); in GATTS_HandleValueIndication()
643 p_tcb->indicate_handle = indication.handle; in GATTS_HandleValueIndication()
[all …]
Dgatt_cl.c48 void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb);
117 st = attp_send_cl_msg(p_clcb->p_tcb, p_clcb->clcb_idx, op_code, &cl_req); in gatt_act_discovery()
138 tGATT_TCB *p_tcb = p_clcb->p_tcb; in gatt_act_read() local
208 rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg); in gatt_act_read()
227 tGATT_TCB *p_tcb = p_clcb->p_tcb; in gatt_act_write() local
237 rt = gatt_send_write_msg(p_tcb, in gatt_act_write()
247 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE)) { in gatt_act_write()
250 rt = gatt_send_write_msg(p_tcb, in gatt_act_write()
258 gatt_send_prepare_write(p_tcb, p_clcb); in gatt_act_write()
263 gatt_send_prepare_write(p_tcb, p_clcb); in gatt_act_write()
[all …]
Datt_protocol.c349 tGATT_STATUS attp_send_msg_to_l2cap(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP) in attp_send_msg_to_l2cap() argument
354 if (p_tcb->att_lcid == L2CAP_ATT_CID) { in attp_send_msg_to_l2cap()
355 l2cap_ret = L2CA_SendFixedChnlData (L2CAP_ATT_CID, p_tcb->peer_bda, p_toL2CAP); in attp_send_msg_to_l2cap()
358 l2cap_ret = (UINT16) L2CA_DataWrite (p_tcb->att_lcid, p_toL2CAP); in attp_send_msg_to_l2cap()
382 BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg) in attp_build_sr_msg() argument
422 p_cmd = attp_build_value_cmd(p_tcb->payload_size, in attp_build_sr_msg()
472 tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg) in attp_send_sr_msg() argument
476 if (p_tcb != NULL) { in attp_send_sr_msg()
479 cmd_sent = attp_send_msg_to_l2cap (p_tcb, p_msg); in attp_send_sr_msg()
497 tGATT_STATUS attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR *p_cmd) in attp_cl_send_cmd() argument
[all …]
Dgatt_attr.c260 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); in gatt_sr_write_cl_supp_feat() local
264 if (p_tcb == NULL) { in gatt_sr_write_cl_supp_feat()
282 val_old = p_tcb->cl_supp_feat; in gatt_sr_write_cl_supp_feat()
290 p_tcb->cl_supp_feat = val_new; in gatt_sr_write_cl_supp_feat()
292 bta_gatts_co_cl_feat_save(p_tcb->peer_bda, &p_tcb->cl_supp_feat); in gatt_sr_write_cl_supp_feat()
709 static BOOLEAN gatt_sr_is_cl_robust_caching_supported(tGATT_TCB *p_tcb) in gatt_sr_is_cl_robust_caching_supported() argument
711 return (p_tcb->cl_supp_feat & BLE_GATT_CL_SUPP_FEAT_ROBUST_CACHING_BITMASK); in gatt_sr_is_cl_robust_caching_supported()
722 BOOLEAN gatt_sr_is_cl_change_aware(tGATT_TCB *p_tcb) in gatt_sr_is_cl_change_aware() argument
725 if (!gatt_sr_is_cl_robust_caching_supported(p_tcb)) { in gatt_sr_is_cl_change_aware()
729 return p_tcb->is_robust_cache_change_aware; in gatt_sr_is_cl_change_aware()
[all …]
Dgatt_db.c50 static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code,
325 tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, in gatts_db_read_attr_value_by_type() argument
377 … status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, 0, trans_id, need_rsp); in gatts_db_read_attr_value_by_type()
384 … status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, 0, trans_id, need_rsp); in gatts_db_read_attr_value_by_type()
390 trans_id = p_tcb->sr_cmd.trans_id; in gatts_db_read_attr_value_by_type()
416 if (BTM_GetSecurityFlags(p_tcb->peer_bda, &flag)) { in gatts_db_read_attr_value_by_type()
417 if ((p_tcb->att_lcid == L2CAP_ATT_CID) && (status == GATT_PENDING) && in gatts_db_read_attr_value_by_type()
422 p = btm_bda_to_acl(p_tcb->peer_bda, BT_TRANSPORT_LE); in gatts_db_read_attr_value_by_type()
425 btm_ble_set_encryption(p_tcb->peer_bda, &sec_act, p->link_role); in gatts_db_read_attr_value_by_type()
989 tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb, in gatts_read_attr_value_by_handle() argument
[all …]
/hal_espressif-latest/components/bt/host/bluedroid/stack/gatt/include/
Dgatt_int.h428 tGATT_TCB *p_tcb; /* associated TCB of this CLCB */ member
466 tGATT_TCB *p_tcb; member
596 extern BOOLEAN gatt_disconnect (tGATT_TCB *p_tcb);
598 extern BOOLEAN gatt_connect (BD_ADDR rem_bda, tBLE_ADDR_TYPE bd_addr_type, tGATT_TCB *p_tcb, tBT_TR…
599 extern void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf);
600 extern void gatt_update_app_use_link_flag ( tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOO…
603 extern void gatt_set_ch_state(tGATT_TCB *p_tcb, tGATT_CH_STATE ch_state);
604 extern tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB *p_tcb);
616 extern tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, tGATT_CL_MS…
617 extern BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg);
[all …]
/hal_espressif-latest/components/bt/host/bluedroid/api/
Desp_gattc_api.c447 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(conn_id); in esp_ble_gattc_read_char() local
448 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in esp_ble_gattc_read_char()
453 if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) { in esp_ble_gattc_read_char()
488 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(conn_id); in esp_ble_gattc_read_by_type() local
489 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in esp_ble_gattc_read_by_type()
494 if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) { in esp_ble_gattc_read_by_type()
524 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(conn_id); in esp_ble_gattc_read_multiple() local
525 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in esp_ble_gattc_read_multiple()
530 if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) { in esp_ble_gattc_read_multiple()
560 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(conn_id); in esp_ble_gattc_read_multiple_variable() local
[all …]
Desp_gatts_api.c268 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(conn_id); in esp_ble_gatts_send_indicate() local
269 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in esp_ble_gatts_send_indicate()
274 if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) { in esp_ble_gatts_send_indicate()
302 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(conn_id); in esp_ble_gatts_send_response() local
303 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in esp_ble_gatts_send_response()
/hal_espressif-latest/components/bt/host/bluedroid/bta/gatt/
Dbta_gattc_utils.c413 tBTA_GATTC_SERV *p_tcb = &bta_gattc_cb.known_server[0], in bta_gattc_srcb_alloc() local
418 for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i ++, p_tcb ++) { in bta_gattc_srcb_alloc()
419 if (!p_tcb->in_use) { in bta_gattc_srcb_alloc()
422 } else if (!p_tcb->connected) { in bta_gattc_srcb_alloc()
423 p_recycle = p_tcb; in bta_gattc_srcb_alloc()
429 p_tcb = NULL; in bta_gattc_srcb_alloc()
432 p_tcb = p_recycle; in bta_gattc_srcb_alloc()
435 if (p_tcb != NULL) in bta_gattc_srcb_alloc()
437 if (p_tcb->p_srvc_cache != NULL) { in bta_gattc_srcb_alloc()
438 list_free(p_tcb->p_srvc_cache); in bta_gattc_srcb_alloc()
[all …]
Dbta_gattc_act.c511 tGATT_TCB *p_tcb; in bta_gattc_open() local
518 p_tcb = gatt_find_tcb_by_addr(p_data->api_conn.remote_bda, BT_TRANSPORT_LE); in bta_gattc_open()
519 if(p_tcb) { in bta_gattc_open()
520 found_app = gatt_find_specific_app_in_hold_link(p_tcb, p_clcb->p_rcb->client_if); in bta_gattc_open()
/hal_espressif-latest/components/bt/host/bluedroid/stack/l2cap/
Dl2c_api.c1956 tGATT_TCB *p_tcb; in L2CA_BleDisconnect() local
1971 p_tcb = gatt_find_tcb_by_addr(rem_bda, BT_TRANSPORT_LE); in L2CA_BleDisconnect()
1972 if (p_tcb == NULL) { in L2CA_BleDisconnect()
1976 gatt_set_ch_state(p_tcb, GATT_CH_CLOSING); in L2CA_BleDisconnect()
2383 tGATT_TCB * p_tcb = gatt_get_tcb_by_idx(tcb_idx); in l2ble_update_att_acl_pkt_num() local
2384 if (p_tcb == NULL){ in l2ble_update_att_acl_pkt_num()
2390 if (!gatt_check_connection_state_by_tcb(p_tcb)) { in l2ble_update_att_acl_pkt_num()
2396 tL2C_LCB * p_lcb = l2cu_find_lcb_by_bd_addr (p_tcb->peer_bda, BT_TRANSPORT_LE); in l2ble_update_att_acl_pkt_num()