• Home
  • Raw
  • Download

Lines Matching refs:conn_id

61 static void gatt_request_cback(uint16_t conn_id, uint32_t trans_id,
64 const RawAddress& bda, uint16_t conn_id,
67 static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type,
69 static void gatt_disc_cmpl_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type,
71 static void gatt_cl_op_cmpl_cback(uint16_t conn_id, tGATTC_OPTYPE op,
79 static tGATT_STATUS gatt_sr_read_db_hash(uint16_t conn_id,
81 static tGATT_STATUS gatt_sr_read_cl_supp_feat(uint16_t conn_id,
83 static tGATT_STATUS gatt_sr_write_cl_supp_feat(uint16_t conn_id,
106 uint16_t conn_id = GATT_INVALID_CONN_ID; in gatt_profile_find_conn_id_by_bd_addr() local
107 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_find_conn_id_by_bd_addr()
109 if (conn_id == GATT_INVALID_CONN_ID) in gatt_profile_find_conn_id_by_bd_addr()
110 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_find_conn_id_by_bd_addr()
112 return conn_id; in gatt_profile_find_conn_id_by_bd_addr()
124 static tGATT_PROFILE_CLCB* gatt_profile_find_clcb_by_conn_id(uint16_t conn_id) { in gatt_profile_find_clcb_by_conn_id() argument
130 if (p_clcb->in_use && p_clcb->conn_id == conn_id) return p_clcb; in gatt_profile_find_clcb_by_conn_id()
171 tGATT_PROFILE_CLCB* gatt_profile_clcb_alloc(uint16_t conn_id, in gatt_profile_clcb_alloc() argument
181 p_clcb->conn_id = conn_id; in gatt_profile_clcb_alloc()
208 tGATT_STATUS read_attr_value(uint16_t conn_id, uint16_t handle, in read_attr_value() argument
225 return gatt_sr_read_cl_supp_feat(conn_id, p_value); in read_attr_value()
232 return gatt_sr_read_db_hash(conn_id, p_value); in read_attr_value()
244 tGATT_STATUS proc_read_req(uint16_t conn_id, tGATTS_REQ_TYPE, in proc_read_req() argument
250 return read_attr_value(conn_id, p_data->handle, &p_rsp->attr_value, in proc_read_req()
255 tGATT_STATUS proc_write_req(uint16_t conn_id, tGATTS_REQ_TYPE, in proc_write_req() argument
264 return gatt_sr_write_cl_supp_feat(conn_id, p_data); in proc_write_req()
284 static void gatt_request_cback(uint16_t conn_id, uint32_t trans_id, in gatt_request_cback() argument
295 status = proc_read_req(conn_id, type, &p_data->read_req, &rsp_msg); in gatt_request_cback()
304 status = proc_write_req(conn_id, type, &p_data->write_req); in gatt_request_cback()
317 if (rsp_needed) GATTS_SendRsp(conn_id, trans_id, status, &rsp_msg); in gatt_request_cback()
330 const RawAddress& bda, uint16_t conn_id, in gatt_connect_cback() argument
334 << ", conn_id: " << loghex(conn_id); in gatt_connect_cback()
348 p_clcb->conn_id = conn_id; in gatt_connect_cback()
443 static void gatt_disc_res_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, in gatt_disc_res_cback() argument
445 tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); in gatt_disc_res_cback()
484 static void gatt_disc_cmpl_cback(uint16_t conn_id, tGATT_DISC_TYPE disc_type, in gatt_disc_cmpl_cback() argument
486 tGATT_PROFILE_CLCB* p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); in gatt_disc_cmpl_cback()
498 conn_id); in gatt_disc_cmpl_cback()
507 static bool gatt_svc_read_cl_supp_feat_req(uint16_t conn_id, in gatt_svc_read_cl_supp_feat_req() argument
519 tGATT_STATUS status = GATTC_Read(conn_id, GATT_READ_BY_TYPE, &param); in gatt_svc_read_cl_supp_feat_req()
530 static bool gatt_att_write_cl_supp_feat(uint16_t conn_id, uint16_t handle) { in gatt_att_write_cl_supp_feat() argument
535 attr.conn_id = conn_id; in gatt_att_write_cl_supp_feat()
540 tGATT_STATUS status = GATTC_Write(conn_id, GATT_WRITE, &attr); in gatt_att_write_cl_supp_feat()
559 static void gatt_cl_op_cmpl_cback(uint16_t conn_id, tGATTC_OPTYPE op, in gatt_cl_op_cmpl_cback() argument
562 auto iter = OngoingOps.find(conn_id); in gatt_cl_op_cmpl_cback()
566 << " conn id: " << loghex(static_cast<uint8_t>(conn_id)); in gatt_cl_op_cmpl_cback()
585 uint8_t tcb_idx = GATT_GET_TCB_IDX(conn_id); in gatt_cl_op_cmpl_cback()
604 if (gatt_svc_read_cl_supp_feat_req(conn_id, operation_callback_data)) in gatt_cl_op_cmpl_cback()
625 gatt_att_write_cl_supp_feat(conn_id, p_data->att_value.handle); in gatt_cl_op_cmpl_cback()
645 GATTC_Discover(p_clcb->conn_id, GATT_DISC_SRVC_BY_UUID, 0x0001, 0xffff, in gatt_cl_start_config_ccc()
650 GATTC_Discover(p_clcb->conn_id, GATT_DISC_CHAR, 0x0001, p_clcb->e_handle, in gatt_cl_start_config_ccc()
655 GATTC_Discover(p_clcb->conn_id, GATT_DISC_CHAR_DSCPT, p_clcb->s_handle, in gatt_cl_start_config_ccc()
666 GATTC_Write(p_clcb->conn_id, GATT_WRITE, &ccc_value); in gatt_cl_start_config_ccc()
691 if (GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &p_clcb->conn_id, in GATT_ConfigServiceChangeCCC()
738 uint16_t conn_id; in gatt_cl_read_sr_supp_feat_req() local
745 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, peer_bda, &conn_id, in gatt_cl_read_sr_supp_feat_req()
747 if (conn_id == GATT_INVALID_CONN_ID) return false; in gatt_cl_read_sr_supp_feat_req()
749 p_clcb = gatt_profile_find_clcb_by_conn_id(conn_id); in gatt_cl_read_sr_supp_feat_req()
751 p_clcb = gatt_profile_clcb_alloc(conn_id, peer_bda, BT_TRANSPORT_LE); in gatt_cl_read_sr_supp_feat_req()
755 VLOG(1) << __func__ << " p_clcb is NULL " << loghex(conn_id); in gatt_cl_read_sr_supp_feat_req()
759 auto it = OngoingOps.find(conn_id); in gatt_cl_read_sr_supp_feat_req()
762 << loghex(conn_id); in gatt_cl_read_sr_supp_feat_req()
774 if (GATTC_Read(conn_id, GATT_READ_BY_TYPE, &param) != GATT_SUCCESS) { in gatt_cl_read_sr_supp_feat_req()
782 OngoingOps[conn_id] = std::move(cb_data); in gatt_cl_read_sr_supp_feat_req()
797 uint16_t conn_id; in gatt_profile_get_eatt_support() local
801 GATT_GetConnIdIfConnected(gatt_cb.gatt_if, remote_bda, &conn_id, in gatt_profile_get_eatt_support()
805 if (conn_id == GATT_INVALID_CONN_ID) return false; in gatt_profile_get_eatt_support()
808 uint8_t tcb_idx = GATT_GET_TCB_IDX(conn_id); in gatt_profile_get_eatt_support()
914 static tGATT_STATUS gatt_sr_read_db_hash(uint16_t conn_id, in gatt_sr_read_db_hash() argument
916 LOG(INFO) << __func__ << ": conn_id=" << loghex(conn_id); in gatt_sr_read_db_hash()
924 uint8_t tcb_idx = GATT_GET_TCB_IDX(conn_id); in gatt_sr_read_db_hash()
930 static tGATT_STATUS gatt_sr_read_cl_supp_feat(uint16_t conn_id, in gatt_sr_read_cl_supp_feat() argument
933 uint8_t tcb_idx = GATT_GET_TCB_IDX(conn_id); in gatt_sr_read_cl_supp_feat()
944 static tGATT_STATUS gatt_sr_write_cl_supp_feat(uint16_t conn_id, in gatt_sr_write_cl_supp_feat() argument
962 uint8_t tcb_idx = GATT_GET_TCB_IDX(conn_id); in gatt_sr_write_cl_supp_feat()
970 LOG(INFO) << __func__ << ": zero length, conn_id=" << loghex(conn_id) in gatt_sr_write_cl_supp_feat()
976 LOG(INFO) << __func__ << ": shorter length, conn_id=" << loghex(conn_id) in gatt_sr_write_cl_supp_feat()
992 << ": bit cannot be reset, conn_id=" << loghex(conn_id) in gatt_sr_write_cl_supp_feat()
1006 << ": reset robust caching bit, conn_id=" << loghex(conn_id) in gatt_sr_write_cl_supp_feat()
1017 << ", conn_id=" << loghex(conn_id); in gatt_sr_write_cl_supp_feat()