qcacld-3.0: Refactor more dfs cfg items

Refactor following DFS cfg items
CFG_DISABLE_DFS_CH_SWITCH
CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME
CFG_IGNORE_CAC_NAME
CFG_DFS_RADAR_PRI_MULTIPLIER_NAME
CFG_SAP_TX_LEAKAGE_THRESHOLD_NAME
CFG_DFS_BEACON_TX_ENHANCED
CFG_DISABLE_DFS_JAPAN_W53
CFG_ENABLE_NON_DFS_CHAN_ON_RADAR

Change-Id: I7f39ed0680919c6a383d9b8bae5864f979b6948c
CRs-Fixed: 2351995
This commit is contained in:
Arif Hussain
2018-11-16 17:58:38 -08:00
committato da nshrivas
parent 461ab006eb
commit 224d38154f
19 ha cambiato i file con 421 aggiunte e 380 eliminazioni

Vedi File

@@ -850,8 +850,19 @@ static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,
static void mlme_init_dfs_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_dfs_cfg *dfs_cfg)
{
dfs_cfg->dfs_master_capable = cfg_get(psoc,
CFG_ENABLE_DFS_MASTER_CAPABILITY);
dfs_cfg->dfs_ignore_cac = cfg_get(psoc, CFG_IGNORE_CAC);
dfs_cfg->dfs_master_capable =
cfg_get(psoc, CFG_ENABLE_DFS_MASTER_CAPABILITY);
dfs_cfg->dfs_disable_channel_switch =
cfg_get(psoc, CFG_DISABLE_DFS_CH_SWITCH);
dfs_cfg->dfs_filter_offload =
cfg_get(psoc, CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD);
dfs_cfg->dfs_prefer_non_dfs =
cfg_get(psoc, CFG_ENABLE_NON_DFS_CHAN_ON_RADAR);
dfs_cfg->dfs_beacon_tx_enhanced =
cfg_get(psoc, CFG_DFS_BEACON_TX_ENHANCED);
dfs_cfg->sap_tx_leakage_threshold =
cfg_get(psoc, CFG_SAP_TX_LEAKAGE_THRESHOLD);
}
static void mlme_init_feature_flag_in_cfg(

Vedi File

@@ -23,6 +23,136 @@
#ifndef __CFG_MLME_DFS_H
#define __CFG_MLME_DFS_H
/*
* <ini>
* gsap_tx_leakage_threshold - sap tx leakage threshold
* @Min: 100
* @Max: 1000
* @Default: 310
*
* customer can set this value from 100 to 1000 which means
* sap tx leakage threshold is -10db to -100db
*
* Related: none
*
* Usage: External
*
* </ini>
*/
#define CFG_SAP_TX_LEAKAGE_THRESHOLD CFG_INI_UINT( \
"gsap_tx_leakage_threshold", \
100, \
1000, \
310, \
CFG_VALUE_OR_DEFAULT, \
"sap tx leakage threshold")
/*
* <ini>
* gDfsBeaconTxEnhanced - beacon tx enhanced
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enhance dfs beacon tx
*
* Related: none
*
* Usage: External
*
* </ini>
*/
#define CFG_DFS_BEACON_TX_ENHANCED CFG_INI_BOOL( \
"gDfsBeaconTxEnhanced", \
0, \
"beacon tx enhanced")
/*
* <ini>
* gPreferNonDfsChanOnRadar - During random channel selection prefer non dfs
* @Min: 0
* @Max: 1
* @Default: 0
*
* During random channel selection prefer non dfs.
*
* Related: none
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR CFG_INI_BOOL( \
"gPreferNonDfsChanOnRadar", \
0, \
"channel selection prefer non dfs")
/*
* <ini>
* dfsPhyerrFilterOffload - Enable dfs phyerror filtering offload in FW
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to to enable dfs phyerror filtering offload to firmware
* Enabling it will cause basic phy error to be discarding in firmware.
* Related: NA.
*
* Supported Feature: DFS
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD CFG_INI_BOOL( \
"dfsPhyerrFilterOffload", \
0, \
"dfs phyerror filtering offload")
/*
* <ini>
* gIgnoreCAC - Used to ignore CAC
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to set default CAC
*
* Related: None
*
* Supported Feature: DFS
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_IGNORE_CAC CFG_INI_BOOL( \
"gIgnoreCAC", \
0, \
"ignore CAC on DFS channel")
/*
* <ini>
* gDisableDFSChSwitch - Disable channel switch if radar is found
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to disable channel switch if radar is found
* on that channel.
* Related: NA.
*
* Supported Feature: DFS
*
* Usage: Internal
*
* </ini>
*/
#define CFG_DISABLE_DFS_CH_SWITCH CFG_INI_BOOL( \
"gDisableDFSChSwitch", \
0, \
"Disable channel switch on radar")
/*
* <ini>
* gEnableDFSMasterCap - Enable DFS master capability
@@ -47,6 +177,12 @@
"DFS master mode capability")
#define CFG_DFS_ALL \
CFG(CFG_ENABLE_DFS_MASTER_CAPABILITY)
CFG(CFG_IGNORE_CAC) \
CFG(CFG_DISABLE_DFS_CH_SWITCH) \
CFG(CFG_DFS_BEACON_TX_ENHANCED) \
CFG(CFG_SAP_TX_LEAKAGE_THRESHOLD) \
CFG(CFG_ENABLE_NON_DFS_CHAN_ON_RADAR) \
CFG(CFG_ENABLE_DFS_MASTER_CAPABILITY) \
CFG(CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD)
#endif /* __CFG_MLME_DFS_H */

