qcacld-3.0: Add MLME CFG items and APIs

Add the basic infra for MLME CFG items and the APIs to be used from
other components.

Change-Id: I39654de8f7266089d574b85437a19e8d21f91249
CRs-Fixed: 2293825
diff --git a/Kbuild b/Kbuild
index 31efed7..2d937f0 100755
--- a/Kbuild
+++ b/Kbuild
@@ -820,7 +820,8 @@
 MLME_INC := -I$(WLAN_ROOT)/$(MLME_DIR)/core/inc \
 		-I$(WLAN_ROOT)/$(MLME_DIR)/dispatcher/inc
 
-MLME_OBJS :=	$(MLME_DIR)/core/src/wlan_mlme_main.o
+MLME_OBJS :=	$(MLME_DIR)/core/src/wlan_mlme_main.o \
+		$(MLME_DIR)/dispatcher/src/wlan_mlme_ucfg_api.o
 
 ########## ACTION OUI ##########
 
diff --git a/components/cfg/cfg_all.h b/components/cfg/cfg_all.h
index ffe29c9..d86c3a4 100644
--- a/components/cfg/cfg_all.h
+++ b/components/cfg/cfg_all.h
@@ -18,6 +18,7 @@
 
 #include "cfg_define.h"
 #include "cfg_converged.h"
+#include "cfg_mlme.h"
 
 #ifdef CONVERGED_P2P_ENABLE
 #include "wlan_p2p_cfg.h"
@@ -37,8 +38,10 @@
 #define CFG_NAN_ALL
 #endif
 
+/* Maintain Alphabetic order here while adding components */
 #define CFG_ALL \
 	CFG_CONVERGED_ALL \
+	CFG_MLME_ALL \
+	CFG_NAN_ALL \
 	CFG_P2P_ALL \
-	CFG_TDLS_ALL \
-	CFG_NAN_ALL
+	CFG_TDLS_ALL
diff --git a/components/mlme/core/inc/wlan_mlme_main.h b/components/mlme/core/inc/wlan_mlme_main.h
index 812f634..46f56ff 100644
--- a/components/mlme/core/inc/wlan_mlme_main.h
+++ b/components/mlme/core/inc/wlan_mlme_main.h
@@ -16,8 +16,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 /**
- * DOC: declare utility API related to the pmo component
- * called by other components
+ * DOC: declare internal API related to the mlme component
  */
 
 #ifndef _WLAN_MLME_MAIN_H_
@@ -70,20 +69,41 @@
  *
  * Register this api with objmgr to detect psoc is created
  *
- * Return QDF_STATUS status in case of success else return error
+ * Return: QDF_STATUS status in case of success else return error
  */
 QDF_STATUS mlme_psoc_object_created_notification(
 		struct wlan_objmgr_psoc *psoc, void *arg);
 
 /**
- *  mlme_psoc_object_destroyed_notification(): mlme psoc delete handler
+ * mlme_psoc_object_destroyed_notification(): mlme psoc delete handler
  * @psoc: psoc which is going to delete by objmgr
  * @arg: argument for vdev delete handler
  *
  * Register this api with objmgr to detect psoc is deleted
  *
- * Return QDF_STATUS status in case of success else return error
+ * Return: QDF_STATUS status in case of success else return error
  */
 QDF_STATUS mlme_psoc_object_destroyed_notification(
 		struct wlan_objmgr_psoc *psoc, void *arg);
+
+/**
+ * mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI
+ * @psoc: pointer to the psoc object
+ *
+ * Populate the MLME CFG structure from CFG and INI values using CFG APIs
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * mlme_get_psoc_obj() - Get MLME object from psoc
+ * @psoc: pointer to the psoc object
+ *
+ * Get the MLME object pointer from the psoc
+ *
+ * Return: pointer to MLME object
+ */
+struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc);
+
 #endif
diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 6e16008..80a194c 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -16,20 +16,13 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 /**
- * DOC: define utility API related to the mlme component
- * called by other components
+ * DOC: define internal APIs related to the mlme component
  */
 
 #include "wlan_mlme_main.h"
+#include "cfg_ucfg_api.h"
 
