Home | History | Annotate | Download | only in gatt

Lines Matching refs:p_tcb

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;
208 rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg);
227 tGATT_TCB *p_tcb = p_clcb->p_tcb;
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,
262 gatt_send_prepare_write(p_tcb, p_clcb);
267 gatt_send_prepare_write(p_tcb, p_clcb);
298 void gatt_send_queue_write_cancel (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG flag)
304 rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, GATT_REQ_EXEC_WRITE, (tGATT_CL_MSG *)&flag);
320 BOOLEAN gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_VALUE *p_rsp_value)
349 gatt_send_queue_write_cancel (p_tcb, p_clcb, flag);
363 void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
373 if (to_send > (p_tcb->payload_size - GATT_WRITE_LONG_HDR_SIZE)) /* 2 = UINT16 offset bytes */
374 to_send = p_tcb->payload_size - GATT_WRITE_LONG_HDR_SIZE;
386 rt = gatt_send_write_msg(p_tcb,
414 void gatt_process_find_type_value_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data)
419 UNUSED(p_tcb);
459 void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
465 UNUSED(p_tcb);
518 void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode,
523 UNUSED(p_tcb);
558 void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
575 gatt_proc_disc_error_rsp(p_tcb, p_clcb, opcode, handle, reason);
586 gatt_send_queue_write_cancel(p_tcb, p_clcb, GATT_PREP_WRITE_CANCEL);
611 void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
643 if (!gatt_check_write_long_terminate(p_tcb, p_clcb, &value))
644 gatt_send_prepare_write(p_tcb, p_clcb);
659 void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
685 attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, NULL);
691 if (p_tcb->ind_count)
698 GATT_TRACE_ERROR("gatt_process_notification rcv Ind. but ind_count=%d (will reset ind_count)", p_tcb->ind_count);
700 p_tcb->ind_count = 0;
710 p_tcb->ind_count++;
716 if (p_tcb->ind_count > 0)
717 gatt_start_ind_ack_timer(p_tcb);
719 attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, NULL);
722 encrypt_status = gatt_get_link_encrypt_status(p_tcb);
727 conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
745 void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
766 if ((value_len > (p_tcb->payload_size - 2)) || (value_len > (len-1)) )
771 op_code, value_len, (p_tcb->payload_size - 2), (len-1));
862 if ( p_clcb->counter == (p_clcb->p_tcb->payload_size -4))
947 void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
981 if (len == (p_tcb->payload_size - 1) && /* full packet for read or read blob rsp */
1051 void gatt_process_mtu_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data)
1065 if (mtu < p_tcb->payload_size && mtu >= GATT_DEF_BLE_MTU_SIZE)
1066 p_tcb->payload_size = mtu;
1069 l2cble_set_fixed_channel_tx_data_length(p_tcb->peer_bda, L2CAP_ATT_CID, p_tcb->payload_size);
1101 BOOLEAN gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb)
1103 tGATT_CMD_Q *p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
1110 p_tcb->pending_cl_req != p_tcb->next_slot_inq &&
1113 att_ret = attp_send_msg_to_l2cap(p_tcb, p_cmd->p_cmd);
1128 p_clcb = gatt_cmd_dequeue(p_tcb, &rsp_code);
1134 p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
1144 p_tcb->pending_cl_req ++;
1145 p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
1163 void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
1171 p_clcb = gatt_cmd_dequeue(p_tcb, &rsp_code);
1190 if (len >= p_tcb->payload_size)
1192 GATT_TRACE_ERROR("invalid response/indicate pkt size: %d, PDU size: %d", len + 1, p_tcb->payload_size);
1202 gatt_process_error_rsp(p_tcb, p_clcb, op_code, len, p_data);
1206 gatt_process_mtu_rsp(p_tcb, p_clcb, len ,p_data);
1210 gatt_process_read_info_rsp(p_tcb, p_clcb, op_code, len, p_data);
1215 gatt_process_read_by_type_rsp(p_tcb, p_clcb, op_code, len, p_data);
1221 gatt_process_read_rsp(p_tcb, p_clcb, op_code, len, p_data);
1225 gatt_process_find_type_value_rsp(p_tcb, p_clcb, len, p_data);
1233 gatt_process_prep_write_rsp(p_tcb, p_clcb, op_code, len, p_data);
1242 gatt_process_notification(p_tcb, op_code, len, p_data);
1253 gatt_cl_send_next_cmd_inq(p_tcb);