qcacld-3.0: Add FW offload INI items (2)

Add the following fw param ini items to the fw offload component

CFG_ENABLE_SMART_CHAINMASK - gEnableSmartChainmask
CFG_ENABLE_FW_RTS_PROFILE - gEnableRTSProfiles
CFG_ENABLE_FW_DEBUG_LOG_LEVEL - gFwDebugLogLevel
CFG_ENABLE_FW_LOG_TYPE - gFwDebugLogType
CFG_RA_FILTER_ENABLE - gRAFilterEnable
CFG_SET_TSF_GPIO_PIN - gtsf_gpio_pin
CFG_DHCP_SERVER_OFFLOAD_SUPPORT - gEnableDeauthToDisassocMap
CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT - gDHCPMaxNumClients

Change-Id: I296e095cf2a7b83856e1ab777c7dbdcc005ee96a
CRs-Fixed: 2316269
This commit is contained in:
Sourav Mohapatra 2018-09-12 10:03:51 +05:30 • committed by nshrivas
commit 0f3b857e8c
12 changed files with 645 additions and 195 deletions

View file

@ -121,6 +121,14 @@ struct wlan_fwol_ie_whitelist {
* @lower_brssi_thresh: Lower BRSSI threshold
* @enable_dtim_1chrx: Enable/disable DTIM 1 CHRX
* @alternative_chainmask_enabled: Alternate chainmask
* @smart_chainmask_enabled: Enable/disable chainmask
* @get_rts_profile: Set the RTS profile
* @enable_fw_log_level: Set the FW log level
* @enable_fw_log_type: Set the FW log type
* @is_rate_limit_enabled: Enable/disable RA rate limited
* @tsf_gpio_pin: TSF GPIO Pin config
* @enable_dhcp_server_offload: DHCP Offload is enabled or not
* @dhcp_max_num_clients: Max number of DHCP client supported
*/
struct wlan_fwol_cfg {
/* Add CFG and INI items here */
@ -136,6 +144,20 @@ struct wlan_fwol_cfg {
uint16_t lower_brssi_thresh;
bool enable_dtim_1chrx;
bool alternative_chainmask_enabled;
bool smart_chainmask_enabled;
uint16_t get_rts_profile;
uint16_t enable_fw_log_level;
uint16_t enable_fw_log_type;
#ifdef FEATURE_WLAN_RA_FILTERING
bool is_rate_limit_enabled;
#endif
#ifdef WLAN_FEATURE_TSF
uint32_t tsf_gpio_pin;
#endif
#ifdef DHCP_SERVER_OFFLOAD
bool enable_dhcp_server_offload;
uint32_t dhcp_max_num_clients;
#endif
};
/**

View file

@ -91,6 +91,70 @@ fwol_init_ie_whiltelist_in_cfg(struct wlan_objmgr_psoc *psoc,
whitelist->ie_bitmap_7 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP7);
}
/**
* ucfg_fwol_fetch_dhcp_server_settings: Populate the enable_dhcp_server_offload
* and dhcp_max_num_clients from cfg
* @psoc: The global psoc handler
* @fwol_cfg: The cfg structure
*
* Return: none
*/
#ifdef DHCP_SERVER_OFFLOAD
static void ucfg_fwol_fetch_dhcp_server_settings(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_cfg *fwol_cfg)
{
fwol_cfg->enable_dhcp_server_offload =
cfg_get(psoc, CFG_DHCP_SERVER_OFFLOAD_SUPPORT);
fwol_cfg->dhcp_max_num_clients =
cfg_get(psoc, CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT);
}
#else
static void ucfg_fwol_fetch_dhcp_server_settings(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_cfg *fwol_cfg)
{
}
#endif
/**
* ucfg_fwol_fetch_tsf_gpio_pin: Populate the tsf_gpio_pin from cfg
* @psoc: The global psoc handler
* @fwol_cfg: The cfg structure
*
* Return: none
*/
#ifdef WLAN_FEATURE_TSF
static void ucfg_fwol_fetch_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_cfg *fwol_cfg)
{
fwol_cfg->tsf_gpio_pin = cfg_get(psoc, CFG_SET_TSF_GPIO_PIN);
}
#else
static void ucfg_fwol_fetch_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_cfg *fwol_cfg)
{
}
#endif
/**
* ucfg_fwol_fetch_ra_filter: Populate the RA filter enabled or not from cfg
* @psoc: The global psoc handler
* @fwol_cfg: The cfg structure
*
* Return: none
*/
#ifdef FEATURE_WLAN_RA_FILTERING
static void ucfg_fwol_fetch_ra_filter(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_cfg *fwol_cfg)
{
fwol_cfg->is_rate_limit_enabled = cfg_get(psoc, CFG_RA_FILTER_ENABLE);
}
#else
static void ucfg_fwol_fetch_ra_filter(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_cfg *fwol_cfg)
{
}
#endif
QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
@ -119,6 +183,15 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
fwol_cfg->enable_dtim_1chrx = cfg_get(psoc, CFG_DTIM_1CHRX_ENABLE);
fwol_cfg->alternative_chainmask_enabled =
cfg_get(psoc, CFG_ENABLE_COEX_ALT_CHAINMASK);
fwol_cfg->smart_chainmask_enabled =
cfg_get(psoc, CFG_ENABLE_SMART_CHAINMASK);
fwol_cfg->get_rts_profile = cfg_get(psoc, CFG_ENABLE_FW_RTS_PROFILE);
fwol_cfg->enable_fw_log_level =
cfg_get(psoc, CFG_ENABLE_FW_DEBUG_LOG_LEVEL);
fwol_cfg->enable_fw_log_type = cfg_get(psoc, CFG_ENABLE_FW_LOG_TYPE);
ucfg_fwol_fetch_ra_filter(psoc, fwol_cfg);
ucfg_fwol_fetch_tsf_gpio_pin(psoc, fwol_cfg);
ucfg_fwol_fetch_dhcp_server_settings(psoc, fwol_cfg);
return status;
}