-/**
- * wlan_psoc_get_mlme_obj() - private API to get mlme object from psoc
- * @psoc: psoc object
- *
- * Return: mlme object
- */
-static inline struct wlan_mlme_psoc_obj *
-wlan_psoc_get_mlme_obj(struct wlan_objmgr_psoc *psoc)
+struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
 {
 	struct wlan_mlme_psoc_obj *mlme_obj;
 
@@ -116,7 +109,7 @@
 	struct wlan_mlme_psoc_obj *mlme_obj = NULL;
 	QDF_STATUS status;
 
-	mlme_obj = wlan_psoc_get_mlme_obj(psoc);
+	mlme_obj = mlme_get_psoc_obj(psoc);
 
 	status = wlan_objmgr_psoc_component_obj_detach(psoc,
 						       WLAN_UMAC_COMP_MLME,
@@ -133,3 +126,43 @@
 	return status;
 }
 
+static void mlme_update_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
+				      struct mlme_ht_capabilities_info
+				      *ht_cap_info)
+{
+	union {
+		uint16_t val_16;
+		struct mlme_ht_capabilities_info default_ht_cap_info;
+	} u;
+
+	u.val_16 = (uint16_t)cfg_default(CFG_HT_CAP_INFO);
+
+	u.default_ht_cap_info.advCodingCap = cfg_get(psoc, CFG_RX_LDPC_ENABLE);
+	u.default_ht_cap_info.rxSTBC = cfg_get(psoc, CFG_RX_STBC_ENABLE);
+	u.default_ht_cap_info.txSTBC = cfg_get(psoc, CFG_TX_STBC_ENABLE);
+	u.default_ht_cap_info.shortGI20MHz =
+				cfg_get(psoc, CFG_SHORT_GI_20MHZ);
+	u.default_ht_cap_info.shortGI40MHz =
+				cfg_get(psoc, CFG_SHORT_GI_40MHZ);
+
+	*ht_cap_info = u.default_ht_cap_info;
+}
+
+QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+	struct wlan_mlme_cfg *mlme_cfg;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	mlme_cfg = &mlme_obj->cfg;
+	mlme_update_ht_cap_in_cfg(psoc, &mlme_cfg->ht_caps.ht_cap_info);
+
+	return status;
+}
+
diff --git a/components/mlme/dispatcher/inc/cfg_mlme.h b/components/mlme/dispatcher/inc/cfg_mlme.h
new file mode 100644
index 0000000..2bd5c94
--- /dev/null
+++ b/components/mlme/dispatcher/inc/cfg_mlme.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018 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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef __CFG_MLME_H
+#define __CFG_MLME_H
+
+#include "cfg_define.h"
+#include "cfg_converged.h"
+#include "qdf_types.h"
+
+#include "cfg_mlme_ht_caps.h"
+#include "cfg_mlme_vht_caps.h"
+
+#define CFG_MLME_ALL \
+	CFG_HT_CAPS_ALL \
+	CFG_VHT_CAPS_ALL
+
+#endif /* __CFG_MLME_H */
+
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_ht_caps.h b/components/mlme/dispatcher/inc/cfg_mlme_ht_caps.h
new file mode 100644
index 0000000..a8a1cdf
--- /dev/null
+++ b/components/mlme/dispatcher/inc/cfg_mlme_ht_caps.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2012-2018 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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains centralized definitions of converged configuration.
+ */
+
+#ifndef __CFG_MLME_HT_CAPS_H
+#define __CFG_MLME_HT_CAPS_H
+
+/*
+ * <ini>
+ * gTxLdpcEnable - Config Param to enable Tx LDPC capability
+ * @Min: 0
+ * @Max: 3
+ * @Default: 3
+ *
+ * This ini is used to enable/disable Tx LDPC capability
+ * 0 - disable
+ * 1 - HT LDPC enable
+ * 2 - VHT LDPC enable
+ * 3 - HT & VHT LDPC enable
+ *
+ * Related: STA/SAP/P2P/IBSS/NAN.
+ *
+ * Supported Feature: Concurrency/Standalone
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_TX_LDPC_ENABLE CFG_INI_UINT( \
+		"gTxLdpcEnable", \
+		0, \
+		3, \
+		3, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Tx LDPC capability")
+
+/*
+ * <ini>
+ * gEnableRXLDPC - Config Param to enable Rx LDPC capability
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable Rx LDPC capability
+ * 0 - disable Rx LDPC
+ * 1 - enable Rx LDPC
+ *
+ * Related: STA/SAP/P2P/IBSS/NAN.
+ *
+ * Supported Feature: Concurrency/Standalone
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_RX_LDPC_ENABLE CFG_INI_BOOL( \
+		"gEnableRXLDPC", \
+		0, \
+		"Rx LDPC capability")
+
+/*
+ * <ini>
+ * gEnableTXSTBC - Enables/disables Tx STBC capability in STA mode
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to set default Tx STBC capability
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_TX_STBC_ENABLE CFG_INI_BOOL( \
+		"gEnableTXSTBC", \
+		0, \
+		"Tx STBC capability")
+
+/*
+ * <ini>
+ * gEnableRXSTBC - Enables/disables Rx STBC capability in STA mode
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set default Rx STBC capability
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_RX_STBC_ENABLE CFG_INI_BOOL( \
+		"gEnableRXSTBC", \
+		1, \
+		"Rx STBC capability")
+
+/*
+ * <ini>
+ * gShortGI20Mhz - Short Guard Interval for HT20
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set default short interval for HT20
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_SHORT_GI_20MHZ CFG_INI_BOOL( \
+		"gShortGI20Mhz", \
+		1, \
+		"Short Guard Interval for HT20")
+
+/*
+ * <ini>
+ * gShortGI40Mhz - It will check gShortGI20Mhz and
+ * gShortGI40Mhz from session entry
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set default gShortGI40Mhz
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_SHORT_GI_40MHZ CFG_INI_BOOL( \
+		"gShortGI40Mhz", \
+		1, \
+		"Short Guard Interval for HT40")
+
+#define CFG_HT_CAP_INFO CFG_UINT( \
+		"ht_cap_info", \
+		0, \
+		65535, \
+		364, \
+		CFG_VALUE_OR_DEFAULT, \
+		"HT cap info")
+
+#define CFG_HT_CAPS_ALL \
+	CFG(CFG_HT_CAP_INFO) \
+	CFG(CFG_TX_LDPC_ENABLE) \
+	CFG(CFG_RX_LDPC_ENABLE) \
+	CFG(CFG_TX_STBC_ENABLE) \
+	CFG(CFG_RX_STBC_ENABLE) \
+	CFG(CFG_SHORT_GI_20MHZ) \
+	CFG(CFG_SHORT_GI_40MHZ)
+
+#endif /* __CFG_MLME_HT_CAPS_H */
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h b/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h
new file mode 100644
index 0000000..b61d3a8
--- /dev/null
+++ b/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2018 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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains centralized definitions of converged configuration.
+ */
+
+#ifndef __CFG_MLME_VHT_CAPS_H
+#define __CFG_MLME_VHT_CAPS_H
+
+#define CFG_VHT_CAPS_ALL
+
+#endif /* __CFG_MLME_HT_CAPS_H */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 67b1e36..73eea29 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -26,13 +26,78 @@
 #include <wlan_cmn.h>
 
 /**
- * struct wlan_mlme_cfg -MLME config items
- * @cfg:     cfg items
+ * struct mlme_ht_capabilities_info - HT Capabilities Info
+ * @lsigTXOPProtection: L-SIG TXOP Protection Mechanism support
+ * @stbcControlFrame: STBC Control frame support
+ * @psmp: PSMP Support
+ * @dsssCckMode40MHz: To indicate use of DSSS/CCK in 40Mhz
+ * @maximalAMSDUsize: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
+ * @delayedBA: Support of Delayed Block Ack
+ * @rxSTBC: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
+ * @txSTBC: Tx STBC Support
+ * @shortGI40MHz: Short GI Support for HT40
+ * @shortGI20MHz: Short GI support for HT20
+ * @greenField: Support for HT Greenfield PPDUs
+ * @mimoPowerSave: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
+ * @supportedChannelWidthSet: Supported Channel Width - 0:20Mhz, 1:20Mhz & 40Mhz
+ * @advCodingCap: Rx LDPC support
+ */
+#ifndef ANI_LITTLE_BIT_ENDIAN
+struct mlme_ht_capabilities_info {
+	uint16_t lsigTXOPProtection:1;
+	uint16_t stbcControlFrame:1;
+	uint16_t psmp:1;
+	uint16_t dsssCckMode40MHz:1;
+	uint16_t maximalAMSDUsize:1;
+	uint16_t delayedBA:1;
+	uint16_t rxSTBC:2;
+	uint16_t txSTBC:1;
+	uint16_t shortGI40MHz:1;
+	uint16_t shortGI20MHz:1;
+	uint16_t greenField:1;
+	uint16_t mimoPowerSave:2;
+	uint16_t supportedChannelWidthSet:1;
+	uint16_t advCodingCap:1;
+} qdf_packed;
+#else
+struct mlme_ht_capabilities_info {
+	uint16_t advCodingCap:1;
+	uint16_t supportedChannelWidthSet:1;
+	uint16_t mimoPowerSave:2;
+	uint16_t greenField:1;
+	uint16_t shortGI20MHz:1;
+	uint16_t shortGI40MHz:1;
+	uint16_t txSTBC:1;
+	uint16_t rxSTBC:2;
+	uint16_t delayedBA:1;
+	uint16_t maximalAMSDUsize:1;
+	uint16_t dsssCckMode40MHz:1;
+	uint16_t psmp:1;
+	uint16_t stbcControlFrame:1;
+	uint16_t lsigTXOPProtection:1;
+} qdf_packed;
+#endif
+
+/**
+ * struct wlan_mlme_ht_caps - HT Capabilities related config items
+ * @ht_cap_info: HT capabilities Info Structure
+ */
+struct wlan_mlme_ht_caps {
+	struct mlme_ht_capabilities_info ht_cap_info;
+};
+
+struct wlan_mlme_vht_caps {
+	/* VHT related configs */
+};
+
+/**
+ * struct wlan_mlme_cfg - MLME config items
+ * @ht_cfg: HT related CFG Items
+ * @vht_cfg: VHT related CFG Items
  */
 struct wlan_mlme_cfg {
-	uint8_t test;
-	/* VHT config */
-	/* HT config */
+	struct wlan_mlme_ht_caps ht_caps;
+	struct wlan_mlme_vht_caps vht_caps;
 };
 
 #endif
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
new file mode 100644
index 0000000..f345467
--- /dev/null
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018 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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/**
+ * DOC: declare internal API related to the mlme component
+ */
+
+#ifndef _WLAN_MLME_UCFG_API_H_
+#define _WLAN_MLME_UCFG_API_H_
+
+#include <wlan_mlme_public_struct.h>
+#include <wlan_objmgr_psoc_obj.h>
+#include <wlan_objmgr_global_obj.h>
+#include <wlan_cmn.h>
+
+/**
+ * mlme_psoc_open() - MLME component Open
+ * @psoc: pointer to psoc object
+ *
+ * Open the MLME component and initialize the MLME strucutre
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * mlme_psoc_close() - MLME component close
+ * @psoc: pointer to psoc object
+ *
+ * Close the MLME component and clear the MLME structures
+ *
+ * Return: None
+ */
+void mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * wlan_mlme_get_ht_cap_info() - Get the HT cap info config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
+				     struct mlme_ht_capabilities_info
+				     *ht_cap_info);
+
+/**
+ * wlan_mlme_set_ht_cap_info() - Set the HT cap info config
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
+				     struct mlme_ht_capabilities_info
+				     ht_cap_info);
+
+/**
+ * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which will be filled for the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
+				     struct mlme_ht_capabilities_info
+				     *ht_cap_info)
+{
+	return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info);
+}
+
+/**
+ * ucfg_mlme_set_ht_cap_info() - Set the HT cap info config
+ * @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_ht_cap_info(struct wlan_objmgr_psoc *psoc,
+				     struct mlme_ht_capabilities_info
+				     ht_cap_info)
+{
+	return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
+}
+#endif /* _WLAN_MLME_UCFG_API_H_ */
diff --git a/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c b/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c
new file mode 100644
index 0000000..385ac4e
--- /dev/null
+++ b/components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2018 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
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/**
+ * DOC: define internal APIs related to the mlme component
+ */
+
+#include "cfg_ucfg_api.h"
+#include "wlan_mlme_main.h"
+#include "wlan_mlme_ucfg_api.h"
+
+QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc)
+{
+	QDF_STATUS status;
+
+	status = mlme_cfg_on_psoc_enable(psoc);
+	if (!QDF_IS_STATUS_SUCCESS(status))
+		mlme_err("Failed to initialize MLME CFG");
+
+	return status;
+}
+
+void mlme_psoc_close(struct wlan_objmgr_psoc *psoc)
+{
+	/* Clear the MLME CFG Structure */
+}
+
+QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
+				     struct mlme_ht_capabilities_info
+				     *ht_cap_info)
+{
+	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;
+	}
+
+	*ht_cap_info = mlme_obj->cfg.ht_caps.ht_cap_info;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
+				     struct mlme_ht_capabilities_info
+				     ht_cap_info)
+{
+	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.ht_caps.ht_cap_info = ht_cap_info;
+
+	return QDF_STATUS_SUCCESS;
+}
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index c50460c..f615c94 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -680,7 +680,13 @@
 
 	cds_register_all_modules();
 
