浏览代码

qcacld-3.0: ADD MLME INI items of FE_BEAMFORM and WLAN_REG

Add the following WLAN_REG ini configs and FE_BEAMFORM
cfg items to MLME cfg:
1. WNI_CFG_11D_ENABLED
2. WNI_CFG_11H_ENABLED
3. WNI_CFG_TX_BF_CAP
4. WNI_CFG_AS_CAP
5. WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP

Introduce the basic infra APIs related to these configs
from mlme.

In csr_roam_open_session, lim_populate_vht_mcs_set,
lim_sta_send_add_bss, populate_dot11f_tdls_ht_vht_cap,
populate_dot11f_vht_caps and sme_update_nss, local structure
is updated instead of mlme global structure for vht caps and
thus the mlme vht caps contains only the default values.

Fix this by updating mlme vht caps in mlme_update_vht_cap.

Change-Id: I1a948d7a44ad2bcc7f711c46b278971d7e4026e7
CRs-Fixed: 2354562
Abhinav Kumar 6 年之前
父节点
当前提交
d4d6eb7d4e

+ 8 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -349,6 +349,9 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
 	gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG);
 	gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG);
 	mlme_init_pmf_cfg(psoc, gen);
 	mlme_init_pmf_cfg(psoc, gen);
 	mlme_init_lpass_support_cfg(psoc, gen);
 	mlme_init_lpass_support_cfg(psoc, gen);
+
+	gen->enabled_11h = cfg_default(CFG_11H_SUPPORT_ENABLED);
+	gen->enabled_11d = cfg_default(CFG_11D_SUPPORT_ENABLED);
 }
 }
 
 
 static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)
 static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)
@@ -806,6 +809,11 @@ static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc,
 
 
 	if (vht_cap_info->enable2x2 && vht_cap_info->su_bformer)
 	if (vht_cap_info->enable2x2 && vht_cap_info->su_bformer)
 		vht_cap_info->num_soundingdim = NUM_OF_SOUNDING_DIMENSIONS;
 		vht_cap_info->num_soundingdim = NUM_OF_SOUNDING_DIMENSIONS;
+
+	vht_cap_info->tx_bf_cap = cfg_default(CFG_TX_BF_CAP);
+	vht_cap_info->as_cap = cfg_default(CFG_AS_CAP);
+	vht_cap_info->disable_ldpc_with_txbf_ap =
+			cfg_get(psoc, CFG_DISABLE_LDPC_WITH_TXBF_AP);
 }
 }
 
 
 static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,
 static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,

+ 46 - 0
components/mlme/dispatcher/inc/cfg_mlme_generic.h

@@ -94,6 +94,50 @@
 		1, \
 		1, \
 		"RTT3 enable/disable info")
 		"RTT3 enable/disable info")
 
 
+/*
+ * <ini>
+ * g11hSupportEnabled - Enable 11h support
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set 11h support flag
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_11H_SUPPORT_ENABLED CFG_INI_BOOL( \
+		"g11hSupportEnabled", \
+		1, \
+		"11h Enable Flag")
+
+/*
+ * <ini>
+ * g11dSupportEnabled - Enable 11d support
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set 11d support flag
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_11D_SUPPORT_ENABLED CFG_INI_BOOL( \
+		"g11dSupportEnabled", \
+		1, \
+		"11d Enable Flag")
+
 /*
 /*
  * <ini>
  * <ini>
  * BandCapability - Preferred band (0: Both,  1: 2.4G only,  2: 5G only)
  * BandCapability - Preferred band (0: Both,  1: 2.4G only,  2: 5G only)
@@ -494,6 +538,8 @@
 	CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \
 	CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \
 	CFG(CFG_ENABLE_RTT_MAC_RANDOMIZATION) \
 	CFG(CFG_ENABLE_RTT_MAC_RANDOMIZATION) \
 	CFG(CFG_RTT3_ENABLE) \
 	CFG(CFG_RTT3_ENABLE) \
+	CFG(CFG_11H_SUPPORT_ENABLED) \
+	CFG(CFG_11D_SUPPORT_ENABLED) \
 	CFG(CFG_BAND_CAPABILITY) \
 	CFG(CFG_BAND_CAPABILITY) \
 	CFG(CFG_PREVENT_LINK_DOWN) \
 	CFG(CFG_PREVENT_LINK_DOWN) \
 	CFG(CFG_SELECT_5GHZ_MARGIN) \
 	CFG(CFG_SELECT_5GHZ_MARGIN) \

+ 40 - 1
components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h

@@ -126,6 +126,42 @@
 		CFG_VALUE_OR_DEFAULT, \
 		CFG_VALUE_OR_DEFAULT, \
 		"VHT TX SUPP DATA RATE")
 		"VHT TX SUPP DATA RATE")
 
 
+#define CFG_TX_BF_CAP CFG_INT( \
+		"tx_bf_cap", \
+		0, \
+		-1, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"TX BF CAP")
+
+#define CFG_AS_CAP CFG_UINT( \
+		"as_cap", \
+		0, \
+		255, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"AS CAP")
+
+/*
+ * <ini>
+ * gDisableLDPCWithTxbfAP - Disable LDPC with tx bf AP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_DISABLE_LDPC_WITH_TXBF_AP CFG_INI_BOOL( \
+		"gDisableLDPCWithTxbfAP", \
+		0, \
+		"Disable LDPC with tx bf AP")
+
 /*
 /*
  * <ini>
  * <ini>
  * gTxBFEnable - Enables SU beamformee caps
  * gTxBFEnable - Enables SU beamformee caps
@@ -591,6 +627,9 @@
 	CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \
 	CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \
 	CFG(CFG_VHT_MPDU_LEN) \
 	CFG(CFG_VHT_MPDU_LEN) \
 	CFG(CFG_VHT_ENABLE_TXBF_SAP_MODE) \
 	CFG(CFG_VHT_ENABLE_TXBF_SAP_MODE) \
-	CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE)
+	CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE) \
+	CFG(CFG_TX_BF_CAP) \
+	CFG(CFG_AS_CAP) \
+	CFG(CFG_DISABLE_LDPC_WITH_TXBF_AP)
 
 
 #endif /* __CFG_MLME_VHT_CAPS_H */
 #endif /* __CFG_MLME_VHT_CAPS_H */

+ 37 - 0
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -1857,4 +1857,41 @@ QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc,
  */
  */
 QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
 					bool value);
 					bool value);
+
+/**
+ * wlan_mlme_is_11h_enabled() - Get the 11h flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
+
+/**
+ * wlan_mlme_set_11h_enabled() - Set the 11h flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value);
+
+/**
+ * wlan_mlme_is_11d_enabled() - Get the 11d flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
+
+/**
+ * wlan_mlme_set_11d_enabled() - Set the 11h flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value);
+
 #endif /* _WLAN_MLME_API_H_ */
 #endif /* _WLAN_MLME_API_H_ */