View file

@ -233,8 +233,215 @@
0, \
"Enable Co-Ex Alternative Chainmask")
/*
* <ini>
* gEnableSmartChainmask - Enable Smart Chainmask
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable the Smart Chainmask feature via
* the WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME firmware parameter.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_SMART_CHAINMASK CFG_INI_BOOL( \
"gEnableSmartChainmask", \
0, \
"Enable/disable the Smart Chainmask feature")
/*
* <ini>
* gEnableRTSProfiles - It will use configuring different RTS profiles
* @Min: 0
* @Max: 66
* @Default: 33
*
* This ini used for configuring different RTS profiles
* to firmware.
* Following are the valid values for the rts profile:
* RTSCTS_DISABLED 0
* NOT_ALLOWED 1
* NOT_ALLOWED 2
* RTSCTS_DISABLED 16
* RTSCTS_ENABLED_4_SECOND_RATESERIES 17
* CTS2SELF_ENABLED_4_SECOND_RATESERIES 18
* RTSCTS_DISABLED 32
* RTSCTS_ENABLED_4_SWRETRIES 33
* CTS2SELF_ENABLED_4_SWRETRIES 34
* NOT_ALLOWED 48
* NOT_ALLOWED 49
* NOT_ALLOWED 50
* RTSCTS_DISABLED 64
* RTSCTS_ENABLED_4_ALL_RATESERIES 65
* CTS2SELF_ENABLED_4_ALL_RATESERIES 66
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_FW_RTS_PROFILE CFG_INI_INT( \
"gEnableRTSProfiles", \
0, \
66, \
33, \
CFG_VALUE_OR_DEFAULT, \
"It is used to configure different RTS profiles")
/* <ini>
* gFwDebugLogLevel: Takes values from enum DBGLOG_LOG_LVL,
* make default value as DBGLOG_WARN to enable error and
* warning logs by default.
* @Min: 0
* @Max: 255
* @Default: 3
*
* Related: None
*
* Supported Features: Debugging
*
* Usage: Internal
*
* </ini>
*/
#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL CFG_INI_INT( \
"gFwDebugLogLevel", \
0, \
255, \
3, \
CFG_VALUE_OR_DEFAULT, \
"enable error and warning logs by default")
/* <ini>
* gFwDebugLogType: takes values from enum dbglog_process_t,
* make default value as DBGLOG_PROCESS_NET_RAW to give the
* logs to net link since cnss_diag service is started at boot
* time by default.
* @Min: 0
* @Max: 255
* @Default: 3
*
* Related: None
*
* Supported Features: Debugging
*
* Usage: Internal
*
* </ini>
*/
#define CFG_ENABLE_FW_LOG_TYPE CFG_INI_INT( \
"gFwDebugLogType", \
0, \
255, \
3, \
CFG_VALUE_OR_DEFAULT, \
"Default value to be given to the net link cnss_diag service")
#ifdef FEATURE_WLAN_RA_FILTERING
/* <ini>
* gRAFilterEnable
* @Min: 0
* @Max: 1
* @Default: 1
*
* Related: None
*
* Usage: Internal
*
* </ini>
*/
#define CFG_RA_FILTER_ENABLE CFG_INI_BOOL( \
"gRAFilterEnable", \
1, \
"Enable RA Filter")
#else
#define CFG_RA_FILTER_ENABLE
#endif
/* <ini>
* gtsf_gpio_pin
* @Min: 0
* @Max: 254
* @Default: 255
*
* GPIO pin to toggle when capture tsf
*
* Related: None
*
* Usage: Internal
*
* </ini>
*/
#define CFG_SET_TSF_GPIO_PIN CFG_INI_INT( \
"gtsf_gpio_pin", \
0, \
254, \
255, \
CFG_VALUE_OR_DEFAULT, \
"GPIO pin to toggle when capture tsf")
#ifdef DHCP_SERVER_OFFLOAD
/* <ini>
* gEnableDeauthToDisassocMap
* @Min: 0
* @Max: 1
* @Default: 0
*
* DHCP Server offload support
*
* Related: None
*
* Usage: Internal
*
* </ini>
*/
#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT CFG_INI_BOOL( \
"gEnableDeauthToDisassocMap", \
0, \
"DHCP Server offload support")
/* <ini>
* gDHCPMaxNumClients
* @Min: 1
* @Max: 8
* @Default: 8
*
* Number of DHCP server offload clients
*
* Related: None
*
* Usage: Internal
*
* </ini>
*/
#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT CFG_INI_INT( \
"gDHCPMaxNumClients", \
1, \
8, \
8, \
CFG_VALUE_OR_DEFAULT, \
"Number of DHCP server offload clients")
#define CFG_FWOL_DHCP \
CFG(CFG_DHCP_SERVER_OFFLOAD_SUPPORT) \
CFG(CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT)
#else
#define CFG_FWOL_DHCP
#endif
#define CFG_FWOL_GENERIC_ALL \
CFG_FWOL_DHCP \
CFG(CFG_ENABLE_ANI) \
CFG(CFG_SET_RTS_FOR_SIFS_BURSTING) \
CFG(CFG_MAX_MPDUS_IN_AMPDU) \
@ -243,6 +450,12 @@
CFG(CFG_UPPER_BRSSI_THRESH) \
CFG(CFG_LOWER_BRSSI_THRESH) \
CFG(CFG_DTIM_1CHRX_ENABLE) \
CFG(CFG_ENABLE_COEX_ALT_CHAINMASK)
CFG(CFG_ENABLE_COEX_ALT_CHAINMASK) \
CFG(CFG_ENABLE_SMART_CHAINMASK) \
CFG(CFG_ENABLE_FW_RTS_PROFILE) \
CFG(CFG_ENABLE_FW_DEBUG_LOG_LEVEL) \
CFG(CFG_ENABLE_FW_LOG_TYPE) \
CFG(CFG_RA_FILTER_ENABLE) \
CFG(CFG_SET_TSF_GPIO_PIN)
#endif

