qcacmn: Refactor operation related to gEnableStaConnectionIn5Ghz INI
Ownership of gEnableStaConnectionIn5Ghz is changed from HDD to Policy manager. So policy manager doesn't have to rely on HDD to obtain the INI setting. CRs-Fixed: 2324395 Change-Id: I894467bab4b0bddf309463802b98904ef1150536
This commit is contained in:
parent
c9af406975
commit
dd8bf40a44
@ -179,6 +179,20 @@ QDF_STATUS policy_mgr_get_chnl_select_plcy(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
QDF_STATUS policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *enable_mcc_adaptive_sch);
|
||||
|
||||
/**
|
||||
* policy_mgr_get_sta_cxn_5g_band() - to get STA's connection in 5G config
|
||||
*
|
||||
* @psoc: pointer to psoc
|
||||
* @enable_sta_cxn_5g_band: value to be filled
|
||||
*
|
||||
* This API is used to find out if STA connection in 5G band is allowed or
|
||||
* disallowed.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
|
||||
*/
|
||||
QDF_STATUS policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *enable_sta_cxn_5g_band);
|
||||
/**
|
||||
* policy_mgr_set_concurrency_mode() - To set concurrency mode
|
||||
* @psoc: PSOC object data
|
||||
|
@ -265,6 +265,29 @@
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Enable/Disable MCC Adaptive Scheduler")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableStaConnectionIn5Ghz - To enable/disable STA connection in 5G
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to enable/disable STA connection in 5G band
|
||||
*
|
||||
* Related: STA
|
||||
*
|
||||
* Supported Feature: Concurrency
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ CFG_INI_UINT(\
|
||||
"gEnableStaConnectionIn5Ghz", \
|
||||
0, 1, 1, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Enable/Disable STA connection in 5G")
|
||||
|
||||
#define CFG_POLICY_MGR_ALL \
|
||||
CFG(CFG_MCC_TO_SCC_SWITCH) \
|
||||
CFG(CFG_CONC_SYS_PREF) \
|
||||
@ -274,5 +297,6 @@
|
||||
CFG(CFG_CHNL_SELECT_LOGIC_CONC) \
|
||||
CFG(CFG_ENABLE_CONC_RULE1) \
|
||||
CFG(CFG_ENABLE_CONC_RULE2) \
|
||||
CFG(CFG_ENABLE_MCC_ADATIVE_SCH_ENABLED_NAME)
|
||||
CFG(CFG_ENABLE_MCC_ADATIVE_SCH_ENABLED_NAME)\
|
||||
CFG(CFG_ENABLE_STA_CONNECTION_IN_5GHZ)
|
||||
#endif
|
||||
|
@ -164,4 +164,18 @@ QDF_STATUS ucfg_policy_mgr_get_chnl_select_plcy(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS
|
||||
ucfg_policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *enable_mcc_adaptive_sch);
|
||||
|
||||
/**
|
||||
* ucfg_policy_mgr_get_sta_cxn_5g_band() - to get STA's connection in 5G config
|
||||
*
|
||||
* @psoc: pointer to psoc
|
||||
* @enable_sta_cxn_5g_band: value to be filled
|
||||
*
|
||||
* This API is used to find out if STA connection in 5G band is allowed or
|
||||
* disallowed.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
|
||||
*/
|
||||
QDF_STATUS ucfg_policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *enable_sta_cxn_5g_band);
|
||||
#endif //__WLAN_POLICY_MGR_UCFG
|
||||
|
@ -187,6 +187,21 @@ QDF_STATUS policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *enable_sta_cxn_5g_band)
|
||||
{
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
policy_mgr_err("pm_ctx is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
*enable_sta_cxn_5g_band = pm_ctx->cfg.enable_sta_cxn_5g_band;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void policy_mgr_update_new_hw_mode_index(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t new_hw_mode_index)
|
||||
{
|
||||
|
@ -224,6 +224,7 @@ struct sta_ap_intf_check_work_ctx {
|
||||
* @vdev_priority_list: Priority list for various vdevs
|
||||
* @chnl_select_plcy: Channel selection policy
|
||||
* @enable_mcc_adaptive_sch: Enable/Disable MCC adaptive scheduler
|
||||
* @enable_sta_cxn_5g_band: Enable/Disable STA connection in 5G band
|
||||
*/
|
||||
struct policy_mgr_cfg {
|
||||
uint8_t mcc_to_scc_switch;
|
||||
@ -232,6 +233,7 @@ struct policy_mgr_cfg {
|
||||
uint8_t conc_rule1;
|
||||
uint8_t conc_rule2;
|
||||
uint8_t enable_mcc_adaptive_sch;
|
||||
uint8_t enable_sta_cxn_5g_band;
|
||||
uint32_t dbs_selection_plcy;
|
||||
uint32_t vdev_priority_list;
|
||||
uint32_t chnl_select_plcy;
|
||||
|
@ -42,6 +42,8 @@ static QDF_STATUS policy_mgr_init_cfg(struct wlan_objmgr_psoc *psoc)
|
||||
cfg->chnl_select_plcy = cfg_get(psoc, CFG_CHNL_SELECT_LOGIC_CONC);
|
||||
cfg->enable_mcc_adaptive_sch =
|
||||
cfg_get(psoc, CFG_ENABLE_MCC_ADATIVE_SCH_ENABLED_NAME);
|
||||
cfg->enable_sta_cxn_5g_band =
|
||||
cfg_get(psoc, CFG_ENABLE_STA_CONNECTION_IN_5GHZ);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@ -136,3 +138,9 @@ QDF_STATUS ucfg_policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return policy_mgr_get_mcc_adaptive_sch(psoc, mcc_adaptive_sch);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_policy_mgr_get_sta_cxn_5g_band(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *enable_sta_cxn_5g_band)
|
||||
{
|
||||
return policy_mgr_get_sta_cxn_5g_band(psoc, enable_sta_cxn_5g_band);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user