+ 10 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -646,6 +646,9 @@ struct wlan_mlme_mbo {
  * @ampdu_len: To handle maximum receive AMPDU ampdu len
  * @ampdu_len: To handle maximum receive AMPDU ampdu len
  * @tx_bfee_sap: enable tx bfee SAp
  * @tx_bfee_sap: enable tx bfee SAp
  * @subfee_vendor_vhtie: enable subfee vendor vht ie
  * @subfee_vendor_vhtie: enable subfee vendor vht ie
+ * @tx_bf_cap: Transmit bf capability
+ * @as_cap: Antenna sharing capability info
+ * @disable_ldpc_with_txbf_ap: Disable ldpc capability
  */
  */
 struct mlme_vht_capabilities_info {
 struct mlme_vht_capabilities_info {
 	uint8_t supp_chan_width;
 	uint8_t supp_chan_width;
@@ -686,6 +689,9 @@ struct mlme_vht_capabilities_info {
 	uint8_t ampdu_len;
 	uint8_t ampdu_len;
 	bool tx_bfee_sap;
 	bool tx_bfee_sap;
 	bool vendor_vhtie;
 	bool vendor_vhtie;
+	uint8_t tx_bf_cap;
+	uint8_t as_cap;
+	bool disable_ldpc_with_txbf_ap;
 };
 };
 
 
 /**
 /**
@@ -902,6 +908,8 @@ struct wlan_mlme_chainmask {
  * @optimize_ca_event: Enable/Disable Optimization of CA events
  * @optimize_ca_event: Enable/Disable Optimization of CA events
  * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  * @debug_packet_log: Debug packet log flags
  * @debug_packet_log: Debug packet log flags
+ * @enabled_11h: enable 11h flag
+ * @enabled_11d: enable 11d flag
  */
  */
 struct wlan_mlme_generic {
 struct wlan_mlme_generic {
 	enum band_info band_capability;
 	enum band_info band_capability;
@@ -925,6 +933,8 @@ struct wlan_mlme_generic {
 	bool optimize_ca_event;
 	bool optimize_ca_event;
 	bool fw_timeout_crash;
 	bool fw_timeout_crash;
 	uint8_t debug_packet_log;
 	uint8_t debug_packet_log;
+	bool enabled_11h;
+	bool enabled_11d;
 };
 };
 
 
 /*
 /*

+ 60 - 0
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -2358,6 +2358,66 @@ ucfg_mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc)
 	return mlme_update_nss_vht_cap(psoc);
 	return mlme_update_nss_vht_cap(psoc);
 }
 }
 
 
+/**
+ * ucfg_mlme_is_11h_enabled() - Get 11h flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	return wlan_mlme_is_11h_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_set_11h_enabled() - Set 11h flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value)
+{
+	return wlan_mlme_set_11h_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_is_11d_enabled() - Get 11d flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	return wlan_mlme_is_11d_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_set_11d_enabled() - Set 11d flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value)
+{
+	return wlan_mlme_set_11d_enabled(psoc, value);
+}
+
 /**
 /**
  * ucfg_mlme_get_opr_rate_set() - Get operational rate set
  * ucfg_mlme_get_opr_rate_set() - Get operational rate set
  * @psoc: pointer to psoc object
  * @psoc: pointer to psoc object

+ 63 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -2351,6 +2351,69 @@ QDF_STATUS mlme_set_wep_key(struct wlan_mlme_wep_cfg *wep_params,
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }
 
 
+QDF_STATUS
+wlan_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	*value = mlme_obj->cfg.gen.enabled_11h;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	mlme_obj->cfg.gen.enabled_11h = value;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	*value = mlme_obj->cfg.gen.enabled_11d;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	mlme_obj->cfg.gen.enabled_11d = value;
+
+	return QDF_STATUS_SUCCESS;
+}
 QDF_STATUS
 QDF_STATUS
 wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value)
 wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value)
 {
 {

+ 0 - 53
core/hdd/inc/wlan_hdd_cfg.h

@@ -86,28 +86,6 @@ struct hdd_context;
 #define CFG_ENABLE_CONNECTED_SCAN_MAX         (1)
 #define CFG_ENABLE_CONNECTED_SCAN_MAX         (1)
 #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT     (1)
 #define CFG_ENABLE_CONNECTED_SCAN_DEFAULT     (1)
 
 
-/*
- * <ini>
- * g11dSupportEnabled - Enable/Disable 11d support
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable or disable 11d support.
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_11D_SUPPORT_ENABLED_NAME           "g11dSupportEnabled"
-#define CFG_11D_SUPPORT_ENABLED_MIN            WNI_CFG_11D_ENABLED_STAMIN
-#define CFG_11D_SUPPORT_ENABLED_MAX            WNI_CFG_11D_ENABLED_STAMAX
-#define CFG_11D_SUPPORT_ENABLED_DEFAULT        WNI_CFG_11D_ENABLED_STADEF       /* Default is ON */
-
 /*
 /*
  * <ini>
  * <ini>
  * enable_11d_in_world_mode - enable 11d in world mode
  * enable_11d_in_world_mode - enable 11d in world mode
@@ -127,29 +105,6 @@ struct hdd_context;
  #define CFG_ENABLE_11D_IN_WORLD_MODE_MAX     (1)
  #define CFG_ENABLE_11D_IN_WORLD_MODE_MAX     (1)
  #define CFG_ENABLE_11D_IN_WORLD_MODE_DEFAULT (0)
  #define CFG_ENABLE_11D_IN_WORLD_MODE_DEFAULT (0)
 
 
-/*
- * <ini>
- * g11hSupportEnabled - Enable/Disable 11h support
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable or disable 11h support.
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_11H_SUPPORT_ENABLED_NAME           "g11hSupportEnabled"
-#define CFG_11H_SUPPORT_ENABLED_MIN            (0)
-#define CFG_11H_SUPPORT_ENABLED_MAX            (1)
-#define CFG_11H_SUPPORT_ENABLED_DEFAULT        (1)    /* Default is ON */
-
 #define CFG_REG_CHANGE_DEF_COUNTRY_NAME          "gRegulatoryChangeCountry"
 #define CFG_REG_CHANGE_DEF_COUNTRY_NAME          "gRegulatoryChangeCountry"
 #define CFG_REG_CHANGE_DEF_COUNTRY_DEFAULT       (0)
 #define CFG_REG_CHANGE_DEF_COUNTRY_DEFAULT       (0)
 #define CFG_REG_CHANGE_DEF_COUNTRY_MIN           (0)
 #define CFG_REG_CHANGE_DEF_COUNTRY_MIN           (0)
@@ -2744,11 +2699,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_TX_STBC_MAX                   (1)
 #define CFG_ENABLE_TX_STBC_MAX                   (1)
 #define CFG_ENABLE_TX_STBC_DEFAULT               (0)
 #define CFG_ENABLE_TX_STBC_DEFAULT               (0)
 
 
-#define CFG_DISABLE_LDPC_WITH_TXBF_AP             "gDisableLDPCWithTxbfAP"
-#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN         (0)
-#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX         (1)
-#define CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT     (0)
-
 /*
 /*
  * <ini>
  * <ini>
  * gEnableSNRMonitoring - Enables SNR Monitoring
  * gEnableSNRMonitoring - Enables SNR Monitoring
@@ -4914,8 +4864,6 @@ struct hdd_config {
 
 
 	/* Config parameters */
 	/* Config parameters */
 	bool enable_connected_scan;
 	bool enable_connected_scan;
-	bool Is11dSupportEnabled;
-	bool Is11hSupportEnabled;
 	char PowerUsageControl[4];
 	char PowerUsageControl[4];
 	bool fSupplicantCountryCodeHasPriority;
 	bool fSupplicantCountryCodeHasPriority;
 	bool fIsImpsEnabled;
 	bool fIsImpsEnabled;
@@ -5042,7 +4990,6 @@ struct hdd_config {
 	bool enableFirstScan2GOnly;
 	bool enableFirstScan2GOnly;
 	bool prevent_link_down;
 	bool prevent_link_down;
 	uint8_t scanAgingTimeout;
 	uint8_t scanAgingTimeout;
-	uint8_t disableLDPCWithTxbfAP;
 	bool fEnableSNRMonitoring;
 	bool fEnableSNRMonitoring;
 	/*PNO related parameters */
 	/*PNO related parameters */
 #ifdef FEATURE_WLAN_SCAN_PNO
 #ifdef FEATURE_WLAN_SCAN_PNO

+ 0 - 37
core/hdd/src/wlan_hdd_cfg.c

@@ -56,21 +56,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_CONNECTED_SCAN_MIN,
 		     CFG_ENABLE_CONNECTED_SCAN_MIN,
 		     CFG_ENABLE_CONNECTED_SCAN_MAX),
 		     CFG_ENABLE_CONNECTED_SCAN_MAX),
 
 
-	REG_VARIABLE(CFG_11D_SUPPORT_ENABLED_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, Is11dSupportEnabled,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_11D_SUPPORT_ENABLED_DEFAULT,
-		     CFG_11D_SUPPORT_ENABLED_MIN,
-		     CFG_11D_SUPPORT_ENABLED_MAX),
-
-	REG_VARIABLE(CFG_11H_SUPPORT_ENABLED_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, Is11hSupportEnabled,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_11H_SUPPORT_ENABLED_DEFAULT,
-		     CFG_11H_SUPPORT_ENABLED_MIN,
-		     CFG_11H_SUPPORT_ENABLED_MAX),
-
-
 	REG_VARIABLE(CFG_ENABLE_IMPS_NAME, WLAN_PARAM_Integer,
 	REG_VARIABLE(CFG_ENABLE_IMPS_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, fIsImpsEnabled,
 		     struct hdd_config, fIsImpsEnabled,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -515,13 +500,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN,
 		     CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN,
 		     CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX),
 		     CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX),
 
 
-	REG_VARIABLE(CFG_DISABLE_LDPC_WITH_TXBF_AP, WLAN_PARAM_Integer,
-		     struct hdd_config, disableLDPCWithTxbfAP,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT,
-		     CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN,
-		     CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX),
-
 	REG_VARIABLE(CFG_ENABLE_SNR_MONITORING_NAME, WLAN_PARAM_Integer,
 	REG_VARIABLE(CFG_ENABLE_SNR_MONITORING_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, fEnableSNRMonitoring,
 		     struct hdd_config, fEnableSNRMonitoring,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -2628,18 +2606,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Fail to pass WNI_CFG_PS_WOW_DATA_INACTIVITY_TO CFG");
 		hdd_err("Fail to pass WNI_CFG_PS_WOW_DATA_INACTIVITY_TO CFG");
 	}
 	}
 
 
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_11D_ENABLED,
-		     config->Is11dSupportEnabled) == QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_11D_ENABLED to CFG");
-	}
-
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
-		    config->disableLDPCWithTxbfAP) == QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP to CFG");
-	}
-
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_IBSS_ATIM_WIN_SIZE,
 			    config->ibssATIMWinSize) ==
 			    config->ibssATIMWinSize) ==
 			QDF_STATUS_E_FAILURE) {
 			QDF_STATUS_E_FAILURE) {
@@ -2818,8 +2784,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 	/* Config params obtained from the registry
 	/* Config params obtained from the registry
 	 * To Do: set regulatory information here
 	 * To Do: set regulatory information here
 	 */
 	 */
-	smeConfig->csrConfig.Is11dSupportEnabled = pConfig->Is11dSupportEnabled;
-
 	smeConfig->csrConfig.phyMode =
 	smeConfig->csrConfig.phyMode =
 		hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
 		hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
 
 
@@ -2888,7 +2852,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 	smeConfig->csrConfig.AdHocChannel24 = pConfig->AdHocChannel24G;
 	smeConfig->csrConfig.AdHocChannel24 = pConfig->AdHocChannel24G;
 	smeConfig->csrConfig.ProprietaryRatesEnabled = 0;
 	smeConfig->csrConfig.ProprietaryRatesEnabled = 0;
 	smeConfig->csrConfig.HeartbeatThresh50 = 40;
 	smeConfig->csrConfig.HeartbeatThresh50 = 40;
-	smeConfig->csrConfig.Is11hSupportEnabled = pConfig->Is11hSupportEnabled;
 	smeConfig->csrConfig.nTxPowerCap = pConfig->nTxPowerCap;
 	smeConfig->csrConfig.nTxPowerCap = pConfig->nTxPowerCap;
 	smeConfig->csrConfig.fEnableDFSChnlScan = pConfig->enableDFSChnlScan;
 	smeConfig->csrConfig.fEnableDFSChnlScan = pConfig->enableDFSChnlScan;
 
 

+ 17 - 6
core/hdd/src/wlan_hdd_main.c

@@ -9025,6 +9025,7 @@ void hdd_acs_response_timeout_handler(void *context)
  */
  */
 static void hdd_override_ini_config(struct hdd_context *hdd_ctx)
 static void hdd_override_ini_config(struct hdd_context *hdd_ctx)
 {
 {
+	QDF_STATUS status;
 
 
 	if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan) {
 	if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan) {
 		hdd_ctx->config->enableDFSChnlScan = enable_dfs_chan_scan;
 		hdd_ctx->config->enableDFSChnlScan = enable_dfs_chan_scan;
@@ -9032,8 +9033,9 @@ static void hdd_override_ini_config(struct hdd_context *hdd_ctx)
 			   enable_dfs_chan_scan);
 			   enable_dfs_chan_scan);
 	}
 	}
 	if (0 == enable_11d || 1 == enable_11d) {
 	if (0 == enable_11d || 1 == enable_11d) {
-		hdd_ctx->config->Is11dSupportEnabled = enable_11d;
-		hdd_debug("Module enable_11d set to %d", enable_11d);
+		status = ucfg_mlme_set_11d_enabled(hdd_ctx->psoc, enable_11d);
+		if (!QDF_IS_STATUS_SUCCESS(status))
+			hdd_err("Failed to set 11d_enable flag");
 	}
 	}
 
 
 	if (hdd_ctx->config->action_oui_enable && !ucfg_action_oui_enabled()) {
 	if (hdd_ctx->config->action_oui_enable && !ucfg_action_oui_enabled()) {
@@ -9814,6 +9816,7 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx)
 	bool skip_dfs_in_p2p_search = false;
 	bool skip_dfs_in_p2p_search = false;
 	uint8_t band_capability;
 	uint8_t band_capability;
 	QDF_STATUS status;
 	QDF_STATUS status;
+	bool value = false;
 
 
 	status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability);
 	status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability);
 	if (QDF_IS_STATUS_ERROR(status))
 	if (QDF_IS_STATUS_ERROR(status))
@@ -9828,10 +9831,18 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->dual_mac_feature_disable;
 		hdd_ctx->config->dual_mac_feature_disable;
 	user_config->indoor_channel_support =
 	user_config->indoor_channel_support =
 		hdd_ctx->config->indoor_channel_support;
 		hdd_ctx->config->indoor_channel_support;
-	user_config->is_11d_support_enabled =
-		hdd_ctx->config->Is11dSupportEnabled;
-	user_config->is_11h_support_enabled =
-		hdd_ctx->config->Is11hSupportEnabled;
+
+	status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &value);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("Invalid 11d_enable flag");
+	user_config->is_11d_support_enabled = value;
+
+	value = false;
+	status = ucfg_mlme_is_11h_enabled(hdd_ctx->psoc, &value);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("Invalid 11h_enable flag");
+	user_config->is_11h_support_enabled = value;
+
 	cfg_p2p_get_skip_dfs_channel_p2p_search(hdd_ctx->psoc,
 	cfg_p2p_get_skip_dfs_channel_p2p_search(hdd_ctx->psoc,
 						&skip_dfs_in_p2p_search);
 						&skip_dfs_in_p2p_search);
 	user_config->skip_dfs_chnl_in_p2p_search = skip_dfs_in_p2p_search;
 	user_config->skip_dfs_chnl_in_p2p_search = skip_dfs_in_p2p_search;

+ 6 - 1
core/hdd/src/wlan_hdd_regulatory.c

@@ -210,12 +210,17 @@ static void reg_program_config_vars(struct hdd_context *hdd_ctx,
 	uint8_t band_capability = 0;
 	uint8_t band_capability = 0;
 	QDF_STATUS status;
 	QDF_STATUS status;
 	bool country_priority = 0;
 	bool country_priority = 0;
+	bool value = false;
 
 
 	status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability);
 	status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability);
 	if (QDF_IS_STATUS_ERROR(status))
 	if (QDF_IS_STATUS_ERROR(status))
 		hdd_err("Failed to get MLME band cap, defaulting to BAND_ALL");
 		hdd_err("Failed to get MLME band cap, defaulting to BAND_ALL");
 
 
-	config_vars->enable_11d_support = hdd_ctx->config->Is11dSupportEnabled;
+	status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &value);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("Invalid 11d_enable flag");
+	config_vars->enable_11d_support = value;
+
 	config_vars->scan_11d_interval = hdd_ctx->config->scan_11d_interval;
 	config_vars->scan_11d_interval = hdd_ctx->config->scan_11d_interval;
 	ucfg_mlme_get_sap_country_priority(hdd_ctx->psoc,
 	ucfg_mlme_get_sap_country_priority(hdd_ctx->psoc,
 					   &country_priority);
 					   &country_priority);