View file

@ -209,4 +209,92 @@ QDF_STATUS
ucfg_get_alternative_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
bool *alternative_chainmask_enabled);
/**
* ucfg_get_smart_chainmask_enabled() - Assigns smart_chainmask_enabled value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_get_smart_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
bool *smart_chainmask_enabled);
/**
* ucfg_fwol_get_rts_profile() - Assigns get_rts_profile value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_rts_profile(struct wlan_objmgr_psoc *psoc,
uint16_t *get_rts_profile);
/**
* ucfg_fwol_get_enable_fw_log_level() - Assigns enable_fw_log_level value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_enable_fw_log_level(struct wlan_objmgr_psoc *psoc,
uint16_t *enable_fw_log_level);
/**
* ucfg_fwol_get_enable_fw_log_type() - Assigns enable_fw_log_type value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_enable_fw_log_type(struct wlan_objmgr_psoc *psoc,
uint16_t *enable_fw_log_type);
#ifdef FEATURE_WLAN_RA_FILTERING
/**
* ucfg_fwol_set_is_rate_limit_enabled() - Sets the is_rate_limit_enabled value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_set_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
bool is_rate_limit_enabled);
/**
* ucfg_fwol_get_is_rate_limit_enabled() - Assigns is_rate_limit_enabled value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
bool *is_rate_limit_enabled);
#endif /* FEATURE_WLAN_RA_FILTERING */
/**
* ucfg_fwol_get_tsf_gpio_pin() - Assigns tsf_gpio_pin value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
uint32_t *tsf_gpio_pin);
#ifdef DHCP_SERVER_OFFLOAD
/**
* ucfg_fwol_get_enable_dhcp_server_offload()-Assign enable_dhcp_server_offload
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_enable_dhcp_server_offload(struct wlan_objmgr_psoc *psoc,
bool *enable_dhcp_server_offload);
/**
* ucfg_fwol_get_dhcp_max_num_clients() - Assigns dhcp_max_num_clients value
* @psoc: pointer to the psoc object
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_dhcp_max_num_clients(struct wlan_objmgr_psoc *psoc,
uint32_t *dhcp_max_num_clients);
#endif
#endif /* _WLAN_FWOL_UCFG_API_H_ */

View file