-	return dispatcher_psoc_open(psoc);
+	status = dispatcher_psoc_open(psoc);
+
+	if (QDF_IS_STATUS_SUCCESS(status))
+		return status;
+
+	cds_alert("Failed to open PSOC Components");
+	QDF_ASSERT(0);
 
 err_mac_close:
 	mac_close(mac_handle);
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 5a33b56..71df561 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -347,29 +347,6 @@
 
 /*
  * <ini>
- * gShortGI20Mhz - Short Guard Interval for HT20
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to set default short interval for HT20
- *
- * Related: None
- *
- * Supported Feature: STA
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_SHORT_GI_20MHZ_NAME                "gShortGI20Mhz"
-#define CFG_SHORT_GI_20MHZ_MIN                 WNI_CFG_SHORT_GI_20MHZ_STAMIN
-#define CFG_SHORT_GI_20MHZ_MAX                 WNI_CFG_SHORT_GI_20MHZ_STAMAX
-#define CFG_SHORT_GI_20MHZ_DEFAULT             WNI_CFG_SHORT_GI_20MHZ_STADEF
-
-/*
- * <ini>
  * gScanResultAgeCount - Set scan result age count
  * @Min: 1
  * @Max: 100
@@ -5771,7 +5748,6 @@
  *
  * </ini>
  */
-
 #define CFG_SHORT_GI_40MHZ_NAME                "gShortGI40Mhz"
 #define CFG_SHORT_GI_40MHZ_MIN                 0
 #define CFG_SHORT_GI_40MHZ_MAX                 1
@@ -13969,7 +13945,6 @@
 	bool override_ht20_40_24g;
 	uint32_t nChannelBondingMode5GHz;
 	uint32_t MaxRxAmpduFactor;
-	uint32_t ShortGI20MhzEnable;
 	uint32_t ScanResultAgeCount;
 	uint8_t nRssiCatGap;
 	bool fIsShortPreamble;
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 8be54ed..c01554f 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -3218,6 +3218,28 @@
 					 struct qdf_mac_addr mac_addr);
 
 /**
+ * hdd_component_psoc_open() - Open the legacy components
+ * @psoc: Pointer to psoc object
+ *
+ * This function opens the legacy components and initializes the
+ * component's private objects.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS hdd_component_psoc_open(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * hdd_component_psoc_close() - Close the legacy components
+ * @psoc: Pointer to psoc object
+ *
+ * This function closes the legacy components and resets the
+ * component's private objects.
+ *
+ * Return: None
+ */
+void hdd_component_psoc_close(struct wlan_objmgr_psoc *psoc);
+
+/**
  * hdd_component_psoc_enable() - Trigger psoc enable for CLD Components
  *
  * Return: None
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index cae7ec1..b3c231d 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -42,6 +42,8 @@
 #include "wlan_hdd_green_ap.h"
 #include "wlan_hdd_green_ap_cfg.h"
 #include "wlan_hdd_twt.h"
+#include "wlan_mlme_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
 
 static void
 cb_notify_set_roam_prefer5_g_hz(struct hdd_context *hdd_ctx,
@@ -520,13 +522,6 @@
 		     CFG_HT_MPDU_DENSITY_MIN,
 		     CFG_HT_MPDU_DENSITY_MAX),
 
-	REG_VARIABLE(CFG_SHORT_GI_20MHZ_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, ShortGI20MhzEnable,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_SHORT_GI_20MHZ_DEFAULT,
-		     CFG_SHORT_GI_20MHZ_MIN,
-		     CFG_SHORT_GI_20MHZ_MAX),
-
 	REG_VARIABLE(CFG_SCAN_RESULT_AGE_COUNT_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, ScanResultAgeCount,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
@@ -7738,45 +7733,6 @@
 }
 
 /**
- * hdd_update_ht_cap_in_cfg() - to update HT cap in global CFG
- * @hdd_ctx: pointer to hdd context
- *
- * This API will update the HT config in CFG after taking intersection
- * of INI and firmware capabilities provided reading CFG
- *
- * Return: true or false
- */
-static bool hdd_update_ht_cap_in_cfg(struct hdd_context *hdd_ctx)
-{
-	uint32_t val32;
-	uint16_t val16;
-	bool status = true;
-	tSirMacHTCapabilityInfo *ht_cap_info;
-
-	if (sme_cfg_get_int(hdd_ctx->mac_handle, WNI_CFG_HT_CAP_INFO,
-				&val32) ==
-			QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Could not get WNI_CFG_HT_CAP_INFO");
-	}
-	val16 = (uint16_t) val32;
-	ht_cap_info = (tSirMacHTCapabilityInfo *) &val16;
-	ht_cap_info->advCodingCap &= hdd_ctx->config->enable_rx_ldpc;
-	ht_cap_info->rxSTBC = QDF_MIN(ht_cap_info->rxSTBC,
-			hdd_ctx->config->enableRxSTBC);
-	ht_cap_info->txSTBC &= hdd_ctx->config->enableTxSTBC;
-	ht_cap_info->shortGI20MHz &= hdd_ctx->config->ShortGI20MhzEnable;
-	ht_cap_info->shortGI40MHz &= hdd_ctx->config->ShortGI40MhzEnable;
-	val32 = val16;
-	if (sme_cfg_set_int(hdd_ctx->mac_handle, WNI_CFG_HT_CAP_INFO, val32) ==
-			QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Could not set WNI_CFG_HT_CAP_INFO");
-	}
-	return status;
-}
-
-/**
  * hdd_update_vht_cap_in_cfg() - to update VHT cap in global CFG
  * @hdd_ctx: pointer to hdd context
  *
@@ -7929,10 +7885,6 @@
 	 * During the initialization both 2G and 5G capabilities should be same.
 	 * So read 5G HT capablity and update 2G and 5G capablities.
 	 */
-	if (!hdd_update_ht_cap_in_cfg(hdd_ctx)) {
-		status = false;
-		hdd_err("Couldn't set HT CAP in cfg");
-	}
 
 	if (!hdd_update_vht_cap_in_cfg(hdd_ctx)) {
 		status = false;
@@ -9055,11 +9007,11 @@
 	uint32_t temp = 0;
 	uint32_t rx_supp_data_rate, tx_supp_data_rate;
 	bool status = true;
-	tSirMacHTCapabilityInfo *ht_cap_info;
+	QDF_STATUS qdf_status;
+	struct mlme_ht_capabilities_info ht_cap_info;
 	uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET] = {0};
 	uint8_t mcs_set_temp[SIZE_OF_SUPPORTED_MCS_SET];
 	uint32_t val, val32;
-	uint16_t val16;
 	uint8_t enable2x2;
 	mac_handle_t mac_handle;
 
@@ -9109,21 +9061,24 @@
 		hdd_err("Could not pass on WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE to CFG");
 	}
 
-	sme_cfg_get_int(mac_handle, WNI_CFG_HT_CAP_INFO, &temp);
-	val16 = (uint16_t)temp;
-	ht_cap_info = (tSirMacHTCapabilityInfo *)&val16;
+	qdf_status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc, &ht_cap_info);
+	if (!QDF_IS_STATUS_SUCCESS(status)) {
+		hdd_err("Failed to get HT Cap info");
+		status = false;
+	}
+
 	if (!(hdd_ctx->ht_tx_stbc_supported && hdd_config->enable2x2)) {
-		ht_cap_info->txSTBC = 0;
+		ht_cap_info.txSTBC = 0;
 	} else {
 		sme_cfg_get_int(mac_handle, WNI_CFG_VHT_TXSTBC, &val32);
 		hdd_debug("STBC %d", val32);
-		ht_cap_info->txSTBC = val32;
+		ht_cap_info.txSTBC = val32;
 	}
