qcacld-3.0: Add Ini for SBS
Add Ini to Disable/Enable SBS. Also, if INI is set then only set the fw mode config bit corresponding to SBS. Change-Id: I839990dcd9bd2daf3df2c64abe5fa74a99c73051 CRs-Fixed: 3065084
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c2f10811c9
commit
3cdd05d709
@@ -3071,6 +3071,20 @@ QDF_STATUS policy_mgr_set_user_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
void policy_mgr_init_dbs_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t scan_config, uint32_t fw_config);
|
||||
|
||||
/**
|
||||
* policy_mgr_init_sbs_fw_config() - Function to initialize SBS
|
||||
* fw mode config in policy manager component
|
||||
* @psoc: PSOC object information
|
||||
* @fw_config: FW config
|
||||
*
|
||||
* This function initialize SBS fw mode config in policy manager component
|
||||
*
|
||||
* Return: void
|
||||
*
|
||||
*/
|
||||
void policy_mgr_init_sbs_fw_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t fw_config);
|
||||
|
||||
/**
|
||||
* policy_mgr_update_dbs_scan_config() - Function to update
|
||||
* DBS scan config in policy manager component
|
||||
|
@@ -360,6 +360,32 @@ CFG_INI_UINT("gAllowMCCGODiffBI", 0, 4, 4, CFG_VALUE_OR_DEFAULT, \
|
||||
CFG_INI_UINT("gDualMacFeatureDisable", 0, 6, 6, CFG_VALUE_OR_DEFAULT, \
|
||||
"This INI is used to enable/disable Dual MAC feature")
|
||||
|
||||
/*
|
||||
*
|
||||
* <ini>
|
||||
* enable_sbs - Enable/Disable SBS.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to enable/disable SBS feature.
|
||||
* 0 - disable SBS
|
||||
* 1 - enable SBS
|
||||
*
|
||||
*
|
||||
* Related: None.
|
||||
*
|
||||
* Supported Feature: SBS
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_SBS CFG_INI_BOOL(\
|
||||
"enable_sbs", \
|
||||
true, \
|
||||
"Enable/Disable SBS")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* g_sta_sap_scc_on_dfs_chan - Allow STA+SAP SCC on DFS channel with master
|
||||
@@ -588,6 +614,7 @@ CFG_INI_UINT("g_pcl_band_priority", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \
|
||||
CFG(CFG_ENABLE_MCC_ADAPTIVE_SCH_ENABLED_NAME)\
|
||||
CFG(CFG_ENABLE_STA_CONNECTION_IN_5GHZ)\
|
||||
CFG(CFG_DUAL_MAC_FEATURE_DISABLE)\
|
||||
CFG(CFG_ENABLE_SBS)\
|
||||
CFG(CFG_STA_SAP_SCC_ON_DFS_CHAN)\
|
||||
CFG(CFG_FORCE_1X1_FEATURE)\
|
||||
CFG(CFG_ENABLE_SAP_MANDATORY_CHAN_LIST)\
|
||||
|
@@ -1604,6 +1604,40 @@ done:
|
||||
pm_ctx->dual_mac_cfg.cur_fw_mode_config);
|
||||
}
|
||||
|
||||
void policy_mgr_init_sbs_fw_config(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t fw_config)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
bool sbs_enabled;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If SBS is not enabled from ini, no need to set SBS bits in fw config
|
||||
*/
|
||||
sbs_enabled = pm_ctx->cfg.sbs_enable;
|
||||
if (!sbs_enabled) {
|
||||
policy_mgr_debug("SBS not enabled from ini");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialize fw_mode_config_bits with default FW value */
|
||||
WMI_DBS_FW_MODE_CFG_ASYNC_SBS_SET(
|
||||
pm_ctx->dual_mac_cfg.cur_fw_mode_config,
|
||||
WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(fw_config));
|
||||
|
||||
policy_mgr_rl_debug("fw_mode config updated from %x to %x",
|
||||
pm_ctx->dual_mac_cfg.prev_fw_mode_config,
|
||||
pm_ctx->dual_mac_cfg.cur_fw_mode_config);
|
||||
/* Initialize the previous scan/fw mode config */
|
||||
pm_ctx->dual_mac_cfg.prev_fw_mode_config =
|
||||
pm_ctx->dual_mac_cfg.cur_fw_mode_config;
|
||||
}
|
||||
|
||||
void policy_mgr_update_dbs_scan_config(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
@@ -1898,14 +1932,40 @@ bool policy_mgr_is_interband_mcc_supported(struct wlan_objmgr_psoc *psoc)
|
||||
wmi_service_no_interband_mcc_support);
|
||||
}
|
||||
|
||||
static bool policy_mgr_is_sbs_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("Invalid Context");
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* if gEnableSBS is not set then policy_mgr_init_sbs_fw_config won't
|
||||
* enable Async SBS fw config bit
|
||||
*/
|
||||
if (WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(
|
||||
pm_ctx->dual_mac_cfg.cur_fw_mode_config))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool policy_mgr_is_hw_sbs_capable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
if (!policy_mgr_is_sbs_enable(psoc)) {
|
||||
policy_mgr_rl_debug("SBS INI is disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!policy_mgr_find_if_fw_supports_dbs(psoc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!policy_mgr_find_if_hwlist_has_sbs(psoc)) {
|
||||
policymgr_nofl_debug("HW mode list has no SBS");
|
||||
policy_mgr_rl_debug("HW mode list has no SBS");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -250,6 +250,7 @@ extern enum policy_mgr_conc_next_action
|
||||
* @enable_sta_cxn_5g_band: Enable/Disable STA connection in 5G band
|
||||
* @go_force_scc: Enable/Disable P2P GO force SCC
|
||||
* @pcl_band_priority: PCL channel order between 5G and 6G.
|
||||
* @sbs_enable: To enable/disable SBS
|
||||
*/
|
||||
struct policy_mgr_cfg {
|
||||
uint8_t mcc_to_scc_switch;
|
||||
@@ -272,6 +273,7 @@ struct policy_mgr_cfg {
|
||||
uint32_t chnl_select_plcy;
|
||||
uint8_t go_force_scc;
|
||||
enum policy_mgr_pcl_band_priority pcl_band_priority;
|
||||
bool sbs_enable;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -49,6 +49,8 @@ static QDF_STATUS policy_mgr_init_cfg(struct wlan_objmgr_psoc *psoc)
|
||||
cfg_get(psoc, CFG_ALLOW_MCC_GO_DIFF_BI);
|
||||
cfg->dual_mac_feature =
|
||||
cfg_get(psoc, CFG_DUAL_MAC_FEATURE_DISABLE);
|
||||
cfg->sbs_enable =
|
||||
cfg_get(psoc, CFG_ENABLE_SBS);
|
||||
cfg->is_force_1x1_enable =
|
||||
cfg_get(psoc, CFG_FORCE_1X1_FEATURE);
|
||||
cfg->sta_sap_scc_on_dfs_chnl =
|
||||
|
@@ -5662,6 +5662,7 @@ static void wma_init_scan_fw_mode_config(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
policy_mgr_init_dbs_config(psoc, scan_config, fw_config);
|
||||
policy_mgr_init_sbs_fw_config(psoc, fw_config);
|
||||
|
||||
wma_debug("Exit");
|
||||
}
|
||||
|
Reference in New Issue
Block a user