Lines Matching refs:tlv

64 BHND_NVRAM_DATA_CLASS_DEFN(tlv, "WGT634U", BHND_NVRAM_DATA_CAP_DEVPATHS,
99 struct bhnd_nvram_tlv *tlv,
103 struct bhnd_nvram_tlv *tlv,
107 struct bhnd_nvram_tlv *tlv,
110 struct bhnd_nvram_tlv *tlv,
360 bhnd_nvram_tlv_init(struct bhnd_nvram_tlv *tlv, struct bhnd_nvram_io *src) in bhnd_nvram_tlv_init() argument
367 BHND_NV_ASSERT(tlv->data == NULL, ("tlv data already initialized")); in bhnd_nvram_tlv_init()
374 if ((tlv->data = bhnd_nvram_iobuf_copy_range(src, 0x0, size)) == NULL) in bhnd_nvram_tlv_init()
378 tlv->count = 0; in bhnd_nvram_tlv_init()
380 while ((env = bhnd_nvram_tlv_next_env(tlv, &next, NULL)) != NULL) { in bhnd_nvram_tlv_init()
406 tlv->count++; in bhnd_nvram_tlv_init()
416 struct bhnd_nvram_tlv *tlv; in bhnd_nvram_tlv_new() local
420 tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_new()
424 if ((error = bhnd_nvram_tlv_init(tlv, io))) { in bhnd_nvram_tlv_new()
435 struct bhnd_nvram_tlv *tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_free() local
436 if (tlv->data != NULL) in bhnd_nvram_tlv_free()
437 bhnd_nvram_io_free(tlv->data); in bhnd_nvram_tlv_free()
443 struct bhnd_nvram_tlv *tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_count() local
444 return (tlv->count); in bhnd_nvram_tlv_count()
462 struct bhnd_nvram_tlv *tlv; in bhnd_nvram_tlv_next() local
466 tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_next()
472 env = bhnd_nvram_tlv_next_env(tlv, &io_offset, cookiep); in bhnd_nvram_tlv_next()
475 io_offset = bhnd_nvram_tlv_to_offset(tlv, *cookiep); in bhnd_nvram_tlv_next()
476 env = bhnd_nvram_tlv_next_env(tlv, &io_offset, NULL); in bhnd_nvram_tlv_next()
481 env = bhnd_nvram_tlv_next_env(tlv, &io_offset, cookiep); in bhnd_nvram_tlv_next()
529 struct bhnd_nvram_tlv *tlv; in bhnd_nvram_tlv_getvar_ptr() local
534 tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_getvar_ptr()
537 if ((env = bhnd_nvram_tlv_get_env(tlv, cookiep)) == NULL) in bhnd_nvram_tlv_getvar_ptr()
555 struct bhnd_nvram_tlv *tlv; in bhnd_nvram_tlv_getvar_name() local
558 tlv = (struct bhnd_nvram_tlv *)nv; in bhnd_nvram_tlv_getvar_name()
561 if ((env = bhnd_nvram_tlv_get_env(tlv, cookiep)) == NULL) in bhnd_nvram_tlv_getvar_name()
749 bhnd_nvram_tlv_next_env(struct bhnd_nvram_tlv *tlv, size_t *next, in bhnd_nvram_tlv_next_env() argument
761 error = bhnd_nvram_tlv_next_record(tlv->data, next, &offset, in bhnd_nvram_tlv_next_env()
774 c = bhnd_nvram_tlv_to_cookie(tlv, offset); in bhnd_nvram_tlv_next_env()
780 return (bhnd_nvram_tlv_get_env(tlv, c)); in bhnd_nvram_tlv_next_env()
792 bhnd_nvram_tlv_get_env(struct bhnd_nvram_tlv *tlv, void *cookiep) in bhnd_nvram_tlv_get_env() argument
800 io_size = bhnd_nvram_io_getsize(tlv->data); in bhnd_nvram_tlv_get_env()
801 io_offset = bhnd_nvram_tlv_to_offset(tlv, cookiep); in bhnd_nvram_tlv_get_env()
808 error = bhnd_nvram_io_write_ptr(tlv->data, io_offset, &ptr, in bhnd_nvram_tlv_get_env()
841 bhnd_nvram_tlv_to_cookie(struct bhnd_nvram_tlv *tlv, size_t io_offset) in bhnd_nvram_tlv_to_cookie() argument
846 BHND_NV_ASSERT(io_offset < bhnd_nvram_io_getsize(tlv->data), in bhnd_nvram_tlv_to_cookie()
851 error = bhnd_nvram_io_read_ptr(tlv->data, 0x0, &ptr, io_offset, NULL); in bhnd_nvram_tlv_to_cookie()
861 bhnd_nvram_tlv_to_offset(struct bhnd_nvram_tlv *tlv, void *cookiep) in bhnd_nvram_tlv_to_offset() argument
870 io_size = bhnd_nvram_io_getsize(tlv->data); in bhnd_nvram_tlv_to_offset()
872 error = bhnd_nvram_io_read_ptr(tlv->data, 0x0, &ptr, io_size, NULL); in bhnd_nvram_tlv_to_offset()