Lines Matching refs:meta

91 				   const struct cfg_meta *meta,
100 #define cfg_value_ptr(store, meta) \ argument
101 ((void *)&(store)->values + (meta)->field_offset)
105 const struct cfg_meta *meta, in cfg_int_item_handler() argument
109 int32_t *store_value = cfg_value_ptr(store, meta); in cfg_int_item_handler()
115 meta->name, str_value, status, *store_value); in cfg_int_item_handler()
119 QDF_BUG(meta->min <= meta->max); in cfg_int_item_handler()
120 if (meta->min > meta->max) { in cfg_int_item_handler()
121 cfg_err("Invalid config item meta for %s", meta->name); in cfg_int_item_handler()
125 if (value >= meta->min && value <= meta->max) { in cfg_int_item_handler()
130 switch (meta->fallback) { in cfg_int_item_handler()
133 meta->fallback, meta->name); in cfg_int_item_handler()
139 *store_value = __cfg_clamp(value, meta->min, meta->max); in cfg_int_item_handler()
144 meta->name, value, meta->min, meta->max, *store_value); in cfg_int_item_handler()
149 const struct cfg_meta *meta, in cfg_uint_item_handler() argument
153 uint32_t *store_value = cfg_value_ptr(store, meta); in cfg_uint_item_handler()
163 min = (uint32_t)meta->min; in cfg_uint_item_handler()
164 max = (uint32_t)meta->max; in cfg_uint_item_handler()
169 meta->name, str_value, status, *store_value); in cfg_uint_item_handler()
175 cfg_err("Invalid config item meta for %s", meta->name); in cfg_uint_item_handler()
184 switch (meta->fallback) { in cfg_uint_item_handler()
187 meta->fallback, meta->name); in cfg_uint_item_handler()
198 meta->name, value, min, max, *store_value); in cfg_uint_item_handler()
203 const struct cfg_meta *meta, in cfg_bool_item_handler() argument
207 bool *store_value = cfg_value_ptr(store, meta); in cfg_bool_item_handler()
214 meta->name, str_value, status, *store_value ? "true" : "false"); in cfg_bool_item_handler()
219 const struct cfg_meta *meta, in cfg_string_item_handler() argument
222 char *store_value = cfg_value_ptr(store, meta); in cfg_string_item_handler()
225 QDF_BUG(meta->min >= 0); in cfg_string_item_handler()
226 QDF_BUG(meta->min <= meta->max); in cfg_string_item_handler()
227 if (meta->min < 0 || meta->min > meta->max) { in cfg_string_item_handler()
228 cfg_err("Invalid config item meta for %s", meta->name); in cfg_string_item_handler()
233 len = qdf_str_nlen(str_value, meta->min); in cfg_string_item_handler()
234 if (len < meta->min) { in cfg_string_item_handler()
236 meta->name, str_value, store_value); in cfg_string_item_handler()
241 len += qdf_str_nlen(str_value + meta->min, meta->max - meta->min + 1); in cfg_string_item_handler()
242 if (len > meta->max) { in cfg_string_item_handler()
244 meta->name, str_value, store_value); in cfg_string_item_handler()
248 qdf_str_lcopy(store_value, str_value, meta->max + 1); in cfg_string_item_handler()
253 const struct cfg_meta *meta, in cfg_mac_item_handler() argument
257 struct qdf_mac_addr *store_value = cfg_value_ptr(store, meta); in cfg_mac_item_handler()
264 QDF_MAC_ADDR_FMT, meta->name, str_value, status, in cfg_mac_item_handler()
270 const struct cfg_meta *meta, in cfg_ipv4_item_handler() argument
274 struct qdf_ipv4_addr *store_value = cfg_value_ptr(store, meta); in cfg_ipv4_item_handler()
281 QDF_IPV4_ADDR_STR, meta->name, str_value, status, in cfg_ipv4_item_handler()
287 const struct cfg_meta *meta, in cfg_ipv6_item_handler() argument
291 struct qdf_ipv6_addr *store_value = cfg_value_ptr(store, meta); in cfg_ipv6_item_handler()
298 QDF_IPV6_ADDR_STR, meta->name, str_value, status, in cfg_ipv6_item_handler()
361 const struct cfg_meta *meta = &cfg_meta_lookup_table[i]; in cfg_lookup_meta() local
366 if (strlen(meta->name) >= CFG_META_NAME_LENGTH_MAX) { in cfg_lookup_meta()
367 cfg_err("Invalid meta name %s", meta->name); in cfg_lookup_meta()
371 qdf_mem_copy(param, meta->name, strlen(meta->name)); in cfg_lookup_meta()
372 param[strlen(meta->name)] = '\0'; in cfg_lookup_meta()
379 return meta; in cfg_lookup_meta()
385 cfg_err("Invalid ini name %s", meta->name); in cfg_lookup_meta()
389 return meta; in cfg_lookup_meta()
400 const struct cfg_meta *meta; in cfg_ini_item_handler() local
402 meta = cfg_lookup_meta(key); in cfg_ini_item_handler()
403 if (!meta) { in cfg_ini_item_handler()
409 QDF_BUG(meta->item_handler); in cfg_ini_item_handler()
410 if (!meta->item_handler) in cfg_ini_item_handler()
413 meta->item_handler(store, meta, value); in cfg_ini_item_handler()
624 const struct cfg_meta *meta = &cfg_meta_lookup_table[i]; in cfg_store_print() local
626 offset = cfg_value_ptr(store, meta); in cfg_store_print()
628 switch (meta->cfg_type) { in cfg_store_print()
630 cfg_nofl_debug("%pK %s %d", offset, meta->name, in cfg_store_print()
634 cfg_nofl_debug("%pK %s %d", offset, meta->name, in cfg_store_print()
638 cfg_nofl_debug("%pK %s %d", offset, meta->name, in cfg_store_print()
642 cfg_nofl_debug("%pK %s %s", offset, meta->name, in cfg_store_print()
647 offset, meta->name, in cfg_store_print()
652 offset, meta->name, in cfg_store_print()
657 offset, meta->name, in cfg_store_print()
691 const struct cfg_meta *meta = &cfg_meta_lookup_table[i]; in cfg_ini_config_print() local
693 offset = cfg_value_ptr(store, meta); in cfg_ini_config_print()
695 switch (meta->cfg_type) { in cfg_ini_config_print()
697 len = qdf_scnprintf(buf, buflen, "%s %d\n", meta->name, in cfg_ini_config_print()
703 len = qdf_scnprintf(buf, buflen, "%s %d\n", meta->name, in cfg_ini_config_print()
709 len = qdf_scnprintf(buf, buflen, "%s %d\n", meta->name, in cfg_ini_config_print()
715 len = qdf_scnprintf(buf, buflen, "%s %s\n", meta->name, in cfg_ini_config_print()
723 meta->name, in cfg_ini_config_print()
731 meta->name, in cfg_ini_config_print()
738 meta->name, in cfg_ini_config_print()