Lines Matching refs:len
96 cl_req.browse.uuid.len = 2; in gatt_act_discovery()
102 cl_req.find_type_value.uuid.len = 2; in gatt_act_discovery()
106 cl_req.find_type_value.value_len = p_clcb->uuid.len; in gatt_act_discovery()
108 if (p_clcb->uuid.len == LEN_UUID_32) in gatt_act_discovery()
114 memcpy (cl_req.find_type_value.value, &p_clcb->uuid.uu, p_clcb->uuid.len); in gatt_act_discovery()
157 msg.browse.uuid.len = LEN_UUID_16; in gatt_act_read()
242 p_attr->len, in gatt_act_write()
248 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE)) in gatt_act_write()
256 p_attr->len, in gatt_act_write()
331 p_rsp_value->len != p_clcb->counter || in gatt_check_write_long_terminate()
332 memcmp(p_rsp_value->value, p_attr->value + p_attr->offset, p_rsp_value->len)) in gatt_check_write_long_terminate()
343 if ((p_attr->offset += p_rsp_value->len) >= p_attr->len) in gatt_check_write_long_terminate()
371 to_send = p_attr->len - p_attr->offset; in gatt_send_prepare_write()
414 void gatt_process_find_type_value_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_d… in gatt_process_find_type_value_rsp() argument
427 result.type.len = 2; in gatt_process_find_type_value_rsp()
431 while (len >= 4) in gatt_process_find_type_value_rsp()
437 len -= 4; in gatt_process_find_type_value_rsp()
460 UINT16 len, UINT8 *p_data) in gatt_process_read_info_rsp() argument
468 if (len < GATT_INFO_RSP_MIN_LEN) in gatt_process_read_info_rsp()
479 len -= 1; in gatt_process_read_info_rsp()
486 while (len >= uuid_len + 2) in gatt_process_read_info_rsp()
498 len -= (uuid_len + 2); in gatt_process_read_info_rsp()
559 UINT16 len, UINT8 *p_data) in gatt_process_error_rsp() argument
566 UNUSED(len); in gatt_process_error_rsp()
612 UINT16 len, UINT8 *p_data) in gatt_process_prep_write_rsp() argument
621 GATT_TRACE_ERROR("value resp op_code = %s len = %d", gatt_dbg_op_name(op_code), len); in gatt_process_prep_write_rsp()
623 if (len < GATT_PREP_WRITE_RSP_MIN_LEN) in gatt_process_prep_write_rsp()
633 value.len = len - 4; in gatt_process_prep_write_rsp()
635 memcpy (value.value, p, value.len); in gatt_process_prep_write_rsp()
664 UINT16 len, UINT8 *p_data) in gatt_process_notification() argument
675 if (len < GATT_NOTIFICATION_MIN_LEN) in gatt_process_notification()
683 value.len = len - 2; in gatt_process_notification()
684 memcpy (value.value, p, value.len); in gatt_process_notification()
751 UINT16 len, UINT8 *p_data) in gatt_process_read_by_type_rsp() argument
762 if (len < GATT_READ_BY_TYPE_RSP_MIN_LEN) in gatt_process_read_by_type_rsp()
771 if ((value_len > (p_tcb->payload_size - 2)) || (value_len > (len-1)) ) in gatt_process_read_by_type_rsp()
776 op_code, value_len, (p_tcb->payload_size - 2), (len-1)); in gatt_process_read_by_type_rsp()
785 len -= 1; in gatt_process_read_by_type_rsp()
787 while (len >= (handle_len + value_len)) in gatt_process_read_by_type_rsp()
801 result.type.len = 2; in gatt_process_read_by_type_rsp()
842 record_value.incl_service.service_type.len = LEN_UUID_16; in gatt_process_read_by_type_rsp()
865 p_clcb->counter = len - 2; in gatt_process_read_by_type_rsp()
904 len -= (value_len + 2); in gatt_process_read_by_type_rsp()
918 len -= (value_len + handle_len); in gatt_process_read_by_type_rsp()
952 UINT16 len, UINT8 *p_data) in gatt_process_read_rsp() argument
963 p_clcb->counter = len; in gatt_process_read_rsp()
975 if ((len + offset) > GATT_MAX_ATTR_LEN) in gatt_process_read_rsp()
976 len = GATT_MAX_ATTR_LEN - offset; in gatt_process_read_rsp()
978 p_clcb->counter += len; in gatt_process_read_rsp()
980 memcpy(p_clcb->p_attr_buf + offset, p, len); in gatt_process_read_rsp()
984 if (len == (p_tcb->payload_size - 1) && /* full packet for read or read blob rsp */ in gatt_process_read_rsp()
985 len + offset < GATT_MAX_ATTR_LEN) in gatt_process_read_rsp()
988 offset, len, p_clcb->counter); in gatt_process_read_rsp()
1011 if (len == LEN_UUID_128) in gatt_process_read_rsp()
1014 … memcpy(p_clcb->read_uuid128.result.value.incl_service.service_type.uu.uuid128, p, len); in gatt_process_read_rsp()
1015 p_clcb->read_uuid128.result.value.incl_service.service_type.len = LEN_UUID_128; in gatt_process_read_rsp()
1054 void gatt_process_mtu_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data) in gatt_process_mtu_rsp() argument
1059 if (len < GATT_MTU_RSP_MIN_LEN) in gatt_process_mtu_rsp()
1167 UINT16 len, UINT8 *p_data) in gatt_client_handle_server_rsp() argument
1193 if (len >= p_tcb->payload_size) in gatt_client_handle_server_rsp()
1195 …GATT_TRACE_ERROR("invalid response/indicate pkt size: %d, PDU size: %d", len + 1, p_tcb->payload_s… in gatt_client_handle_server_rsp()
1205 gatt_process_error_rsp(p_tcb, p_clcb, op_code, len, p_data); in gatt_client_handle_server_rsp()
1209 gatt_process_mtu_rsp(p_tcb, p_clcb, len ,p_data); in gatt_client_handle_server_rsp()
1213 gatt_process_read_info_rsp(p_tcb, p_clcb, op_code, len, p_data); in gatt_client_handle_server_rsp()
1218 gatt_process_read_by_type_rsp(p_tcb, p_clcb, op_code, len, p_data); in gatt_client_handle_server_rsp()
1224 gatt_process_read_rsp(p_tcb, p_clcb, op_code, len, p_data); in gatt_client_handle_server_rsp()
1228 gatt_process_find_type_value_rsp(p_tcb, p_clcb, len, p_data); in gatt_client_handle_server_rsp()
1236 gatt_process_prep_write_rsp(p_tcb, p_clcb, op_code, len, p_data); in gatt_client_handle_server_rsp()
1245 gatt_process_notification(p_tcb, op_code, len, p_data); in gatt_client_handle_server_rsp()