-	temp = val16;
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_HT_CAP_INFO,
-			    temp) == QDF_STATUS_E_FAILURE) {
+
+	qdf_status = ucfg_mlme_set_ht_cap_info(hdd_ctx->hdd_psoc, ht_cap_info);
+	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		status = false;
-		hdd_err("Could not pass on WNI_CFG_HT_CAP_INFO to CFG");
+		hdd_err("Could not pass on HT_CAP_INFO to CFG");
 	}
 
 	sme_cfg_get_int(mac_handle, WNI_CFG_VHT_BASIC_MCS_SET, &temp);
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index cd9ec2c..4de7b71 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -117,6 +117,8 @@
 #include <wlan_hdd_active_tos.h>
 #include <wlan_hdd_sar_limits.h>
 #include <wlan_hdd_ota_test.h>
+#include "wlan_mlme_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
 
 #define g_mode_rates_size (12)
 #define a_mode_rates_size (8)
@@ -12066,18 +12068,6 @@
 		wiphy->iface_combinations = wlan_hdd_iface_combination;
 	}
 
-	/* Before registering we need to update the ht capabilitied based
-	 * on ini values
-	 */
-	if (!pCfg->ShortGI20MhzEnable) {
-		wlan_hdd_band_2_4_ghz.ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_20;
-		wlan_hdd_band_5_ghz.ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_20;
-	}
-
-	if (!pCfg->ShortGI40MhzEnable)
-		wlan_hdd_band_5_ghz.ht_cap.cap &=
-			~IEEE80211_HT_CAP_SGI_40;
-
 	if (!pCfg->nChannelBondingMode5GHz)
 		wlan_hdd_band_5_ghz.ht_cap.cap &=
 			~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
@@ -12277,23 +12267,16 @@
  *
  * Return: void
  */
-static void wlan_hdd_update_band_cap(struct hdd_context *hdd_ctx)
+static void wlan_hdd_update_ht_cap(struct hdd_context *hdd_ctx)
 {
-	uint32_t val32;
-	uint16_t val16;
-	tSirMacHTCapabilityInfo *ht_cap_info;
+	struct mlme_ht_capabilities_info ht_cap_info = {0};
 	QDF_STATUS status;
-	mac_handle_t mac_handle = hdd_ctx->mac_handle;
 
-	status = sme_cfg_get_int(mac_handle, WNI_CFG_HT_CAP_INFO, &val32);
-	if (QDF_STATUS_SUCCESS != status) {
+	status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc, &ht_cap_info);
+	if (QDF_STATUS_SUCCESS != status)
 		hdd_err("could not get HT capability info");
-		val32 = 0;
-	}
-	val16 = (uint16_t)val32;
-	ht_cap_info = (tSirMacHTCapabilityInfo *)&val16;
 
-	if (ht_cap_info->txSTBC == true) {
+	if (ht_cap_info.txSTBC) {
 		if (NULL != hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ])
 			hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ]->ht_cap.cap |=
 						IEEE80211_HT_CAP_TX_STBC;
@@ -12310,6 +12293,14 @@
 						vht_cap.vht_supported = 0;
 		hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->vht_cap.cap = 0;
 	}
+
+	if (!ht_cap_info.shortGI20MHz) {
+		wlan_hdd_band_2_4_ghz.ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_20;
+		wlan_hdd_band_5_ghz.ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_20;
+	}
+
+	if (!ht_cap_info.shortGI40MHz)
+		wlan_hdd_band_5_ghz.ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
 }
 
 /*
@@ -12322,7 +12313,7 @@
 {
 	hdd_ctx->wiphy->max_ap_assoc_sta = hdd_ctx->config->maxNumberOfPeers;
 
-	wlan_hdd_update_band_cap(hdd_ctx);
+	wlan_hdd_update_ht_cap(hdd_ctx);
 }
 
 /**
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index f99b78b..0661fc4 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -139,7 +139,8 @@
 #include "wlan_p2p_cfg_api.h"
 #include "wlan_tdls_cfg_api.h"
 #include <wlan_hdd_rssi_monitor.h>
-
+#include "wlan_mlme_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
 #ifdef CNSS_GENL
 #include <net/cnss_nl.h>
 #endif
@@ -299,6 +300,7 @@
 	[QDF_MODULE_ID_IPA] = {QDF_TRACE_LEVEL_ALL},
 	[QDF_MODULE_ID_ACTION_OUI] = {QDF_TRACE_LEVEL_ALL},
 	[QDF_MODULE_ID_CONFIG] = {QDF_TRACE_LEVEL_ALL},
+	[QDF_MODULE_ID_MLME] = {QDF_TRACE_LEVEL_ALL},
 };
 
 struct notifier_block hdd_netdev_notifier;
@@ -1333,19 +1335,11 @@
 				  struct wma_tgt_ht_cap *cfg)
 {
 	QDF_STATUS status;
-	uint32_t value, val32;
-	uint16_t val16;
+	uint32_t value;
 	struct hdd_config *pconfig = hdd_ctx->config;
-	tSirMacHTCapabilityInfo *phtCapInfo;
+	struct mlme_ht_capabilities_info ht_cap_info;
 	uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET];
-	uint8_t enable_tx_stbc;
-	mac_handle_t mac_handle;
-
-	/* check and update RX STBC */
-	if (pconfig->enableRxSTBC && !cfg->ht_rx_stbc)
-		pconfig->enableRxSTBC = cfg->ht_rx_stbc;
-
-	mac_handle = hdd_ctx->mac_handle;
+	mac_handle_t mac_handle = hdd_ctx->mac_handle;
 
 	/* get the MPDU density */
 	status = sme_cfg_get_int(mac_handle, WNI_CFG_MPDU_DENSITY, &value);
@@ -1369,33 +1363,33 @@
 	}
 
 	/* get the HT capability info */
-	status = sme_cfg_get_int(mac_handle, WNI_CFG_HT_CAP_INFO, &val32);
+	status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc, &ht_cap_info);
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("could not get HT capability info");
 		return;
 	}
-	val16 = (uint16_t) val32;
-	phtCapInfo = (tSirMacHTCapabilityInfo *) &val16;
+
+	/* check and update RX STBC */
+	if (ht_cap_info.rxSTBC && !cfg->ht_rx_stbc)
+		ht_cap_info.rxSTBC = cfg->ht_rx_stbc;
 
 	/* Set the LDPC capability */
-	phtCapInfo->advCodingCap = cfg->ht_rx_ldpc;
+	ht_cap_info.advCodingCap = cfg->ht_rx_ldpc;
 
-	if (pconfig->ShortGI20MhzEnable && !cfg->ht_sgi_20)
-		pconfig->ShortGI20MhzEnable = cfg->ht_sgi_20;
+	if (ht_cap_info.shortGI20MHz && !cfg->ht_sgi_20)
+		ht_cap_info.shortGI20MHz = cfg->ht_sgi_20;
 
-	if (pconfig->ShortGI40MhzEnable && !cfg->ht_sgi_40)
-		pconfig->ShortGI40MhzEnable = cfg->ht_sgi_40;
+	if (ht_cap_info.shortGI40MHz && !cfg->ht_sgi_40)
+		ht_cap_info.shortGI40MHz = cfg->ht_sgi_40;
 
 	hdd_ctx->num_rf_chains = cfg->num_rf_chains;
 	hdd_ctx->ht_tx_stbc_supported = cfg->ht_tx_stbc;
 
-	enable_tx_stbc = pconfig->enableTxSTBC;
-
 	if (pconfig->enable2x2 && (cfg->num_rf_chains == 2)) {
 		pconfig->enable2x2 = 1;
 	} else {
 		pconfig->enable2x2 = 0;
-		enable_tx_stbc = 0;
+		ht_cap_info.txSTBC = 0;
 
 		/* 1x1 */
 		/* Update Rx Highest Long GI data Rate */
@@ -1416,11 +1410,9 @@
 		}
 	}
 	if (!(cfg->ht_tx_stbc && pconfig->enable2x2))
-		enable_tx_stbc = 0;
-	phtCapInfo->txSTBC = enable_tx_stbc;
+		ht_cap_info.txSTBC = 0;
 
-	val32 = val16;
-	status = sme_cfg_set_int(mac_handle, WNI_CFG_HT_CAP_INFO, val32);
+	status = ucfg_mlme_set_ht_cap_info(hdd_ctx->hdd_psoc, ht_cap_info);
 	if (status != QDF_STATUS_SUCCESS)
 		hdd_err("could not set HT capability to CCM");
 #define WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES 0xff
@@ -2896,11 +2888,19 @@
 
 		hdd_update_cds_ac_specs_params(hdd_ctx);
 
