qcacld-3.0: Remove obsolete SoftAP VSTA feature code

The SoftAP VSTA feature was introduced to overcome a limitation in a
prior version of WLAN hardware. Since the WLAN hardware supported by
this driver does not have this limitation, remove the feature code.

Change-Id: I1f2fe31b294fb7b2da1fa8619b3380412c5d872e
CRs-Fixed: 2224817
diff --git a/Kbuild b/Kbuild
index cf445c5..507ff0e 100644
--- a/Kbuild
+++ b/Kbuild
@@ -498,7 +498,6 @@
 CONFIG_FEATURE_WLAN_SCAN_PNO := y
 CONFIG_WLAN_FEATURE_PACKET_FILTERING := y
 CONFIG_WLAN_NS_OFFLOAD := y
-CONFIG_WLAN_SOFTAP_VSTA_FEATURE := y
 CONFIG_FEATURE_WLAN_RA_FILTERING:= y
 CONFIG_FEATURE_WLAN_LPHB := y
 CONFIG_QCA_SUPPORT_TX_THROTTLE := y
@@ -1963,7 +1962,6 @@
 ccflags-$(CONFIG_FEATURE_WLAN_SCAN_PNO) += -DFEATURE_WLAN_SCAN_PNO
 ccflags-$(CONFIG_WLAN_FEATURE_PACKET_FILTERING) += -DWLAN_FEATURE_PACKET_FILTERING
 ccflags-$(CONFIG_WLAN_NS_OFFLOAD) += -DWLAN_NS_OFFLOAD
-ccflags-$(CONFIG_WLAN_SOFTAP_VSTA_FEATURE) += -DWLAN_SOFTAP_VSTA_FEATURE
 ccflags-$(CONFIG_FEATURE_WLAN_RA_FILTERING) += -DFEATURE_WLAN_RA_FILTERING
 ccflags-$(CONFIG_FEATURE_WLAN_LPHB) += -DFEATURE_WLAN_LPHB
 ccflags-$(CONFIG_QCA_SUPPORT_TX_THROTTLE) += -DQCA_SUPPORT_TX_THROTTLE
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 7356586..ff151d8 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3002,31 +3002,6 @@
 #define CFG_BEACON_INTERVAL_MAX                WNI_CFG_BEACON_INTERVAL_STAMAX
 #define CFG_BEACON_INTERVAL_DEFAULT            WNI_CFG_BEACON_INTERVAL_STADEF
 
