qcacld-3.0: Optimize struct reg_table_entry definition

Optimize struct reg_table_entry definition by means of
alignment and data type declarations to save memory.

Change-Id: Ib97541b0868416d1d797d8326e265e9789a040da
CRs-Fixed: 2301744
This commit is contained in:
Qiwei Cai
2018-08-23 18:58:58 +08:00
committed by nshrivas
parent 26a0a83c53
commit 1c52ef67ba

View File

@@ -14843,13 +14843,13 @@ enum wlan_parameter_type {
(_Name), \ (_Name), \
(_Type), \ (_Type), \
(_Flags), \ (_Flags), \
0, \
VAR_OFFSET(_Struct, _VarName), \ VAR_OFFSET(_Struct, _VarName), \
VAR_SIZE(_Struct, _VarName), \ VAR_SIZE(_Struct, _VarName), \
(_Default), \ (_Default), \
(_Min), \ (_Min), \
(_Max), \ (_Max), \
NULL, \ NULL \
0 \
} }
#define REG_DYNAMIC_VARIABLE(_Name, _Type, _Struct, _VarName, \ #define REG_DYNAMIC_VARIABLE(_Name, _Type, _Struct, _VarName, \
@@ -14859,13 +14859,13 @@ enum wlan_parameter_type {
(_Name), \ (_Name), \
(_Type), \ (_Type), \
(VAR_FLAGS_DYNAMIC_CFG | (_Flags)), \ (VAR_FLAGS_DYNAMIC_CFG | (_Flags)), \
(_CBParam), \
VAR_OFFSET(_Struct, _VarName), \ VAR_OFFSET(_Struct, _VarName), \
VAR_SIZE(_Struct, _VarName), \ VAR_SIZE(_Struct, _VarName), \
(_Default), \ (_Default), \
(_Min), \ (_Min), \
(_Max), \ (_Max), \
(_CBFunc), \ (_CBFunc) \
(_CBParam) \
} }
#define REG_VARIABLE_STRING(_Name, _Type, _Struct, _VarName, \ #define REG_VARIABLE_STRING(_Name, _Type, _Struct, _VarName, \
@@ -14874,19 +14874,20 @@ enum wlan_parameter_type {
(_Name), \ (_Name), \
(_Type), \ (_Type), \
(_Flags), \ (_Flags), \
0, \
VAR_OFFSET(_Struct, _VarName), \ VAR_OFFSET(_Struct, _VarName), \
VAR_SIZE(_Struct, _VarName), \ VAR_SIZE(_Struct, _VarName), \
(unsigned long)(_Default), \ (unsigned long)(_Default), \
0, \ 0, \
0, \ 0, \
NULL, \ NULL \
0 \
} }
struct reg_table_entry { struct reg_table_entry {
char *RegName; /* variable name in the qcom_cfg.ini file */ char *RegName; /* variable name in the qcom_cfg.ini file */
enum wlan_parameter_type RegType; /* variable type in hdd_config struct */ unsigned char RegType; /* variable type in hdd_config struct */
unsigned long Flags; /* Specify optional parms and if RangeCheck is performed */ unsigned char Flags; /* Specify optional parms and if RangeCheck is performed */
unsigned char notifyId; /* Dynamic modification identifier */
unsigned short VarOffset; /* offset to field from the base address of the structure */ unsigned short VarOffset; /* offset to field from the base address of the structure */
unsigned short VarSize; /* size (in bytes) of the field */ unsigned short VarSize; /* size (in bytes) of the field */
unsigned long VarDefault; /* default value to use */ unsigned long VarDefault; /* default value to use */
@@ -14895,7 +14896,6 @@ struct reg_table_entry {
/* Dynamic modification notifier */ /* Dynamic modification notifier */
void (*pfnDynamicnotify)(struct hdd_context *hdd_ctx, void (*pfnDynamicnotify)(struct hdd_context *hdd_ctx,
unsigned long notifyId); unsigned long notifyId);
unsigned long notifyId; /* Dynamic modification identifier */
}; };
/** /**