qcacmn: Enable configuration component in dispatcher
Enable the configuration component in dispatcher, by calling the cfg_dispatcher_init() and cfg_dispatcher_deinit() functions. Change-Id: I1aa0d79729f35be422457280700cf1121a1873bf CRs-Fixed: 2258230
Этот коммит содержится в:

коммит произвёл
nshrivas

родитель
21e69f5fe2
Коммит
45b7264097
@@ -73,9 +73,10 @@ struct cfg_meta {
|
||||
#define cfg_value_ptr(store, meta) \
|
||||
((void *)&(store)->values + (meta)->field_offset)
|
||||
|
||||
static void cfg_int_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_int_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
int32_t *store_value = cfg_value_ptr(store, meta);
|
||||
@@ -115,9 +116,10 @@ static void cfg_int_item_handler(struct cfg_value_store *store,
|
||||
meta->name, value, meta->min, meta->max, *store_value);
|
||||
}
|
||||
|
||||
static void cfg_uint_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_uint_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint32_t *store_value = cfg_value_ptr(store, meta);
|
||||
@@ -167,9 +169,10 @@ static void cfg_uint_item_handler(struct cfg_value_store *store,
|
||||
meta->name, value, min, max, *store_value);
|
||||
}
|
||||
|
||||
static void cfg_bool_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_bool_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
bool *store_value = cfg_value_ptr(store, meta);
|
||||
@@ -182,9 +185,10 @@ static void cfg_bool_item_handler(struct cfg_value_store *store,
|
||||
meta->name, str_value, status, *store_value ? "true" : "false");
|
||||
}
|
||||
|
||||
static void cfg_string_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_string_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
char *store_value = cfg_value_ptr(store, meta);
|
||||
qdf_size_t len;
|
||||
@@ -215,9 +219,10 @@ static void cfg_string_item_handler(struct cfg_value_store *store,
|
||||
qdf_str_lcopy(store_value, str_value, meta->max + 1);
|
||||
}
|
||||
|
||||
static void cfg_mac_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_mac_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct qdf_mac_addr *store_value = cfg_value_ptr(store, meta);
|
||||
@@ -231,9 +236,10 @@ static void cfg_mac_item_handler(struct cfg_value_store *store,
|
||||
QDF_MAC_ADDR_ARRAY(store_value->bytes));
|
||||
}
|
||||
|
||||
static void cfg_ipv4_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_ipv4_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct qdf_ipv4_addr *store_value = cfg_value_ptr(store, meta);
|
||||
@@ -247,9 +253,10 @@ static void cfg_ipv4_item_handler(struct cfg_value_store *store,
|
||||
QDF_IPV4_ADDR_ARRAY(store_value->bytes));
|
||||
}
|
||||
|
||||
static void cfg_ipv6_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
static __attribute__((unused)) void
|
||||
cfg_ipv6_item_handler(struct cfg_value_store *store,
|
||||
const struct cfg_meta *meta,
|
||||
const char *str_value)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
struct qdf_ipv6_addr *store_value = cfg_value_ptr(store, meta);
|
||||
@@ -335,7 +342,7 @@ cfg_ini_item_handler(void *context, const char *key, const char *value)
|
||||
meta = cfg_lookup_meta(key);
|
||||
if (!meta) {
|
||||
/* TODO: promote to 'err' or 'warn' once legacy is ported */
|
||||
cfg_info("Unknown config item '%s'", key);
|
||||
cfg_debug("Unknown config item '%s'", key);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "cfg_dispatcher.h"
|
||||
#include <qdf_types.h>
|
||||
#include <qdf_trace.h>
|
||||
#include <qdf_threads.h>
|
||||
@@ -969,6 +970,9 @@ QDF_STATUS dispatcher_init(void)
|
||||
if (QDF_STATUS_SUCCESS != dispatcher_ftm_init())
|
||||
goto ftm_init_fail;
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(cfg_dispatcher_init()))
|
||||
goto cfg_init_fail;
|
||||
|
||||
/*
|
||||
* scheduler INIT has to be the last as each component's
|
||||
* initialization has to happen first and then at the end
|
||||
@@ -980,6 +984,8 @@ QDF_STATUS dispatcher_init(void)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
scheduler_init_fail:
|
||||
cfg_dispatcher_deinit();
|
||||
cfg_init_fail:
|
||||
dispatcher_ftm_deinit();
|
||||
ftm_init_fail:
|
||||
dispatcher_green_ap_deinit();
|
||||
@@ -1031,8 +1037,13 @@ qdf_export_symbol(dispatcher_init);
|
||||
|
||||
QDF_STATUS dispatcher_deinit(void)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit());
|
||||
|
||||
status = cfg_dispatcher_deinit();
|
||||
QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_deinit());
|
||||
|
||||
QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_green_ap_deinit());
|
||||
|
Ссылка в новой задаче
Block a user