-/*
- * <ini>
- * gEnableVSTASupport - Enable/disable VSTA support
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to enable/disable VSTA based on max assoc limit.
- * Enable to have maximum 32 STA (P2P GC) on DUT as P2P GO or SAP
- *
- * Related: None.
- *
- * Supported Feature: SAP
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
-#define CFG_VSTA_SUPPORT_ENABLE               "gEnableVSTASupport"
-#define CFG_VSTA_SUPPORT_ENABLE_MIN           (0)
-#define CFG_VSTA_SUPPORT_ENABLE_MAX           (1)
-#define CFG_VSTA_SUPPORT_ENABLE_DEFAULT       (0)
-#endif
-
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
 #define CFG_WLAN_AUTO_SHUTDOWN              "gWlanAutoShutdown"
 #define CFG_WLAN_AUTO_SHUTDOWN_MIN          (0)
@@ -14269,9 +14244,6 @@
 	uint8_t enable_tdls_scan;
 	uint32_t tdls_peer_kickout_threshold;
 #endif
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
-	bool fEnableVSTASupport;
-#endif
 	uint8_t scanAgingTimeout;
 	uint8_t disableLDPCWithTxbfAP;
 	uint8_t enableMCCAdaptiveScheduler;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index c1ae8fb..f89d6cc 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -2391,15 +2391,6 @@
 
 #endif
 
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
-	REG_VARIABLE(CFG_VSTA_SUPPORT_ENABLE, WLAN_PARAM_Integer,
-		     struct hdd_config, fEnableVSTASupport,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_VSTA_SUPPORT_ENABLE_DEFAULT,
-		     CFG_VSTA_SUPPORT_ENABLE_MIN,
-		     CFG_VSTA_SUPPORT_ENABLE_MAX),
-#endif
-
 	REG_VARIABLE(CFG_SCAN_AGING_PARAM_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, scanAgingTimeout,
 		     VAR_FLAGS_OPTIONAL,
@@ -7912,7 +7903,6 @@
 bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 {
 	bool status = true;
-	uint32_t val;
 	struct hdd_config *config = hdd_ctx->config;
 
 	/*
@@ -8087,22 +8077,6 @@
 		hdd_err("Couldn't pass on WNI_CFG_ENABLE_MC_ADDR_LIST to CFG");
 	}
 
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
-	if (config->fEnableVSTASupport) {
-		sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_ASSOC_STA_LIMIT, &val);
-		if (val <= WNI_CFG_ASSOC_STA_LIMIT_STADEF)
-			val = WNI_CFG_ASSOC_STA_LIMIT_STAMAX;
-	} else {
-		val = config->maxNumberOfPeers;
-
-	}
-	if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_ASSOC_STA_LIMIT, val) ==
-			QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_ASSOC_STA_LIMIT to CFG");
-	}
-#endif
-
 	if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
 		    config->enableMCCAdaptiveScheduler) ==
 		    QDF_STATUS_E_FAILURE) {
diff --git a/core/mac/inc/sir_types.h b/core/mac/inc/sir_types.h
index c67f76f..fb5138b 100644
--- a/core/mac/inc/sir_types.h
+++ b/core/mac/inc/sir_types.h
@@ -92,24 +92,8 @@
 	HAL_STOP_TYPE_RF_KILL,
 } tHalStopType;
 
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
 #define HAL_NUM_ASSOC_STA           32
 #define HAL_NUM_STA                 41
-#define HAL_NUM_HW_STA              16
-#define HAL_NUM_GPSTA               4
-
-/* is the STA a HW STA (excluding GP STAs) */
-#define IS_HWSTA_IDX(__x) \
-	((__x) < (HAL_NUM_HW_STA-HAL_NUM_GPSTA))
-
-#else
-/*In prima 12 HW stations are supported including BCAST STA(staId 0)
-   and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
-   SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations. */
-#define HAL_NUM_STA                 12
-#define HAL_NUM_ASSOC_STA           10
-#define HAL_NUM_HW_STA              12
-#endif
 
 #define STACFG_MAX_TC               8
 
diff --git a/core/mac/src/pe/include/sch_global.h b/core/mac/src/pe/include/sch_global.h
index 8d0e682..07742a0 100644
--- a/core/mac/src/pe/include/sch_global.h
+++ b/core/mac/src/pe/include/sch_global.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014, 2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 2017-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -44,11 +44,7 @@
 
 #include "parser_api.h"
 
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
 #define TIM_IE_SIZE 0xB
-#else
-#define TIM_IE_SIZE 0x7
-#endif
 
 /* ----------------------- Beacon processing ------------------------ */
 
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index 8d8cbdf..c989166 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -78,16 +78,6 @@
 #define WMA_MAC_TO_PDEV_MAP(x) ((x) + (1))
 #define WMA_PDEV_TO_MAC_MAP(x) ((x) - (1))
 
-/* In prima 12 HW stations are supported including BCAST STA(staId 0)
- * and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
- * SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations.
- */
-
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
-#define WMA_MAX_SUPPORTED_STAS    38
-#else
-#define WMA_MAX_SUPPORTED_STAS    12
-#endif
 #define WMA_MAX_SUPPORTED_BSS     SIR_MAX_SUPPORTED_BSS
 
 #define WMA_MAX_MGMT_MPDU_LEN 2000
diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h
index 74d86fa..c6a35fa 100644
--- a/core/wma/inc/wma_types.h
+++ b/core/wma/inc/wma_types.h
@@ -46,12 +46,6 @@
 #define IS_ADVANCE_TDLS_ENABLE 0
 #endif
 
-#ifdef WLAN_SOFTAP_VSTA_FEATURE
-#define WMA_MAX_STA    (41)
-#else
-#define WMA_MAX_STA    (16)
-#endif
-
 #define WMA_NVDownload_Start(x)    ({ QDF_STATUS_SUCCESS; })
 
 #define DPU_FEEDBACK_UNPROTECTED_ERROR 0x0F