qcacmn: Enable CFG INI/NON INI Logging
Enable CFG INI/NON INI logging CRs-Fixed: 2425069 Change-Id: I21cbcc5f88cc0099dc593113f1d346e188d70f58
This commit is contained in:

committed by
nshrivas

parent
05f70da365
commit
41696b3a10
@@ -173,6 +173,14 @@ QDF_STATUS cfg_parse_to_psoc_store(struct wlan_objmgr_psoc *psoc,
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS cfg_parse_to_global_store(const char *path);
|
QDF_STATUS cfg_parse_to_global_store(const char *path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cfg_ucfg_store_print() prints the cfg ini/non ini logs
|
||||||
|
* @psoc: psoc
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS ucfg_cfg_store_print(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cfg_get() - lookup the configured value for @id from @psoc
|
* cfg_get() - lookup the configured value for @id from @psoc
|
||||||
* @psoc: The psoc from which to lookup the configured value
|
* @psoc: The psoc from which to lookup the configured value
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -34,6 +34,20 @@
|
|||||||
#define cfg_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_CONFIG, "enter")
|
#define cfg_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_CONFIG, "enter")
|
||||||
#define cfg_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_CONFIG, "exit")
|
#define cfg_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_CONFIG, "exit")
|
||||||
|
|
||||||
|
#define cfg_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
#define cfg_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
#define cfg_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
#define cfg_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
|
||||||
|
#define cfg_nofl_err(params...) \
|
||||||
|
QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
#define cfg_nofl_warn(params...) \
|
||||||
|
QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
#define cfg_nofl_info(params...) \
|
||||||
|
QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
#define cfg_nofl_debug(params...) \
|
||||||
|
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_CONFIG, params)
|
||||||
|
|
||||||
/* define global config values structure */
|
/* define global config values structure */
|
||||||
|
|
||||||
#undef __CFG_INI_STRING
|
#undef __CFG_INI_STRING
|
||||||
|
@@ -309,6 +309,7 @@ static void cfg_store_set_defaults(struct cfg_value_store *store)
|
|||||||
#undef __CFG_INI_STRING
|
#undef __CFG_INI_STRING
|
||||||
#define __CFG_INI_STRING(id, mtype, ctype, name, min_len, max_len, ...) \
|
#define __CFG_INI_STRING(id, mtype, ctype, name, min_len, max_len, ...) \
|
||||||
qdf_str_lcopy((char *)&store->values.id##_internal, id, (max_len) + 1);
|
qdf_str_lcopy((char *)&store->values.id##_internal, id, (max_len) + 1);
|
||||||
|
|
||||||
#undef __CFG_INI
|
#undef __CFG_INI
|
||||||
#define __CFG_INI(id, mtype, ctype, name, min, max, fallback, desc, def...) \
|
#define __CFG_INI(id, mtype, ctype, name, min, max, fallback, desc, def...) \
|
||||||
*(ctype *)&store->values.id##_internal = id;
|
*(ctype *)&store->values.id##_internal = id;
|
||||||
@@ -519,6 +520,60 @@ QDF_STATUS cfg_parse_to_global_store(const char *path)
|
|||||||
|
|
||||||
qdf_export_symbol(cfg_parse_to_global_store);
|
qdf_export_symbol(cfg_parse_to_global_store);
|
||||||
|
|
||||||
|
|
||||||
|
static QDF_STATUS
|
||||||
|
cfg_store_print(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct cfg_value_store *store;
|
||||||
|
struct cfg_psoc_ctx *psoc_ctx;
|
||||||
|
|
||||||
|
cfg_enter();
|
||||||
|
|
||||||
|
psoc_ctx = cfg_psoc_get_ctx(psoc);
|
||||||
|
if (!psoc_ctx)
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
|
store = psoc_ctx->store;
|
||||||
|
if (!store)
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
|
#undef __CFG_INI_MAC
|
||||||
|
#define __CFG_INI_MAC(id, mtype, ctype, name, desc, def...) \
|
||||||
|
cfg_nofl_debug("%s %pM", name, (&store->values.id##_internal)->bytes);
|
||||||
|
|
||||||
|
#undef __CFG_INI_IPV4
|
||||||
|
#define __CFG_INI_IPV4(id, mtype, ctype, name, desc, def...) \
|
||||||
|
cfg_nofl_debug("%s %pI4", name, (&store->values.id##_internal)->bytes);
|
||||||
|
|
||||||
|
#undef __CFG_INI_IPV6
|
||||||
|
#define __CFG_INI_IPV6(id, mtype, ctype, name, desc, def...) \
|
||||||
|
cfg_nofl_debug("%s %pI6c", name, (&store->values.id##_internal)->bytes);
|
||||||
|
|
||||||
|
#undef __CFG_INI
|
||||||
|
#define __CFG_INI(id, mtype, ctype, name, min, max, fallback, desc, def...) \
|
||||||
|
cfg_nofl_debug("%s %u", name, *(ctype *)&store->values.id##_internal);
|
||||||
|
|
||||||
|
#undef __CFG_INI_STRING
|
||||||
|
#define __CFG_INI_STRING(id, mtype, ctype, name, min_len, max_len, ...) \
|
||||||
|
cfg_nofl_debug("%s %s", name, (char *)&store->values.id##_internal);
|
||||||
|
|
||||||
|
CFG_ALL
|
||||||
|
|
||||||
|
#undef __CFG_INI_MAC
|
||||||
|
#undef __CFG_INI_IPV4
|
||||||
|
#undef __CFG_INI_IPV6
|
||||||
|
#undef __CFG_INI
|
||||||
|
#undef __CFG_INI_STRING
|
||||||
|
|
||||||
|
cfg_exit();
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS ucfg_cfg_store_print(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
return cfg_store_print(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
static QDF_STATUS
|
static QDF_STATUS
|
||||||
cfg_on_psoc_create(struct wlan_objmgr_psoc *psoc, void *context)
|
cfg_on_psoc_create(struct wlan_objmgr_psoc *psoc, void *context)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user