qcacmn: Fix cfg_in_range for non-ini values

Currently, the macro type and the "is an ini" value information are
clubbed to together in the cfg component. This lead to not being able to
use the macro type with non-ini configuration values. Split macro type
and "is an ini" value information in the cfg component so that
cfg_in_range can be used with non-ini configuration values.

Change-Id: If63f222cf21a45f0d7d3809f1be845ecc2b2cd65
CRs-Fixed: 2278656
This commit is contained in:
Dustin Brown
2018-07-13 10:41:08 -07:00
committed by nshrivas
父節點 0bd21d200c
當前提交 46a32752de
共有 4 個文件被更改,包括 67 次插入50 次删除

查看文件

@@ -38,11 +38,12 @@
/* define global config values structure */
#undef __CFG_STRING
#define __CFG_STRING(id, mtype, ctype, name, min, max, fallback, desc, def...) \
const char id##_internal[max + 1];
#undef __CFG_ANY
#define __CFG_ANY(id, mtype, ctype, name, min, max, fallback, desc, def...) \
#undef __CFG_INI_STRING
#define __CFG_INI_STRING(id, mtype, ctype, name, min, max, fallback, desc, \
def...) \
const char id##_internal[(max) + 1];
#undef __CFG_INI
#define __CFG_INI(id, mtype, ctype, name, min, max, fallback, desc, def...) \
const ctype id##_internal;
struct cfg_values {
@@ -50,10 +51,10 @@ struct cfg_values {
CFG_ALL
};
#undef __CFG_STRING
#define __CFG_STRING(args...) __CFG_ANY(args)
#undef __CFG_ANY
#define __CFG_ANY(args...) (args)
#undef __CFG_INI_STRING
#define __CFG_INI_STRING(args...) __CFG_INI(args)
#undef __CFG_INI
#define __CFG_INI(args...) (args)
struct cfg_values *cfg_psoc_get_values(struct wlan_objmgr_psoc *psoc);