/system/bt/stack/gatt/ |
H A D | gatt_main.c | 60 static void gatt_send_conn_cback (tGATT_TCB *p_tcb); 172 BOOLEAN gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb, tBT_TRANSPORT transport) argument 176 if (gatt_get_ch_state(p_tcb) != GATT_CH_OPEN) 177 gatt_set_ch_state(p_tcb, GATT_CH_CONN); 181 p_tcb->att_lcid = L2CAP_ATT_CID; 186 if ((p_tcb->att_lcid = L2CA_ConnectReq(BT_PSM_ATT, rem_bda)) != 0) 199 ** Parameter p_tcb: pointer to the TCB to disconnect. 205 BOOLEAN gatt_disconnect (tGATT_TCB *p_tcb) argument 211 if (p_tcb != NULL) 214 if ( (ch_state = gatt_get_ch_state(p_tcb)) ! 252 gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add) argument 304 gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOOLEAN check_acl_link) argument 348 tGATT_TCB *p_tcb; local 409 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, transport); local 489 gatt_channel_congestion(tGATT_TCB *p_tcb, BOOLEAN congested) argument 526 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(remote_bda, BT_TRANSPORT_LE); local 552 tGATT_TCB *p_tcb; local 588 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_BR_EDR); local 640 tGATT_TCB *p_tcb; local 692 tGATT_TCB *p_tcb; local 748 tGATT_TCB *p_tcb; local 804 tGATT_TCB *p_tcb; local 841 tGATT_TCB *p_tcb; local 876 tGATT_TCB *p_tcb; local 900 tGATT_TCB *p_tcb = gatt_find_tcb_by_cid(lcid); local 918 gatt_send_conn_cback(tGATT_TCB *p_tcb) argument 967 gatt_data_process(tGATT_TCB *p_tcb, BT_HDR *p_buf) argument 1157 tGATT_TCB *p_tcb; local 1193 gatt_set_ch_state(tGATT_TCB *p_tcb, tGATT_CH_STATE ch_state) argument 1211 gatt_get_ch_state(tGATT_TCB *p_tcb) argument [all...] |
H A D | gatt_auth.c | 48 UINT16 payload_size = p_clcb->p_tcb->payload_size; 53 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); 69 if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda, 75 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); 99 void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf) argument 115 if (BTM_BleVerifySignature(p_tcb->peer_bda, p_orig, cmd_len, counter, p)) 118 gatt_server_handle_client_req (p_tcb, op_code, (UINT16)(p_buf->len - 1), p_orig); 139 if (p_clcb && p_clcb->p_tcb && GKI_queue_is_empty(&p_clcb->p_tcb->pending_enc_clcb)) 140 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NON 166 tGATT_TCB *p_tcb; local 235 tGATT_TCB *p_tcb; local 283 gatt_set_sec_act(tGATT_TCB *p_tcb, tGATT_SEC_ACTION sec_act) argument 299 gatt_get_sec_act(tGATT_TCB *p_tcb) argument 322 tGATT_TCB *p_tcb = p_clcb->p_tcb; local 422 gatt_get_link_encrypt_status(tGATT_TCB *p_tcb) argument 482 tGATT_TCB *p_tcb = p_clcb->p_tcb; local [all...] |
H A D | gatt_sr.c | 46 UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle) argument 48 tGATT_SR_CMD *p_cmd = &p_tcb->sr_cmd; 59 trans_id = ++p_tcb->trans_id; 63 p_cmd->trans_id = ++p_tcb->trans_id; 67 p_tcb->trans_id %= GATT_TRANS_ID_MAX; 84 BOOLEAN gatt_sr_cmd_empty (tGATT_TCB *p_tcb) argument 86 return(p_tcb->sr_cmd.op_code == 0); 98 void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb) argument 102 if (p_tcb->sr_cmd.p_rsp_msg) 104 GATT_TRACE_ERROR("free p_tcb 261 gatt_sr_process_app_rsp(tGATT_TCB *p_tcb, tGATT_IF gatt_if, UINT32 trans_id, UINT8 op_code, tGATT_STATUS status, tGATTS_RSP *p_msg) argument 331 gatt_process_exec_write_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 395 gatt_process_read_multi_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 524 gatt_build_primary_service_rsp(BT_HDR *p_msg, tGATT_TCB *p_tcb, UINT8 op_code, UINT16 s_hdl, UINT16 e_hdl, UINT8 *p_data, tBT_UUID value) argument 762 gatts_process_primary_service_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 833 gatts_process_find_info(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 908 gatts_process_mtu_req(tGATT_TCB *p_tcb, UINT16 len, UINT8 *p_data) argument 976 gatts_process_read_by_type_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 1092 gatts_process_write_req(tGATT_TCB *p_tcb, UINT8 i_rcb, UINT16 handle, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 1184 gatts_process_read_req(tGATT_TCB *p_tcb, tGATT_SR_REG *p_rcb, UINT8 op_code, UINT16 handle, UINT16 len, UINT8 *p_data) argument 1254 gatts_process_attribute_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 1389 gatts_proc_ind_ack(tGATT_TCB *p_tcb, UINT16 ack_handle) argument 1415 gatts_process_value_conf(tGATT_TCB *p_tcb, UINT8 op_code) argument 1461 gatt_server_handle_client_req(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument [all...] |
H A D | gatt_cl.c | 49 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); 139 tGATT_TCB *p_tcb = p_clcb->p_tcb; local 208 rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg); 227 tGATT_TCB *p_tcb = p_clcb->p_tcb; local 238 rt = gatt_send_write_msg(p_tcb, 248 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE)) 252 rt = gatt_send_write_msg(p_tcb, 298 gatt_send_queue_write_cancel(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG flag) argument 320 gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_VALUE *p_rsp_value) argument 363 gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb) argument 414 gatt_process_find_type_value_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data) argument 459 gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 518 gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode, UINT16 handle, UINT8 reason) argument 558 gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 611 gatt_process_prep_write_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 659 gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 745 gatt_process_read_by_type_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 947 gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument 1051 gatt_process_mtu_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data) argument 1101 gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb) argument 1163 gatt_client_handle_server_rsp(tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, UINT8 *p_data) argument [all...] |
H A D | gatt_api.c | 606 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 610 if ( (p_reg == NULL) || (p_tcb == NULL)) 625 if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle)) 628 if ((p_buf = gatt_add_pending_ind(p_tcb, &indication)) !=NULL) 640 if ( (p_msg = attp_build_sr_msg (p_tcb, GATT_HANDLE_VALUE_IND, (tGATT_SR_MSG *)&indication)) != NULL) 642 cmd_status = attp_send_sr_msg (p_tcb, p_msg); 646 p_tcb->indicate_handle = indication.handle; 647 gatt_start_conf_timer(p_tcb); 677 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 681 if ( (p_reg == NULL) || (p_tcb 726 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 778 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 833 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 902 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 990 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 1064 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 1111 tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id)); local 1162 tGATT_TCB *p_tcb; local 1251 tGATT_TCB *p_tcb; local 1336 tGATT_TCB *p_tcb; local 1420 tGATT_TCB *p_tcb; local 1499 tGATT_TCB *p_tcb=NULL; local 1541 tGATT_TCB *p_tcb= gatt_get_tcb_by_idx(tcb_idx); local 1576 tGATT_TCB *p_tcb= gatt_find_tcb_by_addr(bd_addr, transport); local [all...] |
H A D | gatt_utils.c | 92 void gatt_free_pending_ind(tGATT_TCB *p_tcb) argument 96 while (!GKI_queue_is_empty(&p_tcb->pending_ind_q)) 97 GKI_freebuf (GKI_dequeue (&p_tcb->pending_ind_q)); 109 void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb) argument 113 while (!GKI_queue_is_empty(&p_tcb->pending_enc_clcb)) 114 GKI_freebuf (GKI_dequeue (&p_tcb->pending_enc_clcb)); 215 tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB *p_tcb, tGATT_VALUE *p_ind) argument 223 GKI_enqueue (&p_tcb->pending_ind_q, p_buf); 744 BOOLEAN gatt_is_srv_chg_ind_pending (tGATT_TCB *p_tcb) argument 746 tGATT_VALUE *p_buf = (tGATT_VALUE *)GKI_getfirst(&p_tcb 865 tGATT_TCB *p_tcb = NULL; local 884 tGATT_TCB *p_tcb = NULL; local 928 tGATT_TCB *p_tcb = NULL; local 1194 gatt_start_conf_timer(tGATT_TCB *p_tcb) argument 1209 gatt_start_ind_ack_timer(tGATT_TCB *p_tcb) argument 1267 tGATT_TCB * p_tcb = (tGATT_TCB *)p_tle->param; local 1438 gatt_send_error_rsp(tGATT_TCB *p_tcb, UINT8 err_code, UINT8 op_code, UINT16 handle, BOOLEAN deq) argument 1624 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 1676 tGATT_TCB *p_tcb = NULL; local 1699 gatt_num_apps_hold_link(tGATT_TCB *p_tcb) argument 1802 gatt_sr_is_prep_cnt_zero(tGATT_TCB *p_tcb) argument 1879 gatt_sr_update_cback_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc, BOOLEAN is_reset_first) argument 1914 gatt_sr_update_prep_cnt(tGATT_TCB *p_tcb, tGATT_IF gatt_if, BOOLEAN is_inc, BOOLEAN is_reset_first) argument 1951 tGATT_TCB *p_tcb=NULL; local 1985 gatt_find_app_hold_link(tGATT_TCB *p_tcb, UINT8 start_idx, UINT8 *p_found_idx, tGATT_IF *p_gatt_if) argument 2012 gatt_cmd_enq(tGATT_TCB *p_tcb, UINT16 clcb_idx, BOOLEAN to_send, UINT8 op_code, BT_HDR *p_buf) argument 2041 gatt_cmd_dequeue(tGATT_TCB *p_tcb, UINT8 *p_op_code) argument 2068 gatt_send_write_msg(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, UINT16 handle, UINT16 len, UINT16 offset, UINT8 *p_data) argument 2094 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle, UINT16 e_handle, tBT_UUID uuid) argument 2200 tGATT_TCB *p_tcb = NULL; local 2478 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE); local 2700 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE); local 2738 gatt_add_pending_enc_channel_clcb(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb ) argument [all...] |
H A D | att_protocol.c | 355 tGATT_STATUS attp_send_msg_to_l2cap(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP) argument 360 if (p_tcb->att_lcid == L2CAP_ATT_CID) 361 l2cap_ret = L2CA_SendFixedChnlData (L2CAP_ATT_CID, p_tcb->peer_bda, p_toL2CAP); 363 l2cap_ret = (UINT16) L2CA_DataWrite (p_tcb->att_lcid, p_toL2CAP); 386 BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg) argument 405 p_cmd = attp_build_value_cmd(p_tcb->payload_size, 447 ** Parameter p_tcb: pointer to the connecton control block. 454 tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg) argument 458 if (p_tcb != NULL) 463 cmd_sent = attp_send_msg_to_l2cap (p_tcb, p_ms 481 attp_cl_send_cmd(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 cmd_code, BT_HDR *p_cmd) argument 533 attp_send_cl_msg(tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, tGATT_CL_MSG *p_msg) argument [all...] |
H A D | gatt_int.h | 395 tGATT_TCB *p_tcb; /* associated TCB of this CLCB */ member in struct:__anon877 436 tGATT_TCB *p_tcb; member in struct:__anon880 553 extern BOOLEAN gatt_disconnect (tGATT_TCB *p_tcb); 555 extern BOOLEAN gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb, tBT_TRANSPORT transport); 556 extern void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf); 557 extern void gatt_update_app_use_link_flag ( tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOOLEAN check_acl_link); 560 extern void gatt_set_ch_state(tGATT_TCB *p_tcb, tGATT_CH_STATE ch_state); 561 extern tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB *p_tcb); 573 extern tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, tGATT_CL_MSG *p_msg); 574 extern BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT [all...] |
H A D | gatt_db.c | 47 static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code, 321 tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, argument 379 status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, 0, trans_id); 412 if (BTM_GetSecurityFlags(p_tcb->peer_bda, &flag)) 414 if ((p_tcb->att_lcid == L2CAP_ATT_CID) && (status == GATT_PENDING) && 421 p = btm_bda_to_acl(p_tcb->peer_bda, BT_TRANSPORT_LE); 425 btm_ble_set_encryption(p_tcb->peer_bda, &sec_act, p->link_role); 633 tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb, argument 661 status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, offset, trans_id); 1135 static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT argument [all...] |
/system/bt/bta/gatt/ |
H A D | bta_gattc_utils.c | 390 tBTA_GATTC_SERV *p_tcb = &bta_gattc_cb.known_server[0], local 395 for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i ++, p_tcb ++) 397 if (!p_tcb->in_use) 402 else if (!p_tcb->connected) 404 p_recycle = p_tcb; 410 p_tcb = NULL; 412 p_tcb = p_recycle; 414 if (p_tcb != NULL) 416 while (!GKI_queue_is_empty(&p_tcb->cache_buffer)) 417 GKI_freebuf (GKI_dequeue (&p_tcb [all...] |