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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user