/external/bluetooth/bluedroid/stack/gatt/ |
gatt_main.c | 52 static void gatt_send_conn_cback (tGATT_TCB *p_tcb); 140 BOOLEAN gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb) 148 if (gatt_get_ch_state(p_tcb) != GATT_CH_OPEN) 149 gatt_set_ch_state(p_tcb, GATT_CH_CONN); 153 p_tcb->att_lcid = L2CAP_ATT_CID; 158 if ((p_tcb->att_lcid = L2CA_ConnectReq(BT_PSM_ATT, rem_bda)) == 0) 179 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(rem_bda); local 184 if (p_tcb != NULL) 187 if ( (ch_state = gatt_get_ch_state(p_tcb)) != GATT_CH_CLOSING ) 189 if (p_tcb->att_lcid == L2CAP_ATT_CID 320 tGATT_TCB *p_tcb; local 381 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr); local 475 tGATT_TCB *p_tcb; local 511 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr); local 562 tGATT_TCB *p_tcb; local 614 tGATT_TCB *p_tcb; local 673 tGATT_TCB *p_tcb; local 731 tGATT_TCB *p_tcb; local 770 tGATT_TCB *p_tcb; local 803 tGATT_TCB *p_tcb; local 1072 tGATT_TCB *p_tcb; local [all...] |
gatt_sr.c | 43 UINT32 gatt_sr_enqueue_cmd (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 handle) 45 tGATT_SR_CMD *p_cmd = &p_tcb->sr_cmd; 56 trans_id = ++p_tcb->trans_id; 60 p_cmd->trans_id = ++p_tcb->trans_id; 64 p_tcb->trans_id %= GATT_TRANS_ID_MAX; 81 BOOLEAN gatt_sr_cmd_empty (tGATT_TCB *p_tcb) 83 return(p_tcb->sr_cmd.op_code == 0); 95 void gatt_dequeue_sr_cmd (tGATT_TCB *p_tcb) 99 if (p_tcb->sr_cmd.p_rsp_msg) 101 GATT_TRACE_ERROR1("free p_tcb->sr_cmd.p_rsp_msg = %d", p_tcb->sr_cmd.p_rsp_msg) [all...] |
gatt_auth.c | 47 UINT16 payload_size = p_clcb->p_tcb->payload_size; 52 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); 68 if (BTM_BleDataSignature(p_clcb->p_tcb->peer_bda, 74 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); 98 void gatt_verify_signature(tGATT_TCB *p_tcb, BT_HDR *p_buf) 109 if (BTM_BleVerifySignature(p_tcb->peer_bda, p_orig, cmd_len, counter, p)) 112 gatt_server_handle_client_req (p_tcb, op_code, (UINT16)(p_buf->len - 1), p_orig); 118 gatt_disconnect(p_tcb->peer_bda); 134 if (GKI_queue_is_empty(&p_clcb->p_tcb->pending_enc_clcb)) 135 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NONE) 161 tGATT_TCB *p_tcb; local 228 tGATT_TCB *p_tcb; local 306 tGATT_TCB *p_tcb = p_clcb->p_tcb; local 477 tGATT_TCB *p_tcb = p_clcb->p_tcb; local [all...] |
gatt_cl.c | 40 void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb); 100 if (attp_send_cl_msg(p_clcb->p_tcb, p_clcb->clcb_idx, op_code, &cl_req) != GATT_SUCCESS) 120 tGATT_TCB *p_tcb = p_clcb->p_tcb; local 189 (rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg)) != GATT_SUCCESS) 206 tGATT_TCB *p_tcb = p_clcb->p_tcb; local 217 rt = gatt_send_write_msg(p_tcb, 227 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE)) 231 rt = gatt_send_write_msg(p_tcb, [all...] |
gatt_int.h | 382 tGATT_TCB *p_tcb; /* associated TCB of this CLCB */ member in struct:__anon3121 420 tGATT_TCB *p_tcb; member in struct:__anon3124 526 extern BOOLEAN gatt_connect (BD_ADDR rem_bda, tGATT_TCB *p_tcb); 527 extern void gatt_data_process (tGATT_TCB *p_tcb, BT_HDR *p_buf); 528 extern void gatt_update_app_use_link_flag ( tGATT_IF gatt_if, tGATT_TCB *p_tcb, BOOLEAN is_add, BOOLEAN check_acl_link); 531 extern void gatt_set_ch_state(tGATT_TCB *p_tcb, tGATT_CH_STATE ch_state); 532 extern tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB *p_tcb); 547 extern tGATT_STATUS attp_send_cl_msg (tGATT_TCB *p_tcb, UINT16 clcb_idx, UINT8 op_code, tGATT_CL_MSG *p_msg); 548 extern BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg); 549 extern tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg) [all...] |
gatt_api.c | 605 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 609 if ( (p_reg == NULL) || (p_tcb == NULL)) 622 if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle)) 625 if ((p_buf = gatt_add_pending_ind(p_tcb, &indication)) !=NULL) 637 if ( (p_msg = attp_build_sr_msg (p_tcb, GATT_HANDLE_VALUE_IND, (tGATT_SR_MSG *)&indication)) != NULL) 639 cmd_status = attp_send_sr_msg (p_tcb, p_msg); 643 p_tcb->indicate_handle = indication.handle; 644 gatt_start_conf_timer(p_tcb); 675 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 679 if ( (p_reg == NULL) || (p_tcb == NULL) 719 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 771 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 823 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 892 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 980 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 1054 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 1101 tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id)); local 1152 tGATT_TCB *p_tcb; local 1237 tGATT_TCB *p_tcb; local 1316 tGATT_TCB *p_tcb; local 1392 tGATT_TCB *p_tcb; local 1470 tGATT_TCB *p_tcb=NULL; local 1511 tGATT_TCB *p_tcb= gatt_get_tcb_by_idx(tcb_idx); local 1543 tGATT_TCB *p_tcb= gatt_find_tcb_by_addr(bd_addr); local [all...] |
gatt_utils.c | 91 void gatt_free_pending_ind(tGATT_TCB *p_tcb) 95 while (p_tcb->pending_ind_q.p_first) 96 GKI_freebuf (GKI_dequeue (&p_tcb->pending_ind_q)); 108 void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb) 112 while (p_tcb->pending_enc_clcb.p_first) 113 GKI_freebuf (GKI_dequeue (&p_tcb->pending_enc_clcb)); 214 tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB *p_tcb, tGATT_VALUE *p_ind) 222 GKI_enqueue (&p_tcb->pending_ind_q, p_buf); 739 BOOLEAN gatt_is_srv_chg_ind_pending (tGATT_TCB *p_tcb) 741 tGATT_VALUE *p_buf = (tGATT_VALUE *)GKI_getfirst(&p_tcb->pending_ind_q) 860 tGATT_TCB *p_tcb = NULL; local 879 tGATT_TCB *p_tcb = NULL; local 923 tGATT_TCB *p_tcb = NULL; local 1183 tGATT_TCB * p_tcb = (tGATT_TCB *)p_tle->param; local 1527 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx); local 1579 tGATT_TCB *p_tcb = NULL; local 1854 tGATT_TCB *p_tcb=NULL; local 2100 tGATT_TCB *p_tcb = NULL; local 2369 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr); local 2577 tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr); local 2623 tGATT_TCB *p_tcb; local [all...] |
att_protocol.c | 355 BOOLEAN attp_send_msg_to_L2CAP(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP) 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); 385 BT_HDR *attp_build_sr_msg(tGATT_TCB *p_tcb, UINT8 op_code, tGATT_SR_MSG *p_msg) 404 p_cmd = attp_build_value_cmd(p_tcb->payload_size, 446 ** Parameter p_tcb: pointer to the connecton control block. 453 tGATT_STATUS attp_send_sr_msg (tGATT_TCB *p_tcb, BT_HDR *p_msg) 457 if (p_tcb != NULL) 463 if (attp_send_msg_to_L2CAP (p_tcb, p_msg) [all...] |
gatt_db.c | 45 static tGATT_STATUS gatts_send_app_read_request(tGATT_TCB *p_tcb, UINT8 op_code, 315 tGATT_STATUS gatts_db_read_attr_value_by_type (tGATT_TCB *p_tcb, 365 status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, 0, trans_id); 600 tGATT_STATUS gatts_read_attr_value_by_handle(tGATT_TCB *p_tcb, 628 status = gatts_send_app_read_request(p_tcb, op_code, p_attr->handle, offset, trans_id); [all...] |
/external/bluetooth/bluedroid/bta/gatt/ |
bta_gattc_utils.c | 376 tBTA_GATTC_SERV *p_tcb = &bta_gattc_cb.known_server[0], local 381 for (i = 0; i < BTA_GATTC_KNOWN_SR_MAX; i ++, p_tcb ++) 383 if (!p_tcb->in_use) 388 else if (!p_tcb->connected) 390 p_recycle = p_tcb; 396 p_tcb = NULL; 398 p_tcb = p_recycle; 400 if (p_tcb != NULL) 402 while (p_tcb->cache_buffer.p_first) 403 GKI_freebuf (GKI_dequeue (&p_tcb->cache_buffer)) [all...] |