+		status = hdd_component_psoc_open(hdd_ctx->hdd_psoc);
+		if (QDF_IS_STATUS_ERROR(status)) {
+			hdd_err("Failed to Open legacy components; status: %d",
+				status);
+			ret = qdf_status_to_os_return(status);
+			goto deinit_config;
+		}
+
 		status = cds_open(hdd_ctx->hdd_psoc);
 		if (QDF_IS_STATUS_ERROR(status)) {
 			hdd_err("Failed to Open CDS; status: %d", status);
 			ret = qdf_status_to_os_return(status);
-			goto deinit_config;
+			goto hdd_psoc_close;
 		}
 
 		if (hdd_ctx->config->rx_thread_affinity_mask)
@@ -3013,6 +3013,9 @@
 
 	cds_close(hdd_ctx->hdd_psoc);
 
+hdd_psoc_close:
+	hdd_component_psoc_close(hdd_ctx->hdd_psoc);
+
 deinit_config:
 	cds_deinit_ini_config();
 
@@ -8818,6 +8821,7 @@
 				hdd_ctx->config->qdf_trace_enable_regulatory);
 	hdd_qdf_trace_enable(QDF_MODULE_ID_CP_STATS,
 				hdd_ctx->config->qdf_trace_enable_cp_stats);
+	hdd_qdf_trace_enable(QDF_MODULE_ID_MLME, 0xffff);
 
 	hdd_cfg_print(hdd_ctx);
 }
@@ -10938,6 +10942,7 @@
 		QDF_ASSERT(0);
 	}
 
+	hdd_component_psoc_close(hdd_ctx->hdd_psoc);
 	dispatcher_pdev_close(hdd_ctx->hdd_pdev);
 	ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
 	if (ret) {
@@ -11169,6 +11174,7 @@
 {
 	QDF_STATUS status;
 	struct hdd_context *hdd_ctx;
+	struct wlan_objmgr_psoc *psoc;
 	int ret;
 	bool rtnl_held;
 	mac_handle_t mac_handle;
@@ -11189,6 +11195,7 @@
 	}
 
 	hdd_action_oui_config(hdd_ctx);
+	psoc = hdd_ctx->hdd_psoc;
 
 	qdf_nbuf_init_replenish_timer();
 
@@ -12486,6 +12493,16 @@
 	mlme_deinit();
 }
 
+QDF_STATUS hdd_component_psoc_open(struct wlan_objmgr_psoc *psoc)
+{
+	return mlme_psoc_open(psoc);
+}
+
+void hdd_component_psoc_close(struct wlan_objmgr_psoc *psoc)
+{
+	mlme_psoc_close(psoc);
+}
+
 void hdd_component_psoc_enable(struct wlan_objmgr_psoc *psoc)
 {
 	ocb_psoc_enable(psoc);
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 4982eb5..6c746e0 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -98,6 +98,8 @@
 #include "wlan_reg_ucfg_api.h"
 #include "wlan_hdd_packet_filter_api.h"
 #include "wlan_cp_stats_mc_ucfg_api.h"
+#include "wlan_mlme_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
 
 #define HDD_FINISH_ULA_TIME_OUT         800
 #define HDD_SET_MCBC_FILTERS_TO_FW      1
@@ -3389,13 +3391,9 @@
 	mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
 	int ret;
 	QDF_STATUS status;
-	uint32_t cfg_value;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	struct hdd_config *config = hdd_ctx->config;
-	union {
-		uint16_t cfg_value16;
-		tSirMacHTCapabilityInfo ht_cap_info;
-	} u;
+	struct mlme_ht_capabilities_info ht_cap_info;
 
 	hdd_debug("%d", value);
 	if (value) {
@@ -3408,16 +3406,14 @@
 			hdd_err("LDCP is already disabled");
 			return 0;
 	}
-	status = sme_cfg_get_int(mac_handle, WNI_CFG_HT_CAP_INFO, &cfg_value);
+	status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc, &ht_cap_info);
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("Failed to get HT capability info");
 		return -EIO;
 	}
-	u.cfg_value16 = cfg_value & 0xFFFF;
 
-	u.ht_cap_info.advCodingCap = value;
-	status = sme_cfg_set_int(mac_handle, WNI_CFG_HT_CAP_INFO,
-				 u.cfg_value16);
+	ht_cap_info.advCodingCap = value;
+	status = ucfg_mlme_set_ht_cap_info(hdd_ctx->hdd_psoc, ht_cap_info);
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("Failed to set HT capability info");
 		return -EIO;
