Browse Source

qcacld-3.0: Remove legacy CFG macro definitions

Remove the legacy macro definitions that are related to the
mlme cfg.
Move them to wlan_mlme_public_struct.h

Change-Id: I64f474512463d3ba7ac238b2efd0f4cf2e36999b
CRs-Fixed: 2317750
Pragaspathi Thilagaraj 6 years ago
parent
commit
1ee7600f9f

+ 1 - 1
components/mlme/core/src/wlan_mlme_main.c

@@ -201,7 +201,7 @@ static void mlme_init_sap_protection_cfg(struct wlan_objmgr_psoc *psoc,
 				cfg_default(CFG_PROTECTION_ENABLED);
 	sap_protection_params->protection_force_policy =
 				cfg_default(CFG_FORCE_POLICY_PROTECTION);
-	sap_protection_params->ignore_peer_ht_mode =
+	sap_protection_params->ignore_peer_ht_opmode =
 				cfg_get(psoc, CFG_IGNORE_PEER_HT_MODE);
 }
 

+ 41 - 14
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -184,33 +184,60 @@ struct wlan_mlme_rates {
 	uint8_t disable_high_ht_mcs_2x2;
 };
 
+
+/* Flags for gLimProtectionControl that is updated in pe session*/
+#define MLME_FORCE_POLICY_PROTECTION_DISABLE        0
+#define MLME_FORCE_POLICY_PROTECTION_CTS            1
+#define MLME_FORCE_POLICY_PROTECTION_RTS            2
+#define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS       3
+#define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS     4
+#define MLME_FORCE_POLICY_PROTECTION_AUTO           5
+
+/* protection_enabled bits*/
+#define MLME_PROTECTION_ENABLED_FROM_llA            0
+#define MLME_PROTECTION_ENABLED_FROM_llB            1
+#define MLME_PROTECTION_ENABLED_FROM_llG            2
+#define MLME_PROTECTION_ENABLED_HT_20               3
+#define MLME_PROTECTION_ENABLED_NON_GF              4
+#define MLME_PROTECTION_ENABLED_LSIG_TXOP           5
+#define MLME_PROTECTION_ENABLED_RIFS                6
+#define MLME_PROTECTION_ENABLED_OBSS                7
+#define MLME_PROTECTION_ENABLED_OLBC_FROM_llA       8
+#define MLME_PROTECTION_ENABLED_OLBC_FROM_llB       9
+#define MLME_PROTECTION_ENABLED_OLBC_FROM_llG       10
+#define MLME_PROTECTION_ENABLED_OLBC_HT20           11
+#define MLME_PROTECTION_ENABLED_OLBC_NON_GF         12
+#define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP      13
+#define MLME_PROTECTION_ENABLED_OLBC_RIFS           14
+#define MLME_PROTECTION_ENABLED_OLBC_OBSS           15
+
 /*
  * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  *
- * @protection_enabled - Force enable protection. static via cfg
- * @protection_force_policy - Protection force policy. Static via cfg
- * @ignore_peer_ht_mode - ignore the ht opmode of the peer. Dynamic via INI.
+ * @protection_enabled:        Force enable protection. static via cfg
+ * @protection_force_policy:   Protection force policy. Static via cfg
+ * @ignore_peer_ht_opmode:     Ignore the ht opmode of the peer. Dynamic via INI
  *
  */
 struct wlan_mlme_sap_protection {
 	uint32_t protection_enabled;
 	uint8_t protection_force_policy;
-	bool ignore_peer_ht_mode;
+	bool ignore_peer_ht_opmode;
 };
 
 /*
  * struct wlan_mlme_chainmask - All chainmask related cfg items
  *
- * @txchainmask1x1 - to set transmit chainmask
- * @rxchainmask1x1 - to set rx chainmask
- * @tx_chain_mask_cck - Used to enable/disable Cck ChainMask
- * @tx_chain_mask_1ss - Enables/disables tx chain Mask1ss
- * @num_11b_tx_chains - Number of Tx Chains in 11b mode
- * @num_11ag_tx_chains - Number of Tx Chains in 11ag mode
- * @tx_chain_mask_2g - tx chain mask for 2g
- * @rx_chain_mask_2g - rx chain mask for 2g
- * @tx_chain_mask_5g - tx chain mask for 5g
- * @rx_chain_mask_5g - rx chain mask for 5g
+ * @txchainmask1x1:     To set transmit chainmask
+ * @rxchainmask1x1:     To set rx chainmask
+ * @tx_chain_mask_cck:  Used to enable/disable Cck ChainMask
+ * @tx_chain_mask_1ss:  Enables/disables tx chain Mask1ss
+ * @num_11b_tx_chains:  Number of Tx Chains in 11b mode
+ * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
+ * @tx_chain_mask_2g:   Tx chain mask for 2g
+ * @rx_chain_mask_2g:   Tx chain mask for 2g
+ * @tx_chain_mask_5g:   Tx chain mask for 5g
+ * @rx_chain_mask_5g:   Rx chain mask for 5g
  */
 struct wlan_mlme_chainmask {
 	uint8_t txchainmask1x1;

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

@@ -168,24 +168,6 @@ void ucfg_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc,
 	wlan_mlme_get_sap_inactivity_override(psoc, value);
 }
 
