Lines Matching refs:len
26 uint16_t len; member
51 struct qmi_tlv *qmi_tlv_decode(void *buf, size_t len, unsigned *txn, unsigned msg_type) in qmi_tlv_decode() argument
63 tlv->size = len; in qmi_tlv_decode()
71 void *qmi_tlv_encode(struct qmi_tlv *tlv, size_t *len) in qmi_tlv_encode() argument
82 *len = tlv->size; in qmi_tlv_encode()
107 offset += sizeof(struct qmi_tlv_item) + item->len; in qmi_tlv_get_item()
112 void *qmi_tlv_get(struct qmi_tlv *tlv, unsigned id, size_t *len) in qmi_tlv_get() argument
120 *len = item->len; in qmi_tlv_get()
124 void *qmi_tlv_get_array(struct qmi_tlv *tlv, unsigned id, unsigned len_size, size_t *len, size_t *s… in qmi_tlv_get_array() argument
147 *len = count; in qmi_tlv_get_array()
148 *size = (item->len - len_size) / count; in qmi_tlv_get_array()
153 static struct qmi_tlv_item *qmi_tlv_alloc_item(struct qmi_tlv *tlv, unsigned id, size_t len) in qmi_tlv_alloc_item() argument
163 new_size = tlv->size + sizeof(struct qmi_tlv_item) + len; in qmi_tlv_alloc_item()
173 item->len = len; in qmi_tlv_alloc_item()
181 int qmi_tlv_set(struct qmi_tlv *tlv, unsigned id, void *buf, size_t len) in qmi_tlv_set() argument
188 item = qmi_tlv_alloc_item(tlv, id, len); in qmi_tlv_set()
194 memcpy(item->data, buf, len); in qmi_tlv_set()
199 int qmi_tlv_set_array(struct qmi_tlv *tlv, unsigned id, unsigned len_size, void *buf, size_t len, s… in qmi_tlv_set_array() argument
208 array_size = len * size; in qmi_tlv_set_array()
219 *(uint32_t*)ptr++ = len; in qmi_tlv_set_array()
222 *(uint16_t*)ptr++ = len; in qmi_tlv_set_array()
225 *(uint8_t*)ptr++ = len; in qmi_tlv_set_array()