Vedi File

@@ -573,9 +573,21 @@ struct wlan_mlme_cfg_sap {
/**
* struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
* @dfs_master_capable: Is DFS master mode support enabled
* @dfs_disable_channel_switch: disable channel switch on radar detection
* @dfs_ignore_cac: Disable cac
* @dfs_filter_offload: dfs filter offloaad
* @dfs_beacon_tx_enhanced: enhance dfs beacon tx
* @dfs_prefer_non_dfs: perefer non dfs channel after radar
* @sap_tx_leakage_threshold: sap tx leakage threshold
*/
struct wlan_mlme_dfs_cfg {
bool dfs_master_capable;
bool dfs_disable_channel_switch;
bool dfs_ignore_cac;
bool dfs_filter_offload;
bool dfs_beacon_tx_enhanced;
bool dfs_prefer_non_dfs;
uint32_t sap_tx_leakage_threshold;
};
/**

Vedi File

@@ -702,6 +702,93 @@ QDF_STATUS
ucfg_mlme_get_dfs_master_capability(struct wlan_objmgr_psoc *psoc,
bool *val);
/*
* ucfg_mlme_get_dfs_disable_channel_switch() - Get the dfs channel switch
* @psoc: pointer to psoc object
* @dfs_disable_channel_switch: Pointer to the value which will be filled
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_dfs_disable_channel_switch(struct wlan_objmgr_psoc *psoc,
bool *dfs_disable_channel_switch);
/*
* ucfg_mlme_set_dfs_disable_channel_switch() - Set the dfs channel switch
* @psoc: pointer to psoc object
* @dfs_disable_channel_switch: Value that needs to be set.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_dfs_disable_channel_switch(struct wlan_objmgr_psoc *psoc,
bool dfs_disable_channel_switch);
/*
* ucfg_mlme_get_dfs_ignore_cac() - GSet the dfs ignore cac
* @psoc: pointer to psoc object
* @dfs_ignore_cac: Pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_dfs_ignore_cac(struct wlan_objmgr_psoc *psoc,
bool *dfs_ignore_cac);
/*
* ucfg_mlme_set_dfs_ignore_cac() - Set the dfs ignore cac
* @psoc: pointer to psoc object
* @dfs_ignore_cac: Value that needs to be set.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_dfs_ignore_cac(struct wlan_objmgr_psoc *psoc,
bool dfs_ignore_cac);
/*
* ucfg_mlme_get_sap_tx_leakage_threshold() - Get sap tx leakage threshold
* @psoc: pointer to psoc object
* @sap_tx_leakage_threshold: Pointer to the value which will be filled
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_sap_tx_leakage_threshold(struct wlan_objmgr_psoc *psoc,
uint32_t *sap_tx_leakage_threshold);
/*
* ucfg_mlme_set_sap_tx_leakage_threshold() - Set sap tx leakage threshold
* @psoc: pointer to psoc object
* @sap_tx_leakage_threshold: Value that needs to be set.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_sap_tx_leakage_threshold(struct wlan_objmgr_psoc *psoc,
uint32_t sap_tx_leakage_threshold);
/*
* ucfg_mlme_get_dfs_filter_offload() - Get the dfs filter offload
* @psoc: pointer to psoc object
* @dfs_filter_offload: Pointer to the value which will be filled
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool *dfs_filter_offload);
/*
* ucfg_mlme_set_dfs_filter_offload() - Set the dfs filter offload
* @psoc: pointer to psoc object
* @dfs_filter_offload: Value that needs to be set.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool dfs_filter_offload);
/**
* ucfg_mlme_get_pmkid_modes() - Get PMKID modes
* @psoc: pointer to psoc object

Vedi File

@@ -206,6 +206,153 @@ ucfg_mlme_get_dfs_master_capability(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_dfs_disable_channel_switch(struct wlan_objmgr_psoc *psoc,
bool *dfs_disable_channel_switch)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*dfs_disable_channel_switch =
cfg_default(CFG_DISABLE_DFS_CH_SWITCH);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*dfs_disable_channel_switch =
mlme_obj->cfg.dfs_cfg.dfs_disable_channel_switch;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_dfs_disable_channel_switch(struct wlan_objmgr_psoc *psoc,
bool dfs_disable_channel_switch)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
mlme_obj->cfg.dfs_cfg.dfs_disable_channel_switch =
dfs_disable_channel_switch;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_dfs_ignore_cac(struct wlan_objmgr_psoc *psoc,
bool *dfs_ignore_cac)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*dfs_ignore_cac = cfg_default(CFG_IGNORE_CAC);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*dfs_ignore_cac = mlme_obj->cfg.dfs_cfg.dfs_ignore_cac;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_dfs_ignore_cac(struct wlan_objmgr_psoc *psoc,
bool dfs_ignore_cac)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
mlme_obj->cfg.dfs_cfg.dfs_ignore_cac = dfs_ignore_cac;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_sap_tx_leakage_threshold(struct wlan_objmgr_psoc *psoc,
uint32_t *sap_tx_leakage_threshold)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*sap_tx_leakage_threshold =
cfg_default(CFG_SAP_TX_LEAKAGE_THRESHOLD);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*sap_tx_leakage_threshold =
mlme_obj->cfg.dfs_cfg.sap_tx_leakage_threshold;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_sap_tx_leakage_threshold(struct wlan_objmgr_psoc *psoc,
uint32_t sap_tx_leakage_threshold)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
mlme_obj->cfg.dfs_cfg.sap_tx_leakage_threshold =
sap_tx_leakage_threshold;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool *dfs_filter_offload)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*dfs_filter_offload =
cfg_default(CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*dfs_filter_offload = mlme_obj->cfg.dfs_cfg.dfs_filter_offload;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool dfs_filter_offload)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
mlme_obj->cfg.dfs_cfg.dfs_filter_offload = dfs_filter_offload;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_pmkid_modes(struct wlan_objmgr_psoc *psoc,
uint32_t *val)