@ -389,3 +389,153 @@ ucfg_get_alternative_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
fwol_obj->cfg.alternative_chainmask_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_smart_chainmask_enabled(struct wlan_objmgr_psoc *psoc,
bool *smart_chainmask_enabled)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*smart_chainmask_enabled =
fwol_obj->cfg.smart_chainmask_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_fwol_get_rts_profile(struct wlan_objmgr_psoc *psoc,
uint16_t *get_rts_profile)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*get_rts_profile = fwol_obj->cfg.get_rts_profile;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_fwol_get_enable_fw_log_level(struct wlan_objmgr_psoc *psoc,
uint16_t *enable_fw_log_level)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*enable_fw_log_level = fwol_obj->cfg.enable_fw_log_level;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_fwol_get_enable_fw_log_type(struct wlan_objmgr_psoc *psoc,
uint16_t *enable_fw_log_type)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*enable_fw_log_type = fwol_obj->cfg.enable_fw_log_type;
return QDF_STATUS_SUCCESS;
}
#ifdef FEATURE_WLAN_RA_FILTERING
QDF_STATUS ucfg_fwol_set_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
bool is_rate_limit_enabled)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
fwol_obj->cfg.is_rate_limit_enabled = is_rate_limit_enabled;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_fwol_get_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
bool *is_rate_limit_enabled)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*is_rate_limit_enabled = fwol_obj->cfg.is_rate_limit_enabled;
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef WLAN_FEATURE_TSF
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
uint32_t *tsf_gpio_pin)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*tsf_gpio_pin = fwol_obj->cfg.tsf_gpio_pin;
return QDF_STATUS_SUCCESS;
}
#else
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
uint32_t *tsf_gpio_pin)
{
return QDF_STATUS_SUCCESS;
}
#endif
#ifdef DHCP_SERVER_OFFLOAD
QDF_STATUS
ucfg_fwol_get_enable_dhcp_server_offload(struct wlan_objmgr_psoc *psoc,
bool *enable_dhcp_server_offload)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*enable_dhcp_server_offload = fwol_obj->cfg.enable_dhcp_server_offload;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_fwol_get_dhcp_max_num_clients(struct wlan_objmgr_psoc *psoc,
uint32_t *dhcp_max_num_clients)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get FWOL obj");
return QDF_STATUS_E_FAILURE;
}
*dhcp_max_num_clients = fwol_obj->cfg.dhcp_max_num_clients;
return QDF_STATUS_SUCCESS;
}
#endif

View file

