qcacmn: Add cfg API to parse additional files

Add cfg API's to parse different global
and psoc INI files, but store to the same
global or psoc store as required.

Change-Id: I588f47bc61094640ddfe4b29712ca978908f2844
CRs-Fixed: 2278934
This commit is contained in:
Vivek
2018-07-19 18:31:16 +05:30
committed by nshrivas
parent c7f6224588
commit 2a331374b8
2 changed files with 38 additions and 0 deletions

View File

@@ -155,6 +155,24 @@ void cfg_release(void);
*/ */
QDF_STATUS cfg_psoc_parse(struct wlan_objmgr_psoc *psoc, const char *path); QDF_STATUS cfg_psoc_parse(struct wlan_objmgr_psoc *psoc, const char *path);
/**
* cfg_parse_to_psoc_store() - Parse file @path and update psoc ini store
* @psoc: The psoc whose config store should be updated
* @path: The full file path of the ini file to parse
*
* Return: QDF_STATUS
*/
QDF_STATUS cfg_parse_to_psoc_store(struct wlan_objmgr_psoc *psoc,
const char *path);
/**
* cfg_parse_to_global_store() Parse file @path and update global ini store
* @path: The full file path of the ini file to parse
*
* Return: QDF_STATUS
*/
QDF_STATUS cfg_parse_to_global_store(const char *path);
/** /**
* 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

View File

@@ -501,6 +501,26 @@ cfg_ini_parse_to_store(const char *path, struct cfg_value_store *store)
return status; return status;
} }
QDF_STATUS cfg_parse_to_psoc_store(struct wlan_objmgr_psoc *psoc,
const char *path)
{
return cfg_ini_parse_to_store(path, cfg_psoc_get_ctx(psoc)->store);
}
qdf_export_symbol(cfg_parse_to_psoc_store);
QDF_STATUS cfg_parse_to_global_store(const char *path)
{
if (!__cfg_global_store) {
cfg_err("Global INI store is not valid");
return QDF_STATUS_E_NOMEM;
}
return cfg_ini_parse_to_store(path, __cfg_global_store);
}
qdf_export_symbol(cfg_parse_to_global_store);
static void cfg_init(void) static void cfg_init(void)
{ {
qdf_list_create(&__cfg_stores_list, 0); qdf_list_create(&__cfg_stores_list, 0);