-/**
- * ucfg_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht mode flag
- *
- * @psoc: pointer to psoc object
- * @value: Value that needs to be set
- *
- * Inline UCFG API to be used by HDD/OSIF callers to get the
- * ignore_peer_ht_opmode flag value
- *
- * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
- */
-static inline
-QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
-					     bool *value)
-{
-	return wlan_mlme_get_ignore_peer_ht_mode(psoc, value);
-}
-
 /**
  * ucfg_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
  *

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

@@ -72,20 +72,6 @@ void wlan_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc,
 	*val = mlme_obj->cfg.qos_mlme_params.sap_max_inactivity_override;
 }
 
-QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
-					     bool *value)
-{
-	struct wlan_mlme_psoc_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.sap_protection_cfg.ignore_peer_ht_mode;
-	return QDF_STATUS_SUCCESS;
-}
-
 QDF_STATUS wlan_mlme_get_tx_chainmask_cck(struct wlan_objmgr_psoc *psoc,
 					  bool *value)
 {

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

@@ -5994,7 +5994,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSmeConfigParams *smeConfig;
 	uint8_t rrm_capab_len, val;
-	bool ignore_peer_ht_mode;
 	mac_handle_t mac_handle = hdd_ctx->mac_handle;
 
 	struct hdd_config *pConfig = hdd_ctx->config;
@@ -6262,13 +6261,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 		hdd_ctx->config->min_delay_btw_roam_scans;
 	smeConfig->csrConfig.roam_trigger_reason_bitmask =
 		hdd_ctx->config->roam_trigger_reason_bitmask;
-	status = ucfg_mlme_get_ignore_peer_ht_mode(hdd_ctx->psoc,
-						   &ignore_peer_ht_mode);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		hdd_err("Get ignore_peer_ht_mode failed");
-		goto error;
-	}
-	smeConfig->csrConfig.ignore_peer_ht_opmode = ignore_peer_ht_mode;
 	smeConfig->csrConfig.enable_fatal_event =
 			pConfig->enable_fatal_event;
 	smeConfig->csrConfig.scan_adaptive_dwell_mode =
@@ -6372,7 +6364,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		hdd_err("sme_update_config() failure: %d", status);
 
-error:
 	qdf_mem_free(smeConfig);
 	return status;
 }

+ 5 - 8
core/hdd/src/wlan_hdd_cfg80211.c

@@ -65,6 +65,7 @@
 #include "csr_api.h"
 #include "pld_common.h"
 #include "wmi_unified_param.h"
+#include "cfg_ucfg_api.h"
 
 #ifdef WLAN_UMAC_CONVERGENCE
 #include "wlan_cfg80211.h"
@@ -5750,14 +5751,10 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
 		request.vdev_id = adapter->session_id;
 		request.aggr_type = WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU;
 
-		if (request.tx_aggregation_size >=
-					CFG_TX_AGGREGATION_SIZE_MIN &&
-			request.tx_aggregation_size <=
-					CFG_TX_AGGREGATION_SIZE_MAX &&
-			request.rx_aggregation_size >=
-					CFG_RX_AGGREGATION_SIZE_MIN &&
-			request.rx_aggregation_size <=
-					CFG_RX_AGGREGATION_SIZE_MAX) {
+		if (cfg_in_range(CFG_TX_AGGREGATION_SIZE,
+				 request.tx_aggregation_size) &&
+		    cfg_in_range(CFG_RX_AGGREGATION_SIZE,
+				 request.rx_aggregation_size)) {
 			qdf_status = wma_set_tx_rx_aggregation_size(&request);
 			if (qdf_status != QDF_STATUS_SUCCESS) {
 				hdd_err("failed to set aggr sizes err %d",

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

@@ -76,9 +76,6 @@ enum {
 	WNI_CFG_COUNTRY_CODE,
 	WNI_CFG_11H_ENABLED,
 	WNI_CFG_OLBC_DETECT_TIMEOUT,
-	WNI_CFG_PROTECTION_ENABLED,
-	WNI_CFG_11G_PROTECTION_ALWAYS,
-	WNI_CFG_FORCE_POLICY_PROTECTION,
 	WNI_CFG_11G_SHORT_PREAMBLE_ENABLED,
 	WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED,
 	WNI_CFG_11G_ONLY_POLICY,
@@ -637,42 +634,6 @@ enum {
 #define WNI_CFG_OLBC_DETECT_TIMEOUT_STAMAX    30000
 #define WNI_CFG_OLBC_DETECT_TIMEOUT_STADEF    10000
 
-#define WNI_CFG_PROTECTION_ENABLED_STAMIN    0
-#define WNI_CFG_PROTECTION_ENABLED_STAMAX    65535
-#define WNI_CFG_PROTECTION_ENABLED_STADEF    65535
-
-#define WNI_CFG_PROTECTION_ENABLED_FROM_llA    0
-#define WNI_CFG_PROTECTION_ENABLED_FROM_llB    1
-#define WNI_CFG_PROTECTION_ENABLED_FROM_llG    2
-#define WNI_CFG_PROTECTION_ENABLED_HT_20    3
-#define WNI_CFG_PROTECTION_ENABLED_NON_GF    4
-#define WNI_CFG_PROTECTION_ENABLED_LSIG_TXOP    5
-#define WNI_CFG_PROTECTION_ENABLED_RIFS    6
-#define WNI_CFG_PROTECTION_ENABLED_OBSS    7
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_FROM_llA    8
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_FROM_llB    9
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_FROM_llG    10
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_HT20    11
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_NON_GF    12
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_LSIG_TXOP    13
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_RIFS    14
-#define WNI_CFG_PROTECTION_ENABLED_OLBC_OBSS    15
-
-#define WNI_CFG_11G_PROTECTION_ALWAYS_STAMIN    0
-#define WNI_CFG_11G_PROTECTION_ALWAYS_STAMAX    1
-#define WNI_CFG_11G_PROTECTION_ALWAYS_STADEF    0
-
-#define WNI_CFG_FORCE_POLICY_PROTECTION_STAMIN    0
-#define WNI_CFG_FORCE_POLICY_PROTECTION_STAMAX    5
-#define WNI_CFG_FORCE_POLICY_PROTECTION_STADEF    5
-
-#define WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE    0
-#define WNI_CFG_FORCE_POLICY_PROTECTION_CTS    1
-#define WNI_CFG_FORCE_POLICY_PROTECTION_RTS    2
-#define WNI_CFG_FORCE_POLICY_PROTECTION_DUAL_CTS    3
-#define WNI_CFG_FORCE_POLICY_PROTECTION_RTS_ALWAYS    4
-#define WNI_CFG_FORCE_POLICY_PROTECTION_AUTO    5
-
 #define WNI_CFG_11G_SHORT_PREAMBLE_ENABLED_STAMIN    0
 #define WNI_CFG_11G_SHORT_PREAMBLE_ENABLED_STAMAX    1
 #define WNI_CFG_11G_SHORT_PREAMBLE_ENABLED_STADEF    0

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

@@ -91,9 +91,6 @@ const char *cfg_get_string(uint16_t cfg_id)
 	CASE_RETURN_STRING(WNI_CFG_COUNTRY_CODE);
 	CASE_RETURN_STRING(WNI_CFG_11H_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_OLBC_DETECT_TIMEOUT);
-	CASE_RETURN_STRING(WNI_CFG_PROTECTION_ENABLED);
-	CASE_RETURN_STRING(WNI_CFG_11G_PROTECTION_ALWAYS);
-	CASE_RETURN_STRING(WNI_CFG_FORCE_POLICY_PROTECTION);
 	CASE_RETURN_STRING(WNI_CFG_11G_SHORT_PREAMBLE_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED);
 	CASE_RETURN_STRING(WNI_CFG_11G_ONLY_POLICY);

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

@@ -266,24 +266,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
 	WNI_CFG_OLBC_DETECT_TIMEOUT_STAMIN,
 	WNI_CFG_OLBC_DETECT_TIMEOUT_STAMAX,
 	WNI_CFG_OLBC_DETECT_TIMEOUT_STADEF},
-	{WNI_CFG_PROTECTION_ENABLED,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
-	WNI_CFG_PROTECTION_ENABLED_STAMIN,
-	WNI_CFG_PROTECTION_ENABLED_STAMAX,
-	WNI_CFG_PROTECTION_ENABLED_STADEF},
-	{WNI_CFG_11G_PROTECTION_ALWAYS,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_RESTART,
-	WNI_CFG_11G_PROTECTION_ALWAYS_STAMIN,
-	WNI_CFG_11G_PROTECTION_ALWAYS_STAMAX,
-	WNI_CFG_11G_PROTECTION_ALWAYS_STADEF},
-	{WNI_CFG_FORCE_POLICY_PROTECTION,
-	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
-	CFG_CTL_RESTART,
-	WNI_CFG_FORCE_POLICY_PROTECTION_STAMIN,
-	WNI_CFG_FORCE_POLICY_PROTECTION_STAMAX,
-	WNI_CFG_FORCE_POLICY_PROTECTION_STADEF},
 	{WNI_CFG_11G_SHORT_PREAMBLE_ENABLED,
 	CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
 	CFG_CTL_RESTART,

+ 2 - 2
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3086,7 +3086,7 @@ lim_delete_dph_hash_entry(tpAniSirGlobal mac_ctx, tSirMacAddr sta_addr,
 	if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry)) {
 		if (LIM_IS_AP_ROLE(session_entry)) {
 			if (session_entry->gLimProtectionControl !=
-				WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+				MLME_FORCE_POLICY_PROTECTION_DISABLE)
 				lim_decide_ap_protection_on_delete(mac_ctx,
 					sta_ds, &beacon_params, session_entry);
 		}
@@ -4175,7 +4175,7 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(tpAniSirGlobal pMac, uint8_t updateEnt
 			pBeaconStruct);
 
 	if (pMac->lim.gLimProtectionControl !=
-	    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+	    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 		lim_decide_sta_protection_on_assoc(pMac, pBeaconStruct,
 						   psessionEntry);
 	qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,

+ 1 - 1
core/mac/src/pe/lim/lim_ft.c

@@ -151,7 +151,7 @@ void lim_ft_prepare_add_bss_req(tpAniSirGlobal pMac,
 			pBeaconStruct);
 
 	if (pMac->lim.gLimProtectionControl !=
-	    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+	    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 		lim_decide_sta_protection_on_assoc(pMac, pBeaconStruct,
 						   pftSessionEntry);
 

+ 2 - 2
core/mac/src/pe/lim/lim_ibss_peer_mgmt.c

@@ -960,7 +960,7 @@ lim_ibss_sta_add(tpAniSirGlobal pMac, void *pBody, tpPESession psessionEntry)
 						      dphHashTable);
 			} else {
 				if (pMac->lim.gLimProtectionControl !=
-				    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+				    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 					lim_ibss_decide_protection(pMac, pStaDs,
 								   &beaconParams,
 								   psessionEntry);
@@ -1507,7 +1507,7 @@ lim_ibss_coalesce(tpAniSirGlobal pMac,
 			dph_lookup_hash_entry(pMac, pPeerNode->peerMacAddr, &peerIdx,
 					      &psessionEntry->dph.dphHashTable);
 		if (pMac->lim.gLimProtectionControl !=
-		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+		    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 			lim_ibss_decide_protection(pMac, pStaDs, &beaconParams,
 						   psessionEntry);
 

+ 2 - 2
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -1033,9 +1033,9 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx,
 		sta_ds->parsed_ies.vht_operation = beacon->VHTOperation;
 
 	if (mac_ctx->lim.gLimProtectionControl !=
-		WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+	    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 		lim_decide_sta_protection_on_assoc(mac_ctx, beacon,
-			session_entry);
+						   session_entry);
 
 	if (beacon->erpPresent) {
 		if (beacon->erpIEInfo.barkerPreambleMode)

+ 10 - 20
core/mac/src/pe/lim/lim_process_cfg_updates.c

@@ -39,12 +39,6 @@
 
 static void lim_update_config(tpAniSirGlobal pMac, tpPESession psessionEntry);
 
-/** -------------------------------------------------------------
-   \fn lim_set_cfg_protection
-   \brief sets lim global cfg cache from the config.
-   \param      tpAniSirGlobal    pMac
-   \return      None
-   -------------------------------------------------------------*/
 void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
 {
 	uint32_t val = 0;
@@ -52,7 +46,7 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
 
 	if (pesessionEntry != NULL && LIM_IS_AP_ROLE(pesessionEntry)) {
 		if (pesessionEntry->gLimProtectionControl ==
-		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+		    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 			qdf_mem_set((void *)&pesessionEntry->cfgProtection,
 				    sizeof(tCfgProtection), 0);
 		else {
@@ -74,28 +68,28 @@ void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
 
 
 		if (pMac->lim.gLimProtectionControl ==
-		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+		    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 			qdf_mem_set((void *)&pMac->lim.cfgProtection,
 				    sizeof(tCfgProtection), 0);
 		else {
 			val = mlme_cfg->sap_protection_cfg.protection_enabled;
 
 			pMac->lim.cfgProtection.fromlla =
-				(val >> WNI_CFG_PROTECTION_ENABLED_FROM_llA) & 1;
+				(val >> MLME_PROTECTION_ENABLED_FROM_llA) & 1;
 			pMac->lim.cfgProtection.fromllb =
-				(val >> WNI_CFG_PROTECTION_ENABLED_FROM_llB) & 1;
+				(val >> MLME_PROTECTION_ENABLED_FROM_llB) & 1;
 			pMac->lim.cfgProtection.fromllg =
-				(val >> WNI_CFG_PROTECTION_ENABLED_FROM_llG) & 1;
+				(val >> MLME_PROTECTION_ENABLED_FROM_llG) & 1;
 			pMac->lim.cfgProtection.ht20 =
-				(val >> WNI_CFG_PROTECTION_ENABLED_HT_20) & 1;
+				(val >> MLME_PROTECTION_ENABLED_HT_20) & 1;
 			pMac->lim.cfgProtection.nonGf =
-				(val >> WNI_CFG_PROTECTION_ENABLED_NON_GF) & 1;
+				(val >> MLME_PROTECTION_ENABLED_NON_GF) & 1;
 			pMac->lim.cfgProtection.lsigTxop =
-				(val >> WNI_CFG_PROTECTION_ENABLED_LSIG_TXOP) & 1;
+				(val >> MLME_PROTECTION_ENABLED_LSIG_TXOP) & 1;
 			pMac->lim.cfgProtection.rifs =
-				(val >> WNI_CFG_PROTECTION_ENABLED_RIFS) & 1;
+				(val >> MLME_PROTECTION_ENABLED_RIFS) & 1;
 			pMac->lim.cfgProtection.obss =
-				(val >> WNI_CFG_PROTECTION_ENABLED_OBSS) & 1;
+				(val >> MLME_PROTECTION_ENABLED_OBSS) & 1;
 
 		}
 	}
@@ -183,10 +177,6 @@ void lim_handle_cf_gparam_update(tpAniSirGlobal pMac, uint32_t cfgId)
 
 		break;
 
-	case WNI_CFG_PROTECTION_ENABLED:
-		lim_set_cfg_protection(pMac, NULL);
-		break;
-
 	case WNI_CFG_MPDU_DENSITY:
 		if (wlan_cfg_get_int(pMac, WNI_CFG_HT_AMPDU_PARAMS, &val1) !=
 		    QDF_STATUS_SUCCESS) {

+ 2 - 2
core/mac/src/pe/lim/lim_reassoc_utils.c

@@ -176,7 +176,7 @@ void lim_handle_del_bss_in_re_assoc_context(tpAniSirGlobal pMac,
 			lim_get_ielen_from_bss_description(bss_desc),
 			beacon_struct);
 		if (pMac->lim.gLimProtectionControl !=
-		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+		    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 			lim_decide_sta_protection_on_assoc(pMac,
 				beacon_struct,
 				psessionEntry);
@@ -300,7 +300,7 @@ void lim_handle_add_bss_in_re_assoc_context(tpAniSirGlobal pMac,
 						    bssDescription),
 					    pBeaconStruct);
 		if (pMac->lim.gLimProtectionControl !=
-		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+		    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 			lim_decide_sta_protection_on_assoc(pMac,
 							   pBeaconStruct,
 							   psessionEntry);

+ 4 - 4
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1282,10 +1282,10 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
 	qdf_mem_set((uint8_t *) &beacon_params, sizeof(beacon_params), 0);
 
 	if (LIM_IS_AP_ROLE(pe_session) &&
-		(pe_session->gLimProtectionControl !=
-		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE))
-			lim_decide_ap_protection(mac_ctx, peer_addr,
-				&beacon_params, pe_session);
+	    (pe_session->gLimProtectionControl !=
+	     MLME_FORCE_POLICY_PROTECTION_DISABLE))
+		lim_decide_ap_protection(mac_ctx, peer_addr, &beacon_params,
+					 pe_session);
 
 	lim_update_short_preamble(mac_ctx, peer_addr, &beacon_params,
 		pe_session);

+ 7 - 0
core/mac/src/pe/lim/lim_types.h

@@ -436,6 +436,13 @@ void lim_handle_param_update(tpAniSirGlobal pMac, eUpdateIEsType cfgId);
 /* Function to apply CFG parameters before join/reassoc/start BSS */
 void lim_apply_configuration(tpAniSirGlobal, tpPESession);
 
+/**
+ * lim_set_cfg_protection() - sets lim global cfg cache from the config
+ * @pMac: global mac context
+ * @pesessionEntry: PE session
+ *
+ * Return none
+ */
 void lim_set_cfg_protection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
 
 /* Function to Initialize MLM state machine on STA */

+ 6 - 6
core/mac/src/pe/sch/sch_beacon_process.c

@@ -192,7 +192,7 @@ ap_beacon_process_24_ghz(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 	 * already been set to legacy in the previous blocks.
 	 */
 	if ((eSIR_HT_OP_MODE_OVERLAP_LEGACY == bcn_struct->HTInfo.opMode) &&
-		!mac_ctx->roam.configParam.ignore_peer_ht_opmode) {
+		!mac_ctx->mlme_cfg->sap_protection_cfg.ignore_peer_ht_opmode) {
 		if (eSIR_HT_OP_MODE_OVERLAP_LEGACY == mac_ctx->lim.gHTOperMode
 		    || eSIR_HT_OP_MODE_MIXED == mac_ctx->lim.gHTOperMode)
 			return;
@@ -420,7 +420,7 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx,
 	}
 
 	if (mac_ctx->lim.gLimProtectionControl !=
-			WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+	    MLME_FORCE_POLICY_PROTECTION_DISABLE)
 		lim_decide_sta_protection(mac_ctx, bcn, beaconParams, session);
 
 	if (bcn->erpPresent) {
@@ -1052,7 +1052,7 @@ void sch_beacon_process_for_ap(tpAniSirGlobal mac_ctx,
 					bcn, &bcn_prm);
 
 	if ((ap_session->gLimProtectionControl !=
-	     WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) &&
+	     MLME_FORCE_POLICY_PROTECTION_DISABLE) &&
 	    !ap_session->is_session_obss_offload_enabled)
 		ap_beacon_process(mac_ctx, rx_pkt_info,
 					bcn, &bcn_prm, ap_session);
@@ -1215,7 +1215,7 @@ void lim_enable_obss_detection_config(tpAniSirGlobal mac_ctx,
 	}
 
 	if (session->gLimProtectionControl ==
-	    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) {
+	    MLME_FORCE_POLICY_PROTECTION_DISABLE) {
 		pe_err("protectiond disabled, force policy, session %d",
 		       session->smeSessionId);
 		return;
@@ -1347,7 +1347,7 @@ QDF_STATUS lim_obss_generate_detection_config(tpAniSirGlobal mac_ctx,
 			cfg->obss_11b_sta_detect_mode =
 				OBSS_OFFLOAD_DETECTION_DISABLED;
 
-		if (mac_ctx->roam.configParam.ignore_peer_ht_opmode)
+		if (mac_ctx->mlme_cfg->sap_protection_cfg.ignore_peer_ht_opmode)
 			cfg->obss_ht_legacy_detect_mode =
 				OBSS_OFFLOAD_DETECTION_DISABLED;
 	}
@@ -1416,7 +1416,7 @@ QDF_STATUS lim_obss_send_detection_cfg(tpAniSirGlobal mac_ctx,
 	}
 
 	if (session->gLimProtectionControl ==
-	    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE) {
+	    MLME_FORCE_POLICY_PROTECTION_DISABLE) {
 		pe_debug("protectiond disabled, force from policy, session %d",
 		       session->smeSessionId);
 		/* Send success */

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

@@ -1205,7 +1205,6 @@ typedef struct tagCsrConfigParam {
 	int8_t roam_bg_scan_bad_rssi_thresh;
 	uint8_t roam_bad_rssi_thresh_offset_2g;
 	uint32_t roam_bg_scan_client_bitmap;
-	bool ignore_peer_ht_opmode;
 	bool enable_edca_params;
 	uint32_t edca_vo_cwmin;
 	uint32_t edca_vi_cwmin;

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

@@ -528,7 +528,6 @@ struct csr_config {
 	uint8_t conc_custom_rule2;
 	uint8_t is_sta_connection_in_5gz_enabled;
 	struct roam_ext_params roam_params;
-	bool ignore_peer_ht_opmode;
 	bool enable_edca_params;
 	uint32_t edca_vo_cwmin;
 	uint32_t edca_vi_cwmin;

+ 0 - 4
core/sme/src/csr/csr_api_roam.c

@@ -3089,8 +3089,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 			pParam->is_ps_enabled;
 		pMac->sme.ps_global_info.auto_bmps_timer_val =
 			pParam->auto_bmps_timer_val;
-		pMac->roam.configParam.ignore_peer_ht_opmode =
-			pParam->ignore_peer_ht_opmode;
 		pMac->dual_mac_feature_disable =
 			pParam->dual_mac_feature_disable;
 		pMac->sta_sap_scc_on_dfs_chan =
@@ -3341,8 +3339,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
 	pParam->fEnableDebugLog = pMac->fEnableDebugLog;
 	pParam->f_sta_miracast_mcc_rest_time_val =
 		pMac->f_sta_miracast_mcc_rest_time_val;
-	pParam->ignore_peer_ht_opmode =
-		pMac->roam.configParam.ignore_peer_ht_opmode;
 	pParam->enableHtSmps = pMac->roam.configParam.enableHtSmps;
 	pParam->htSmps = pMac->roam.configParam.htSmps;
 	pParam->send_smps_action = pMac->roam.configParam.send_smps_action;