@@ -3476,26 +3472,21 @@
 int hdd_set_tx_stbc(struct hdd_adapter *adapter, int value)
 {
 	mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	int ret;
+	QDF_STATUS status;
+	struct mlme_ht_capabilities_info ht_cap_info;
 
 	hdd_debug("%d", value);
 	if (value) {
 		/* make sure HT capabilities allow this */
-		QDF_STATUS status;
-		uint32_t cfg_value;
-		union {
-			uint16_t cfg_value16;
-			tSirMacHTCapabilityInfo ht_cap_info;
-		} u;
-
-		status = sme_cfg_get_int(mac_handle, WNI_CFG_HT_CAP_INFO,
-					 &cfg_value);
+		status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc,
+						   &ht_cap_info);
 		if (QDF_STATUS_SUCCESS != status) {
 			hdd_err("Failed to get HT capability info");
 			return -EIO;
 		}
-		u.cfg_value16 = cfg_value & 0xFFFF;
-		if (!u.ht_cap_info.txSTBC) {
+		if (!ht_cap_info.txSTBC) {
 			hdd_err("TX STBC not supported");
 			return -EINVAL;
 		}
@@ -3547,26 +3538,21 @@
 int hdd_set_rx_stbc(struct hdd_adapter *adapter, int value)
 {
 	mac_handle_t mac_handle = adapter->hdd_ctx->mac_handle;
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	int ret;
+	QDF_STATUS status;
+	struct mlme_ht_capabilities_info ht_cap_info;
 
 	hdd_debug("%d", value);
 	if (value) {
 		/* make sure HT capabilities allow this */
-		QDF_STATUS status;
-		uint32_t cfg_value;
-		union {
-			uint16_t cfg_value16;
-			tSirMacHTCapabilityInfo ht_cap_info;
-		} u;
-
-		status = sme_cfg_get_int(mac_handle, WNI_CFG_HT_CAP_INFO,
-					 &cfg_value);
+		status = ucfg_mlme_get_ht_cap_info(hdd_ctx->hdd_psoc,
+						   &ht_cap_info);
 		if (QDF_STATUS_SUCCESS != status) {
 			hdd_err("Failed to get HT capability info");
 			return -EIO;
 		}
-		u.cfg_value16 = cfg_value & 0xFFFF;
-		if (!u.ht_cap_info.rxSTBC) {
+		if (!ht_cap_info.rxSTBC) {
 			hdd_warn("RX STBC not supported");
 			return -EINVAL;
 		}
diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h
index e1e648f..f2adc55 100644
--- a/core/mac/inc/ani_global.h
+++ b/core/mac/inc/ani_global.h
@@ -42,6 +42,7 @@
 
 #include <lim_ft_defs.h>
 #include "wlan_objmgr_psoc_obj.h"
+#include "wlan_mlme_public_struct.h"
 
 /**
  * MAC_CONTEXT() - Convert an opaque mac handle into a mac context
@@ -847,6 +848,7 @@
 	enum qdf_driver_type gDriverType;
 
 	tAniSirCfg cfg;
+	struct wlan_mlme_cfg *mlme_cfg;
 	tAniSirLim lim;
 	tAniSirSch sch;
 	tAniSirSys sys;
diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h
index d19b494..4175182 100644
--- a/core/mac/inc/sir_mac_prot_def.h
+++ b/core/mac/inc/sir_mac_prot_def.h
@@ -1760,41 +1760,6 @@
 	eHT_PCO_PHASE
 } tHTCapability;
 
-/* HT Capabilities Info */
-typedef struct sSirMacHTCapabilityInfo {
-#ifndef ANI_LITTLE_BIT_ENDIAN
-	uint16_t lsigTXOPProtection:1;  /* Dynamic state */
-	uint16_t stbcControlFrame:1;    /* Static via CFG */
-	uint16_t psmp:1;        /* Static via CFG */
-	uint16_t dsssCckMode40MHz:1;    /* Static via CFG */
-	uint16_t maximalAMSDUsize:1;    /* Static via CFG */
-	uint16_t delayedBA:1;   /* Static via CFG */
-	uint16_t rxSTBC:2;      /* Static via CFG */
-	uint16_t txSTBC:1;      /* Static via CFG */
-	uint16_t shortGI40MHz:1;        /* Static via CFG */
-	uint16_t shortGI20MHz:1;        /* Static via CFG */
-	uint16_t greenField:1;  /* Static via CFG */
-	uint16_t mimoPowerSave:2;       /* Dynamic state */
-	uint16_t supportedChannelWidthSet:1;    /* Static via CFG */
-	uint16_t advCodingCap:1;        /* Static via CFG */
-#else
-	uint16_t advCodingCap:1;
-	uint16_t supportedChannelWidthSet:1;
-	uint16_t mimoPowerSave:2;
-	uint16_t greenField:1;
-	uint16_t shortGI20MHz:1;
-	uint16_t shortGI40MHz:1;
-	uint16_t txSTBC:1;
-	uint16_t rxSTBC:2;
-	uint16_t delayedBA:1;
-	uint16_t maximalAMSDUsize:1;
-	uint16_t dsssCckMode40MHz:1;
-	uint16_t psmp:1;
-	uint16_t stbcControlFrame:1;
-	uint16_t lsigTXOPProtection:1;
-#endif
-} qdf_packed tSirMacHTCapabilityInfo;
-
 /* HT Parameters Info */
 typedef struct sSirMacHTParametersInfo {
 #ifndef ANI_LITTLE_BIT_ENDIAN
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index a4910c2..3bd335d 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -71,6 +71,8 @@
 #include <wlan_p2p_ucfg_api.h>
 #include "wlan_utility.h"
 #include <wlan_tdls_cfg_api.h>
+#include "cfg_ucfg_api.h"
+#include "wlan_mlme_public_struct.h"
 
 static void __lim_init_scan_vars(tpAniSirGlobal pMac)
 {
@@ -267,8 +269,8 @@
 	uint16_t val16;
 	uint8_t val8;
 	bool valb;
+	struct mlme_ht_capabilities_info *ht_cap_info;
 	QDF_STATUS status;
-	tSirMacHTCapabilityInfo *pHTCapabilityInfo;
 	tSirMacHTInfoField1 *pHTInfoField1;
 	tSirMacHTParametersInfo *pAmpduParamInfo;
 
@@ -285,30 +287,19 @@
 
 	pMac->lim.gLimAssocStaLimit = val1;
 	pMac->lim.gLimIbssStaLimit = val1;
-	if (wlan_cfg_get_int(pMac, WNI_CFG_HT_CAP_INFO, &val1) != QDF_STATUS_SUCCESS) {
-		pe_err("could not retrieve HT Cap CFG");
-		return QDF_STATUS_E_FAILURE;
-	}
+	ht_cap_info = &pMac->mlme_cfg->ht_caps.ht_cap_info;
 
 	if (wlan_cfg_get_int(pMac, WNI_CFG_CHANNEL_BONDING_MODE, &val2) !=
 	    QDF_STATUS_SUCCESS) {
 		pe_err("could not retrieve Channel Bonding CFG");
 		return QDF_STATUS_E_FAILURE;
 	}
-	val16 = (uint16_t) val1;
-	pHTCapabilityInfo = (tSirMacHTCapabilityInfo *) &val16;
 
 	/* channel bonding mode could be set to anything from 0 to 4(Titan had these */
 	/* modes But for Taurus we have only two modes: enable(>0) or disable(=0) */
-	pHTCapabilityInfo->supportedChannelWidthSet = val2 ?
-						      WNI_CFG_CHANNEL_BONDING_MODE_ENABLE :
-						      WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
-	if (cfg_set_int
-		    (pMac, WNI_CFG_HT_CAP_INFO, *(uint16_t *) pHTCapabilityInfo)
-	    != QDF_STATUS_SUCCESS) {
-		pe_err("could not update HT Cap Info CFG");
-		return QDF_STATUS_E_FAILURE;
-	}
+	ht_cap_info->supportedChannelWidthSet = val2 ?
+				      WNI_CFG_CHANNEL_BONDING_MODE_ENABLE :
+				      WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
 
 	if (wlan_cfg_get_int(pMac, WNI_CFG_HT_INFO_FIELD1, &val1) != QDF_STATUS_SUCCESS) {
 		pe_err("could not retrieve HT INFO Field1 CFG");
@@ -318,7 +309,7 @@
 	val8 = (uint8_t) val1;
 	pHTInfoField1 = (tSirMacHTInfoField1 *) &val8;
 	pHTInfoField1->recommendedTxWidthSet =
-		(uint8_t) pHTCapabilityInfo->supportedChannelWidthSet;
+				ht_cap_info->supportedChannelWidthSet;
 	if (cfg_set_int(pMac, WNI_CFG_HT_INFO_FIELD1, *(uint8_t *) pHTInfoField1)
 	    != QDF_STATUS_SUCCESS) {
 		pe_err("could not update HT Info Field");
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index 311c77b..52826db 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -59,7 +59,7 @@
 #include "lim_security_utils.h"
 #include "cds_ieee80211_common.h"
 #include <wlan_scan_ucfg_api.h>
-
+#include "wlan_mlme_public_struct.h"
 
 void lim_log_session_states(tpAniSirGlobal pMac);
 static void lim_process_normal_hdd_msg(tpAniSirGlobal mac_ctx,
@@ -2232,7 +2232,7 @@
 handle_ht_capabilityand_ht_info(struct sAniSirGlobal *pMac,
 				tpPESession psessionEntry)
 {
-	tSirMacHTCapabilityInfo macHTCapabilityInfo;
+	struct mlme_ht_capabilities_info *ht_cap_info;
 	tSirMacHTParametersInfo macHTParametersInfo;
 	tSirMacHTInfoField1 macHTInfoField1;
 	tSirMacHTInfoField2 macHTInfoField2;
@@ -2240,25 +2240,19 @@
 	uint32_t cfgValue;
 	uint8_t *ptr;
 
-	if (wlan_cfg_get_int(pMac, WNI_CFG_HT_CAP_INFO, &cfgValue) !=
-	    QDF_STATUS_SUCCESS) {
-		pe_err("Fail to retrieve WNI_CFG_HT_CAP_INFO value");
-		return;
-	}
-	ptr = (uint8_t *) &macHTCapabilityInfo;
-	*((uint16_t *) ptr) = (uint16_t) (cfgValue & 0xffff);
+	ht_cap_info = &pMac->mlme_cfg->ht_caps.ht_cap_info;
 	pMac->lim.gHTLsigTXOPProtection =
-		(uint8_t) macHTCapabilityInfo.lsigTXOPProtection;
+		(uint8_t)ht_cap_info->lsigTXOPProtection;
 	pMac->lim.gHTMIMOPSState =
-		(tSirMacHTMIMOPowerSaveState) macHTCapabilityInfo.mimoPowerSave;
-	pMac->lim.gHTGreenfield = (uint8_t) macHTCapabilityInfo.greenField;
+		(tSirMacHTMIMOPowerSaveState) ht_cap_info->mimoPowerSave;
+	pMac->lim.gHTGreenfield = (uint8_t)ht_cap_info->greenField;
 	pMac->lim.gHTMaxAmsduLength =
-		(uint8_t) macHTCapabilityInfo.maximalAMSDUsize;
-	pMac->lim.gHTShortGI20Mhz = (uint8_t) macHTCapabilityInfo.shortGI20MHz;
-	pMac->lim.gHTShortGI40Mhz = (uint8_t) macHTCapabilityInfo.shortGI40MHz;
-	pMac->lim.gHTPSMPSupport = (uint8_t) macHTCapabilityInfo.psmp;
+		(uint8_t)ht_cap_info->maximalAMSDUsize;
+	pMac->lim.gHTShortGI20Mhz = (uint8_t)ht_cap_info->shortGI20MHz;
+	pMac->lim.gHTShortGI40Mhz = (uint8_t)ht_cap_info->shortGI40MHz;
+	pMac->lim.gHTPSMPSupport = (uint8_t)ht_cap_info->psmp;
 	pMac->lim.gHTDsssCckRate40MHzSupport =
-		(uint8_t) macHTCapabilityInfo.dsssCckMode40MHz;
+		(uint8_t)ht_cap_info->dsssCckMode40MHz;
 
 	if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &cfgValue) !=
 	    QDF_STATUS_SUCCESS) {
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index 1019bdf..ef96bbd 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -71,6 +71,7 @@
 #include "cds_utils.h"
 #include "wlan_reg_services_api.h"
 #include "wlan_tdls_tgt_api.h"
+#include "wlan_mlme_public_struct.h"
 
 /* define NO_PAD_TDLS_MIN_8023_SIZE to NOT padding: See CR#447630
    There was IOT issue with cisco 1252 open mode, where it pads
@@ -2035,7 +2036,7 @@
 	tSirMacHTParametersInfo *pHTParametersInfo;
 	union {
 		uint16_t nCfgValue16;
-		tSirMacHTCapabilityInfo htCapInfo;
+		struct mlme_ht_capabilities_info htCapInfo;
 		tSirMacExtendedHTCapabilityInfo extHtCapInfo;
 	} uHTCapabilityInfo;
 
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index ffe0f92..947193b 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -52,6 +52,7 @@
 #include "wma.h"
 #include "wlan_reg_services_api.h"
 #include "wlan_policy_mgr_api.h"
+#include "wlan_mlme_public_struct.h"
 #ifdef WLAN_FEATURE_11AX_BSS_COLOR
 #include "wma_he.h"
 #endif
@@ -2731,7 +2732,7 @@
 	uint8_t retVal = 0;
 	uint8_t *ptr;
 	uint32_t cfgValue;
-	tSirMacHTCapabilityInfo macHTCapabilityInfo = { 0 };
+	struct mlme_ht_capabilities_info ht_cap_info = { 0 };
 	tSirMacExtendedHTCapabilityInfo macExtHTCapabilityInfo = { 0 };
 	tSirMacTxBFCapabilityInfo macTxBFCapabilityInfo = { 0 };
 	tSirMacASCapabilityInfo macASCapabilityInfo = { 0 };
@@ -2771,12 +2772,10 @@
 			} else {
 				if (htCap < eHT_MAX_RX_AMPDU_FACTOR) {
 					/* Get HT Capabilities */
-					if (QDF_STATUS_SUCCESS !=
-					    wlan_cfg_get_int(pMac,
-							     WNI_CFG_HT_CAP_INFO,
-							     &cfgValue))
-						cfgValue = 0;
-					ptr = (uint8_t *) &macHTCapabilityInfo;
+					cfgValue = *(uint32_t *)
+						&pMac->mlme_cfg->ht_caps.
+						ht_cap_info;
+					ptr = (uint8_t *)&ht_cap_info;
 					/* CR 265282 MDM SoftAP 2.4PL: SoftAP boot up crash in 2.4 PL builds while same WLAN SU is working on 2.1 PL */
 					*ptr++ = cfgValue & 0xff;
 					*ptr = (cfgValue >> 8) & 0xff;
@@ -2791,7 +2790,7 @@
 		break;
 
 	case eHT_STBC_CONTROL_FRAME:
-		retVal = (uint8_t) macHTCapabilityInfo.stbcControlFrame;
+		retVal = (uint8_t)ht_cap_info.stbcControlFrame;
 		break;
 
 	case eHT_PSMP:
@@ -2803,7 +2802,7 @@
 		break;
 
 	case eHT_MAX_AMSDU_LENGTH:
-		retVal = (uint8_t) macHTCapabilityInfo.maximalAMSDUsize;
+		retVal = (uint8_t)ht_cap_info.maximalAMSDUsize;
 		break;
 
 	case eHT_MAX_AMSDU_NUM:
@@ -2820,16 +2819,16 @@
 
 	case eHT_SHORT_GI_40MHZ:
 		retVal = (uint8_t) (psessionEntry->htConfig.ht_sgi40) ?
-			 macHTCapabilityInfo.shortGI40MHz : 0;
+			 ht_cap_info.shortGI40MHz : 0;
 		break;
 
 	case eHT_SHORT_GI_20MHZ:
 		retVal = (uint8_t) (psessionEntry->htConfig.ht_sgi20) ?
-			 macHTCapabilityInfo.shortGI20MHz : 0;
+			 ht_cap_info.shortGI20MHz : 0;
 		break;
 
 	case eHT_GREENFIELD:
-		retVal = (uint8_t) macHTCapabilityInfo.greenField;
+		retVal = (uint8_t)ht_cap_info.greenField;
 		break;
 
 	case eHT_MIMO_POWER_SAVE:
diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
index 884bea7..e41bb26 100644
--- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
+++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
@@ -34,6 +34,7 @@
 #include "sir_types.h"
 #include "sys_entry_func.h"
 #include "mac_init_api.h"
+#include "wlan_mlme_main.h"
 
 #ifdef TRACE_RECORD
 #include "mac_trace.h"
@@ -112,6 +113,7 @@
 {
 	tpAniSirGlobal p_mac;
 	QDF_STATUS status;
+	struct wlan_mlme_psoc_obj *mlme_obj;
 
 	if (pHalHandle == NULL)
 		return QDF_STATUS_E_FAILURE;
@@ -139,6 +141,13 @@
 	}
 
 	p_mac->psoc = psoc;
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		pe_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+	p_mac->mlme_cfg = &mlme_obj->cfg;
+
 	*pHalHandle = (tHalHandle) p_mac;
 
 	{
@@ -199,6 +208,7 @@
 		pMac->pdev = NULL;
 	}
 	wlan_objmgr_psoc_release_ref(pMac->psoc, WLAN_LEGACY_MAC_ID);
+	pMac->mlme_cfg = NULL;
 	pMac->psoc = NULL;
 	mac_free_context_buffer();
 
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 20a9217..be35efe 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -43,7 +43,7 @@
 #include "lim_process_fils.h"
 #include "wlan_utility.h"
 #include "wifi_pos_api.h"
-
+#include "wlan_mlme_public_struct.h"
 
 #define RSN_OUI_SIZE 4
 /* ////////////////////////////////////////////////////////////////////// */
@@ -607,42 +607,33 @@
 	uint8_t disable_high_ht_mcs_2x2 = 0;
 	union {
 		uint16_t nCfgValue16;
-		tSirMacHTCapabilityInfo htCapInfo;
 		tSirMacExtendedHTCapabilityInfo extHtCapInfo;
 	} uHTCapabilityInfo;
 
 	tSirMacTxBFCapabilityInfo *pTxBFCapabilityInfo;
 	tSirMacASCapabilityInfo *pASCapabilityInfo;
+	struct mlme_ht_capabilities_info *ht_cap_info;
 
-	CFG_GET_INT(nSirStatus, pMac, WNI_CFG_HT_CAP_INFO, nCfgValue);
+	ht_cap_info = &pMac->mlme_cfg->ht_caps.ht_cap_info;
 
-	uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
-
-	pDot11f->mimoPowerSave = uHTCapabilityInfo.htCapInfo.mimoPowerSave;
-	pDot11f->greenField = uHTCapabilityInfo.htCapInfo.greenField;
-	pDot11f->delayedBA = uHTCapabilityInfo.htCapInfo.delayedBA;
-	pDot11f->maximalAMSDUsize =
-		uHTCapabilityInfo.htCapInfo.maximalAMSDUsize;
-	pDot11f->dsssCckMode40MHz =
-		uHTCapabilityInfo.htCapInfo.dsssCckMode40MHz;
-	pDot11f->psmp = uHTCapabilityInfo.htCapInfo.psmp;
-	pDot11f->stbcControlFrame =
-		uHTCapabilityInfo.htCapInfo.stbcControlFrame;
-	pDot11f->lsigTXOPProtection =
-		uHTCapabilityInfo.htCapInfo.lsigTXOPProtection;
+	pDot11f->mimoPowerSave = ht_cap_info->mimoPowerSave;
+	pDot11f->greenField = ht_cap_info->greenField;
+	pDot11f->delayedBA = ht_cap_info->delayedBA;
+	pDot11f->maximalAMSDUsize = ht_cap_info->maximalAMSDUsize;
+	pDot11f->dsssCckMode40MHz = ht_cap_info->dsssCckMode40MHz;
+	pDot11f->psmp = ht_cap_info->psmp;
+	pDot11f->stbcControlFrame = ht_cap_info->stbcControlFrame;
+	pDot11f->lsigTXOPProtection = ht_cap_info->lsigTXOPProtection;
 
 	/* All sessionized entries will need the check below */
 	if (psessionEntry == NULL) {     /* Only in case of NO session */
 		pDot11f->supportedChannelWidthSet =
-			uHTCapabilityInfo.htCapInfo.supportedChannelWidthSet;
-		pDot11f->advCodingCap =
-			uHTCapabilityInfo.htCapInfo.advCodingCap;
-		pDot11f->txSTBC = uHTCapabilityInfo.htCapInfo.txSTBC;
-		pDot11f->rxSTBC = uHTCapabilityInfo.htCapInfo.rxSTBC;
-		pDot11f->shortGI20MHz =
-			uHTCapabilityInfo.htCapInfo.shortGI20MHz;
-		pDot11f->shortGI40MHz =
-			uHTCapabilityInfo.htCapInfo.shortGI40MHz;
+			ht_cap_info->supportedChannelWidthSet;
+		pDot11f->advCodingCap = ht_cap_info->advCodingCap;
+		pDot11f->txSTBC = ht_cap_info->txSTBC;
+		pDot11f->rxSTBC = ht_cap_info->rxSTBC;
+		pDot11f->shortGI20MHz = ht_cap_info->shortGI20MHz;
+		pDot11f->shortGI40MHz = ht_cap_info->shortGI40MHz;
 	} else {
 		pDot11f->advCodingCap = psessionEntry->htConfig.ht_rx_ldpc;
 		pDot11f->supportedChannelWidthSet =
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 36368ba..35de71c 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -57,6 +57,7 @@
 #include "net/cfg80211.h"
 #include <qca_vendor.h>
 #include <wlan_spectral_utils_api.h>
+#include "wlan_mlme_public_struct.h"
 
 static tSelfRecoveryStats g_self_recovery_stats;
 
@@ -12626,11 +12627,8 @@
 {
 	QDF_STATUS status;
 	tpAniSirGlobal mac_ctx = PMAC_STRUCT(h_hal);
-	uint32_t i, value = 0;
-	union {
-		uint16_t cfg_value16;
-		tSirMacHTCapabilityInfo ht_cap_info;
-	} uHTCapabilityInfo;
+	uint32_t i;
+	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct csr_roam_session *csr_session;
 
 	status = sme_acquire_global_lock(&mac_ctx->sme);
@@ -12639,14 +12637,13 @@
 		mac_ctx->roam.configParam.enable2x2 = (nss == 1) ? 0 : 1;
 
 		/* get the HT capability info*/
-		sme_cfg_get_int(h_hal, WNI_CFG_HT_CAP_INFO, &value);
-		uHTCapabilityInfo.cfg_value16 = (0xFFFF & value);
+		ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info;
 
 		for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
 			if (CSR_IS_SESSION_VALID(mac_ctx, i)) {
 				csr_session = &mac_ctx->roam.roamSession[i];
 				csr_session->htConfig.ht_tx_stbc =
-					uHTCapabilityInfo.ht_cap_info.txSTBC;
+					ht_cap_info->txSTBC;
 			}
 		}
 
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 28e4197..2d5c9a6 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -55,6 +55,7 @@
 #include <wlan_action_oui_public_struct.h>
 #include <wlan_action_oui_ucfg_api.h>
 #include <wlan_utility.h>
+#include "wlan_mlme_public_struct.h"
 
 #define MAX_PWR_FCC_CHAN_12 8
 #define MAX_PWR_FCC_CHAN_13 2
@@ -17379,10 +17380,7 @@
 {
 	QDF_STATUS status;
 	uint32_t existing_session_id;
-	union {
-		uint16_t nCfgValue16;
-		tSirMacHTCapabilityInfo htCapInfo;
-	} uHTCapabilityInfo;
+	struct mlme_ht_capabilities_info *ht_cap_info;
 	uint32_t nCfgValue;
 	struct csr_roam_session *session;
 
@@ -17443,19 +17441,12 @@
 		return status;
 	}
 
-	/* get the HT capability info */
-	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_HT_CAP_INFO, &nCfgValue) !=
-	    QDF_STATUS_SUCCESS) {
-		sme_err("could not get HT capability info");
-		return QDF_STATUS_SUCCESS;
-	}
-
-	uHTCapabilityInfo.nCfgValue16 = 0xFFFF & nCfgValue;
-	session->htConfig.ht_rx_ldpc = uHTCapabilityInfo.htCapInfo.advCodingCap;
-	session->htConfig.ht_tx_stbc = uHTCapabilityInfo.htCapInfo.txSTBC;
-	session->htConfig.ht_rx_stbc = uHTCapabilityInfo.htCapInfo.rxSTBC;
-	session->htConfig.ht_sgi20 = uHTCapabilityInfo.htCapInfo.shortGI20MHz;
-	session->htConfig.ht_sgi40 = uHTCapabilityInfo.htCapInfo.shortGI40MHz;
+	ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info;
+	session->htConfig.ht_rx_ldpc = ht_cap_info->advCodingCap;
+	session->htConfig.ht_tx_stbc = ht_cap_info->txSTBC;
+	session->htConfig.ht_rx_stbc = ht_cap_info->rxSTBC;
+	session->htConfig.ht_sgi20 = ht_cap_info->shortGI20MHz;
+	session->htConfig.ht_sgi40 = ht_cap_info->shortGI40MHz;
 
 #ifdef FEATURE_WLAN_BTAMP_UT_RF
 	status = qdf_mc_timer_init(&session->hTimerJoinRetry, QDF_TIMER_TYPE_SW,
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 4ca21cb..41fda58 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -74,6 +74,7 @@
 #include "wlan_ocb_ucfg_api.h"
 #include "init_deinit_lmac.h"
 #include <target_if.h>
+#include "wlan_mlme_public_struct.h"
 
 /**
  * wma_find_vdev_by_addr() - find vdev_id from mac address
@@ -2191,9 +2192,8 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct sAniSirGlobal *mac = cds_get_context(QDF_MODULE_ID_PE);
 	uint32_t cfg_val;
-	uint16_t val16;
 	QDF_STATUS ret;
-	tSirMacHTCapabilityInfo *phtCapInfo;
+	struct mlme_ht_capabilities_info *ht_cap_info;
 	struct scheduler_msg sme_msg = { 0 };
 	struct vdev_create_params params = { 0 };
 	u_int8_t vdev_id;
@@ -2436,20 +2436,14 @@
 		WMA_LOGE("Failed to get value for WNI_CFG_FRAGMENTATION_THRESHOLD, leaving unchanged");
 	}
 
-	if (wlan_cfg_get_int(mac, WNI_CFG_HT_CAP_INFO, &cfg_val) ==
-	    QDF_STATUS_SUCCESS) {
-		val16 = (uint16_t) cfg_val;
-		phtCapInfo = (tSirMacHTCapabilityInfo *) &cfg_val;
+	ht_cap_info = &mac->mlme_cfg->ht_caps.ht_cap_info;
 
-		ret = wma_vdev_set_param(wma_handle->wmi_handle,
-						      self_sta_req->session_id,
-						      WMI_VDEV_PARAM_TX_STBC,
-						      phtCapInfo->txSTBC);
-		if (QDF_IS_STATUS_ERROR(ret))
-			WMA_LOGE("Failed to set WMI_VDEV_PARAM_TX_STBC");
-	} else {
-		WMA_LOGE("Failed to get value of HT_CAP, TX STBC unchanged");
-	}
+	ret = wma_vdev_set_param(wma_handle->wmi_handle,
+				 self_sta_req->session_id,
+				 WMI_VDEV_PARAM_TX_STBC,
+				 ht_cap_info->txSTBC);
+	if (QDF_IS_STATUS_ERROR(ret))
+		WMA_LOGE("Failed to set WMI_VDEV_PARAM_TX_STBC");
 
 	wma_set_vdev_mgmt_rate(wma_handle, self_sta_req->session_id);
 
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index f4d7ca7..cdb4fdc 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -60,6 +60,7 @@
 #include "wlan_tgt_def_config.h"
 #include "wlan_reg_services_api.h"
 #include "wlan_roam_debug.h"
+#include "wlan_mlme_public_struct.h"
 
 /* This is temporary, should be removed */
 #include "ol_htt_api.h"
@@ -2653,7 +2654,7 @@
 	tSirMacQosInfoStation macQosInfoSta;
 	union {
 		uint16_t nCfgValue16;
-		tSirMacHTCapabilityInfo htCapInfo;
+		struct mlme_ht_capabilities_info htCapInfo;
 		tSirMacExtendedHTCapabilityInfo extHtCapInfo;
 	} uHTCapabilityInfo;
 
@@ -2749,12 +2750,7 @@
 	roam_offload_params->capability <<= RSN_CAPS_SHIFT;
 	roam_offload_params->capability |= ((*pCfgValue16) & 0xFFFF);
 
-	if (wlan_cfg_get_int(pMac, WNI_CFG_HT_CAP_INFO, &nCfgValue) !=
-	    QDF_STATUS_SUCCESS) {
-		QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
-			  "Failed to get WNI_CFG_HT_CAP_INFO");
-		return QDF_STATUS_E_FAILURE;
-	}
+	nCfgValue = *(uint32_t *)&pMac->mlme_cfg->ht_caps.ht_cap_info;
 	uHTCapabilityInfo.nCfgValue16 = nCfgValue & 0xFFFF;
 	roam_offload_params->ht_caps_info =
 		uHTCapabilityInfo.nCfgValue16 & 0xFFFF;