qcacmn: Parse and update qdf module params

Read the file wifi_module_param.ini, in which wifi module params
are present and compare these module params with qdf module params
in qdf module init function.

If any of the module params belongs to qdf module is present,
then that particular module param is updted during qdf module init.

Change-Id: I76ef876f6c7be3cdffd93b6050a190438d60bf39
This commit is contained in:
Adwait Nayak
2021-03-22 08:44:27 +05:30
committed by Madan Koyyalamudi
父節點 8159fecc91
當前提交 c2c89243d8
共有 9 個文件被更改,包括 373 次插入8 次删除

查看文件

@@ -538,6 +538,8 @@ enum qdf_dpt_debugfs_state {
QDF_DPT_DEBUGFS_STATE_SHOW_COMPLETE,
};
#define QDF_WIFI_MODULE_PARAMS_FILE "wifi_module_param.ini"
typedef void (*tp_qdf_trace_cb)(void *p_mac, tp_qdf_trace_record, uint16_t);
typedef void (*tp_qdf_state_info_cb) (char **buf, uint16_t *size);
#ifdef WLAN_FEATURE_MEMDUMP_ENABLE
@@ -1426,6 +1428,24 @@ int qdf_print_ctrl_register(const struct category_info *cinfo,
void *custom_ctx,
const char *pctrl_name);
#ifdef QCA_WIFI_MODULE_PARAMS_FROM_INI
/**
* qdf_update_module_param() - Update qdf module params
*
*
* Read the file which has wifi module params, parse and update
* qdf module params.
*
* Return: void
*/
void qdf_initialize_module_param_from_ini(void);
#else
static inline
void qdf_initialize_module_param_from_ini(void)
{
}
#endif
/**
* qdf_shared_print_ctrl_init() - Initialize the shared print ctrl obj with
* all categories set to the default level
@@ -1566,6 +1586,30 @@ bool qdf_print_get_node_flag(unsigned int idx);
#endif
#ifdef QCA_WIFI_MODULE_PARAMS_FROM_INI
/**
* qdf_module_param_handler() - Function to store module params
*
* @context : NULL, unused.
* @key : Name of the module param
* @value: Value of the module param
*
* Handler function to be called from qdf_ini_parse()
* function when a valid parameter is found in a file.
*
* Return : QDF_STATUS_SUCCESS on Success
*/
QDF_STATUS qdf_module_param_handler(void *context, const char *key,
const char *value);
#else
static inline
QDF_STATUS qdf_module_param_handler(void *context, const char *key,
const char *value)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* qdf_logging_init() - Initialize msg logging functionality
*