@ -4067,26 +4067,6 @@ enum hdd_link_speed_rpt_type {
#endif
#endif
/* gFwDebugLogType takes values from enum dbglog_process_t,
* make default value as DBGLOG_PROCESS_NET_RAW to give the
* logs to net link since cnss_diag service is started at boot
* time by default.
*/
#define CFG_ENABLE_FW_LOG_TYPE "gFwDebugLogType"
#define CFG_ENABLE_FW_LOG_TYPE_MIN (0)
#define CFG_ENABLE_FW_LOG_TYPE_MAX (255)
#define CFG_ENABLE_FW_LOG_TYPE_DEFAULT (3)
/* gFwDebugLogLevel takes values from enum DBGLOG_LOG_LVL,
* make default value as DBGLOG_WARN to enable error and
* warning logs by default.
*/
#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL "gFwDebugLogLevel"
#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MIN (0)
#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MAX (255)
#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_DEFAULT (3)
/* For valid values of log levels check enum DBGLOG_LOG_LVL and
* for valid values of module ids check enum WLAN_MODULE_ID.
*/
@ -4111,47 +4091,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_CONCURRENT_STA "gEnableConcurrentSTA"
#define CFG_ENABLE_CONCURRENT_STA_DEFAULT ""
/*
* <ini>
* gEnableRTSProfiles - It will use configuring different RTS profiles
* @Min: 0
* @Max: 66
* @Default: 33
*
* This ini used for configuring different RTS profiles
* to firmware.
* Following are the valid values for the rts profile:
* RTSCTS_DISABLED 0
* NOT_ALLOWED 1
* NOT_ALLOWED 2
* RTSCTS_DISABLED 16
* RTSCTS_ENABLED_4_SECOND_RATESERIES 17
* CTS2SELF_ENABLED_4_SECOND_RATESERIES 18
* RTSCTS_DISABLED 32
* RTSCTS_ENABLED_4_SWRETRIES 33
* CTS2SELF_ENABLED_4_SWRETRIES 34
* NOT_ALLOWED 48
* NOT_ALLOWED 49
* NOT_ALLOWED 50
* RTSCTS_DISABLED 64
* RTSCTS_ENABLED_4_ALL_RATESERIES 65
* CTS2SELF_ENABLED_4_ALL_RATESERIES 66
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_FW_RTS_PROFILE "gEnableRTSProfiles"
#define CFG_ENABLE_FW_RTS_PROFILE_MIN (0)
#define CFG_ENABLE_FW_RTS_PROFILE_MAX (66)
#define CFG_ENABLE_FW_RTS_PROFILE_DEFAULT (33)
/*
* QDF Trace Enable Control
* Notes:
@ -5274,11 +5213,6 @@ enum hdd_link_speed_rpt_type {
#endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
#ifdef FEATURE_WLAN_RA_FILTERING
#define CFG_RA_FILTER_ENABLE_NAME "gRAFilterEnable"
#define CFG_RA_FILTER_ENABLE_MIN (0)
#define CFG_RA_FILTER_ENABLE_MAX (1)
#define CFG_RA_FILTER_ENABLE_DEFAULT (1)
#define CFG_RA_RATE_LIMIT_INTERVAL_NAME "gRArateLimitInterval"
#define CFG_RA_RATE_LIMIT_INTERVAL_MIN (60)
#define CFG_RA_RATE_LIMIT_INTERVAL_MAX (3600)
@ -5759,16 +5693,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_DEFAULT (0)
#ifdef DHCP_SERVER_OFFLOAD
#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_NAME "gDHCPServerOffloadEnable"
#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MIN (0)
#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MAX (1)
#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_DEFAULT (CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MIN)
#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_NAME "gDHCPMaxNumClients"
#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MIN (1)
#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MAX (8)
#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_DEFAULT (CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MAX)
#define CFG_DHCP_SERVER_IP_NAME "gDHCPServerIP"
#define CFG_DHCP_SERVER_IP_DEFAULT ""
#endif /* DHCP_SERVER_OFFLOAD */
@ -6130,29 +6054,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_MAX_MSDUS_PER_RXIND_MAX (32)
#define CFG_MAX_MSDUS_PER_RXIND_DEFAULT (32)
/*
* <ini>
* gEnableSmartChainmask - Enable Smart Chainmask
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable the Smart Chainmask feature via
* the WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME firmware parameter.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_SMART_CHAINMASK_NAME "gEnableSmartChainmask"
#define CFG_ENABLE_SMART_CHAINMASK_MIN (0)
#define CFG_ENABLE_SMART_CHAINMASK_MAX (1)
#define CFG_ENABLE_SMART_CHAINMASK_DEFAULT (0)
/*
* set the self gen power value from
* 0 to 0xffff
@ -6374,13 +6275,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_INFORM_BSS_RSSI_RAW_MAX (1)
#define CFG_INFORM_BSS_RSSI_RAW_DEFAULT (1)
/* GPIO pin to toggle when capture tsf */
#define CFG_SET_TSF_GPIO_PIN_NAME "gtsf_gpio_pin"
#define CFG_SET_TSF_GPIO_PIN_MIN (0)
#define CFG_SET_TSF_GPIO_PIN_MAX (254)
#define TSF_GPIO_PIN_INVALID (255)
#define CFG_SET_TSF_GPIO_PIN_DEFAULT (TSF_GPIO_PIN_INVALID)
#ifdef WLAN_FEATURE_TSF_PLUS
/* PTP options */
#define CFG_SET_TSF_PTP_OPT_NAME "gtsf_ptp_options"
@ -9290,7 +9184,6 @@ struct hdd_config {
#endif
#ifdef FEATURE_WLAN_RA_FILTERING
bool IsRArateLimitEnabled;
uint16_t RArateLimitInterval;
#endif
#ifdef FEATURE_WLAN_SCAN_PNO
@ -9501,14 +9394,8 @@ struct hdd_config {
u8 periodic_stats_disp_time;
#endif /* MSM_PLATFORM */
/* FW debug log parameters */
uint32_t enableFwLogType;
uint32_t enableFwLogLevel;
uint8_t enableFwModuleLogLevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
/* RTS profile parameter */
uint32_t rts_profile;
uint8_t gMaxConcurrentActiveSessions;
uint8_t ignoreCAC;
@ -9543,8 +9430,6 @@ struct hdd_config {
bool gEnableDeauthToDisassocMap;
#ifdef DHCP_SERVER_OFFLOAD
bool enableDHCPServerOffload;
uint32_t dhcpMaxNumClients;
uint8_t dhcpServerIP[IPADDR_STRING_LENGTH];
#endif /* DHCP_SERVER_OFFLOAD */
bool enable_mac_spoofing;
@ -9589,7 +9474,6 @@ struct hdd_config {
uint8_t dbs_scan_selection[CFG_DBS_SCAN_PARAM_LENGTH];
uint32_t sta_sap_scc_on_dfs_chan;
uint32_t sta_sap_scc_on_lte_coex_chan;
bool smart_chainmask_enabled;
uint16_t self_gen_frm_pwr;
#ifdef FEATURE_WLAN_SCAN_PNO
bool pno_channel_prediction;
@ -9607,8 +9491,6 @@ struct hdd_config {
#endif
uint8_t inform_bss_rssi_raw;
#ifdef WLAN_FEATURE_TSF
uint32_t tsf_gpio_pin;
#ifdef WLAN_FEATURE_TSF_PLUS
uint8_t tsf_ptp_options;
#endif /* WLAN_FEATURE_TSF_PLUS */

View file

@ -154,6 +154,8 @@ static inline bool in_compat_syscall(void) { return is_compat_task(); }
#define HDD_NUM_NL80211_BANDS ((enum nl80211_band)IEEE80211_NUM_BANDS)
#endif
#define TSF_GPIO_PIN_INVALID 255
/** Length of the TX queue for the netdev */
#define HDD_NETDEV_TX_QUEUE_LEN (3000)

View file

@ -1260,12 +1260,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_QOS_WMM_BURST_SIZE_DEFN_MAX),
#ifdef FEATURE_WLAN_RA_FILTERING
REG_VARIABLE(CFG_RA_FILTER_ENABLE_NAME, WLAN_PARAM_Integer,
struct hdd_config, IsRArateLimitEnabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_RA_FILTER_ENABLE_DEFAULT,
CFG_RA_FILTER_ENABLE_MIN,
CFG_RA_FILTER_ENABLE_MAX),
REG_VARIABLE(CFG_RA_RATE_LIMIT_INTERVAL_NAME, WLAN_PARAM_Integer,
struct hdd_config, RArateLimitInterval,
@ -2270,27 +2264,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_PERIODIC_STATS_DISPLAY_TIME_MAX),
#endif
REG_VARIABLE(CFG_ENABLE_FW_LOG_TYPE, WLAN_PARAM_Integer,
struct hdd_config, enableFwLogType,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_FW_LOG_TYPE_DEFAULT,
CFG_ENABLE_FW_LOG_TYPE_MIN,
CFG_ENABLE_FW_LOG_TYPE_MAX),
REG_VARIABLE(CFG_ENABLE_FW_DEBUG_LOG_LEVEL, WLAN_PARAM_Integer,
struct hdd_config, enableFwLogLevel,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_FW_DEBUG_LOG_LEVEL_DEFAULT,
CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MIN,
CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MAX),
REG_VARIABLE(CFG_ENABLE_FW_RTS_PROFILE, WLAN_PARAM_Integer,
struct hdd_config, rts_profile,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_FW_RTS_PROFILE_DEFAULT,
CFG_ENABLE_FW_RTS_PROFILE_MIN,
CFG_ENABLE_FW_RTS_PROFILE_MAX),
REG_VARIABLE_STRING(CFG_ENABLE_FW_MODULE_LOG_LEVEL, WLAN_PARAM_String,
struct hdd_config, enableFwModuleLogLevel,
VAR_FLAGS_OPTIONAL,
@ -2410,19 +2383,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_MIN,
CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_MAX),
#ifdef DHCP_SERVER_OFFLOAD
REG_VARIABLE(CFG_DHCP_SERVER_OFFLOAD_SUPPORT_NAME, WLAN_PARAM_Integer,
struct hdd_config, enableDHCPServerOffload,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_DHCP_SERVER_OFFLOAD_SUPPORT_DEFAULT,
CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MIN,
CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MAX),
REG_VARIABLE(CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_NAME,
WLAN_PARAM_Integer,
struct hdd_config, dhcpMaxNumClients,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_DEFAULT,
CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MIN,
CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MAX),
REG_VARIABLE_STRING(CFG_DHCP_SERVER_IP_NAME, WLAN_PARAM_String,
struct hdd_config, dhcpServerIP,
VAR_FLAGS_OPTIONAL,
@ -2675,13 +2635,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_MIN,
CFG_ADAPTIVE_PNOSCAN_DWELL_MODE_MAX),
#endif
REG_VARIABLE(CFG_ENABLE_SMART_CHAINMASK_NAME, WLAN_PARAM_Integer,
struct hdd_config, smart_chainmask_enabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_SMART_CHAINMASK_DEFAULT,
CFG_ENABLE_SMART_CHAINMASK_MIN,
CFG_ENABLE_SMART_CHAINMASK_MAX),
REG_VARIABLE(CFG_SELF_GEN_FRM_PWR, WLAN_PARAM_Integer,
struct hdd_config, self_gen_frm_pwr,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@ -2705,13 +2658,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_INFORM_BSS_RSSI_RAW_MAX),
#ifdef WLAN_FEATURE_TSF
REG_VARIABLE(CFG_SET_TSF_GPIO_PIN_NAME, WLAN_PARAM_Integer,
struct hdd_config, tsf_gpio_pin,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_SET_TSF_GPIO_PIN_DEFAULT,
CFG_SET_TSF_GPIO_PIN_MIN,
CFG_SET_TSF_GPIO_PIN_MAX),
#ifdef WLAN_FEATURE_TSF_PLUS
REG_VARIABLE(CFG_SET_TSF_PTP_OPT_NAME, WLAN_PARAM_HexInteger,
struct hdd_config, tsf_ptp_options,

View file

@ -12812,7 +12812,9 @@ static void wlan_hdd_set_dhcp_server_offload(struct hdd_adapter *adapter)
uint8_t srv_ip[IPADDR_NUM_ENTRIES];
uint8_t num;
uint32_t temp;
uint32_t dhcp_max_num_clients;
mac_handle_t mac_handle;
QDF_STATUS status;
pDhcpSrvInfo = qdf_mem_malloc(sizeof(*pDhcpSrvInfo));
if (NULL == pDhcpSrvInfo) {
@ -12821,7 +12823,13 @@ static void wlan_hdd_set_dhcp_server_offload(struct hdd_adapter *adapter)
}
pDhcpSrvInfo->vdev_id = adapter->session_id;
pDhcpSrvInfo->dhcpSrvOffloadEnabled = true;
pDhcpSrvInfo->dhcpClientNum = hdd_ctx->config->dhcpMaxNumClients;
status = ucfg_fwol_get_dhcp_max_num_clients(hdd_ctx->psoc,
&dhcp_max_num_clients);
if (QDF_IS_STATUS_ERROR(status))
return;
pDhcpSrvInfo->dhcpClientNum = dhcp_max_num_clients;
hdd_string_to_u8_array(hdd_ctx->config->dhcpServerIP,
srv_ip, &numEntries, IPADDR_NUM_ENTRIES);
if (numEntries != IPADDR_NUM_ENTRIES) {

View file

@ -4482,6 +4482,37 @@ int wlan_hdd_restore_channels(struct hdd_context *hdd_ctx,
return 0;
}
#endif
/**
* wlan_hdd_is_dhcp_enabled: Enable DHCP offload
* @hdd_ctx: HDD context handler
* @adapter: Adapter pointer
*
* Return: None
*/
#ifdef DHCP_SERVER_OFFLOAD
static void wlan_hdd_is_dhcp_enabled(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter)
{
bool enable_dhcp_server_offload;
QDF_STATUS status;
status = ucfg_fwol_get_enable_dhcp_server_offload(
hdd_ctx->psoc,
&enable_dhcp_server_offload);
if (QDF_IS_STATUS_ERROR(status))
return;
if (enable_dhcp_server_offload)
wlan_hdd_set_dhcp_server_offload(adapter);
}
#else
static void wlan_hdd_is_dhcp_enabled(struct hdd_context *hdd_ctx,
struct hdd_adapter *adapter)
{
}
#endif
/**
* wlan_hdd_cfg80211_start_bss() - start bss
* @adapter: Pointer to hostapd adapter
@ -5169,11 +5200,8 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode,
true);
}
#ifdef DHCP_SERVER_OFFLOAD
if (iniConfig->enableDHCPServerOffload)
wlan_hdd_set_dhcp_server_offload(adapter);
#endif /* DHCP_SERVER_OFFLOAD */
wlan_hdd_is_dhcp_enabled(hdd_ctx, adapter);
ucfg_p2p_status_start_bss(adapter->vdev);
/* Check and restart SAP if it is on unsafe channel */

View file

@ -1908,7 +1908,8 @@ static int hdd_generate_macaddr_auto(struct hdd_context *hdd_ctx)
static void hdd_update_ra_rate_limit(struct hdd_context *hdd_ctx,
struct wma_tgt_cfg *cfg)
{
hdd_ctx->config->IsRArateLimitEnabled = cfg->is_ra_rate_limit_enabled;
ucfg_fwol_set_is_rate_limit_enabled(hdd_ctx->psoc,
cfg->is_ra_rate_limit_enabled);
}
#else
static void hdd_update_ra_rate_limit(struct hdd_context *hdd_ctx,
@ -4411,6 +4412,8 @@ static void hdd_set_fw_log_params(struct hdd_context *hdd_ctx,
uint8_t count = 0, numentries = 0,
moduleloglevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
uint32_t value = 0;
QDF_STATUS status;
uint16_t enable_fw_log_level, enable_fw_log_type;
int ret;
if (QDF_GLOBAL_FTM_MODE == cds_get_conparam() ||
@ -4420,21 +4423,25 @@ static void hdd_set_fw_log_params(struct hdd_context *hdd_ctx,
}
/* Enable FW logs based on INI configuration */
hdd_ctx->fw_log_settings.dl_type =
hdd_ctx->config->enableFwLogType;
status = ucfg_fwol_get_enable_fw_log_type(hdd_ctx->psoc,
&enable_fw_log_type);
if (QDF_IS_STATUS_ERROR(status))
return;
ret = sme_cli_set_command(adapter->session_id,
WMI_DBGLOG_TYPE,
hdd_ctx->config->enableFwLogType,
enable_fw_log_type,
DBG_CMD);
if (ret != 0)
hdd_err("Failed to enable FW log type ret %d",
ret);
hdd_ctx->fw_log_settings.dl_loglevel =
hdd_ctx->config->enableFwLogLevel;
status = ucfg_fwol_get_enable_fw_log_level(hdd_ctx->psoc,
&enable_fw_log_level);
if (QDF_IS_STATUS_ERROR(status))
return;
ret = sme_cli_set_command(adapter->session_id,
WMI_DBGLOG_LOG_LEVEL,
hdd_ctx->config->enableFwLogLevel,
enable_fw_log_level,
DBG_CMD);
if (ret != 0)
hdd_err("Failed to enable FW log level ret %d",
@ -4672,7 +4679,7 @@ err:
int hdd_set_fw_params(struct hdd_adapter *adapter)
{
int ret;
uint16_t upper_brssi_thresh, lower_brssi_thresh;
uint16_t upper_brssi_thresh, lower_brssi_thresh, rts_profile;
bool enable_dtim_1chrx;
QDF_STATUS status;
struct hdd_context *hdd_ctx;
@ -4808,9 +4815,13 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
goto error;
}
status = ucfg_fwol_get_rts_profile(hdd_ctx->psoc, &rts_profile);
if (QDF_IS_STATUS_ERROR(status))
return -EINVAL;
ret = sme_cli_set_command(adapter->session_id,
WMI_VDEV_PARAM_ENABLE_RTSCTS,
hdd_ctx->config->rts_profile,
rts_profile,
VDEV_CMD);
if (ret) {
hdd_err("FAILED TO SET RTSCTS Profile ret:%d", ret);
@ -9611,10 +9622,17 @@ static inline void hdd_txrx_populate_cds_config(struct cds_config_info
static inline void hdd_ra_populate_cds_config(struct cds_config_info *cds_cfg,
struct hdd_context *hdd_ctx)
{
bool is_rate_limit_enabled;
QDF_STATUS status;
status = ucfg_fwol_get_is_rate_limit_enabled(hdd_ctx->psoc,
&is_rate_limit_enabled);
if (QDF_IS_STATUS_ERROR(status))
return;
cds_cfg->ra_ratelimit_interval =
hdd_ctx->config->RArateLimitInterval;
cds_cfg->is_ra_ratelimit_enabled =
hdd_ctx->config->IsRArateLimitEnabled;
cds_cfg->is_ra_ratelimit_enabled = is_rate_limit_enabled;
}
#else
static inline void hdd_ra_populate_cds_config(struct cds_config_info *cds_cfg,
@ -10200,12 +10218,19 @@ static void hdd_initialize_mac_address(struct hdd_context *hdd_ctx)
static int hdd_set_smart_chainmask_enabled(struct hdd_context *hdd_ctx)
{
int vdev_id = 0;
int value = hdd_ctx->config->smart_chainmask_enabled;
QDF_STATUS status;
bool smart_chainmask_enabled;
int param_id = WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME;
int vpdev = PDEV_CMD;
int ret;
ret = sme_cli_set_command(vdev_id, param_id, value, vpdev);
status = ucfg_get_smart_chainmask_enabled(hdd_ctx->psoc,
&smart_chainmask_enabled);
if (QDF_IS_STATUS_ERROR(status))
return -EINVAL;
ret = sme_cli_set_command(vdev_id, param_id,
(int)smart_chainmask_enabled, vpdev);
if (ret)
hdd_err("WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME failed %d", ret);
@ -13808,10 +13833,18 @@ static inline void hdd_ra_populate_pmo_config(
struct pmo_psoc_cfg *psoc_cfg,
struct hdd_context *hdd_ctx)
{
bool is_rate_limit_enabled;
QDF_STATUS status;
status = ucfg_fwol_get_is_rate_limit_enabled(hdd_ctx->psoc,
&is_rate_limit_enabled);
if (QDF_IS_STATUS_ERROR(status))
return;
psoc_cfg->ra_ratelimit_interval =
hdd_ctx->config->RArateLimitInterval;
psoc_cfg->ra_ratelimit_enable =
hdd_ctx->config->IsRArateLimitEnabled;
is_rate_limit_enabled;
}
#else
static inline void hdd_ra_populate_pmo_config(

View file

@ -23,11 +23,11 @@
#include "wlan_hdd_main.h"
#include "wlan_hdd_tsf.h"
#include "wma_api.h"
#include "wlan_fwol_ucfg_api.h"
#include <qca_vendor.h>
static struct completion tsf_sync_get_completion_evt;
#define WLAN_TSF_SYNC_GET_TIMEOUT 2000
/**
* enum hdd_tsf_op_result - result of tsf operation
*
@ -1269,6 +1269,7 @@ int wlan_hdd_cfg80211_handle_tsf_cmd(struct wiphy *wiphy,
void wlan_hdd_tsf_init(struct hdd_context *hdd_ctx)
{
QDF_STATUS status;
uint32_t tsf_gpio_pin = TSF_GPIO_PIN_INVALID;
if (!hdd_ctx)
return;
@ -1278,11 +1279,15 @@ void wlan_hdd_tsf_init(struct hdd_context *hdd_ctx)
qdf_atomic_init(&hdd_ctx->cap_tsf_flag);
if (hdd_ctx->config->tsf_gpio_pin == TSF_GPIO_PIN_INVALID)
status = ucfg_fwol_get_tsf_gpio_pin(hdd_ctx->psoc, &tsf_gpio_pin);
if (QDF_IS_STATUS_ERROR(status))
return;
if (tsf_gpio_pin == TSF_GPIO_PIN_INVALID)
goto fail;
status = sme_set_tsf_gpio(hdd_ctx->mac_handle,
hdd_ctx->config->tsf_gpio_pin);
tsf_gpio_pin);
if (QDF_STATUS_SUCCESS != status) {
hdd_err("set tsf GPIO failed, status: %d", status);
goto fail;