+ 15 - 21
core/hdd/src/wlan_hdd_wext.c

@@ -3943,11 +3943,13 @@ int wlan_hdd_update_phymode(struct hdd_adapter *adapter, int new_phymode)
 			goto free;
 			goto free;
 		}
 		}
 
 
-		if (curr_band == BAND_2G)
-			sme_config->csrConfig.Is11hSupportEnabled = 0;
-		else
-			sme_config->csrConfig.Is11hSupportEnabled =
-				phddctx->config->Is11hSupportEnabled;
+		if (curr_band == BAND_2G) {
+			status = ucfg_mlme_set_11h_enabled(phddctx->psoc, 0);
+			if (!QDF_IS_STATUS_SUCCESS(status)) {
+				hdd_err("Failed to set 11h_enable flag");
+				goto free;
+			}
+		}
 		if (curr_band == BAND_2G)
 		if (curr_band == BAND_2G)
 			sme_config->csrConfig.channelBondingMode24GHz = chwidth;
 			sme_config->csrConfig.channelBondingMode24GHz = chwidth;
 		else if (curr_band == BAND_5G)
 		else if (curr_band == BAND_5G)
@@ -4085,9 +4087,9 @@ free_config:
 static int hdd_we_set_11d_state(struct hdd_adapter *adapter, int state_11d)
 static int hdd_we_set_11d_state(struct hdd_adapter *adapter, int state_11d)
 {
 {
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	tSmeConfigParams *sme_config;
 	bool enable_11d;
 	bool enable_11d;
 	mac_handle_t mac_handle = hdd_ctx->mac_handle;
 	mac_handle_t mac_handle = hdd_ctx->mac_handle;
+	QDF_STATUS status;
 
 
 	if (!mac_handle)
 	if (!mac_handle)
 		return -EINVAL;
 		return -EINVAL;
@@ -4103,17 +4105,9 @@ static int hdd_we_set_11d_state(struct hdd_adapter *adapter, int state_11d)
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
-	sme_config = qdf_mem_malloc(sizeof(*sme_config));
-	if (!sme_config) {
-		hdd_err("failed to allocate memory for sme_config");
-		return -ENOMEM;
-	}
-
-	sme_get_config_param(mac_handle, sme_config);
-	sme_config->csrConfig.Is11dSupportEnabled = enable_11d;
-	sme_update_config(mac_handle, sme_config);
-
-	qdf_mem_free(sme_config);
+	status = ucfg_mlme_set_11d_enabled(hdd_ctx->psoc, enable_11d);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		hdd_err("Invalid 11d_enable flag");
 
 
 	hdd_debug("11D state=%d", enable_11d);
 	hdd_debug("11D state=%d", enable_11d);
 
 
@@ -5654,10 +5648,10 @@ static int __iw_setnone_getint(struct net_device *dev,
 	switch (value[0]) {
 	switch (value[0]) {
 	case WE_GET_11D_STATE:
 	case WE_GET_11D_STATE:
 	{
 	{
-		sme_get_config_param(mac_handle, sme_config);
-
-		*value = sme_config->csrConfig.Is11dSupportEnabled;
-
+		status = ucfg_mlme_is_11d_enabled(hdd_ctx->psoc, &bval);
+		if (!QDF_IS_STATUS_SUCCESS(status))
+			hdd_err("Invalid 11d_enable flag");
+		*value = bval;
 		hdd_debug("11D state=%d!!", *value);
 		hdd_debug("11D state=%d!!", *value);
 
 
 		break;
 		break;

+ 0 - 1
core/mac/inc/ani_global.h

@@ -533,7 +533,6 @@ typedef struct sAniSirLim {
 	/* admission control policy information */
 	/* admission control policy information */
 	tLimAdmitPolicyInfo admitPolicyInfo;
 	tLimAdmitPolicyInfo admitPolicyInfo;
 	qdf_mutex_t lkPeGlobalLock;
 	qdf_mutex_t lkPeGlobalLock;
-	uint8_t disableLDPCWithTxbfAP;
 #ifdef FEATURE_WLAN_TDLS
 #ifdef FEATURE_WLAN_TDLS
 	uint8_t gLimTDLSBufStaEnabled;
 	uint8_t gLimTDLSBufStaEnabled;
 	uint8_t gLimTDLSUapsdMask;
 	uint8_t gLimTDLSUapsdMask;

+ 0 - 5
core/mac/inc/wni_cfg.h

@@ -30,19 +30,14 @@ enum {
 	WNI_CFG_DOT11_MODE,
 	WNI_CFG_DOT11_MODE,
 	WNI_CFG_VALID_CHANNEL_LIST,
 	WNI_CFG_VALID_CHANNEL_LIST,
 	WNI_CFG_APSD_ENABLED,
 	WNI_CFG_APSD_ENABLED,
-	WNI_CFG_11D_ENABLED,
 	WNI_CFG_CURRENT_TX_POWER_LEVEL,
 	WNI_CFG_CURRENT_TX_POWER_LEVEL,
 	WNI_CFG_COUNTRY_CODE,
 	WNI_CFG_COUNTRY_CODE,
-	WNI_CFG_11H_ENABLED,
 	WNI_CFG_LOCAL_POWER_CONSTRAINT,
 	WNI_CFG_LOCAL_POWER_CONSTRAINT,
 	WNI_CFG_SCAN_CONTROL_LIST,
 	WNI_CFG_SCAN_CONTROL_LIST,
-	WNI_CFG_TX_BF_CAP,
-	WNI_CFG_AS_CAP,
 	WNI_CFG_SCAN_IN_POWERSAVE,
 	WNI_CFG_SCAN_IN_POWERSAVE,
 	WNI_CFG_IBSS_AUTO_BSSID,
 	WNI_CFG_IBSS_AUTO_BSSID,
 	WNI_CFG_WPS_UUID,
 	WNI_CFG_WPS_UUID,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
-	WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
 	WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT,
 	WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT,
 	WNI_CFG_OBSS_DETECTION_OFFLOAD,
 	WNI_CFG_OBSS_DETECTION_OFFLOAD,

+ 1 - 6
core/mac/src/cfg/cfg_api.c

@@ -710,12 +710,7 @@ QDF_STATUS cfg_get_capability_info(struct mac_context *mac, uint16_t *pCap,
 
 
 	/* Spectrum Management bit */
 	/* Spectrum Management bit */
 	if (!LIM_IS_IBSS_ROLE(pe_session) && pe_session->lim11hEnable) {
 	if (!LIM_IS_IBSS_ROLE(pe_session) && pe_session->lim11hEnable) {
-		if (wlan_cfg_get_int(mac, WNI_CFG_11H_ENABLED, &val) !=
-		    QDF_STATUS_SUCCESS) {
-			pe_err("cfg get WNI_CFG_11H_ENABLED failed");
-			return QDF_STATUS_E_FAILURE;
-		}
-		if (val)
+		if (mac->mlme_cfg->gen.enabled_11h)
 			pCapInfo->spectrumMgt = 1;
 			pCapInfo->spectrumMgt = 1;
 	}
 	}
 	/* QoS bit */
 	/* QoS bit */

+ 0 - 5
core/mac/src/cfg/cfg_param_name.c

@@ -45,18 +45,13 @@ const char *cfg_get_string(uint16_t cfg_id)
 	CASE_RETURN_STRING(WNI_CFG_DOT11_MODE);
 	CASE_RETURN_STRING(WNI_CFG_DOT11_MODE);
 	CASE_RETURN_STRING(WNI_CFG_VALID_CHANNEL_LIST);
 	CASE_RETURN_STRING(WNI_CFG_VALID_CHANNEL_LIST);
 	CASE_RETURN_STRING(WNI_CFG_APSD_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_APSD_ENABLED);
-	CASE_RETURN_STRING(WNI_CFG_11D_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_CURRENT_TX_POWER_LEVEL);
 	CASE_RETURN_STRING(WNI_CFG_CURRENT_TX_POWER_LEVEL);
 	CASE_RETURN_STRING(WNI_CFG_COUNTRY_CODE);
 	CASE_RETURN_STRING(WNI_CFG_COUNTRY_CODE);
-	CASE_RETURN_STRING(WNI_CFG_11H_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_LOCAL_POWER_CONSTRAINT);
 	CASE_RETURN_STRING(WNI_CFG_LOCAL_POWER_CONSTRAINT);
 	CASE_RETURN_STRING(WNI_CFG_SCAN_CONTROL_LIST);
 	CASE_RETURN_STRING(WNI_CFG_SCAN_CONTROL_LIST);
-	CASE_RETURN_STRING(WNI_CFG_TX_BF_CAP);
-	CASE_RETURN_STRING(WNI_CFG_AS_CAP);
 	CASE_RETURN_STRING(WNI_CFG_IBSS_AUTO_BSSID);
 	CASE_RETURN_STRING(WNI_CFG_IBSS_AUTO_BSSID);
 	CASE_RETURN_STRING(WNI_CFG_WPS_UUID);
 	CASE_RETURN_STRING(WNI_CFG_WPS_UUID);
 	CASE_RETURN_STRING(WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED);
 	CASE_RETURN_STRING(WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED);
-	CASE_RETURN_STRING(WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP);
 	CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE);
 	CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE);
 	CASE_RETURN_STRING(WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT);
 	CASE_RETURN_STRING(WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT);
 	CASE_RETURN_STRING(WNI_CFG_OBSS_DETECTION_OFFLOAD);
 	CASE_RETURN_STRING(WNI_CFG_OBSS_DETECTION_OFFLOAD);

+ 0 - 29
core/mac/src/cfg/cfg_proc_msg.c

@@ -54,12 +54,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_APSD_ENABLED_STAMIN,
 	WNI_CFG_APSD_ENABLED_STAMIN,
 	WNI_CFG_APSD_ENABLED_STAMAX,
 	WNI_CFG_APSD_ENABLED_STAMAX,
 	WNI_CFG_APSD_ENABLED_STADEF},
 	WNI_CFG_APSD_ENABLED_STADEF},
-	{WNI_CFG_11D_ENABLED,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_RESTART,
-	WNI_CFG_11D_ENABLED_STAMIN,
-	WNI_CFG_11D_ENABLED_STAMAX,
-	WNI_CFG_11D_ENABLED_STADEF},
 	{WNI_CFG_CURRENT_TX_POWER_LEVEL,
 	{WNI_CFG_CURRENT_TX_POWER_LEVEL,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMIN,
 	WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMIN,
@@ -68,12 +62,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	{WNI_CFG_COUNTRY_CODE,
 	{WNI_CFG_COUNTRY_CODE,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_NTF_SCH,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_NTF_SCH,
 	0, 0, 0},
 	0, 0, 0},
-	{WNI_CFG_11H_ENABLED,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_RESTART,
-	WNI_CFG_11H_ENABLED_STAMIN,
-	WNI_CFG_11H_ENABLED_STAMAX,
-	WNI_CFG_11H_ENABLED_STADEF},
 	{WNI_CFG_LOCAL_POWER_CONSTRAINT,
 	{WNI_CFG_LOCAL_POWER_CONSTRAINT,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_RESTART,
 	CFG_CTL_RESTART,
@@ -84,18 +72,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RESTART |
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RESTART |
 	CFG_CTL_NTF_LIM,
 	CFG_CTL_NTF_LIM,
 	0, 0, 0},
 	0, 0, 0},
-	{WNI_CFG_TX_BF_CAP,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_INT | CFG_CTL_RESTART |
-	CFG_CTL_NTF_LIM,
-	WNI_CFG_TX_BF_CAP_STAMIN,
-	4294967295u,
-	WNI_CFG_TX_BF_CAP_STADEF},
-	{WNI_CFG_AS_CAP,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_SAVE |
-	CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
-	WNI_CFG_AS_CAP_STAMIN,
-	WNI_CFG_AS_CAP_STAMAX,
-	WNI_CFG_AS_CAP_STADEF},
 	{WNI_CFG_SCAN_IN_POWERSAVE,
 	{WNI_CFG_SCAN_IN_POWERSAVE,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_NTF_LIM,
 	CFG_CTL_NTF_LIM,
@@ -115,11 +91,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMIN,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMIN,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX,
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STADEF},
 	WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STADEF},
-	{WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
-	WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP_STAMIN,
-	WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP_STAMAX,
-	WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP_STADEF},
 	{WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	{WNI_CFG_IBSS_ATIM_WIN_SIZE,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
 	WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMIN,
 	WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMIN,

+ 0 - 6
core/mac/src/pe/lim/lim_api.c

@@ -301,12 +301,6 @@ static QDF_STATUS __lim_init_config(struct mac_context *mac)
 	/* This was initially done after resume notification from HAL. Now, DAL is
 	/* This was initially done after resume notification from HAL. Now, DAL is
 	   started before PE so this can be done here */
 	   started before PE so this can be done here */
 	handle_ht_capabilityand_ht_info(mac, NULL);
 	handle_ht_capabilityand_ht_info(mac, NULL);
-	if (QDF_STATUS_SUCCESS !=
-	    wlan_cfg_get_int(mac, WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
-			     (uint32_t *) &mac->lim.disableLDPCWithTxbfAP)) {
-		pe_err("cfg get disableLDPCWithTxbfAP failed");
-		return QDF_STATUS_E_FAILURE;
-	}
 #ifdef FEATURE_WLAN_TDLS
 #ifdef FEATURE_WLAN_TDLS
 	status = cfg_tdls_get_buffer_sta_enable(mac->psoc, &valb);
 	status = cfg_tdls_get_buffer_sta_enable(mac->psoc, &valb);
 	if (QDF_STATUS_SUCCESS != status) {
 	if (QDF_STATUS_SUCCESS != status) {

+ 24 - 18
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -1341,20 +1341,21 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
 	uint32_t self_sta_dot11mode = 0;
 	uint32_t self_sta_dot11mode = 0;
 	uint16_t mcs_map_mask = MCSMAPMASK1x1;
 	uint16_t mcs_map_mask = MCSMAPMASK1x1;
 	uint16_t mcs_map_mask2x2 = 0;
 	uint16_t mcs_map_mask2x2 = 0;
-	struct mlme_vht_capabilities_info vht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
 	wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_sta_dot11mode);
 	wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_sta_dot11mode);
 
 
 	if (!IS_DOT11_MODE_VHT(self_sta_dot11mode))
 	if (!IS_DOT11_MODE_VHT(self_sta_dot11mode))
 		return QDF_STATUS_SUCCESS;
 		return QDF_STATUS_SUCCESS;
 
 
-	vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
+	vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
 
 
-	rates->vhtRxMCSMap = (uint16_t)vht_cap_info.rx_mcs_map;
-	rates->vhtTxMCSMap = (uint16_t)vht_cap_info.tx_mcs_map;
+	rates->vhtRxMCSMap = (uint16_t)vht_cap_info->rx_mcs_map;
+	rates->vhtTxMCSMap = (uint16_t)vht_cap_info->tx_mcs_map;
 	rates->vhtRxHighestDataRate =
 	rates->vhtRxHighestDataRate =
-			(uint16_t)vht_cap_info.rx_supp_data_rate;
-	rates->vhtTxHighestDataRate = (uint16_t)vht_cap_info.tx_supp_data_rate;
+			(uint16_t)vht_cap_info->rx_supp_data_rate;
+	rates->vhtTxHighestDataRate =
+			(uint16_t)vht_cap_info->tx_supp_data_rate;
 
 
 	if (NSS_1x1_MODE == nss) {
 	if (NSS_1x1_MODE == nss) {
 		rates->vhtRxMCSMap |= VHT_MCS_1x1;
 		rates->vhtRxMCSMap |= VHT_MCS_1x1;
@@ -1364,7 +1365,7 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
 		rates->vhtRxHighestDataRate =
 		rates->vhtRxHighestDataRate =
 			VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
 			VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
 		if (session_entry && !session_entry->ch_width &&
 		if (session_entry && !session_entry->ch_width &&
-		    !vht_cap_info.enable_vht20_mcs9 &&
+		    !vht_cap_info->enable_vht20_mcs9 &&
 		    ((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) ==
 		    ((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) ==
 				 VHT_1x1_MCS9_MAP)) {
 				 VHT_1x1_MCS9_MAP)) {
 			DISABLE_VHT_MCS_9(rates->vhtRxMCSMap,
 			DISABLE_VHT_MCS_9(rates->vhtRxMCSMap,
@@ -1374,9 +1375,9 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
 		}
 		}
 	} else {
 	} else {
 		if (session_entry && !session_entry->ch_width &&
 		if (session_entry && !session_entry->ch_width &&
-				!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_vht20_mcs9 &&
-				((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) ==
-				 VHT_2x2_MCS9_MAP)) {
+			!vht_cap_info->enable_vht20_mcs9 &&
+			((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) ==
+			VHT_2x2_MCS9_MAP)) {
 			DISABLE_VHT_MCS_9(rates->vhtRxMCSMap,
 			DISABLE_VHT_MCS_9(rates->vhtRxMCSMap,
 					NSS_2x2_MODE);
 					NSS_2x2_MODE);
 			DISABLE_VHT_MCS_9(rates->vhtTxMCSMap,
 			DISABLE_VHT_MCS_9(rates->vhtTxMCSMap,
@@ -1440,7 +1441,7 @@ QDF_STATUS lim_populate_vht_mcs_set(struct mac_context *mac_ctx,
 	}
 	}
 
 
 	pe_debug("enable2x2 - %d nss %d vhtRxMCSMap - %x vhtTxMCSMap - %x",
 	pe_debug("enable2x2 - %d nss %d vhtRxMCSMap - %x vhtTxMCSMap - %x",
-		mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2, nss,
+		vht_cap_info->enable2x2, nss,
 		rates->vhtRxMCSMap, rates->vhtTxMCSMap);
 		rates->vhtRxMCSMap, rates->vhtTxMCSMap);
 
 
 	if (NULL != session_entry) {
 	if (NULL != session_entry) {
@@ -2118,6 +2119,9 @@ lim_add_sta(struct mac_context *mac_ctx,
 	tLimIbssPeerNode *peer_node; /* for IBSS mode */
 	tLimIbssPeerNode *peer_node; /* for IBSS mode */
 	const uint8_t *p2p_ie = NULL;
 	const uint8_t *p2p_ie = NULL;
 	tDot11fIEVHTCaps vht_caps;
 	tDot11fIEVHTCaps vht_caps;
+	struct mlme_vht_capabilities_info *vht_cap_info;
+
+	vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	sir_copy_mac_addr(sta_mac, session_entry->selfMacAddr);
 	sir_copy_mac_addr(sta_mac, session_entry->selfMacAddr);
 
 
@@ -2310,7 +2314,7 @@ lim_add_sta(struct mac_context *mac_ctx,
 		 * HT/VHT capability
 		 * HT/VHT capability
 		 */
 		 */
 		if (add_sta_params->vhtTxBFCapable
 		if (add_sta_params->vhtTxBFCapable
-		    && mac_ctx->lim.disableLDPCWithTxbfAP) {
+		    && vht_cap_info->disable_ldpc_with_txbf_ap) {
 			add_sta_params->htLdpcCapable = 0;
 			add_sta_params->htLdpcCapable = 0;
 			add_sta_params->vhtLdpcCapable = 0;
 			add_sta_params->vhtLdpcCapable = 0;
 		} else {
 		} else {
@@ -3577,9 +3581,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 	tDot11fIEVHTOperation *vht_oper = NULL;
 	tDot11fIEVHTOperation *vht_oper = NULL;
 	tAddStaParams *sta_context;
 	tAddStaParams *sta_context;
 	uint32_t listen_interval = MLME_CFG_LISTEN_INTERVAL;
 	uint32_t listen_interval = MLME_CFG_LISTEN_INTERVAL;
-	struct mlme_vht_capabilities_info vht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
-	vht_cap_info = mac->mlme_cfg->vht_caps.vht_cap_info;
+	vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	/* Package SIR_HAL_ADD_BSS_REQ message parameters */
 	/* Package SIR_HAL_ADD_BSS_REQ message parameters */
 	pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams));
 	pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams));
@@ -3861,7 +3865,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 					pe_session->ch_width;
 					pe_session->ch_width;
 		} else {
 		} else {
 			sta_context->ch_width =	CH_WIDTH_20MHZ;
 			sta_context->ch_width =	CH_WIDTH_20MHZ;
-			if (!vht_cap_info.enable_txbf_20mhz)
+			if (!vht_cap_info->enable_txbf_20mhz)
 				sta_context->vhtTxBFCapable = 0;
 				sta_context->vhtTxBFCapable = 0;
 		}
 		}
 
 
@@ -3914,7 +3918,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 				pAssocRsp->HTCaps.maxRxAMPDUFactor;
 				pAssocRsp->HTCaps.maxRxAMPDUFactor;
 		}
 		}
 		if (pAddBssParams->staContext.vhtTxBFCapable
 		if (pAddBssParams->staContext.vhtTxBFCapable
-				&& mac->lim.disableLDPCWithTxbfAP) {
+		    && vht_cap_info->disable_ldpc_with_txbf_ap) {
 			pAddBssParams->staContext.htLdpcCapable = 0;
 			pAddBssParams->staContext.htLdpcCapable = 0;
 			pAddBssParams->staContext.vhtLdpcCapable = 0;
 			pAddBssParams->staContext.vhtLdpcCapable = 0;
 		} else {
 		} else {
@@ -4108,9 +4112,11 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac, uint8_t updat
 	tDot11fIEVHTOperation *vht_oper = NULL;
 	tDot11fIEVHTOperation *vht_oper = NULL;
 	tDot11fIEVHTCaps *vht_caps = NULL;
 	tDot11fIEVHTCaps *vht_caps = NULL;
 	uint32_t listen_interval = MLME_CFG_LISTEN_INTERVAL;
 	uint32_t listen_interval = MLME_CFG_LISTEN_INTERVAL;
-
 	tpSirBssDescription bssDescription =
 	tpSirBssDescription bssDescription =
 		&pe_session->pLimJoinReq->bssDescription;
 		&pe_session->pLimJoinReq->bssDescription;
+	struct mlme_vht_capabilities_info *vht_cap_info;
+
+	vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 	pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 	if (!pBeaconStruct)
 	if (!pBeaconStruct)
@@ -4425,7 +4431,7 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac, uint8_t updat
 		pAddBssParams->staContext.maxAmpduSize =
 		pAddBssParams->staContext.maxAmpduSize =
 			pBeaconStruct->HTCaps.maxRxAMPDUFactor;
 			pBeaconStruct->HTCaps.maxRxAMPDUFactor;
 		if (pAddBssParams->staContext.vhtTxBFCapable
 		if (pAddBssParams->staContext.vhtTxBFCapable
-				&& mac->lim.disableLDPCWithTxbfAP) {
+		    && vht_cap_info->disable_ldpc_with_txbf_ap) {
 			pAddBssParams->staContext.htLdpcCapable = 0;
 			pAddBssParams->staContext.htLdpcCapable = 0;
 			pAddBssParams->staContext.vhtLdpcCapable = 0;
 			pAddBssParams->staContext.vhtLdpcCapable = 0;
 		} else {
 		} else {

+ 1 - 4
core/mac/src/pe/lim/lim_process_cfg_updates.c

@@ -213,7 +213,6 @@ void lim_apply_configuration(struct mac_context *mac, struct pe_session *pe_sess
 
 
 static void lim_update_config(struct mac_context *mac, struct pe_session *pe_session)
 static void lim_update_config(struct mac_context *mac, struct pe_session *pe_session)
 {
 {
-	uint32_t val;
 	bool enabled;
 	bool enabled;
 
 
 	pe_session->beaconParams.fShortPreamble =
 	pe_session->beaconParams.fShortPreamble =
@@ -244,9 +243,7 @@ static void lim_update_config(struct mac_context *mac, struct pe_session *pe_ses
 	if (pe_session->limWsmEnabled && LIM_IS_AP_ROLE(pe_session))
 	if (pe_session->limWsmEnabled && LIM_IS_AP_ROLE(pe_session))
 		pe_session->limHcfEnabled = 1;
 		pe_session->limHcfEnabled = 1;
 
 
-	if (wlan_cfg_get_int(mac, WNI_CFG_11D_ENABLED, &val) != QDF_STATUS_SUCCESS)
-		pe_err("cfg get 11d enabled failed");
-	pe_session->lim11dEnabled = (val) ? 1 : 0;
+	pe_session->lim11dEnabled = mac->mlme_cfg->gen.enabled_11d ? 1 : 0;
 
 
 	pe_debug("Updated Lim shadow state based on CFG");
 	pe_debug("Updated Lim shadow state based on CFG");
 }
 }

+ 11 - 24
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -1009,11 +1009,8 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
 		if (mlm_start_req->bssType != eSIR_IBSS_MODE &&
 		if (mlm_start_req->bssType != eSIR_IBSS_MODE &&
 		    (CHAN_HOP_ALL_BANDS_ENABLE ||
 		    (CHAN_HOP_ALL_BANDS_ENABLE ||
 		     BAND_5G == session->limRFBand)) {
 		     BAND_5G == session->limRFBand)) {
-			if (wlan_cfg_get_int(mac_ctx,
-				WNI_CFG_11H_ENABLED, &val) != QDF_STATUS_SUCCESS)
-				pe_err("Fail to get WNI_CFG_11H_ENABLED");
-			else
-				session->lim11hEnable = val;
+			session->lim11hEnable =
+				mac_ctx->mlme_cfg->gen.enabled_11h;
 
 
 			if (session->lim11hEnable &&
 			if (session->lim11hEnable &&
 				(eSIR_INFRA_AP_MODE ==
 				(eSIR_INFRA_AP_MODE ==
@@ -1711,19 +1708,11 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, uint32_t *msg_buf)
 			lim_get_rf_band(session->currentOperChannel);
 			lim_get_rf_band(session->currentOperChannel);
 
 
 		/* Initialize 11h Enable Flag */
 		/* Initialize 11h Enable Flag */
-		if (BAND_5G == session->limRFBand) {
-			if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED,
-				&val) != QDF_STATUS_SUCCESS) {
-				pe_err("Fail to get WNI_CFG_11H_ENABLED");
-				session->lim11hEnable =
-					WNI_CFG_11H_ENABLED_STADEF;
-			} else {
-				session->lim11hEnable = val;
-			}
-		} else {
+		if (session->limRFBand == BAND_5G)
+			session->lim11hEnable =
+				mac_ctx->mlme_cfg->gen.enabled_11h;
+		else
 			session->lim11hEnable = 0;
 			session->lim11hEnable = 0;
-		}
-
 		/*
 		/*
 		 * To care of the scenario when STA transitions from
 		 * To care of the scenario when STA transitions from
 		 * IBSS to Infrastructure mode.
 		 * IBSS to Infrastructure mode.
@@ -5220,7 +5209,6 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 	struct pe_session *session_entry;
 	struct pe_session *session_entry;
 	uint8_t session_id;      /* PE session_id */
 	uint8_t session_id;      /* PE session_id */
 	int8_t max_tx_pwr;
 	int8_t max_tx_pwr;
-	uint32_t val = 0;
 
 
 	if (msg_buf == NULL) {
 	if (msg_buf == NULL) {
 		pe_err("msg_buf is NULL");
 		pe_err("msg_buf is NULL");
@@ -5291,13 +5279,12 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 
 
 	/* Initialize 11h Enable Flag */
 	/* Initialize 11h Enable Flag */
 	if (CHAN_HOP_ALL_BANDS_ENABLE ||
 	if (CHAN_HOP_ALL_BANDS_ENABLE ||
-	    BAND_5G == session_entry->limRFBand) {
-		if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &val) !=
-				QDF_STATUS_SUCCESS)
-			pe_err("Fail to get WNI_CFG_11H_ENABLED");
-	}
+	    session_entry->limRFBand == BAND_5G)
+		session_entry->lim11hEnable =
+			mac_ctx->mlme_cfg->gen.enabled_11h;
+	else
+		session_entry->lim11hEnable = 0;
 
 
-	session_entry->lim11hEnable = val;
 	session_entry->dot11mode = ch_change_req->dot11mode;
 	session_entry->dot11mode = ch_change_req->dot11mode;
 	session_entry->nwType = ch_change_req->nw_type;
 	session_entry->nwType = ch_change_req->nw_type;
 	qdf_mem_copy(&session_entry->rateSet,
 	qdf_mem_copy(&session_entry->rateSet,

+ 7 - 7
core/mac/src/pe/lim/lim_process_tdls.c

@@ -699,9 +699,9 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac,
 {
 {
 	uint8_t nss;
 	uint8_t nss;
 	qdf_size_t val_len;
 	qdf_size_t val_len;
-	struct mlme_vht_capabilities_info vht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
-	vht_cap_info = mac->mlme_cfg->vht_caps.vht_cap_info;
+	vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	if (IS_5G_CH(pe_session->currentOperChannel))
 	if (IS_5G_CH(pe_session->currentOperChannel))
 		nss = mac->vdev_type_nss_5g.tdls;
 		nss = mac->vdev_type_nss_5g.tdls;
@@ -741,7 +741,7 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac,
 	pe_debug("HT present: %hu, Chan Width: %hu",
 	pe_debug("HT present: %hu, Chan Width: %hu",
 		htCap->present, htCap->supportedChannelWidthSet);
 		htCap->present, htCap->supportedChannelWidthSet);
 	if (((pe_session->currentOperChannel <= SIR_11B_CHANNEL_END) &&
 	if (((pe_session->currentOperChannel <= SIR_11B_CHANNEL_END) &&
-	     mac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) ||
+	     vht_cap_info->b24ghz_band) ||
 	    (pe_session->currentOperChannel >= SIR_11B_CHANNEL_END)) {
 	    (pe_session->currentOperChannel >= SIR_11B_CHANNEL_END)) {
 		if (IS_DOT11_MODE_VHT(selfDot11Mode) &&
 		if (IS_DOT11_MODE_VHT(selfDot11Mode) &&
 		    IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) {
 		    IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) {
@@ -763,12 +763,12 @@ static void populate_dot11f_tdls_ht_vht_cap(struct mac_context *mac,
 			vhtCap->muBeamformeeCap = 0;
 			vhtCap->muBeamformeeCap = 0;
 			vhtCap->muBeamformerCap = 0;
 			vhtCap->muBeamformerCap = 0;
 
 
-			vhtCap->rxMCSMap = vht_cap_info.rx_mcs_map;
+			vhtCap->rxMCSMap = vht_cap_info->rx_mcs_map;
 
 
 			vhtCap->rxHighSupDataRate =
 			vhtCap->rxHighSupDataRate =
-				vht_cap_info.rx_supp_data_rate;
-			vhtCap->txMCSMap = vht_cap_info.tx_mcs_map;
-			vhtCap->txSupDataRate = vht_cap_info.tx_supp_data_rate;
+				vht_cap_info->rx_supp_data_rate;
+			vhtCap->txMCSMap = vht_cap_info->tx_mcs_map;
+			vhtCap->txSupDataRate = vht_cap_info->tx_supp_data_rate;
 			if (nss == NSS_1x1_MODE) {
 			if (nss == NSS_1x1_MODE) {
 				vhtCap->txMCSMap |= DISABLE_NSS2_MCS;
 				vhtCap->txMCSMap |= DISABLE_NSS2_MCS;
 				vhtCap->rxMCSMap |= DISABLE_NSS2_MCS;
 				vhtCap->rxMCSMap |= DISABLE_NSS2_MCS;

+ 5 - 9
core/mac/src/pe/lim/lim_utils.c

@@ -2482,9 +2482,11 @@ uint8_t lim_get_ht_capability(struct mac_context *mac,
 {
 {
 	uint8_t retVal = 0;
 	uint8_t retVal = 0;
 	uint8_t *ptr;
 	uint8_t *ptr;
-	uint32_t cfgValue;
 	tSirMacTxBFCapabilityInfo macTxBFCapabilityInfo = { 0 };
 	tSirMacTxBFCapabilityInfo macTxBFCapabilityInfo = { 0 };
 	tSirMacASCapabilityInfo macASCapabilityInfo = { 0 };
 	tSirMacASCapabilityInfo macASCapabilityInfo = { 0 };
+	struct mlme_vht_capabilities_info *vht_cap_info;
+
+	vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	/* */
 	/* */
 	/* Determine which CFG to read from. Not ALL of the HT */
 	/* Determine which CFG to read from. Not ALL of the HT */
@@ -2493,19 +2495,13 @@ uint8_t lim_get_ht_capability(struct mac_context *mac,
 	/* */
 	/* */
 	if (htCap >= eHT_ANTENNA_SELECTION && htCap < eHT_SI_GRANULARITY) {
 	if (htCap >= eHT_ANTENNA_SELECTION && htCap < eHT_SI_GRANULARITY) {
 		/* Get Antenna Seletion HT Capabilities */
 		/* Get Antenna Seletion HT Capabilities */
-		if (QDF_STATUS_SUCCESS !=
-		    wlan_cfg_get_int(mac, WNI_CFG_AS_CAP, &cfgValue))
-			cfgValue = 0;
 		ptr = (uint8_t *) &macASCapabilityInfo;
 		ptr = (uint8_t *) &macASCapabilityInfo;
-		*((uint8_t *) ptr) = (uint8_t) (cfgValue & 0xff);
+		*((uint8_t *)ptr) = (uint8_t)(vht_cap_info->as_cap & 0xff);
 	} else if (htCap >= eHT_TX_BEAMFORMING &&
 	} else if (htCap >= eHT_TX_BEAMFORMING &&
 		   htCap < eHT_ANTENNA_SELECTION) {
 		   htCap < eHT_ANTENNA_SELECTION) {
 		/* Get Transmit Beam Forming HT Capabilities */
 		/* Get Transmit Beam Forming HT Capabilities */
-		if (QDF_STATUS_SUCCESS !=
-		    wlan_cfg_get_int(mac, WNI_CFG_TX_BF_CAP, &cfgValue))
-			cfgValue = 0;
 		ptr = (uint8_t *)&macTxBFCapabilityInfo;
 		ptr = (uint8_t *)&macTxBFCapabilityInfo;
-		*((uint32_t *)ptr) = (uint32_t)(cfgValue);
+		*((uint32_t *)ptr) = (uint32_t)(vht_cap_info->tx_bf_cap);
 	}
 	}
 
 
 	switch (htCap) {
 	switch (htCap) {

+ 33 - 39
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -608,8 +608,6 @@ QDF_STATUS
 populate_dot11f_ht_caps(struct mac_context *mac,
 populate_dot11f_ht_caps(struct mac_context *mac,
 			struct pe_session *pe_session, tDot11fIEHTCaps *pDot11f)
 			struct pe_session *pe_session, tDot11fIEHTCaps *pDot11f)
 {
 {
-	uint32_t nCfgValue;
-	uint8_t nCfgValue8;
 	qdf_size_t ncfglen;
 	qdf_size_t ncfglen;
 	QDF_STATUS nSirStatus;
 	QDF_STATUS nSirStatus;
 	uint8_t disable_high_ht_mcs_2x2 = 0;
 	uint8_t disable_high_ht_mcs_2x2 = 0;
@@ -617,8 +615,10 @@ populate_dot11f_ht_caps(struct mac_context *mac,
 	tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
 	tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
 	tSirMacASCapabilityInfo *pASCapabilityInfo;
 	tSirMacASCapabilityInfo *pASCapabilityInfo;
 	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct mlme_ht_capabilities_info *ht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
 	ht_cap_info = &mac->mlme_cfg->ht_caps.ht_cap_info;
 	ht_cap_info = &mac->mlme_cfg->ht_caps.ht_cap_info;
+	vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	pDot11f->mimoPowerSave = ht_cap_info->mimo_power_save;
 	pDot11f->mimoPowerSave = ht_cap_info->mimo_power_save;
 	pDot11f->greenField = ht_cap_info->green_field;
 	pDot11f->greenField = ht_cap_info->green_field;
@@ -707,9 +707,8 @@ populate_dot11f_ht_caps(struct mac_context *mac,
 	pDot11f->mcsFeedback =
 	pDot11f->mcsFeedback =
 		mac->mlme_cfg->ht_caps.ext_cap_info.mcs_feedback;
 		mac->mlme_cfg->ht_caps.ext_cap_info.mcs_feedback;
 
 
-	CFG_GET_INT(nSirStatus, mac, WNI_CFG_TX_BF_CAP, nCfgValue);
-
-	pTxBFCapabilityInfo = (tSirMacTxBFCapabilityInfo *) &nCfgValue;
+	pTxBFCapabilityInfo =
+		(tSirMacTxBFCapabilityInfo *)&vht_cap_info->tx_bf_cap;
 	pDot11f->txBF = pTxBFCapabilityInfo->txBF;
 	pDot11f->txBF = pTxBFCapabilityInfo->txBF;
 	pDot11f->rxStaggeredSounding = pTxBFCapabilityInfo->rxStaggeredSounding;
 	pDot11f->rxStaggeredSounding = pTxBFCapabilityInfo->rxStaggeredSounding;
 	pDot11f->txStaggeredSounding = pTxBFCapabilityInfo->txStaggeredSounding;
 	pDot11f->txStaggeredSounding = pTxBFCapabilityInfo->txStaggeredSounding;
@@ -732,11 +731,7 @@ populate_dot11f_ht_caps(struct mac_context *mac,
 	pDot11f->compressedSteeringMatrixBFAntennae =
 	pDot11f->compressedSteeringMatrixBFAntennae =
 		pTxBFCapabilityInfo->compressedSteeringMatrixBFAntennae;
 		pTxBFCapabilityInfo->compressedSteeringMatrixBFAntennae;
 
 
-	CFG_GET_INT(nSirStatus, mac, WNI_CFG_AS_CAP, nCfgValue);
-
-	nCfgValue8 = (uint8_t) nCfgValue;
-
-	pASCapabilityInfo = (tSirMacASCapabilityInfo *) &nCfgValue8;
+	pASCapabilityInfo = (tSirMacASCapabilityInfo *)&vht_cap_info->as_cap;
 	pDot11f->antennaSelection = pASCapabilityInfo->antennaSelection;
 	pDot11f->antennaSelection = pASCapabilityInfo->antennaSelection;
 	pDot11f->explicitCSIFeedbackTx =
 	pDot11f->explicitCSIFeedbackTx =
 		pASCapabilityInfo->explicitCSIFeedbackTx;
 		pASCapabilityInfo->explicitCSIFeedbackTx;
@@ -853,20 +848,20 @@ populate_dot11f_vht_caps(struct mac_context *mac,
 			 struct pe_session *pe_session, tDot11fIEVHTCaps *pDot11f)
 			 struct pe_session *pe_session, tDot11fIEVHTCaps *pDot11f)
 {
 {
 	uint32_t nCfgValue = 0;
 	uint32_t nCfgValue = 0;
-	struct mlme_vht_capabilities_info vht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
 	if (!(mac->mlme_cfg)) {
 	if (!(mac->mlme_cfg)) {
 		pe_err("invalid mlme cfg");
 		pe_err("invalid mlme cfg");
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;
 	}
 	}
-	vht_cap_info = mac->mlme_cfg->vht_caps.vht_cap_info;
+	vht_cap_info = &mac->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	pDot11f->present = 1;
 	pDot11f->present = 1;
 
 
-	nCfgValue = vht_cap_info.ampdu_len;
+	nCfgValue = vht_cap_info->ampdu_len;
 	pDot11f->maxMPDULen = (nCfgValue & 0x0003);
 	pDot11f->maxMPDULen = (nCfgValue & 0x0003);
 
 
-	nCfgValue = vht_cap_info.supp_chan_width;
+	nCfgValue = vht_cap_info->supp_chan_width;
 	pDot11f->supportedChannelWidthSet = (nCfgValue & 0x0003);
 	pDot11f->supportedChannelWidthSet = (nCfgValue & 0x0003);
 
 
 	nCfgValue = 0;
 	nCfgValue = 0;
@@ -926,71 +921,71 @@ populate_dot11f_vht_caps(struct mac_context *mac,
 		pDot11f->vhtLinkAdaptCap =
 		pDot11f->vhtLinkAdaptCap =
 				pe_session->vht_config.vht_link_adapt;
 				pe_session->vht_config.vht_link_adapt;
 	} else {
 	} else {
-		nCfgValue = vht_cap_info.ldpc_coding_cap;
+		nCfgValue = vht_cap_info->ldpc_coding_cap;
 		pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
 		pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.short_gi_80mhz;
+		nCfgValue = vht_cap_info->short_gi_80mhz;
 		pDot11f->shortGI80MHz = (nCfgValue & 0x0001);
 		pDot11f->shortGI80MHz = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.short_gi_160mhz;
+		nCfgValue = vht_cap_info->short_gi_160mhz;
 		pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001);
 		pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.tx_stbc;
+		nCfgValue = vht_cap_info->tx_stbc;
 		pDot11f->txSTBC = (nCfgValue & 0x0001);
 		pDot11f->txSTBC = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.rx_stbc;
+		nCfgValue = vht_cap_info->rx_stbc;
 		pDot11f->rxSTBC = (nCfgValue & 0x0007);
 		pDot11f->rxSTBC = (nCfgValue & 0x0007);
 
 
-		nCfgValue = vht_cap_info.su_bformee;
+		nCfgValue = vht_cap_info->su_bformee;
 		pDot11f->suBeamformeeCap = (nCfgValue & 0x0001);
 		pDot11f->suBeamformeeCap = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.enable_mu_bformee;
+		nCfgValue = vht_cap_info->enable_mu_bformee;
 		pDot11f->muBeamformeeCap = (nCfgValue & 0x0001);
 		pDot11f->muBeamformeeCap = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.su_bformer;
+		nCfgValue = vht_cap_info->su_bformer;
 		pDot11f->suBeamFormerCap = (nCfgValue & 0x0001);
 		pDot11f->suBeamFormerCap = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.tx_bfee_ant_supp;
+		nCfgValue = vht_cap_info->tx_bfee_ant_supp;
 		pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
 		pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
 
 
-		nCfgValue = vht_cap_info.txop_ps;
+		nCfgValue = vht_cap_info->txop_ps;
 		pDot11f->vhtTXOPPS = (nCfgValue & 0x0001);
 		pDot11f->vhtTXOPPS = (nCfgValue & 0x0001);
 
 
-		nCfgValue = vht_cap_info.num_soundingdim;
+		nCfgValue = vht_cap_info->num_soundingdim;
 		pDot11f->numSoundingDim = (nCfgValue & 0x0007);
 		pDot11f->numSoundingDim = (nCfgValue & 0x0007);
 
 
-		nCfgValue = vht_cap_info.htc_vhtc;
+		nCfgValue = vht_cap_info->htc_vhtc;
 		pDot11f->htcVHTCap = (nCfgValue & 0x0001);
 		pDot11f->htcVHTCap = (nCfgValue & 0x0001);
 
 
-		pDot11f->rxAntPattern = vht_cap_info.rx_antpattern;
+		pDot11f->rxAntPattern = vht_cap_info->rx_antpattern;
 
 
-		pDot11f->txAntPattern = vht_cap_info.tx_antpattern;
+		pDot11f->txAntPattern = vht_cap_info->tx_antpattern;
 
 
-		nCfgValue = vht_cap_info.ampdu_len_exponent;
+		nCfgValue = vht_cap_info->ampdu_len_exponent;
 		pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007);
 		pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007);
 
 
-		nCfgValue = vht_cap_info.link_adap_cap;
+		nCfgValue = vht_cap_info->link_adap_cap;
 		pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003);
 		pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003);
 
 
 	}
 	}
 
 
-	nCfgValue = vht_cap_info.mu_bformer;
+	nCfgValue = vht_cap_info->mu_bformer;
 	pDot11f->muBeamformerCap = (nCfgValue & 0x0001);
 	pDot11f->muBeamformerCap = (nCfgValue & 0x0001);
 
 
 	pDot11f->reserved1 = 0;
 	pDot11f->reserved1 = 0;
 
 
-	nCfgValue = vht_cap_info.rx_mcs_map;
+	nCfgValue = vht_cap_info->rx_mcs_map;
 	pDot11f->rxMCSMap = (nCfgValue & 0x0000FFFF);
 	pDot11f->rxMCSMap = (nCfgValue & 0x0000FFFF);
 
 
-	nCfgValue = vht_cap_info.rx_supp_data_rate;
+	nCfgValue = vht_cap_info->rx_supp_data_rate;
 	pDot11f->rxHighSupDataRate = (nCfgValue & 0x00001FFF);
 	pDot11f->rxHighSupDataRate = (nCfgValue & 0x00001FFF);
 
 
 	pDot11f->reserved2 = 0;
 	pDot11f->reserved2 = 0;
 
 
-	nCfgValue = vht_cap_info.tx_mcs_map;
+	nCfgValue = vht_cap_info->tx_mcs_map;
 	pDot11f->txMCSMap = (nCfgValue & 0x0000FFFF);
 	pDot11f->txMCSMap = (nCfgValue & 0x0000FFFF);
 
 
-	nCfgValue = vht_cap_info.tx_supp_data_rate;
+	nCfgValue = vht_cap_info->tx_supp_data_rate;
 	pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF);
 	pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF);
 
 
 	pDot11f->reserved3 = 0;
 	pDot11f->reserved3 = 0;
@@ -1003,7 +998,7 @@ populate_dot11f_vht_caps(struct mac_context *mac,
 			pDot11f->rxHighSupDataRate =
 			pDot11f->rxHighSupDataRate =
 				VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
 				VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
 			if (!pe_session->ch_width &&
 			if (!pe_session->ch_width &&
-			    !vht_cap_info.enable_vht20_mcs9 &&
+			    !vht_cap_info->enable_vht20_mcs9 &&
 			    ((pDot11f->txMCSMap & VHT_1x1_MCS_MASK) ==
 			    ((pDot11f->txMCSMap & VHT_1x1_MCS_MASK) ==
 			     VHT_1x1_MCS9_MAP)) {
 			     VHT_1x1_MCS9_MAP)) {
 				DISABLE_VHT_MCS_9(pDot11f->txMCSMap,
 				DISABLE_VHT_MCS_9(pDot11f->txMCSMap,
@@ -1013,7 +1008,7 @@ populate_dot11f_vht_caps(struct mac_context *mac,
 			}
 			}
 		} else {
 		} else {
 			if (!pe_session->ch_width &&
 			if (!pe_session->ch_width &&
-			    !vht_cap_info.enable_vht20_mcs9 &&
+			    !vht_cap_info->enable_vht20_mcs9 &&
 			    ((pDot11f->txMCSMap & VHT_2x2_MCS_MASK) ==
 			    ((pDot11f->txMCSMap & VHT_2x2_MCS_MASK) ==
 			     VHT_2x2_MCS9_MAP)) {
 			     VHT_2x2_MCS9_MAP)) {
 				DISABLE_VHT_MCS_9(pDot11f->txMCSMap,
 				DISABLE_VHT_MCS_9(pDot11f->txMCSMap,
@@ -5855,8 +5850,7 @@ populate_dot11f_timing_advert_frame(struct mac_context *mac_ctx,
 	if (mac_ctx->mlme_cfg->ht_caps.short_preamble)
 	if (mac_ctx->mlme_cfg->ht_caps.short_preamble)
 		frame->Capabilities.shortPreamble = 1;
 		frame->Capabilities.shortPreamble = 1;
 
 
-	wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &val);
-	if (val)
+	if (mac_ctx->mlme_cfg->gen.enabled_11h)
 		frame->Capabilities.spectrumMgt = 1;
 		frame->Capabilities.spectrumMgt = 1;
 
 
 	if (mac_ctx->mlme_cfg->wmm_params.qos_enabled)
 	if (mac_ctx->mlme_cfg->wmm_params.qos_enabled)

+ 0 - 2
core/sme/inc/csr_api.h

@@ -1023,8 +1023,6 @@ typedef struct tagCsrConfigParam {
 	uint32_t HeartbeatThresh50;
 	uint32_t HeartbeatThresh50;
 	eCsrRoamWmmUserModeType WMMSupportMode;
 	eCsrRoamWmmUserModeType WMMSupportMode;
 	bool Is11eSupportEnabled;
 	bool Is11eSupportEnabled;
-	bool Is11dSupportEnabled;
-	bool Is11hSupportEnabled;
 	bool ProprietaryRatesEnabled;
 	bool ProprietaryRatesEnabled;
 	uint8_t AdHocChannel24;
 	uint8_t AdHocChannel24;
 	uint8_t AdHocChannel5G;
 	uint8_t AdHocChannel5G;

+ 0 - 2
core/sme/inc/csr_internal.h

@@ -386,8 +386,6 @@ struct csr_config {
 	uint32_t HeartbeatThresh24;
 	uint32_t HeartbeatThresh24;
 	eCsrRoamWmmUserModeType WMMSupportMode;
 	eCsrRoamWmmUserModeType WMMSupportMode;
 	bool Is11eSupportEnabled;
 	bool Is11eSupportEnabled;
-	bool Is11dSupportEnabled;
-	bool Is11hSupportEnabled;
 	bool ProprietaryRatesEnabled;
 	bool ProprietaryRatesEnabled;
 	bool fenableMCCMode;
 	bool fenableMCCMode;
 	bool mcc_rts_cts_prot_enable;
 	bool mcc_rts_cts_prot_enable;

+ 10 - 11
core/sme/src/common/sme_api.c

@@ -779,7 +779,7 @@ QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2,
 
 
 	if ((cc_src == SOURCE_USERSPACE) &&
 	if ((cc_src == SOURCE_USERSPACE) &&
 	    (pmac->mlme_cfg->sap_cfg.country_code_priority)) {
 	    (pmac->mlme_cfg->sap_cfg.country_code_priority)) {
-		pmac->roam.configParam.Is11dSupportEnabled = false;
+		pmac->mlme_cfg->gen.enabled_11d = false;
 	}
 	}
 
 
 	return csr_init_chan_list(pmac, alpha2);
 	return csr_init_chan_list(pmac, alpha2);
@@ -5973,12 +5973,10 @@ sme_handle_generic_change_country_code(struct mac_context *mac_ctx,
 	if (SOURCE_11D != mac_ctx->reg_hint_src) {
 	if (SOURCE_11D != mac_ctx->reg_hint_src) {
 		if (SOURCE_DRIVER != mac_ctx->reg_hint_src) {
 		if (SOURCE_DRIVER != mac_ctx->reg_hint_src) {
 			if (user_ctry_priority)
 			if (user_ctry_priority)
-				mac_ctx->roam.configParam.Is11dSupportEnabled =
-					false;
+				mac_ctx->mlme_cfg->gen.enabled_11d = false;
 			else {
 			else {
-				if (mac_ctx->roam.configParam.
-					Is11dSupportEnabled &&
-					mac_ctx->scan.countryCode11d[0] != 0) {
+				if (mac_ctx->mlme_cfg->gen.enabled_11d &&
+				    mac_ctx->scan.countryCode11d[0] != 0) {
 
 
 					sme_debug("restore 11d");
 					sme_debug("restore 11d");
 
 
@@ -12592,14 +12590,14 @@ QDF_STATUS sme_update_nss(mac_handle_t mac_handle, uint8_t nss)
 	uint32_t i;
 	uint32_t i;
 	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct csr_roam_session *csr_session;
 	struct csr_roam_session *csr_session;
-	struct mlme_vht_capabilities_info vht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
-	vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
+	vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	status = sme_acquire_global_lock(&mac_ctx->sme);
 	status = sme_acquire_global_lock(&mac_ctx->sme);
 
 
 	if (QDF_STATUS_SUCCESS == status) {
 	if (QDF_STATUS_SUCCESS == status) {
-		vht_cap_info.enable2x2 = (nss == 1) ? 0 : 1;
+		vht_cap_info->enable2x2 = (nss == 1) ? 0 : 1;
 
 
 		/* get the HT capability info*/
 		/* get the HT capability info*/
 		ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info;
 		ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info;
@@ -12646,15 +12644,16 @@ int sme_update_tx_bfee_nsts(mac_handle_t mac_handle, uint8_t session_id,
 {
 {
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 	uint8_t nsts_set_val;
 	uint8_t nsts_set_val;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
+	vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
 	mac_ctx->usr_cfg_tx_bfee_nsts = usr_cfg_val;
 	mac_ctx->usr_cfg_tx_bfee_nsts = usr_cfg_val;
 	if (usr_cfg_val)
 	if (usr_cfg_val)
 		nsts_set_val = usr_cfg_val;
 		nsts_set_val = usr_cfg_val;
 	else
 	else
 		nsts_set_val = nsts_val;
 		nsts_set_val = nsts_val;
 
 
-	mac_ctx->mlme_cfg->vht_caps.vht_cap_info.tx_bfee_ant_supp =
-		nsts_set_val;
+	vht_cap_info->tx_bfee_ant_supp = nsts_set_val;
 
 
 	if (usr_cfg_val)
 	if (usr_cfg_val)
 		sme_set_he_tx_bf_cbf_rates(session_id);
 		sme_set_he_tx_bf_cbf_rates(session_id);

+ 31 - 44
core/sme/src/csr/csr_api_roam.c

@@ -1308,12 +1308,6 @@ void csr_set_global_cfgs(struct mac_context *mac)
 {
 {
 	wlan_mlme_set_frag_threshold(mac->psoc, csr_get_frag_thresh(mac));
 	wlan_mlme_set_frag_threshold(mac->psoc, csr_get_frag_thresh(mac));
 	wlan_mlme_set_rts_threshold(mac->psoc, csr_get_rts_thresh(mac));
 	wlan_mlme_set_rts_threshold(mac->psoc, csr_get_rts_thresh(mac));
-	cfg_set_int(mac, WNI_CFG_11D_ENABLED,
-			((mac->roam.configParam.Is11hSupportEnabled) ?
-			mac->roam.configParam.Is11dSupportEnabled :
-			mac->roam.configParam.Is11dSupportEnabled));
-	cfg_set_int(mac, WNI_CFG_11H_ENABLED,
-			mac->roam.configParam.Is11hSupportEnabled);
 	/* For now we will just use the 5GHz CB mode ini parameter to decide
 	/* For now we will just use the 5GHz CB mode ini parameter to decide
 	 * whether CB supported or not in Probes when there is no session
 	 * whether CB supported or not in Probes when there is no session
 	 * Once session is established we will use the session related params
 	 * Once session is established we will use the session related params
@@ -1667,9 +1661,9 @@ static void init_config_param(struct mac_context *mac)
 	mac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO;
 	mac->roam.configParam.uCfgDot11Mode = eCSR_CFG_DOT11_MODE_AUTO;
 	mac->roam.configParam.HeartbeatThresh24 = 40;
 	mac->roam.configParam.HeartbeatThresh24 = 40;
 	mac->roam.configParam.HeartbeatThresh50 = 40;
 	mac->roam.configParam.HeartbeatThresh50 = 40;
-	mac->roam.configParam.Is11dSupportEnabled = false;
+	mac->mlme_cfg->gen.enabled_11d = false;
 	mac->roam.configParam.Is11eSupportEnabled = true;
 	mac->roam.configParam.Is11eSupportEnabled = true;
-	mac->roam.configParam.Is11hSupportEnabled = true;
+	mac->mlme_cfg->gen.enabled_11h = true;
 	mac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto;
 	mac->roam.configParam.WMMSupportMode = eCsrRoamWmmAuto;
 	mac->roam.configParam.ProprietaryRatesEnabled = true;
 	mac->roam.configParam.ProprietaryRatesEnabled = true;
 	for (i = 0; i < CSR_NUM_RSSI_CAT; i++)
 	for (i = 0; i < CSR_NUM_RSSI_CAT; i++)
@@ -2495,14 +2489,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
 			(pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1;
 			(pParam->WMMSupportMode == eCsrRoamWmmNoQos) ? 0 : 1;
 		mac->roam.configParam.Is11eSupportEnabled =
 		mac->roam.configParam.Is11eSupportEnabled =
 			pParam->Is11eSupportEnabled;
 			pParam->Is11eSupportEnabled;
-		mac->roam.configParam.Is11dSupportEnabled =
-			pParam->Is11dSupportEnabled;
-
-		if (mac->mlme_cfg->gen.band_capability == BAND_2G)
-			mac->roam.configParam.Is11hSupportEnabled = 0;
-		else
-			mac->roam.configParam.Is11hSupportEnabled =
-				pParam->Is11hSupportEnabled;
 
 
 		mac->roam.configParam.fenableMCCMode = pParam->fEnableMCCMode;
 		mac->roam.configParam.fenableMCCMode = pParam->fEnableMCCMode;
 		mac->roam.configParam.mcc_rts_cts_prot_enable =
 		mac->roam.configParam.mcc_rts_cts_prot_enable =
@@ -2812,8 +2798,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam
 	pParam->is_force_1x1 = cfg_params->is_force_1x1;
 	pParam->is_force_1x1 = cfg_params->is_force_1x1;
 	pParam->WMMSupportMode = cfg_params->WMMSupportMode;
 	pParam->WMMSupportMode = cfg_params->WMMSupportMode;
 	pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled;
 	pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled;
-	pParam->Is11dSupportEnabled = cfg_params->Is11dSupportEnabled;
-	pParam->Is11hSupportEnabled = cfg_params->Is11hSupportEnabled;
 	pParam->channelBondingMode24GHz = csr_convert_phy_cb_state_to_ini_value(
 	pParam->channelBondingMode24GHz = csr_convert_phy_cb_state_to_ini_value(
 					cfg_params->channelBondingMode24GHz);
 					cfg_params->channelBondingMode24GHz);
 	pParam->channelBondingMode5GHz = csr_convert_phy_cb_state_to_ini_value(
 	pParam->channelBondingMode5GHz = csr_convert_phy_cb_state_to_ini_value(
@@ -4184,7 +4168,7 @@ QDF_STATUS csr_roam_prepare_bss_config(struct mac_context *mac,
 		pBssConfig->f11hSupport = false;
 		pBssConfig->f11hSupport = false;
 	else
 	else
 		pBssConfig->f11hSupport =
 		pBssConfig->f11hSupport =
-			mac->roam.configParam.Is11hSupportEnabled;
+			mac->mlme_cfg->gen.enabled_11h;
 	/* power constraint */
 	/* power constraint */
 	pBssConfig->uPowerLimit =
 	pBssConfig->uPowerLimit =
 		csr_get11h_power_constraint(mac, &pIes->PowerConstraints);
 		csr_get11h_power_constraint(mac, &pIes->PowerConstraints);
@@ -4934,9 +4918,11 @@ QDF_STATUS csr_roam_set_bss_config_cfg(struct mac_context *mac, uint32_t session
 	mac->mlme_cfg->feature_flags.enable_short_slot_time_11g =
 	mac->mlme_cfg->feature_flags.enable_short_slot_time_11g =
 						pBssConfig->uShortSlotTime;
 						pBssConfig->uShortSlotTime;
 	/* 11d */
 	/* 11d */
-	cfg_set_int(mac, WNI_CFG_11D_ENABLED,
-			((pBssConfig->f11hSupport) ? pBssConfig->f11hSupport :
-			 pProfile->ieee80211d));
+	if (pBssConfig->f11hSupport)
+		mac->mlme_cfg->gen.enabled_11d = pBssConfig->f11hSupport;
+	else
+		mac->mlme_cfg->gen.enabled_11d = pProfile->ieee80211d;
+
 	cfg_set_int(mac, WNI_CFG_LOCAL_POWER_CONSTRAINT,
 	cfg_set_int(mac, WNI_CFG_LOCAL_POWER_CONSTRAINT,
 			pBssConfig->uPowerLimit);
 			pBssConfig->uPowerLimit);
 	/* CB */
 	/* CB */
@@ -16658,13 +16644,13 @@ QDF_STATUS csr_roam_open_session(struct mac_context *mac_ctx,
 	uint32_t existing_session_id;
 	uint32_t existing_session_id;
 	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct csr_roam_session *session;
 	struct csr_roam_session *session;
-	struct mlme_vht_capabilities_info vht_cap_info;
+	struct mlme_vht_capabilities_info *vht_cap_info;
 
 
 	if (!(mac_ctx->mlme_cfg)) {
 	if (!(mac_ctx->mlme_cfg)) {
 		pe_err("invalid mlme cfg");
 		pe_err("invalid mlme cfg");
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;
 	}
 	}
-	vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
+	vht_cap_info = &mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
 
 
 	/* check to see if the mac address already belongs to a session */
 	/* check to see if the mac address already belongs to a session */
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
@@ -16740,28 +16726,29 @@ QDF_STATUS csr_roam_open_session(struct mac_context *mac_ctx,
 	}
 	}
 #endif /* FEATURE_WLAN_BTAMP_UT_RF */
 #endif /* FEATURE_WLAN_BTAMP_UT_RF */
 
 
-	session->vht_config.max_mpdu_len = vht_cap_info.ampdu_len;
+	session->vht_config.max_mpdu_len = vht_cap_info->ampdu_len;
 	session->vht_config.supported_channel_widthset =
 	session->vht_config.supported_channel_widthset =
-			vht_cap_info.supp_chan_width;
-	session->vht_config.ldpc_coding = vht_cap_info.ldpc_coding_cap;
-	session->vht_config.shortgi80 = vht_cap_info.short_gi_80mhz;
+			vht_cap_info->supp_chan_width;
+	session->vht_config.ldpc_coding = vht_cap_info->ldpc_coding_cap;
+	session->vht_config.shortgi80 = vht_cap_info->short_gi_80mhz;
 	session->vht_config.shortgi160and80plus80 =
 	session->vht_config.shortgi160and80plus80 =
-			vht_cap_info.short_gi_160mhz;
-	session->vht_config.tx_stbc = vht_cap_info.tx_stbc;
-	session->vht_config.rx_stbc = vht_cap_info.rx_stbc;
-	session->vht_config.su_beam_former = vht_cap_info.su_bformer;
-	session->vht_config.su_beam_formee = vht_cap_info.su_bformee;
+			vht_cap_info->short_gi_160mhz;
+	session->vht_config.tx_stbc = vht_cap_info->tx_stbc;
+	session->vht_config.rx_stbc = vht_cap_info->rx_stbc;
+	session->vht_config.su_beam_former = vht_cap_info->su_bformer;
+	session->vht_config.su_beam_formee = vht_cap_info->su_bformee;
 	session->vht_config.csnof_beamformer_antSup =
 	session->vht_config.csnof_beamformer_antSup =
-		vht_cap_info.tx_bfee_ant_supp;
-	session->vht_config.num_soundingdim = vht_cap_info.num_soundingdim;
-	session->vht_config.mu_beam_former = vht_cap_info.mu_bformer;
-	session->vht_config.mu_beam_formee = vht_cap_info.enable_mu_bformee;
-	session->vht_config.vht_txops = vht_cap_info.txop_ps;
-	session->vht_config.htc_vhtcap = vht_cap_info.htc_vhtc;
-	session->vht_config.rx_antpattern = vht_cap_info.rx_antpattern;
-	session->vht_config.tx_antpattern = vht_cap_info.tx_antpattern;
-
-	session->vht_config.max_ampdu_lenexp = vht_cap_info.ampdu_len_exponent;
+			vht_cap_info->tx_bfee_ant_supp;
+	session->vht_config.num_soundingdim = vht_cap_info->num_soundingdim;
+	session->vht_config.mu_beam_former = vht_cap_info->mu_bformer;
+	session->vht_config.mu_beam_formee = vht_cap_info->enable_mu_bformee;
+	session->vht_config.vht_txops = vht_cap_info->txop_ps;
+	session->vht_config.htc_vhtcap = vht_cap_info->htc_vhtc;
+	session->vht_config.rx_antpattern = vht_cap_info->rx_antpattern;
+	session->vht_config.tx_antpattern = vht_cap_info->tx_antpattern;
+
+	session->vht_config.max_ampdu_lenexp =
+			vht_cap_info->ampdu_len_exponent;
 
 
 	csr_update_session_he_cap(mac_ctx, session);
 	csr_update_session_he_cap(mac_ctx, session);
 
 
@@ -18762,7 +18749,7 @@ static void csr_update_driver_assoc_ies(struct mac_context *mac_ctx,
 	else
 	else
 		power_cap_ie_data[1] = MAX_TX_PWR_CAP;
 		power_cap_ie_data[1] = MAX_TX_PWR_CAP;
 
 
-	wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &csr_11henable);
+	csr_11henable = mac_ctx->mlme_cfg->gen.enabled_11h;
 
 
 	if (csr_11henable && csr_is11h_supported(mac_ctx)) {
 	if (csr_11henable && csr_is11h_supported(mac_ctx)) {
 		/* Append power cap IE */
 		/* Append power cap IE */

+ 2 - 2
core/sme/src/csr/csr_api_scan.c

@@ -724,7 +724,7 @@ static void csr_diag_reset_country_information(struct mac_context *mac)
 				mac->roam.configParam.nTxPowerCap);
 				mac->roam.configParam.nTxPowerCap);
 		}
 		}
 	}
 	}
-	if (!mac->roam.configParam.Is11dSupportEnabled)
+	if (!mac->mlme_cfg->gen.enabled_11d)
 		p11dLog->supportMultipleDomain = WLAN_80211D_DISABLED;
 		p11dLog->supportMultipleDomain = WLAN_80211D_DISABLED;
 	else
 	else
 		p11dLog->supportMultipleDomain =
 		p11dLog->supportMultipleDomain =
@@ -834,7 +834,7 @@ static void csr_diag_apply_country_info(struct mac_context *mac_ctx)
 		}
 		}
 	}
 	}
 diag_end:
 diag_end:
-	if (!mac_ctx->roam.configParam.Is11dSupportEnabled)
+	if (!mac_ctx->mlme_cfg->gen.enabled_11d)
 		p11dLog->supportMultipleDomain = WLAN_80211D_DISABLED;
 		p11dLog->supportMultipleDomain = WLAN_80211D_DISABLED;
 	else
 	else
 		p11dLog->supportMultipleDomain =
 		p11dLog->supportMultipleDomain =

+ 4 - 5
core/sme/src/csr/csr_util.c

@@ -1447,12 +1447,12 @@ bool csr_is_privacy(tSirBssDescription *pSirBssDesc)
 
 
 bool csr_is11d_supported(struct mac_context *mac)
 bool csr_is11d_supported(struct mac_context *mac)
 {
 {
-	return mac->roam.configParam.Is11dSupportEnabled;
+	return mac->mlme_cfg->gen.enabled_11d;
 }
 }
 
 
 bool csr_is11h_supported(struct mac_context *mac)
 bool csr_is11h_supported(struct mac_context *mac)
 {
 {
-	return mac->roam.configParam.Is11hSupportEnabled;
+	return mac->mlme_cfg->gen.enabled_11h;
 }
 }
 
 
 bool csr_is11e_supported(struct mac_context *mac)
 bool csr_is11e_supported(struct mac_context *mac)
@@ -2229,10 +2229,9 @@ uint32_t csr_get11h_power_constraint(struct mac_context *mac_ctx,
 	/* check if .11h support is enabled, if not,
 	/* check if .11h support is enabled, if not,
 	 * the power constraint is 0.
 	 * the power constraint is 0.
 	 */
 	 */
-	if (mac_ctx->roam.configParam.Is11hSupportEnabled &&
-	    constraints->present) {
+	if (mac_ctx->mlme_cfg->gen.enabled_11h &&
+	    constraints->present)
 		localPowerConstraint = constraints->localPowerConstraints;
 		localPowerConstraint = constraints->localPowerConstraints;
-	}
 
 
 	return localPowerConstraint;
 	return localPowerConstraint;
 }
 }

+ 4 - 22
core/wma/src/wma_scan_roam.c

@@ -2651,7 +2651,6 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
 	struct mac_context *mac = NULL;
 	struct mac_context *mac = NULL;
 	tSirMacCapabilityInfo selfCaps;
 	tSirMacCapabilityInfo selfCaps;
 	uint32_t val = 0;
 	uint32_t val = 0;
-	uint32_t nCfgValue;
 	uint16_t *pCfgValue16;
 	uint16_t *pCfgValue16;
 	uint8_t nCfgValue8, *pCfgValue8;
 	uint8_t nCfgValue8, *pCfgValue8;
 	tSirMacQosInfoStation macQosInfoSta;
 	tSirMacQosInfoStation macQosInfoSta;
@@ -2682,13 +2681,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
 
 
 	if (mac->mlme_cfg->feature_flags.enable_short_slot_time_11g)
 	if (mac->mlme_cfg->feature_flags.enable_short_slot_time_11g)
 		selfCaps.shortSlotTime = 1;
 		selfCaps.shortSlotTime = 1;
-	if (wlan_cfg_get_int(mac, WNI_CFG_11H_ENABLED, &val) !=
-							QDF_STATUS_SUCCESS) {
-		QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to get WNI_CFG_11H_ENABLED");
-		return QDF_STATUS_E_FAILURE;
-	}
-	if (val)
+
+	if (mac->mlme_cfg->gen.enabled_11h)
 		selfCaps.spectrumMgt = 1;
 		selfCaps.spectrumMgt = 1;
 
 
 	if (mac->mlme_cfg->wmm_params.qos_enabled)
 	if (mac->mlme_cfg->wmm_params.qos_enabled)
@@ -2743,23 +2737,11 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
 		return QDF_STATUS_E_FAILURE;
 		return QDF_STATUS_E_FAILURE;
 	}
 	}
 
 
-	if (wlan_cfg_get_int(mac, WNI_CFG_TX_BF_CAP, &nCfgValue) !=
-							QDF_STATUS_SUCCESS) {
-		QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to get WNI_CFG_TX_BF_CAP");
-		return QDF_STATUS_E_FAILURE;
-	}
 	/* tSirMacTxBFCapabilityInfo */
 	/* tSirMacTxBFCapabilityInfo */
-	nCfgValue8 = (uint8_t) nCfgValue;
+	nCfgValue8 = (uint8_t)mac->mlme_cfg->vht_caps.vht_cap_info.tx_bf_cap;
 	roam_offload_params->ht_txbf = nCfgValue8 & 0xFF;
 	roam_offload_params->ht_txbf = nCfgValue8 & 0xFF;
-	if (wlan_cfg_get_int(mac, WNI_CFG_AS_CAP, &nCfgValue) !=
-							QDF_STATUS_SUCCESS) {
-		QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to get WNI_CFG_AS_CAP");
-		return QDF_STATUS_E_FAILURE;
-	}
 	/* tSirMacASCapabilityInfo */
 	/* tSirMacASCapabilityInfo */
-	nCfgValue8 = (uint8_t) nCfgValue;
+	nCfgValue8 = (uint8_t)mac->mlme_cfg->vht_caps.vht_cap_info.as_cap;
 	roam_offload_params->asel_cap = nCfgValue8 & 0xFF;
 	roam_offload_params->asel_cap = nCfgValue8 & 0xFF;
 
 
 	/* QOS Info */
 	/* QOS Info */