diff --git a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h index 40f88d80a1f6..2edbd035ec7b 100644 --- a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h +++ b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -259,7 +259,7 @@ * * */ -#define CFG_ENABLE_MCC_ADATIVE_SCH_ENABLED_NAME CFG_INI_UINT(\ +#define CFG_ENABLE_MCC_ADAPTIVE_SCH_ENABLED_NAME CFG_INI_UINT(\ "gEnableMCCAdaptiveScheduler", \ 0, 1, 1, \ CFG_VALUE_OR_DEFAULT, \ @@ -513,7 +513,7 @@ CFG_INI_UINT("g_mark_sap_indoor_as_disable", 0, 1, 0, CFG_VALUE_OR_DEFAULT, \ 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_ADAPTIVE_SCH_ENABLED_NAME)\ CFG(CFG_ENABLE_STA_CONNECTION_IN_5GHZ)\ CFG(CFG_ENABLE_OVERLAP_CH)\ CFG(CFG_DUAL_MAC_FEATURE_DISABLE)\ diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c index dca103ddacbe..a97bf4123b86 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_ucfg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -41,7 +41,7 @@ static QDF_STATUS policy_mgr_init_cfg(struct wlan_objmgr_psoc *psoc) cfg->vdev_priority_list = cfg_get(psoc, CFG_VDEV_CUSTOM_PRIORITY_LIST); 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_get(psoc, CFG_ENABLE_MCC_ADAPTIVE_SCH_ENABLED_NAME); cfg->enable_sta_cxn_5g_band = cfg_get(psoc, CFG_ENABLE_STA_CONNECTION_IN_5GHZ); cfg->allow_mcc_go_diff_bi = diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 8d92255725e2..eaa6e9419a0a 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1711,7 +1711,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) bool status = true; struct hdd_config *config = hdd_ctx->config; mac_handle_t mac_handle; - uint8_t mcc_adaptive_sch = 0; /* * During the initialization both 2G and 5G capabilities should be same. @@ -1732,14 +1731,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx) hdd_err("Fail to pass WNI_CFG_PS_WOW_DATA_INACTIVITY_TO CFG"); } - ucfg_policy_mgr_get_mcc_adaptive_sch(hdd_ctx->psoc, - &mcc_adaptive_sch); - if (sme_cfg_set_int(mac_handle, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, - mcc_adaptive_sch) == QDF_STATUS_E_FAILURE) { - status = false; - hdd_err("Couldn't pass on WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED to CFG"); - } - if (sme_cfg_set_int(mac_handle, WNI_CFG_REMOVE_TIME_SYNC_CMD, config->remove_time_stamp_sync_cmd) diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h index b0b145680104..6586e1a893f1 100644 --- a/core/mac/inc/wni_cfg.h +++ b/core/mac/inc/wni_cfg.h @@ -30,7 +30,6 @@ enum { WNI_CFG_CURRENT_TX_POWER_LEVEL, WNI_CFG_COUNTRY_CODE, WNI_CFG_LOCAL_POWER_CONSTRAINT, - WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT, WNI_CFG_OBSS_DETECTION_OFFLOAD, WNI_CFG_OBSS_COLOR_COLLISION_OFFLOAD, @@ -141,10 +140,6 @@ enum { #define WNI_CFG_ASSOC_STA_LIMIT_STAMIN 1 #define WNI_CFG_ASSOC_STA_LIMIT_STAMAX 32 -#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMIN 0 -#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX 1 -#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STADEF 0 - #define WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT_STAMIN 1 #define WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT_STAMAX 255 #define WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT_STADEF 50 diff --git a/core/mac/src/cfg/cfg_param_name.c b/core/mac/src/cfg/cfg_param_name.c index bbde9de82884..54299453aedd 100644 --- a/core/mac/src/cfg/cfg_param_name.c +++ b/core/mac/src/cfg/cfg_param_name.c @@ -45,7 +45,6 @@ const char *cfg_get_string(uint16_t cfg_id) CASE_RETURN_STRING(WNI_CFG_CURRENT_TX_POWER_LEVEL); CASE_RETURN_STRING(WNI_CFG_COUNTRY_CODE); CASE_RETURN_STRING(WNI_CFG_LOCAL_POWER_CONSTRAINT); - CASE_RETURN_STRING(WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED); CASE_RETURN_STRING(WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT); CASE_RETURN_STRING(WNI_CFG_OBSS_DETECTION_OFFLOAD); CASE_RETURN_STRING(WNI_CFG_OBSS_COLOR_COLLISION_OFFLOAD); diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c index dd8a05a77a91..7890f55346b1 100644 --- a/core/mac/src/cfg/cfg_proc_msg.c +++ b/core/mac/src/cfg/cfg_proc_msg.c @@ -52,11 +52,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { WNI_CFG_LOCAL_POWER_CONSTRAINT_STAMIN, WNI_CFG_LOCAL_POWER_CONSTRAINT_STAMAX, WNI_CFG_LOCAL_POWER_CONSTRAINT_STADEF}, - {WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, - WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMIN, - WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX, - WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STADEF}, {WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT_STAMIN, diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index fb05b006a943..512b813e0793 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -73,6 +73,8 @@ #include "wlan_objmgr_vdev_obj.h" #include "wlan_objmgr_peer_obj.h" #include +#include "cfg_ucfg_api.h" +#include "wlan_policy_mgr_ucfg.h" #include #include "wlan_lmac_if_api.h" #include @@ -1065,7 +1067,7 @@ QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t QDF_STATUS wma_set_mcc_channel_time_latency(tp_wma_handle wma, uint32_t mcc_channel, uint32_t mcc_channel_time_latency) { - uint32_t cfg_val = 0; + uint8_t mcc_adapt_sch = 0; struct mac_context *mac = NULL; uint32_t channel1 = mcc_channel; uint32_t chan1_freq = cds_chan_to_freq(channel1); @@ -1089,9 +1091,11 @@ QDF_STATUS wma_set_mcc_channel_time_latency(tp_wma_handle wma, return QDF_STATUS_E_FAILURE; } /* Confirm MCC adaptive scheduler feature is disabled */ - if (wlan_cfg_get_int(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, - &cfg_val) == QDF_STATUS_SUCCESS) { - if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) { + if (policy_mgr_get_mcc_adaptive_sch(mac->psoc, + &mcc_adapt_sch) == + QDF_STATUS_SUCCESS) { + if (mcc_adapt_sch == + cfg_max(CFG_ENABLE_MCC_ADAPTIVE_SCH_ENABLED_NAME)) { WMA_LOGD("%s: Can't set channel latency while MCC ADAPTIVE SCHED is enabled. Exit", __func__); return QDF_STATUS_SUCCESS; @@ -1128,7 +1132,7 @@ QDF_STATUS wma_set_mcc_channel_time_quota(tp_wma_handle wma, uint32_t adapter_1_chan_number, uint32_t adapter_1_quota, uint32_t adapter_2_chan_number) { - uint32_t cfg_val = 0; + uint8_t mcc_adapt_sch = 0; struct mac_context *mac = NULL; uint32_t chan1_freq = cds_chan_to_freq(adapter_1_chan_number); uint32_t chan2_freq = cds_chan_to_freq(adapter_2_chan_number); @@ -1153,9 +1157,11 @@ QDF_STATUS wma_set_mcc_channel_time_quota(tp_wma_handle wma, } /* Confirm MCC adaptive scheduler feature is disabled */ - if (wlan_cfg_get_int(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, - &cfg_val) == QDF_STATUS_SUCCESS) { - if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) { + if (policy_mgr_get_mcc_adaptive_sch(mac->psoc, + &mcc_adapt_sch) == + QDF_STATUS_SUCCESS) { + if (mcc_adapt_sch == + cfg_max(CFG_ENABLE_MCC_ADAPTIVE_SCH_ENABLED_NAME)) { WMA_LOGD("%s: Can't set channel quota while MCC_ADAPTIVE_SCHED is enabled. Exit", __func__); return QDF_STATUS_SUCCESS; diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 193f2060029a..b080fa14a430 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -74,6 +74,7 @@ #include "wlan_ocb_ucfg_api.h" #include "init_deinit_lmac.h" #include +#include "wlan_policy_mgr_ucfg.h" #include "wlan_mlme_public_struct.h" #include "wlan_mlme_api.h" #include "wlan_mlme_main.h" @@ -2709,6 +2710,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle, QDF_STATUS status = QDF_STATUS_SUCCESS; struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE); uint32_t cfg_val; + uint8_t mcc_adapt_sch; QDF_STATUS ret; struct mlme_ht_capabilities_info *ht_cap_info; struct scheduler_msg sme_msg = { 0 }; @@ -3040,11 +3042,13 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle, mac->mlme_cfg->lfr.roam_bmiss_final_bcnt, self_sta_req->session_id); - if (wlan_cfg_get_int(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, - &cfg_val) == QDF_STATUS_SUCCESS) { + if (policy_mgr_get_mcc_adaptive_sch(mac->psoc, + &mcc_adapt_sch) == + QDF_STATUS_SUCCESS) { WMA_LOGD("%s: setting ini value for WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED: %d", - __func__, cfg_val); - ret = wma_set_enable_disable_mcc_adaptive_scheduler(cfg_val); + __func__, mcc_adapt_sch); + ret = + wma_set_enable_disable_mcc_adaptive_scheduler(mcc_adapt_sch); if (QDF_IS_STATUS_ERROR(ret)) { WMA_LOGE("Failed to set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED"); }