Home
last modified time | relevance | path

Searched refs:p_clcb (Results 1 – 17 of 17) sorted by relevance

/system/bt/stack/gatt/
Dgatt_cl.cc50 void gatt_send_prepare_write(tGATT_TCB& tcb, tGATT_CLCB* p_clcb);
79 void gatt_act_discovery(tGATT_CLCB* p_clcb) { in gatt_act_discovery() argument
80 uint8_t op_code = disc_type_to_att_opcode[p_clcb->op_subtype]; in gatt_act_discovery()
84 if (p_clcb->s_handle <= p_clcb->e_handle && p_clcb->s_handle != 0) { in gatt_act_discovery()
87 cl_req.browse.s_handle = p_clcb->s_handle; in gatt_act_discovery()
88 cl_req.browse.e_handle = p_clcb->e_handle; in gatt_act_discovery()
90 if (disc_type_to_uuid[p_clcb->op_subtype] != 0) { in gatt_act_discovery()
92 cl_req.browse.uuid.uu.uuid16 = disc_type_to_uuid[p_clcb->op_subtype]; in gatt_act_discovery()
95 if (p_clcb->op_subtype == in gatt_act_discovery()
100 disc_type_to_uuid[p_clcb->op_subtype]; in gatt_act_discovery()
[all …]
Dgatt_attr.cc62 static void gatt_cl_start_config_ccc(tGATT_PROFILE_CLCB* p_clcb);
101 tGATT_PROFILE_CLCB* p_clcb = NULL; in gatt_profile_find_clcb_by_conn_id() local
103 for (i_clcb = 0, p_clcb = gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; in gatt_profile_find_clcb_by_conn_id()
104 i_clcb++, p_clcb++) { in gatt_profile_find_clcb_by_conn_id()
105 if (p_clcb->in_use && p_clcb->conn_id == conn_id) return p_clcb; in gatt_profile_find_clcb_by_conn_id()
123 tGATT_PROFILE_CLCB* p_clcb = NULL; in gatt_profile_find_clcb_by_bd_addr() local
125 for (i_clcb = 0, p_clcb = gatt_cb.profile_clcb; i_clcb < GATT_MAX_APPS; in gatt_profile_find_clcb_by_bd_addr()
126 i_clcb++, p_clcb++) { in gatt_profile_find_clcb_by_bd_addr()
127 if (p_clcb->in_use && p_clcb->transport == transport && p_clcb->connected && in gatt_profile_find_clcb_by_bd_addr()
128 p_clcb->bda == bda) in gatt_profile_find_clcb_by_bd_addr()
[all …]
Dgatt_auth.cc46 static bool gatt_sign_data(tGATT_CLCB* p_clcb) { in gatt_sign_data() argument
47 tGATT_VALUE* p_attr = (tGATT_VALUE*)p_clcb->p_attr_buf; in gatt_sign_data()
49 uint16_t payload_size = p_clcb->p_tcb->payload_size; in gatt_sign_data()
54 gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_OK); in gatt_sign_data()
71 p_clcb->p_tcb->peer_bda, p_data, in gatt_sign_data()
75 gatt_set_ch_state(p_clcb->p_tcb, GATT_CH_OPEN); in gatt_sign_data()
76 gatt_act_write(p_clcb, GATT_SEC_SIGN_DATA); in gatt_sign_data()
78 gatt_end_operation(p_clcb, GATT_INTERNAL_ERROR, NULL); in gatt_sign_data()
130 void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB* p_clcb, in gatt_sec_check_complete() argument
132 if (p_clcb && p_clcb->p_tcb && p_clcb->p_tcb->pending_enc_clcb.empty()) { in gatt_sec_check_complete()
[all …]
Dgatt_utils.cc658 void gatt_start_rsp_timer(tGATT_CLCB* p_clcb) { in gatt_start_rsp_timer() argument
661 if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY && in gatt_start_rsp_timer()
662 p_clcb->op_subtype == GATT_DISC_SRVC_ALL) { in gatt_start_rsp_timer()
668 if (p_clcb->gatt_rsp_timer_ent == NULL) { in gatt_start_rsp_timer()
669 p_clcb->gatt_rsp_timer_ent = alarm_new("gatt.gatt_rsp_timer_ent"); in gatt_start_rsp_timer()
671 alarm_set_on_mloop(p_clcb->gatt_rsp_timer_ent, timeout_ms, gatt_rsp_timeout, in gatt_start_rsp_timer()
672 p_clcb); in gatt_start_rsp_timer()
714 tGATT_CLCB* p_clcb = (tGATT_CLCB*)data; in gatt_rsp_timeout() local
716 if (p_clcb == NULL || p_clcb->p_tcb == NULL) { in gatt_rsp_timeout()
720 if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY && in gatt_rsp_timeout()
[all …]
Dgatt_api.cc657 tGATT_CLCB* p_clcb = gatt_clcb_alloc(conn_id); in GATTC_ConfigureMTU() local
658 if (!p_clcb) return GATT_NO_RESOURCES; in GATTC_ConfigureMTU()
660 p_clcb->p_tcb->payload_size = mtu; in GATTC_ConfigureMTU()
661 p_clcb->operation = GATTC_OPTYPE_CONFIG; in GATTC_ConfigureMTU()
664 return attp_send_cl_msg(*p_clcb->p_tcb, p_clcb, GATT_REQ_MTU, &gatt_cl_msg); in GATTC_ConfigureMTU()
711 tGATT_CLCB* p_clcb = gatt_clcb_alloc(conn_id); in GATTC_Discover() local
712 if (!p_clcb) return GATT_NO_RESOURCES; in GATTC_Discover()
714 p_clcb->operation = GATTC_OPTYPE_DISCOVERY; in GATTC_Discover()
715 p_clcb->op_subtype = disc_type; in GATTC_Discover()
716 p_clcb->s_handle = p_param->s_handle; in GATTC_Discover()
[all …]
Dgatt_int.h203 tGATT_CLCB* p_clcb; member
426 extern tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb,
446 extern void gatt_start_rsp_timer(tGATT_CLCB* p_clcb);
511 extern void gatt_clcb_dealloc(tGATT_CLCB* p_clcb);
535 extern uint8_t gatt_send_write_msg(tGATT_TCB& p_tcb, tGATT_CLCB* p_clcb,
541 extern void gatt_end_operation(tGATT_CLCB* p_clcb, tGATT_STATUS status,
544 extern void gatt_act_discovery(tGATT_CLCB* p_clcb);
545 extern void gatt_act_read(tGATT_CLCB* p_clcb, uint16_t offset);
546 extern void gatt_act_write(tGATT_CLCB* p_clcb, uint8_t sec_act);
548 extern void gatt_cmd_enq(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, bool to_send,
[all …]
Datt_protocol.cc419 tGATT_STATUS attp_cl_send_cmd(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_cl_send_cmd() argument
424 gatt_cmd_enq(tcb, p_clcb, true, cmd_code, p_cmd); in attp_cl_send_cmd()
439 gatt_start_rsp_timer(p_clcb); in attp_cl_send_cmd()
440 gatt_cmd_enq(tcb, p_clcb, false, cmd_code, NULL); in attp_cl_send_cmd()
460 tGATT_STATUS attp_send_cl_msg(tGATT_TCB& tcb, tGATT_CLCB* p_clcb, in attp_send_cl_msg() argument
535 return attp_cl_send_cmd(tcb, p_clcb, op_code, p_cmd); in attp_send_cl_msg()
/system/bt/bta/gatt/
Dbta_gattc_act.cc266 tBTA_GATTC_CLCB* p_clcb = NULL; in bta_gattc_process_api_open() local
271 p_clcb = bta_gattc_find_alloc_clcb(p_msg->api_conn.client_if, in bta_gattc_process_api_open()
274 if (p_clcb != NULL) { in bta_gattc_process_api_open()
275 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open()
302 tBTA_GATTC_CLCB* p_clcb = NULL; in bta_gattc_process_api_open_cancel() local
307 p_clcb = bta_gattc_find_clcb_by_cif(p_msg->api_cancel_conn.client_if, in bta_gattc_process_api_open_cancel()
310 if (p_clcb != NULL) { in bta_gattc_process_api_open_cancel()
311 bta_gattc_sm_execute(p_clcb, event, p_msg); in bta_gattc_process_api_open_cancel()
353 void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB* p_clcb, in bta_gattc_cancel_open_error() argument
359 if (p_clcb && p_clcb->p_rcb && p_clcb->p_rcb->p_cback) in bta_gattc_cancel_open_error()
[all …]
Dbta_gattc_utils.cc155 tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_cif() local
158 for (i = 0; i < BTA_GATTC_CLCB_MAX; i++, p_clcb++) { in bta_gattc_find_clcb_by_cif()
159 if (p_clcb->in_use && p_clcb->p_rcb->client_if == client_if && in bta_gattc_find_clcb_by_cif()
160 p_clcb->transport == transport && p_clcb->bda == remote_bda) in bta_gattc_find_clcb_by_cif()
161 return p_clcb; in bta_gattc_find_clcb_by_cif()
175 tBTA_GATTC_CLCB* p_clcb = &bta_gattc_cb.clcb[0]; in bta_gattc_find_clcb_by_conn_id() local
178 for (i = 0; i < BTA_GATTC_CLCB_MAX; i++, p_clcb++) { in bta_gattc_find_clcb_by_conn_id()
179 if (p_clcb->in_use && p_clcb->bta_conn_id == conn_id) return p_clcb; in bta_gattc_find_clcb_by_conn_id()
197 tBTA_GATTC_CLCB* p_clcb = NULL; in bta_gattc_clcb_alloc() local
205 p_clcb = &bta_gattc_cb.clcb[i_clcb]; in bta_gattc_clcb_alloc()
[all …]
Dbta_gattc_int.h336 extern bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event,
348 extern void bta_gattc_open(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data);
349 extern void bta_gattc_open_fail(tBTA_GATTC_CLCB* p_clcb,
351 extern void bta_gattc_open_error(tBTA_GATTC_CLCB* p_clcb,
354 extern void bta_gattc_cancel_open(tBTA_GATTC_CLCB* p_clcb,
356 extern void bta_gattc_cancel_open_ok(tBTA_GATTC_CLCB* p_clcb,
358 extern void bta_gattc_cancel_open_error(tBTA_GATTC_CLCB* p_clcb,
361 extern void bta_gattc_conn(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data);
363 extern void bta_gattc_close(tBTA_GATTC_CLCB* p_clcb, tBTA_GATTC_DATA* p_data);
364 extern void bta_gattc_close_fail(tBTA_GATTC_CLCB* p_clcb,
[all …]
Dbta_gattc_main.cc68 typedef void (*tBTA_GATTC_ACTION)(tBTA_GATTC_CLCB* p_clcb,
296 bool bta_gattc_sm_execute(tBTA_GATTC_CLCB* p_clcb, uint16_t event, in bta_gattc_sm_execute() argument
303 tBTA_GATTC_STATE in_state = p_clcb->state; in bta_gattc_sm_execute()
311 state_table = bta_gattc_st_tbl[p_clcb->state]; in bta_gattc_sm_execute()
316 p_clcb->state = state_table[event][BTA_GATTC_NEXT_STATE]; in bta_gattc_sm_execute()
322 (*bta_gattc_action[action])(p_clcb, p_data); in bta_gattc_sm_execute()
323 if (p_clcb->p_q_cmd == p_data) { in bta_gattc_sm_execute()
335 if (in_state != p_clcb->state) { in bta_gattc_sm_execute()
338 gattc_state_code(p_clcb->state), gattc_evt_code(in_event)); in bta_gattc_sm_execute()
355 tBTA_GATTC_CLCB* p_clcb = NULL; in bta_gattc_hdl_event() local
[all …]
Dbta_gattc_cache.cc381 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_discover_pri_service() local
384 if (p_clcb) { in bta_gattc_discover_pri_service()
385 if (p_clcb->transport == BTA_TRANSPORT_LE) in bta_gattc_discover_pri_service()
482 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_explore_srvc() local
489 if (p_clcb == NULL) { in bta_gattc_explore_srvc()
510 p_clcb->p_srcb->state = BTA_GATTC_SERV_SAVE; in bta_gattc_explore_srvc()
513 bta_gattc_cache_save(p_clcb->p_srcb, p_clcb->bta_conn_id); in bta_gattc_explore_srvc()
516 bta_gattc_reset_discover_st(p_clcb->p_srcb, BTA_GATT_OK); in bta_gattc_explore_srvc()
823 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); in bta_gattc_disc_res_cback() local
827 if (p_srvc_cb != NULL && p_clcb != NULL && in bta_gattc_disc_res_cback()
[all …]
/system/bt/stack/srvc/
Dsrvc_eng.cc50 typedef void (*tSRVC_ENG_C_CMPL_ACTION)(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op,
71 tSRVC_CLCB* p_clcb = NULL; in srvc_eng_find_conn_id_by_bd_addr() local
73 for (i_clcb = 0, p_clcb = srvc_eng_cb.clcb; i_clcb < SRVC_MAX_APPS; in srvc_eng_find_conn_id_by_bd_addr()
74 i_clcb++, p_clcb++) { in srvc_eng_find_conn_id_by_bd_addr()
75 if (p_clcb->in_use && p_clcb->connected && p_clcb->bda == bda) { in srvc_eng_find_conn_id_by_bd_addr()
76 return p_clcb->conn_id; in srvc_eng_find_conn_id_by_bd_addr()
94 tSRVC_CLCB* p_clcb = NULL; in srvc_eng_find_clcb_by_bd_addr() local
96 for (i_clcb = 0, p_clcb = srvc_eng_cb.clcb; i_clcb < SRVC_MAX_APPS; in srvc_eng_find_clcb_by_bd_addr()
97 i_clcb++, p_clcb++) { in srvc_eng_find_clcb_by_bd_addr()
98 if (p_clcb->in_use && p_clcb->connected && p_clcb->bda == bda) { in srvc_eng_find_clcb_by_bd_addr()
[all …]
Dsrvc_dis.cc206 tSRVC_CLCB* p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id); in dis_gatt_c_read_dis_value_cmpl() local
212 if (dis_cb.p_read_dis_cback && p_clcb) { in dis_gatt_c_read_dis_value_cmpl()
214 p_clcb->dis_value.attr_mask); in dis_gatt_c_read_dis_value_cmpl()
216 (*dis_cb.p_read_dis_cback)(p_clcb->bda, &p_clcb->dis_value); in dis_gatt_c_read_dis_value_cmpl()
269 void dis_c_cmpl_cback(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op, tGATT_STATUS status, in dis_c_cmpl_cback() argument
273 uint16_t conn_id = p_clcb->conn_id; in dis_c_cmpl_cback()
288 p_clcb->dis_value.attr_mask |= DIS_ATTR_SYS_ID_BIT; in dis_c_cmpl_cback()
290 STREAM_TO_UINT64(p_clcb->dis_value.system_id, pp); in dis_c_cmpl_cback()
296 p_clcb->dis_value.attr_mask |= DIS_ATTR_PNP_ID_BIT; in dis_c_cmpl_cback()
297 STREAM_TO_UINT8(p_clcb->dis_value.pnp_id.vendor_id_src, pp); in dis_c_cmpl_cback()
[all …]
Dsrvc_dis_int.h63 extern void dis_c_cmpl_cback(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op,
Dsrvc_battery.cc162 void battery_c_cmpl_cback(UNUSED_ATTR tSRVC_CLCB* p_clcb, in battery_c_cmpl_cback() argument
/system/bt/stack/gap/
Dgap_ble.cc290 tGAP_CLCB* p_clcb = find_clcb_by_bd_addr(bda); in client_connect_cback() local
291 if (p_clcb == NULL) return; in client_connect_cback()
294 p_clcb->conn_id = conn_id; in client_connect_cback()
295 p_clcb->connected = true; in client_connect_cback()
297 send_cl_read_request(*p_clcb); in client_connect_cback()
299 p_clcb->connected = false; in client_connect_cback()
300 cl_op_cmpl(*p_clcb, false, 0, NULL); in client_connect_cback()
302 clcb_dealloc(*p_clcb); in client_connect_cback()
309 tGAP_CLCB* p_clcb = ble_find_clcb_by_conn_id(conn_id); in client_cmpl_cback() local
315 if (p_clcb == NULL) return; in client_cmpl_cback()
[all …]