diff --git a/CORE/MAC/inc/aniSystemDefs.h b/CORE/MAC/inc/aniSystemDefs.h
index 27f118b..bc84d61 100644
--- a/CORE/MAC/inc/aniSystemDefs.h
+++ b/CORE/MAC/inc/aniSystemDefs.h
@@ -138,9 +138,7 @@
     eSIR_TX_ONLY,
     eSIR_RX_ONLY,
     eSIR_TX_RX,
-#ifdef WLAN_SOFTAP_FEATURE
     eSIR_TX_DEFAULT,
-#endif
     eSIR_DONOT_USE_KEY_DIRECTION = SIR_MAX_ENUM_SIZE
 } tAniKeyDirection;
 
@@ -181,12 +179,12 @@
 
 #ifdef FEATURE_WLAN_CCX
 
-// The CCKM IE needs to be in the 
-// Join and Reassoc Req. 
+// The CCKM IE needs to be in the
+// Join and Reassoc Req.
 typedef struct sSirCCKMie
 {
     tANI_U16       length;
-    tANI_U8        cckmIEdata[SIR_MAC_MAX_IE_LENGTH+2];  
+    tANI_U8        cckmIEdata[SIR_MAC_MAX_IE_LENGTH+2];
 } tSirCCKMie, *tpSirCCKMie;
 
 #endif
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 1191299..8c05ce6 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -548,9 +548,7 @@
 typedef enum eSirBssType
 {
     eSIR_INFRASTRUCTURE_MODE,
-#ifdef WLAN_SOFTAP_FEATURE
     eSIR_INFRA_AP_MODE,                    //Added for softAP support
-#endif
     eSIR_IBSS_MODE,
     eSIR_BTAMP_STA_MODE,                     //Added for BT-AMP support
     eSIR_BTAMP_AP_MODE,                     //Added for BT-AMP support
@@ -648,7 +646,6 @@
     tSirWdsInfo             wdsInfo;
 #endif
     
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_U8                 privacy;
     tANI_U8                 apUapsdEnable;
     tANI_U8                 ssidHidden;
@@ -659,7 +656,6 @@
     tAniAuthType            authType;
     tANI_U32                dtimPeriod;
     tANI_U8                 wps_state;
-#endif
     tVOS_CON_MODE           bssPersona;
 
     tANI_U8                 txLdpcIniFeatureEnabled;
@@ -1383,7 +1379,6 @@
     tAniBool                spectrumMgtIndicator;
     tSirMacPowerCapInfo     powerCap;
     tSirSupChnl             supportedChannels;
-#ifdef WLAN_SOFTAP_FEATURE
     tAniBool             wmmEnabledSta; /* if present - STA is WMM enabled */
     tAniBool             reassocReq;
     // Required for indicating the frames to upper layer
@@ -1391,7 +1386,6 @@
     tANI_U8*             beaconPtr;
     tANI_U32             assocReqLength;
     tANI_U8*             assocReqPtr;
-#endif
 } tSirSmeAssocInd, *tpSirSmeAssocInd;
 
 
@@ -1442,14 +1436,12 @@
     tAniBool                spectrumMgtIndicator;
     tSirMacPowerCapInfo     powerCap;
     tSirSupChnl             supportedChannels;
-#ifdef WLAN_SOFTAP_FEATURE
     // Required for indicating the frames to upper layer
     // TODO: use the appropriate names to distinguish between the other similar names used above for station mode of operation
     tANI_U32             beaconLength;
     tANI_U8*             beaconPtr;
     tANI_U32             assocReqLength;
     tANI_U8*             assocReqPtr;
-#endif
 } tSirSmeReassocInd, *tpSirSmeReassocInd;
 
 /// Definition for Reassociation confirm
@@ -1578,9 +1570,7 @@
 
 /// Definition for Disassociation request
 typedef
-#ifdef WLAN_SOFTAP_FEATURE
 __ani_attr_pre_packed
-#endif
 struct sSirSmeDisassocReq
 {
     tANI_U16            messageType; // eWNI_SME_DISASSOC_REQ
@@ -1599,13 +1589,10 @@
 #endif
 #endif
 }
-#ifdef WLAN_SOFTAP_FEATURE
 __ani_attr_packed
-#endif
 tSirSmeDisassocReq, *tpSirSmeDisassocReq;
 
 /// Definition for Tkip countermeasures request
-#ifdef WLAN_SOFTAP_FEATURE
 typedef __ani_attr_pre_packed struct sSirSmeTkipCntrMeasReq
 {
     tANI_U16            messageType;    // eWNI_SME_DISASSOC_REQ
@@ -1615,7 +1602,6 @@
     tSirMacAddr         bssId;          // Peer BSSID
     tANI_BOOLEAN        bEnable;        // Start/stop countermeasures
 } __ani_attr_packed tSirSmeTkipCntrMeasReq, *tpSirSmeTkipCntrMeasReq;
-#endif
 
 typedef struct sAni64BitCounters
 {
@@ -1843,13 +1829,9 @@
     tANI_U16           aid;
 #endif
     tAniStaStatStruct  perStaStats; // STA stats
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_U16           staId;
-#endif     
 }
-#ifdef WLAN_SOFTAP_FEATURE
 __ani_attr_packed
-#endif
  tSirSmeDisassocRsp, *tpSirSmeDisassocRsp;
 
 /// Definition for Disassociation indication from peer
@@ -1866,9 +1848,7 @@
     tANI_U16            aid;
 #endif
     tAniStaStatStruct  perStaStats; // STA stats
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_U16            staId;
-#endif
     tANI_U32            reasonCode;
 } tSirSmeDisassocInd, *tpSirSmeDisassocInd;
 
@@ -1929,9 +1909,7 @@
     tANI_U16            aid;
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_U16            staId;
-#endif
     tANI_U32            reasonCode;
 } tSirSmeDeauthInd, *tpSirSmeDeauthInd;
 
@@ -3137,7 +3115,6 @@
     tLimScanChn scanChn[SIR_MAX_SUPPORTED_CHANNEL_LIST];
 }tLimScanChnInfo;
 
-#ifdef WLAN_SOFTAP_FEATURE
 typedef struct sSirSmeGetAssocSTAsReq
 {
     tANI_U16    messageType;    // eWNI_SME_GET_ASSOC_STAS_REQ
@@ -3148,7 +3125,6 @@
     void        *pSapEventCallback;
     void        *pAssocStasArray;// Pointer to allocated memory passed in WLANSAP_GetAssocStations API
 } tSirSmeGetAssocSTAsReq, *tpSirSmeGetAssocSTAsReq;
-#endif
 
 typedef struct sSmeMaxAssocInd
 {
@@ -3516,7 +3492,6 @@
     tANI_U8  bssIdx;
 } tSirHalWowlExitParams, *tpSirHalWowlExitParams;
 
-#ifdef WLAN_SOFTAP_FEATURE
 
 #define SIR_MAX_NAME_SIZE 64
 #define SIR_MAX_TEXT_SIZE 32
@@ -3683,7 +3658,6 @@
     tSirRSNie      APWPARSNIEs;
 } tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
 
-#endif
 
 // SME -> HAL - This is the host offload request. 
 #define SIR_IPV4_ARP_REPLY_OFFLOAD                  0
diff --git a/CORE/MAC/inc/sirMacPropExts.h b/CORE/MAC/inc/sirMacPropExts.h
index 503f24f..009fe92 100644
--- a/CORE/MAC/inc/sirMacPropExts.h
+++ b/CORE/MAC/inc/sirMacPropExts.h
@@ -49,7 +49,7 @@
  * History:-
  * Date           Modified by    Modification Information
  * --------------------------------------------------------------------
- * 
+ *
  */
 #ifndef __MAC_PROP_EXTS_H
 #define __MAC_PROP_EXTS_H
@@ -134,7 +134,6 @@
           (dot11Mode == WNI_CFG_DOT11_MODE_TAURUS) || \
           (dot11Mode == WNI_CFG_DOT11_MODE_ALL)) ? TRUE: FALSE)
 
-#ifdef WLAN_SOFTAP_FEATURE
 #define IS_DOT11_MODE_HT(dot11Mode) \
         (((dot11Mode == WNI_CFG_DOT11_MODE_11N) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_11N_ONLY) || \
@@ -142,13 +141,6 @@
           (dot11Mode ==  WNI_CFG_DOT11_MODE_11AC_ONLY) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_TAURUS) || \
           (dot11Mode ==  WNI_CFG_DOT11_MODE_ALL)) ? TRUE: FALSE)
-#else
-#define IS_DOT11_MODE_HT(dot11Mode) \
-        (((dot11Mode == WNI_CFG_DOT11_MODE_11N) || \
-          (dot11Mode ==  WNI_CFG_DOT11_MODE_TAURUS) || \
-          (dot11Mode ==  WNI_CFG_DOT11_MODE_11AC) || \
-          (dot11Mode ==  WNI_CFG_DOT11_MODE_ALL)) ? TRUE: FALSE)
-#endif
 
 #ifdef WLAN_FEATURE_11AC
 #define IS_DOT11_MODE_VHT(dot11Mode) \
diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h
index 39e56ed..c798572 100644
--- a/CORE/MAC/inc/wniApi.h
+++ b/CORE/MAC/inc/wniApi.h
@@ -224,7 +224,6 @@
     eWNI_SME_GET_STATISTICS_REQ,
     eWNI_SME_GET_STATISTICS_RSP,
     eWNI_SME_GET_RSSI_REQ,
-#ifdef WLAN_SOFTAP_FEATURE
     eWNI_SME_GET_ASSOC_STAS_REQ,
     eWNI_SME_TKIP_CNTR_MEAS_REQ,
     eWNI_SME_UPDATE_APWPSIE_REQ,
@@ -234,7 +233,6 @@
     eWNI_SME_UPPER_LAYER_ASSOC_CNF,
     eWNI_SME_HIDE_SSID_REQ,
     eWNI_SME_CHNG_MCC_BEACON_INTERVAL,
-#endif
 #ifdef WLAN_FEATURE_P2P
     eWNI_SME_REMAIN_ON_CHANNEL_REQ,
     eWNI_SME_REMAIN_ON_CHN_IND,
diff --git a/CORE/MAC/src/cfg/cfgApi.c b/CORE/MAC/src/cfg/cfgApi.c
index 05d8ed2..6f3c182 100644
--- a/CORE/MAC/src/cfg/cfgApi.c
+++ b/CORE/MAC/src/cfg/cfgApi.c
@@ -929,23 +929,19 @@
     }
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
     if(systemRole == eLIM_AP_ROLE)
     {
         val = sessionEntry->privacy;
     }
     else
     {
-#endif
-    // PRIVACY bit
-    if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED, &val) != eSIR_SUCCESS)
-    {
-        cfgLog(pMac, LOGP, FL("cfg get WNI_CFG_PRIVACY_ENABLED failed\n"));
-        return eSIR_FAILURE;
+        // PRIVACY bit
+        if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED, &val) != eSIR_SUCCESS)
+        {
+            cfgLog(pMac, LOGP, FL("cfg get WNI_CFG_PRIVACY_ENABLED failed\n"));
+            return eSIR_FAILURE;
+        }
     }
-#ifdef WLAN_SOFTAP_FEATURE
-    }
-#endif
     if (val)
         pCapInfo->privacy = 1;
 
diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h
index f510722..6502496 100644
--- a/CORE/MAC/src/include/parserApi.h
+++ b/CORE/MAC/src/include/parserApi.h
@@ -198,9 +198,7 @@
     tSirMacPowerCapabilityIE  powerCapability;
     tSirMacSupportedChannelIE supportedChannels;
     tDot11fIEHTCaps   HTCaps;
-#ifdef WLAN_SOFTAP_FEATURE
     tDot11fIEWMMInfoStation   WMMInfoStation;
-#endif
     /// This is set if the frame is a reassoc request:
     tANI_U8                   reassocRequest;
     tANI_U8                   ssidPresent;
@@ -218,12 +216,10 @@
 
     tANI_U8                   powerCapabilityPresent;
     tANI_U8                   supportedChannelsPresent;
-#ifdef WLAN_SOFTAP_FEATURE
     // keeing copy of assoction request received, this is 
     // required for indicating the frame to upper layers
     tANI_U32                  assocReqFrameLength;
     tANI_U8*                  assocReqFrame;
-#endif
 #ifdef WLAN_FEATURE_11AC
     tDot11fIEVHTCaps          VHTCaps;
     tDot11fIEOperatingMode    operMode;
@@ -495,15 +491,9 @@
                            tDot11fIEEDCAParamSet *pDot11f,
                            tpPESession psessionEntry);
 
-#ifdef WLAN_SOFTAP_FEATURE
 tSirRetStatus
 PopulateDot11fERPInfo(tpAniSirGlobal    pMac,
                       tDot11fIEERPInfo *pDot11f, tpPESession psessionEntry);
-#else
-tSirRetStatus
-PopulateDot11fERPInfo(tpAniSirGlobal    pMac,
-                      tDot11fIEERPInfo *pDot11f);
-#endif
 
 tSirRetStatus
 PopulateDot11fExtSuppRates(tpAniSirGlobal      pMac,
@@ -548,16 +538,10 @@
                            tpPESession      psessionEntry,
                            tDot11fIEHTCaps *pDot11f);
 
-#ifdef WLAN_SOFTAP_FEATURE
 tSirRetStatus
 PopulateDot11fHTInfo(tpAniSirGlobal   pMac,
                      tDot11fIEHTInfo *pDot11f,
                      tpPESession      psessionEntry);
-#else
-tSirRetStatus
-PopulateDot11fHTInfo(tpAniSirGlobal   pMac,
-                     tDot11fIEHTInfo *pDot11f);
-#endif
 
 void PopulateDot11fIBSSParams(tpAniSirGlobal  pMac,
        tDot11fIEIBSSParams *pDot11f, tpPESession psessionEntry);
@@ -738,14 +722,9 @@
 void PopulateDot11fWMMInfoStation(tpAniSirGlobal           pMac,
                                   tDot11fIEWMMInfoStation *pInfo);
 
-#ifdef WLAN_SOFTAP_FEATURE
 void PopulateDot11fWMMParams(tpAniSirGlobal      pMac,
                              tDot11fIEWMMParams *pParams,
                              tpPESession        psessionEntry);
-#else
-void PopulateDot11fWMMParams(tpAniSirGlobal      pMac,
-                             tDot11fIEWMMParams *pParams);
-#endif
 
 /**
  * \brief Populate a tDot11fIEWMMSchedule
@@ -838,11 +817,9 @@
 tSirRetStatus DePopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
                                                tDot11fIEWscBeacon *pDot11f);
 
-#ifdef WLAN_SOFTAP_FEATURE
 tSirRetStatus PopulateDot11fProbeResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f, tpPESession psessionEntry);
 tSirRetStatus PopulateDot11fAssocResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscAssocRes *pDot11f, tpPESession psessionEntry);
 tSirRetStatus PopulateDot11fBeaconWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f, tpPESession psessionEntry);
-#endif
 
 tSirRetStatus PopulateDot11fWscInProbeRes(tpAniSirGlobal pMac,
                                           tDot11fIEWscProbeRes *pDot11f);
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index 3248df4..600c38c 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -416,28 +416,21 @@
 #define SIR_HAL_TIMER_TRAFFIC_ACTIVITY_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 105)
 #define SIR_HAL_TIMER_ADC_RSSI_STATS       (SIR_HAL_ITC_MSG_TYPES_BEGIN + 106)
 #define SIR_HAL_MIC_FAILURE_IND            (SIR_HAL_ITC_MSG_TYPES_BEGIN + 107)
-
-#ifdef WLAN_SOFTAP_FEATURE
-//107 ... Slots is Free for use.
 #define SIR_HAL_UPDATE_UAPSD_IND           (SIR_HAL_ITC_MSG_TYPES_BEGIN + 108)
-#endif
-
-#define SIR_HAL_SET_MIMOPS_REQ                      (SIR_HAL_ITC_MSG_TYPES_BEGIN + 109)
-#define SIR_HAL_SET_MIMOPS_RSP                      (SIR_HAL_ITC_MSG_TYPES_BEGIN + 110)
-#define SIR_HAL_SYS_READY_IND                       (SIR_HAL_ITC_MSG_TYPES_BEGIN + 111)
-#define SIR_HAL_SET_TX_POWER_REQ                    (SIR_HAL_ITC_MSG_TYPES_BEGIN + 112)
-#define SIR_HAL_SET_TX_POWER_RSP                    (SIR_HAL_ITC_MSG_TYPES_BEGIN + 113)
-#define SIR_HAL_GET_TX_POWER_REQ                    (SIR_HAL_ITC_MSG_TYPES_BEGIN + 114)
-#define SIR_HAL_GET_TX_POWER_RSP                    (SIR_HAL_ITC_MSG_TYPES_BEGIN + 115)
-#define SIR_HAL_GET_NOISE_REQ                       (SIR_HAL_ITC_MSG_TYPES_BEGIN + 116)
-#define SIR_HAL_GET_NOISE_RSP                       (SIR_HAL_ITC_MSG_TYPES_BEGIN + 117)
+#define SIR_HAL_SET_MIMOPS_REQ             (SIR_HAL_ITC_MSG_TYPES_BEGIN + 109)
+#define SIR_HAL_SET_MIMOPS_RSP             (SIR_HAL_ITC_MSG_TYPES_BEGIN + 110)
+#define SIR_HAL_SYS_READY_IND              (SIR_HAL_ITC_MSG_TYPES_BEGIN + 111)
+#define SIR_HAL_SET_TX_POWER_REQ           (SIR_HAL_ITC_MSG_TYPES_BEGIN + 112)
+#define SIR_HAL_SET_TX_POWER_RSP           (SIR_HAL_ITC_MSG_TYPES_BEGIN + 113)
+#define SIR_HAL_GET_TX_POWER_REQ           (SIR_HAL_ITC_MSG_TYPES_BEGIN + 114)
+#define SIR_HAL_GET_TX_POWER_RSP           (SIR_HAL_ITC_MSG_TYPES_BEGIN + 115)
+#define SIR_HAL_GET_NOISE_REQ              (SIR_HAL_ITC_MSG_TYPES_BEGIN + 116)
+#define SIR_HAL_GET_NOISE_RSP              (SIR_HAL_ITC_MSG_TYPES_BEGIN + 117)
 
 /* Messages to support transmit_halt and transmit_resume */
-#define SIR_HAL_TRANSMISSION_CONTROL_IND            (SIR_HAL_ITC_MSG_TYPES_BEGIN + 118)
+#define SIR_HAL_TRANSMISSION_CONTROL_IND   (SIR_HAL_ITC_MSG_TYPES_BEGIN + 118)
 /* Indication from LIM to HAL to Initialize radar interrupt */
-#define SIR_HAL_INIT_RADAR_IND                      (SIR_HAL_ITC_MSG_TYPES_BEGIN + 119)
-/* Messages to support transmit_halt and transmit_resume */
-
+#define SIR_HAL_INIT_RADAR_IND             (SIR_HAL_ITC_MSG_TYPES_BEGIN + 119)
 
 #define SIR_HAL_BEACON_PRE_IND             (SIR_HAL_ITC_MSG_TYPES_BEGIN + 120)
 #define SIR_HAL_ENTER_UAPSD_REQ            (SIR_HAL_ITC_MSG_TYPES_BEGIN + 121)
@@ -654,9 +647,7 @@
 #define SIR_LIM_QUIET_TIMEOUT            (SIR_LIM_TIMEOUT_MSG_START + 0x1B)
 #define SIR_LIM_QUIET_BSS_TIMEOUT        (SIR_LIM_TIMEOUT_MSG_START + 0x1C)
 
-#ifdef WLAN_SOFTAP_FEATURE
 #define SIR_LIM_WPS_OVERLAP_TIMEOUT      (SIR_LIM_TIMEOUT_MSG_START + 0x1D)
-#endif
 #ifdef WLAN_FEATURE_VOWIFI_11R
 #define SIR_LIM_FT_PREAUTH_RSP_TIMEOUT   (SIR_LIM_TIMEOUT_MSG_START + 0x1E)
 #endif
diff --git a/CORE/MAC/src/pe/include/limGlobal.h b/CORE/MAC/src/pe/include/limGlobal.h
index 89fb2e1..03a8257 100644
--- a/CORE/MAC/src/pe/include/limGlobal.h
+++ b/CORE/MAC/src/pe/include/limGlobal.h
@@ -38,7 +38,6 @@
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
  */
-
 /*
  *
  * Airgo Networks, Inc proprietary. All rights reserved.
@@ -61,10 +60,8 @@
 #include "sirCommon.h"
 #include "sirDebug.h"
 #include "wniCfgAp.h"
-#ifdef WLAN_SOFTAP_FEATURE
 #include "csrApi.h"
 #include "sapApi.h"
-#endif
 #ifdef FEATURE_WLAN_TDLS
 #include "dot11f.h"
 #endif
@@ -554,13 +551,8 @@
 #define LIM_PROT_STA_OVERLAP_CACHE_SIZE     10
 #define LIM_PROT_STA_CACHE_SIZE 256
 #else
-#ifdef WLAN_SOFTAP_FEATURE
 #define LIM_PROT_STA_OVERLAP_CACHE_SIZE    HAL_NUM_ASSOC_STA
 #define LIM_PROT_STA_CACHE_SIZE            HAL_NUM_ASSOC_STA
-#else
-#define LIM_PROT_STA_OVERLAP_CACHE_SIZE    5
-#define LIM_PROT_STA_CACHE_SIZE            5
-#endif
 #endif
 
 typedef struct sLimProtStaParams
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index e84f678..95f0624 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -44,16 +44,12 @@
 
 
 /**=========================================================================
-  
+
   \file  limSession.h
-  
+
   \brief prototype for lim Session related APIs
 
   \author Sunit Bhatia
-  
-   Copyright 2008 (c) Qualcomm, Incorporated.  All Rights Reserved.
-   Qualcomm Confidential and Proprietary.
-  
   ========================================================================*/
 
 
@@ -66,9 +62,7 @@
 /*-------------------------------------------------------------------------- 
   Preprocessor definitions and constants
   ------------------------------------------------------------------------*/
-#ifdef WLAN_SOFTAP_FEATURE
 #define NUM_WEP_KEYS 4
-#endif
 
 /*-------------------------------------------------------------------------- 
   Type declarations
@@ -204,7 +198,6 @@
 #endif
     tANI_U32                encryptType;
 
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_BOOLEAN            bTkipCntrMeasActive;    // Used to keep record of TKIP counter measures start/stop
 
     tANI_U8                 gLimProtectionControl;  //used for 11n protection
@@ -267,7 +260,6 @@
     tANI_U8                 ssidHidden;
     tANI_BOOLEAN            fwdWPSPBCProbeReq;
     tANI_U8                 wps_state;
-#endif
 
     tANI_U8            limQosEnabled:1; //11E
     tANI_U8            limWmeEnabled:1; //WME
diff --git a/CORE/MAC/src/pe/include/pmmApi.h b/CORE/MAC/src/pe/include/pmmApi.h
index 593226c..c1d678d 100644
--- a/CORE/MAC/src/pe/include/pmmApi.h
+++ b/CORE/MAC/src/pe/include/pmmApi.h
@@ -77,11 +77,7 @@
 extern void pmmUpdatePSPollState(tpAniSirGlobal);
 extern void pmmProcessRxActivity(tpAniSirGlobal, tANI_U16, tANI_U8);
 
-#ifdef WLAN_SOFTAP_FEATURE
 extern void pmmGenerateTIM(tpAniSirGlobal, tANI_U8 **, tANI_U16 *, tANI_U8);
-#else
-extern void pmmGenerateTIM(tpAniSirGlobal, tANI_U8 **, tANI_U16 *);
-#endif
 
 
 void pmmUpdateTIM(tpAniSirGlobal pMac, tpBeaconGenParams pBeaconGenParams);
diff --git a/CORE/MAC/src/pe/include/pmmGlobal.h b/CORE/MAC/src/pe/include/pmmGlobal.h
index a03a9e6..b209de0 100644
--- a/CORE/MAC/src/pe/include/pmmGlobal.h
+++ b/CORE/MAC/src/pe/include/pmmGlobal.h
@@ -92,7 +92,7 @@
     //UAPSD
     ePMM_STATE_UAPSD_WT_SLEEP_RSP,
     ePMM_STATE_UAPSD_SLEEP,
-    ePMM_STATE_UAPSD_WT_WAKEUP_RSP, 
+    ePMM_STATE_UAPSD_WT_WAKEUP_RSP,
 
     //WOWLAN
     ePMM_STATE_WOWLAN,
@@ -104,7 +104,7 @@
 typedef struct sPmmStaInfo
 {
     tANI_U16 assocId;
-    tANI_U32 staTxAckCnt;   
+    tANI_U32 staTxAckCnt;
 }tPmmStaInfo, *tpPmmStaInfo;
 
 typedef struct sPmmTim
@@ -186,7 +186,7 @@
 
     tANI_U8  gPmmPsPollUpdate:1; // set when any sta state is update due to PS-Poll
     tANI_U8  rsvd: 7;
-   
+
    /// STA Power management state array
     /**
      * An entry in this array records the power save state for an STA
@@ -201,12 +201,10 @@
     tANI_U8 inMissedBeaconScenario;
 
 #ifdef ANI_PRODUCT_TYPE_AP
-    tPmmStaState *gpPmmStaState; // Used for HCF - PS Poll 
+    tPmmStaState *gpPmmStaState; // Used for HCF - PS Poll
     tANI_U8 *gpPmmPSState;          // To Store the PS States in AP
 #endif
-#ifdef WLAN_SOFTAP_FEATURE
     tPmmTim gPmmTim;
-#endif
 
 
     //Reason for which PMC is sending an EXIT_BMPS_REQ to PE
diff --git a/CORE/MAC/src/pe/include/schApi.h b/CORE/MAC/src/pe/include/schApi.h
index 5563751..59373f9 100644
--- a/CORE/MAC/src/pe/include/schApi.h
+++ b/CORE/MAC/src/pe/include/schApi.h
@@ -146,13 +146,11 @@
 
 tSirRetStatus schSendBeaconReq( tpAniSirGlobal, tANI_U8 *, tANI_U16, tpPESession psessionEntry );
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal,tDot11fBeacon1*,tANI_U32*,tDot11fProbeResponse*);
 void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal,tDot11fBeacon2*,tANI_U32*,tDot11fProbeResponse*);
 void SetProbeRspIeBitmap(tANI_U32*,tANI_U32);
 tANI_U32 limSendProbeRspTemplateToHal(tpAniSirGlobal,tpPESession,
                                     tANI_U32*);
-#endif
 
 
 #endif
diff --git a/CORE/MAC/src/pe/include/schGlobal.h b/CORE/MAC/src/pe/include/schGlobal.h
index 34b3c71..188d3fe 100644
--- a/CORE/MAC/src/pe/include/schGlobal.h
+++ b/CORE/MAC/src/pe/include/schGlobal.h
@@ -109,7 +109,7 @@
 
     /// Trailing portion of the beacon frame to be written to TFP
     tANI_U8 *gSchBeaconFrameEnd;
-    
+
     /// Size of the beginning portion
     tANI_U16 gSchBeaconOffsetBegin;
     /// Size of the trailing portion
@@ -156,7 +156,7 @@
     /// flag to indicate that beacon template has been updated
     tANI_U8   fBeaconChanged;
 
-#if defined(WLAN_SOFTAP_FEATURE) && defined(WLAN_FEATURE_P2P) 
+#if defined(WLAN_FEATURE_P2P)
     tANI_U16 p2pIeOffset;
 #endif
 
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index debc86b..94a2064 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -1034,7 +1034,6 @@
     }
     */
 
-#ifdef WLAN_SOFTAP_FEATURE
     if (eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
               (void **) &pMac->pmm.gPmmTim.pTim, sizeof(tANI_U8)*pMac->lim.maxStation))
     {
@@ -1042,7 +1041,6 @@
         return eSIR_FAILURE;
     }
     palZeroMemory(pMac->hHdd, pMac->pmm.gPmmTim.pTim, sizeof(tANI_U8)*pMac->lim.maxStation);
-#endif
 
 #ifdef ANI_PRODUCT_TYPE_AP
 
@@ -1113,10 +1111,8 @@
     palFreeMemory(pMac->hHdd, pMac->dph.dphHashTable.pDphNodeArray);
     pMac->dph.dphHashTable.pDphNodeArray = NULL;
     */
-#ifdef WLAN_SOFTAP_FEATURE
     palFreeMemory(pMac->hHdd, pMac->pmm.gPmmTim.pTim);
     pMac->pmm.gPmmTim.pTim = NULL;
-#endif
 #ifdef ANI_PRODUCT_TYPE_AP
     palFreeMemory(pMac->hHdd, pMac->pmm.gPmmTim.pStaInfo);
     pMac->pmm.gPmmTim.pStaInfo = NULL;
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 51004d2..da2eab8 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -415,7 +415,6 @@
     return true;
 }
 
-#ifdef WLAN_SOFTAP_FEATURE
 
 #define SECURITY_SUITE_TYPE_MASK 0xFF
 #define SECURITY_SUITE_TYPE_WEP40 0x1
@@ -585,7 +584,6 @@
     return eSIR_SUCCESS;
 } /****** end limCheckRxWPAIeMatch() ******/
 
-#endif /* WLAN_SOFTAP_FEATURE */
 
 /**
  * limCleanupRxPath()
@@ -896,9 +894,7 @@
     } 
 
     if((NULL != psessionEntry)
-#ifdef WLAN_SOFTAP_FEATURE
         && (eLIM_AP_ROLE != psessionEntry->limSystemRole )
-#endif     
     )      
             {
                 peDeleteSession(pMac,psessionEntry);
@@ -1021,7 +1017,6 @@
     }
 } /*** end limRejectAssociation() ***/
 
-#ifdef WLAN_SOFTAP_FEATURE
 
 /** -------------------------------------------------------------
 \fn limDecideApProtectionOnHt20Delete
@@ -1267,7 +1262,6 @@
     }
 }
 
-#endif
 
 
 /** -------------------------------------------------------------
@@ -1336,7 +1330,6 @@
        pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta);
        limPrintMacAddr(pMac, pStaDs->staAddr, LOG1);)
 
-#ifdef WLAN_SOFTAP_FEATURE
     if ((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
        psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta> 0)
        {
@@ -1355,7 +1348,6 @@
           }
        }
        else
-#endif
        {
            if (pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta> 0)
            {
@@ -1377,7 +1369,6 @@
 
       wlan_cfgGetInt(pMac, WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED, &val);
 
-#ifdef WLAN_SOFTAP_FEATURE
       if ( (psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
          (val && psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta == 0))
       {
@@ -1394,7 +1385,6 @@
          }
       }
       else 
-#endif
       {
          if (val && pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta == 0)
          {
@@ -2171,13 +2161,11 @@
     pAddStaParams->wmmEnabled = pStaDs->qosMode;
     pAddStaParams->listenInterval = pStaDs->mlmStaContext.listenInterval;
     pAddStaParams->shortPreambleSupported = pStaDs->shortPreambleEnabled;
-#ifdef WLAN_SOFTAP_FEATURE
     if((limGetSystemRole(psessionEntry) == eLIM_AP_ROLE) && (pStaDs->mlmStaContext.subType == LIM_REASSOC))
     {
         /* TBD - need to remove this REASSOC check after fixinf rmmod issue */
         pAddStaParams->updateSta = pStaDs->mlmStaContext.updateContext;
     }
-#endif
     pStaDs->valid                  = 0;
     pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_ADD_STA_RSP_STATE;
 
@@ -2292,7 +2280,6 @@
           pAddStaParams->staTCParams[i].rxUseBA = eBA_DISABLE;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
 #ifdef FEATURE_WLAN_TDLS
     if(pStaDs->wmeEnabled && \
        ((eLIM_AP_ROLE == psessionEntry->limSystemRole) || (STA_ENTRY_TDLS_PEER == pStaDs->staType)) )
@@ -2318,7 +2305,6 @@
         limLog( pMac, LOG1, FL( "uAPSD = 0x%x, maxSpLen = %d" ),
             pAddStaParams->uAPSD, pAddStaParams->maxSPLen);
     }
-#endif
   //we need to defer the message until we get the response back from HAL.
     if (pAddStaParams->respReqd)
         SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
@@ -2612,7 +2598,6 @@
         else
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
         pAddStaParams->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD, psessionEntry);
         pAddStaParams->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry);
         pAddStaParams->mimoPS            = limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE, psessionEntry );
@@ -2625,20 +2610,6 @@
         pAddStaParams->fDsssCckMode40Mhz = limGetHTCapability( pMac, eHT_DSSS_CCK_MODE_40MHZ, psessionEntry);
         pAddStaParams->fShortGI20Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_20MHZ, psessionEntry);
         pAddStaParams->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ, psessionEntry);
-#else
-        pAddStaParams->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD );
-        pAddStaParams->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET );
-        pAddStaParams->mimoPS            = limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE );
-        pAddStaParams->rifsMode          = limGetHTCapability( pMac, eHT_RIFS_MODE );
-        pAddStaParams->lsigTxopProtection = limGetHTCapability( pMac, eHT_LSIG_TXOP_PROTECTION );
-        pAddStaParams->delBASupport      = limGetHTCapability( pMac, eHT_DELAYED_BA );
-        pAddStaParams->maxAmpduDensity   = limGetHTCapability( pMac, eHT_MPDU_DENSITY );
-        pAddStaParams->maxAmpduSize   = limGetHTCapability(pMac, eHT_MAX_RX_AMPDU_FACTOR);
-        pAddStaParams->maxAmsduSize      = limGetHTCapability( pMac, eHT_MAX_AMSDU_LENGTH );
-        pAddStaParams->fDsssCckMode40Mhz = limGetHTCapability( pMac, eHT_DSSS_CCK_MODE_40MHZ);
-        pAddStaParams->fShortGI20Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_20MHZ);
-        pAddStaParams->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ);
-#endif
     }
 #ifdef WLAN_FEATURE_11AC
     pAddStaParams->vhtCapable = psessionEntry->vhtCapability;
@@ -2831,13 +2802,11 @@
         if((eLIM_AP_ROLE == psessionEntry->limSystemRole) ||
               (eLIM_STA_IN_IBSS_ROLE == psessionEntry->limSystemRole))
         {
-#ifdef WLAN_SOFTAP_FEATURE
             if(psessionEntry->limSystemRole == eLIM_AP_ROLE ){
                 if(psessionEntry->gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE){
                 limDecideApProtectionOnDelete(pMac, pStaDs, &beaconParams,psessionEntry);
                 }
             }
-#endif         
 
             if(eLIM_STA_IN_IBSS_ROLE == systemRole)
                 limIbssDecideProtectionOnDelete(pMac, pStaDs, &beaconParams, psessionEntry);
@@ -3238,11 +3207,7 @@
         {
             pAddBssParams->htOperMode = (tSirMacHTOperatingMode)pAssocRsp->HTInfo.opMode;
             pAddBssParams->dualCTSProtection = ( tANI_U8 ) pAssocRsp->HTInfo.dualCTSProtection;
-#ifdef WLAN_SOFTAP_FEATURE
             chanWidthSupp = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry);
-#else
-            chanWidthSupp = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET);
-#endif
             if( (pAssocRsp->HTCaps.supportedChannelWidthSet) &&
                 (chanWidthSupp) )
             {
@@ -3548,11 +3513,7 @@
             pAddBssParams->htOperMode = (tSirMacHTOperatingMode)pBeaconStruct->HTInfo.opMode;
             pAddBssParams->dualCTSProtection = ( tANI_U8 ) pBeaconStruct->HTInfo.dualCTSProtection;
 
-#ifdef WLAN_SOFTAP_FEATURE
             chanWidthSupp = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry);
-#else 
-            chanWidthSupp = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET);
-#endif
             if( (pBeaconStruct->HTCaps.supportedChannelWidthSet) &&
                 (chanWidthSupp) )
             {
@@ -3779,11 +3740,9 @@
     palCopyMemory( pMac->hHdd,  pAddBssParams->bssId,neighborBssInfo->bssId,
                    sizeof( tSirMacAddr ));
 
-#ifdef WLAN_SOFTAP_FEATURE
     // Fill in tAddBssParams selfMacAddr
     palCopyMemory( pMac->hHdd, pAddBssParams->selfMacAddr, psessionEntry->selfMacAddr,
                   sizeof( tSirMacAddr ));
-#endif
 
     pAddBssParams->bssType = eSIR_INFRASTRUCTURE_MODE;
     pAddBssParams->operMode = BSS_OPERATIONAL_MODE_STA;
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.h b/CORE/MAC/src/pe/lim/limAssocUtils.h
index 7fe86a9..ab7d0d1 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.h
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.h
@@ -48,7 +48,7 @@
  * Date           Modified by    Modification Information
  * --------------------------------------------------------------------
  * 05/26/10       js             WPA handling in (Re)Assoc frames
- * 
+ *
  */
 #ifndef __LIM_ASSOC_UTILS_H
 #define __LIM_ASSOC_UTILS_H
@@ -65,10 +65,8 @@
                                        tSirAssocReq *,
                                        tSirMacCapabilityInfo *,tpPESession);
 tANI_U8         limCheckRxBasicRates(tpAniSirGlobal, tSirMacRateSet,tpPESession);
-#ifdef WLAN_SOFTAP_FEATURE
 tANI_U8         limCheckRxRSNIeMatch(tpAniSirGlobal, tDot11fIERSN, tpPESession, tANI_U8);
 tANI_U8         limCheckRxWPAIeMatch(tpAniSirGlobal, tDot11fIEWPA, tpPESession, tANI_U8);
-#endif
 tANI_U8         limCheckMCSSet(tpAniSirGlobal pMac, tANI_U8* supportedMCSSet);
 void            limPostDummyToTmRing(tpAniSirGlobal, tpDphHashNode);
 void            limPostPacketToTdRing(tpAniSirGlobal,
@@ -119,7 +117,7 @@
 tSirRetStatus   limDelBss(tpAniSirGlobal, tpDphHashNode, tANI_U16, tpPESession);
 tSirRetStatus   limDelSta(tpAniSirGlobal, tpDphHashNode, tANI_BOOLEAN, tpPESession);
 #ifdef WLAN_FEATURE_VOWIFI_11R
-tSirRetStatus   limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId, 
+tSirRetStatus   limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId,
                     tpPESession psessionEntry);
 #endif /* WLAN_FEATURE_VOWIFI_11R */
 tSirRetStatus   limAddStaSelf(tpAniSirGlobal, tANI_U16, tANI_U8, tpPESession);
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index a35329d..d1bee1a 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -461,11 +461,7 @@
             pAddBssParams->htOperMode = (tSirMacHTOperatingMode)pBeaconStruct->HTInfo.opMode;
             pAddBssParams->dualCTSProtection = ( tANI_U8 ) pBeaconStruct->HTInfo.dualCTSProtection;
 
-#ifdef WLAN_SOFTAP_FEATURE
             chanWidthSupp = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, pftSessionEntry);
-#else 
-            chanWidthSupp = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET);
-#endif
             if( (pBeaconStruct->HTCaps.supportedChannelWidthSet) &&
                 (chanWidthSupp) )
             {
diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
index 8fda56e..2b75412 100644
--- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
+++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
@@ -1253,15 +1253,12 @@
     limSendSmeWmStatusChangeNtf(pMac, eSIR_SME_JOINED_NEW_BSS,
                                 (tANI_U32 *) &newBssInfo,
                                 infoLen,pSessionEntry->smeSessionId);
-#ifdef WLAN_SOFTAP_FEATURE
     {
         //Configure beacon and send beacons to HAL
         limSendBeaconInd(pMac, pSessionEntry);
     }
-#endif
-    
 
-    end:
+ end:
     ibss_coalesce_free(pMac);
 }
 
diff --git a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
index d9b3692..b8de1aa 100644
--- a/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
+++ b/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c
@@ -185,13 +185,11 @@
         return;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
     switch(pMsg->reasonCode)
     {
         case HAL_DEL_STA_REASON_CODE_KEEP_ALIVE:
         case HAL_DEL_STA_REASON_CODE_TIM_BASED:
              PELOGE(limLog(pMac, LOGE, FL(" Deleting station: staId = %d, reasonCode = %d\n"), pMsg->staId, pMsg->reasonCode);)
-#endif
              pStaDs = dphGetHashEntry(pMac, pMsg->assocId, &psessionEntry->dph.dphHashTable);
 
              if (!pStaDs)
@@ -254,7 +252,6 @@
                  }
 #endif
              }
-#ifdef WLAN_SOFTAP_FEATURE
              break;        
 
         case HAL_DEL_STA_REASON_CODE_UNKNOWN_A2:
@@ -268,7 +265,6 @@
              break;
 
     }
-#endif
     palFreeMemory(pMac->hHdd, pMsg);
     return;
 }
@@ -319,11 +315,7 @@
     pBuf = (tANI_U8 *) &pSmeDeauthReq->messageType;
 
     //messageType
-#ifdef WLAN_SOFTAP_FEATURE
     limCopyU16((tANI_U8*)pBuf, eWNI_SME_DISASSOC_REQ);
-#else
-    limCopyU16((tANI_U8*)pBuf, eWNI_SME_DEAUTH_REQ);
-#endif
     pBuf += sizeof(tANI_U16);
     msgLength += sizeof(tANI_U16);
 
@@ -353,11 +345,7 @@
     msgLength += sizeof(tSirMacAddr);
 
     //reasonCode 
-#ifdef WLAN_SOFTAP_FEATURE
     limCopyU16((tANI_U8*)pBuf, (tANI_U16)eLIM_LINK_MONITORING_DISASSOC);
-#else
-    limCopyU16((tANI_U8*)pBuf, (tANI_U16)eLIM_LINK_MONITORING_DEAUTH);
-#endif
     pBuf += sizeof(tANI_U16);
     msgLength += sizeof(tANI_U16);
 
@@ -379,11 +367,7 @@
     //Fill in length
     limCopyU16((tANI_U8*)pLen, msgLength);
 
-#ifdef WLAN_SOFTAP_FEATURE
     limPostSmeMessage(pMac, eWNI_SME_DISASSOC_REQ, (tANI_U32 *) pSmeDeauthReq);
-#else
-    limPostSmeMessage(pMac, eWNI_SME_DEAUTH_REQ, (tANI_U32 *) pSmeDeauthReq);
-#endif
     palFreeMemory( pMac->hHdd, pSmeDeauthReq );
 
 } /*** end limTriggerSTAdeletion() ***/
diff --git a/CORE/MAC/src/pe/lim/limLogDump.c b/CORE/MAC/src/pe/lim/limLogDump.c
index 546c8e9..fc57623 100644
--- a/CORE/MAC/src/pe/lim/limLogDump.c
+++ b/CORE/MAC/src/pe/lim/limLogDump.c
@@ -530,9 +530,7 @@
         sirCopyMacAddr(pDisAssocReq->peerMacAddr,psessionEntry->bssId);
     }
     if((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
-#ifdef WLAN_SOFTAP_FEATURE
        || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-#endif
     )
     {
         sirCopyMacAddr(pDisAssocReq->peerMacAddr,pStaDs->staAddr);
@@ -1279,11 +1277,7 @@
 dump_lim_set_protection_control( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
 {
     dump_cfg_set(pMac, WNI_CFG_FORCE_POLICY_PROTECTION, arg1, arg2, arg3, p);
-#ifdef WLAN_SOFTAP_FEATURE
     limSetCfgProtection(pMac, NULL);
-#else
-    limSetCfgProtection(pMac);
-#endif
     return p;
 }
 
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 64d24bd..52b2ec0 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -170,12 +170,12 @@
 /**---------------------------------------------------------------
 \fn     limProcessAssocReqFrame
 \brief  This function is called by limProcessMessageQueue()
-\       upon Re/Association Request frame reception in 
+\       upon Re/Association Request frame reception in
 \       BTAMP AP or Soft AP role.
 \
 \param pMac
 \param *pRxPacketInfo    - A pointer to Buffer descriptor + associated PDUs
-\param subType - Indicates whether it is Association Request(=0) 
+\param subType - Indicates whether it is Association Request(=0)
 \                or Reassociation Request(=1) frame
 \return None
 ------------------------------------------------------------------*/
@@ -195,11 +195,9 @@
     tSirMacCapabilityInfo   localCapabilities;
     tpDphHashNode           pStaDs = NULL;
     tpSirAssocReq           pAssocReq;
-#ifdef WLAN_SOFTAP_FEATURE
     tLimMlmStates           mlmPrevState;
     tDot11fIERSN            Dot11fIERSN;
     tDot11fIEWPA            Dot11fIEWPA;
-#endif
     tANI_U32 phyMode;
     tHalBitVal qosMode;
     tHalBitVal wsmMode, wmeMode;
@@ -243,7 +241,7 @@
 
     sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG2, (tANI_U8 *) pBody, framelen);
 
-    if( palEqualMemory( pMac->hHdd,  (tANI_U8* ) pHdr->sa, (tANI_U8 *) pHdr->da, 
+    if( palEqualMemory( pMac->hHdd,  (tANI_U8* ) pHdr->sa, (tANI_U8 *) pHdr->da,
                         (tANI_U8) (sizeof(tSirMacAddr))))
     {
         limSendAssocRspMgmtFrame(pMac,
@@ -255,7 +253,6 @@
         return ;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
     // If TKIP counter measures active send Assoc Rsp frame to station with eSIR_MAC_MIC_FAILURE_REASON
     if ((psessionEntry->bTkipCntrMeasActive) && (psessionEntry->limSystemRole == eLIM_AP_ROLE))
     {
@@ -266,16 +263,15 @@
                                     subType, 0, psessionEntry);
         return;
     }
-#endif
 
     // Allocate memory for the Assoc Request frame
-    if ( palAllocateMemory(pMac->hHdd, (void **)&pAssocReq, sizeof(*pAssocReq)) != eHAL_STATUS_SUCCESS) 
+    if ( palAllocateMemory(pMac->hHdd, (void **)&pAssocReq, sizeof(*pAssocReq)) != eHAL_STATUS_SUCCESS)
     {
         limLog(pMac, LOGP, FL("PAL Allocate Memory failed in AssocReq\n"));
         return;
     }
     palZeroMemory( pMac->hHdd, (void *)pAssocReq , sizeof(*pAssocReq));
-   
+
     // Parse Assoc Request frame
     if (subType == LIM_ASSOC)
         status = sirConvertAssocReqFrame2Struct(pMac, pBody, framelen, pAssocReq);
@@ -451,7 +447,6 @@
         goto error;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
 
     if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
        (psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11G_ONLY) &&
@@ -474,7 +469,6 @@
         goto error;
     }//end if PhyMode == 11N_only
 
-#endif
 
     /* Spectrum Management (11h) specific checks */
     if (localCapabilities.spectrumMgt)
@@ -685,7 +679,6 @@
         }
     } // End if on HT caps turned on in lim.
 
-#ifdef WLAN_SOFTAP_FEATURE
     /* Clear the buffers so that frame parser knows that there isn't a previously decoded IE in these buffers */
     palZeroMemory( pMac->hHdd, ( tANI_U8* )&Dot11fIERSN, sizeof( Dot11fIERSN ) );
     palZeroMemory( pMac->hHdd, ( tANI_U8* )&Dot11fIEWPA, sizeof( Dot11fIEWPA ) );
@@ -812,7 +805,6 @@
             && psessionEntry->pLimStartBssReq->rsnIE->length) */
 
     } /* end of     if( ! pAssocReq->wscInfo.present ) */
-#endif //WLAN_SOFTAP_FEATURE
 
     /**
      * Extract 'associated' context for STA, if any.
@@ -1208,7 +1200,6 @@
         limGetWsmMode(psessionEntry, &wsmMode);
         /* WMM_APSD - WMM_SA related processing should be separate; WMM_SA and WMM_APSD
          can coexist */
-#ifdef WLAN_SOFTAP_FEATURE
         if( pAssocReq->WMMInfoStation.present)
         {
             /* check whether AP supports or not */
@@ -1243,7 +1234,6 @@
                 pStaDs->qos.capability.qosInfo.maxSpLen = pAssocReq->WMMInfoStation.max_sp_length;
             }
         }
-#endif
         //if (assoc.wsmCapablePresent && pMac->dph.gDphWsmEnabled)
         if (pAssocReq->wsmCapablePresent && (wsmMode == eHAL_SET))
             pStaDs->wsmEnabled = eANI_BOOLEAN_TRUE;
@@ -1290,7 +1280,6 @@
     {
         pStaDs->mlmStaContext.updateContext = 1;
 
-#ifdef WLAN_SOFTAP_FEATURE
         mlmPrevState = pStaDs->mlmStaContext.mlmState;
 
         /* As per the HAL/FW needs the reassoc req need not be calling limDelSta */
@@ -1325,7 +1314,6 @@
             }
 
         }
-#endif
 
     }
 
@@ -1384,9 +1372,7 @@
     tANI_U16                temp;
     tANI_U32                phyMode;
     tANI_U8                 subType;
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_U8                 *wpsIe = NULL;
-#endif
     tANI_U32                tmp;
 //    tANI_U16                statusCode;    
     tANI_U16                i, j=0;
@@ -1404,11 +1390,7 @@
         subType = LIM_REASSOC;
     else 
         subType = LIM_ASSOC;
-#ifdef WLAN_SOFTAP_FEATURE
     if (subType == LIM_ASSOC || subType == LIM_REASSOC)
-#else
-    if (subType == LIM_ASSOC )
-#endif
     {
         temp  = sizeof(tLimMlmAssocInd);
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)        
@@ -1464,15 +1446,11 @@
 
         // Fill in RSN IE information
         pMlmAssocInd->rsnIE.length = 0;
-#ifdef WLAN_SOFTAP_FEATURE
         // if WPS IE is present, ignore RSN IE
         if (pAssocReq->addIEPresent && pAssocReq->addIE.length ) {
             wpsIe = limGetWscIEPtr(pMac, pAssocReq->addIE.addIEdata, pAssocReq->addIE.length);
         }
         if (pAssocReq->rsnPresent && (NULL == wpsIe))
-#else
-        if (pAssocReq->rsnPresent)
-#endif
         {
             limLog(pMac, LOG2, FL("Assoc Req RSN IE len = %d\n"), pAssocReq->rsn.length);
             pMlmAssocInd->rsnIE.length = 2 + pAssocReq->rsn.length;
@@ -1496,12 +1474,8 @@
             pMlmAssocInd->spectrumMgtIndicator = eSIR_FALSE;
 
 
-#ifdef WLAN_SOFTAP_FEATURE
         /* This check is to avoid extra Sec IEs present incase of WPS */
         if (pAssocReq->wpaPresent && (NULL == wpsIe))
-#else
-        if ((pAssocReq->wpaPresent) && (pMlmAssocInd->rsnIE.length < SIR_MAC_MAX_IE_LENGTH))
-#endif
         {
             if((pMlmAssocInd->rsnIE.length + pAssocReq->wpa.length) >= SIR_MAC_MAX_IE_LENGTH)
             {
@@ -1529,7 +1503,6 @@
             pMlmAssocInd->addIE.length = pAssocReq->addIE.length;
        }
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(pAssocReq->wmeInfoPresent)
         {
 
@@ -1548,7 +1521,6 @@
             /* Note: we are not rejecting association here because IOT will fail */
 
         }
-#endif
 
         // Required for indicating the frames to upper layer
         pMlmAssocInd->assocReqLength = pAssocReq->assocReqFrameLength;
@@ -1622,14 +1594,10 @@
         pMlmReassocInd->capabilityInfo = pAssocReq->capabilityInfo;
         pMlmReassocInd->rsnIE.length = 0;
 
-#ifdef WLAN_SOFTAP_FEATURE
         if (pAssocReq->addIEPresent && pAssocReq->addIE.length )
             wpsIe = limGetWscIEPtr(pMac, pAssocReq->addIE.addIEdata, pAssocReq->addIE.length);
 
         if (pAssocReq->rsnPresent && (NULL == wpsIe))
-#else
-        if (pAssocReq->rsnPresent)
-#endif
         {
             limLog(pMac, LOG2, FL("Assoc Req: RSN IE length = %d\n"), pAssocReq->rsn.length);
             pMlmReassocInd->rsnIE.length = 2 + pAssocReq->rsn.length;
@@ -1664,12 +1632,8 @@
             pMlmReassocInd->spectrumMgtIndicator = eSIR_FALSE;
 
 
-#ifdef WLAN_SOFTAP_FEATURE
         /* This check is to avoid extra Sec IEs present incase of WPS */
         if (pAssocReq->wpaPresent && (NULL == wpsIe))
-#else
-        if (pAssocReq->wpaPresent)
-#endif
         {
             limLog(pMac, LOG2, FL("Received WPA IE length in Assoc Req is %d\n"), pAssocReq->wpa.length);
             pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length] = SIR_MAC_WPA_EID;
@@ -1692,7 +1656,6 @@
             pMlmReassocInd->addIE.length = pAssocReq->addIE.length;
        }
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(pAssocReq->wmeInfoPresent)
         {
 
@@ -1711,7 +1674,6 @@
             /* Note: we are not rejecting Re-association here because IOT will fail */
 
         }
-#endif
 
         // Required for indicating the frames to upper layer
         pMlmReassocInd->assocReqLength = pAssocReq->assocReqFrameLength;
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
old mode 100755
new mode 100644
index eac2e11..31168c0
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -174,10 +174,8 @@
     tANI_U8                 *pChallenge;
     tANI_U32                key_length=8;
     tANI_U8                 challengeTextArray[SIR_MAC_AUTH_CHALLENGE_LENGTH];
-#ifdef WLAN_SOFTAP_FEATURE
     tpDphHashNode           pStaDs = NULL;
     tANI_U16                assocId = 0;
-#endif
     /* Added For BT -AMP support */
     // Get pointer to Authentication frame header and body
  
@@ -233,7 +231,6 @@
          * WEP bit is set in FC of MAC header.
          */
 
-#ifdef WLAN_SOFTAP_FEATURE
         // If TKIP counter measures enabled issue Deauth frame to station
         if ((psessionEntry->bTkipCntrMeasActive) && (psessionEntry->limSystemRole == eLIM_AP_ROLE))
         {
@@ -245,7 +242,6 @@
                                     pHdr->sa, psessionEntry, FALSE );
             return;
         }
-#endif
 
         // Extract key ID from IV (most 2 bits of 4th byte of IV)
 
@@ -287,13 +283,11 @@
 
             return;
         }
-#ifdef WLAN_SOFTAP_FEATURE
         if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
         {
             val = psessionEntry->privacy; 
         } 
         else 
-#endif
         // Accept Authentication frame only if Privacy is implemented
         if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED,
                       &val) != eSIR_SUCCESS)
@@ -455,7 +449,6 @@
 
                 val = SIR_MAC_KEY_LENGTH;
 
-#ifdef WLAN_SOFTAP_FEATURE  
                 if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
                 {   
                     tpSirKeys pKey;
@@ -464,7 +457,6 @@
                     val = pKey->keyLength;
                 }                   
                 else                              
-#endif                                    
                 if (wlan_cfgGetStr(pMac, (tANI_U16) (WNI_CFG_WEP_DEFAULT_KEY_1 + keyId),
                               defaultKey, &val) != eSIR_SUCCESS)
                 {
@@ -639,7 +631,6 @@
                     PELOGE(limLog(pMac, LOGE, FL("STA is initiating brand-new Authentication ...\n"));)
                     limDeletePreAuthNode(pMac,
                                          pHdr->sa);
-#ifdef WLAN_SOFTAP_FEATURE                    
                     /**
                      *  SAP Mode:Disassociate the station and 
                      *  delete its entry if we have its entry 
@@ -670,7 +661,6 @@
                         limTriggerSTAdeletion(pMac, pStaDs, psessionEntry);
                         return;
                     }
-#endif
                 }
                 else
                 {
@@ -718,18 +708,10 @@
                 return;
             }
             /// No Pre-auth context exists for the STA.
-#ifdef WLAN_SOFTAP_FEATURE
             if (limIsAuthAlgoSupported(
                                       pMac,
                                       (tAniAuthType)
                                       pRxAuthFrameBody->authAlgoNumber, psessionEntry))
-#else
-            if (limIsAuthAlgoSupported(
-                                      pMac,
-                                      (tAniAuthType)
-                                      pRxAuthFrameBody->authAlgoNumber))
-
-#endif
             {
                 switch (pRxAuthFrameBody->authAlgoNumber)
                 {
@@ -795,13 +777,11 @@
 
                     case eSIR_SHARED_KEY:
                         PELOGW(limLog(pMac, LOGW, FL("=======> eSIR_SHARED_KEY  ...\n"));)
-#ifdef WLAN_SOFTAP_FEATURE
                         if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
                         {
                             val = psessionEntry->privacy;
                         }
                         else   
-#endif
                         if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED,
                                       &val) != eSIR_SUCCESS)
                         {
@@ -1117,13 +1097,11 @@
                 {
                     // Shared key authentication
 
-#ifdef WLAN_SOFTAP_FEATURE
                     if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
                     {
                         val = psessionEntry->privacy;
                     }
                     else   
-#endif
                     if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED,
                                   &val) != eSIR_SUCCESS)
                     {
@@ -1256,7 +1234,6 @@
 
                             val = SIR_MAC_KEY_LENGTH;
 
-#ifdef WLAN_SOFTAP_FEATURE  
                             if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
                             {
                                 tpSirKeys pKey;
@@ -1264,7 +1241,6 @@
                                 palCopyMemory( pMac->hHdd, defaultKey, pKey->key, pKey->keyLength);
                             }
                             else
-#endif
                             if (wlan_cfgGetStr(pMac, (tANI_U16) (WNI_CFG_WEP_DEFAULT_KEY_1 + keyId),
                                           defaultKey,
                                           &val)
diff --git a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
index 05ebe96..76822a4 100644
--- a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
+++ b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
@@ -152,15 +152,10 @@
 \param      tpAniSirGlobal    pMac
 \return      None
   -------------------------------------------------------------*/
-#ifdef WLAN_SOFTAP_FEATURE
 void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry)
-#else
-void limSetCfgProtection(tpAniSirGlobal pMac)
-#endif
 {
     tANI_U32 val = 0;
 
-#ifdef WLAN_SOFTAP_FEATURE
     if(( pesessionEntry != NULL ) && (pesessionEntry->limSystemRole == eLIM_AP_ROLE )){
         if (pesessionEntry->gLimProtectionControl == WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE )
             palZeroMemory( pMac->hHdd, (void *)&pesessionEntry->cfgProtection , sizeof(tCfgProtection));
@@ -179,7 +174,6 @@
         }
     }
     else{
-#endif
     if (wlan_cfgGetInt(pMac, WNI_CFG_FORCE_POLICY_PROTECTION, &val) != eSIR_SUCCESS)
     {
         limLog(pMac, LOGP, FL("reading WNI_CFG_FORCE_POLICY_PROTECTION cfg failed\n"));
@@ -221,9 +215,7 @@
             pMac->lim.cfgProtection.obss= (val >> WNI_CFG_PROTECTION_ENABLED_OBSS) & 1;
 
         }
-#ifdef WLAN_SOFTAP_FEATURE
-}
-#endif
+    }
 }
 
 
@@ -428,11 +420,7 @@
         break;
 
     case WNI_CFG_PROTECTION_ENABLED:
-#ifdef WLAN_SOFTAP_FEATURE
         limSetCfgProtection(pMac, NULL);
-#else
-        limSetCfgProtection(pMac);
-#endif
         break;
     case WNI_CFG_PROBE_RSP_BCN_ADDNIE_FLAG:
     {
@@ -721,11 +709,7 @@
 
     psessionEntry->shortSlotTimeSupported = limGetShortSlotFromPhyMode(pMac, psessionEntry, phyMode);
 
-#ifdef WLAN_SOFTAP_FEATURE
     limSetCfgProtection(pMac, psessionEntry);    
-#else
-    limSetCfgProtection(pMac);    
-#endif
 
 
     /* Added for BT - AMP Support */
diff --git a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
index dcbcb72..52ecafb 100644
--- a/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessDeauthFrame.c
@@ -247,9 +247,7 @@
     /* If received DeAuth from AP other than the one we're trying to join with
      * nor associated with, then ignore deauth and delete Pre-auth entry.
      */
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole != eLIM_AP_ROLE ){
-#endif
         if (!IS_CURRENT_BSSID(pMac, pHdr->bssId, psessionEntry))
         {
             PELOGE(limLog(pMac, LOGE, FL("received DeAuth from an AP other than we're trying to join. Ignore. \n"));)
@@ -260,9 +258,7 @@
             }
             return;
         }
-#ifdef WLAN_SOFTAP_FEATURE
     }
-#endif
 
         pStaDs = dphLookupHashEntry(pMac, pHdr->sa, &aid, &psessionEntry->dph.dphHashTable);
 
@@ -396,10 +392,8 @@
             case eLIM_STA_IN_IBSS_ROLE:
                 break;
 
-#ifdef WLAN_SOFTAP_FEATURE
             case eLIM_AP_ROLE:
                 break;
-#endif 
 
             default: // eLIM_AP_ROLE or eLIM_BT_AMP_AP_ROLE
 
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index 5d12a6f..762f068 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -919,9 +919,7 @@
                 case SIR_MAC_MGMT_ASSOC_REQ:
                     // Make sure the role supports Association
                     if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
-#ifdef WLAN_SOFTAP_FEATURE
                     || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-#endif
                     )
                         limProcessAssocReqFrame(pMac, pRxPacketInfo, LIM_ASSOC, psessionEntry);
 
@@ -940,9 +938,7 @@
                 case SIR_MAC_MGMT_REASSOC_REQ:
                     // Make sure the role supports Reassociation
                     if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
-#ifdef WLAN_SOFTAP_FEATURE
                       || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-#endif                   
                     ){
                         limProcessAssocReqFrame(pMac, pRxPacketInfo, LIM_REASSOC, psessionEntry);
                     }
@@ -1470,7 +1466,6 @@
         case eWNI_SME_SET_TX_POWER_REQ:
         case eWNI_SME_GET_TX_POWER_REQ:
         case eWNI_SME_GET_NOISE_REQ:
-#ifdef WLAN_SOFTAP_FEATURE        
         case eWNI_SME_GET_ASSOC_STAS_REQ:
         case eWNI_SME_TKIP_CNTR_MEAS_REQ:
         case eWNI_SME_UPDATE_APWPSIE_REQ:
@@ -1478,7 +1473,6 @@
         case eWNI_SME_GET_WPSPBC_SESSION_REQ:
         case eWNI_SME_SET_APWPARSNIEs_REQ:
         case eWNI_SME_CHNG_MCC_BEACON_INTERVAL:
-#endif
 #if defined WLAN_FEATURE_VOWIFI
         case eWNI_SME_NEIGHBOR_REPORT_REQ_IND:
         case eWNI_SME_BEACON_REPORT_RESP_XMIT_IND:
@@ -1774,9 +1768,7 @@
                         pmmUpdateTIM(pMac, (tpBeaconGenParams)limMsg->bodyptr);
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
                 if( pMac->lim.gLimSystemRole != eLIM_AP_ROLE )
-#endif                  
                     schProcessPreBeaconInd(pMac, limMsg);    
 
                 }
@@ -1948,7 +1940,6 @@
             limProcessQuietBssTimeout(pMac);
             break;
 
-#ifdef WLAN_SOFTAP_FEATURE
         case SIR_LIM_UPDATE_OLBC_CACHEL_TIMEOUT:
             limHandleUpdateOlbcCache(pMac);
             break;
@@ -1958,7 +1949,6 @@
             break;
 #endif
 
-#endif
 
 #ifdef FEATURE_WLAN_TDLS_INTERNAL
         /*
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 3c1bdc8..2f1d5c1 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -1473,7 +1473,6 @@
     if(IS_DOT11_MODE_HT(psessionEntry->dot11mode)) 
     {
         pSta->htCapable         = htCapable;
-#ifdef WLAN_SOFTAP_FEATURE
         pSta->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD, psessionEntry);
         pSta->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry );
         pSta->mimoPS            = (tSirMacHTMIMOPowerSaveState)limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE, psessionEntry );
@@ -1485,20 +1484,6 @@
         pSta->fDsssCckMode40Mhz = limGetHTCapability( pMac, eHT_DSSS_CCK_MODE_40MHZ, psessionEntry);
         pSta->fShortGI20Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_20MHZ, psessionEntry);
         pSta->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ, psessionEntry);
-#else
-        pSta->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD );
-        pSta->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET );
-        pSta->mimoPS            = (tSirMacHTMIMOPowerSaveState)limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE );
-        pSta->rifsMode          = limGetHTCapability( pMac, eHT_RIFS_MODE );
-        pSta->lsigTxopProtection = limGetHTCapability( pMac, eHT_LSIG_TXOP_PROTECTION );
-        pSta->delBASupport      = limGetHTCapability( pMac, eHT_DELAYED_BA );
-        pSta->maxAmpduDensity   = limGetHTCapability( pMac, eHT_MPDU_DENSITY );
-        pSta->maxAmsduSize      = limGetHTCapability( pMac, eHT_MAX_AMSDU_LENGTH );
-        pSta->fDsssCckMode40Mhz = limGetHTCapability( pMac, eHT_DSSS_CCK_MODE_40MHZ);
-        pSta->fShortGI20Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_20MHZ);
-        pSta->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ);
-
-#endif
     }
 #ifdef WLAN_FEATURE_11AC
     if (psessionEntry->vhtCapability)
@@ -1575,17 +1560,11 @@
         (pMlmStartReq->bssType == eSIR_BTAMP_STA_MODE)) {
         pAddBssParams->operMode                 = BSS_OPERATIONAL_MODE_STA;
     }
-#ifdef WLAN_SOFTAP_FEATURE
     else if (pMlmStartReq->bssType == eSIR_INFRA_AP_MODE){
-#else
-    else{
-#endif
         pAddBssParams->operMode                 = BSS_OPERATIONAL_MODE_AP;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE  
     pAddBssParams->shortSlotTimeSupported = psessionEntry->shortSlotTimeSupported;
-#endif
 
     pAddBssParams->beaconInterval               = pMlmStartReq->beaconPeriod;
     pAddBssParams->dtimPeriod                   = pMlmStartReq->dtimPeriod;
@@ -1620,14 +1599,12 @@
         pMlmStartReq->ssId.ssId,
         pMlmStartReq->ssId.length);
     pAddBssParams->ssId.length = pMlmStartReq->ssId.length;
-#ifdef WLAN_SOFTAP_FEATURE
     pAddBssParams->bHiddenSSIDEn = pMlmStartReq->ssidHidden;
     limLog( pMac, LOGE, FL( "TRYING TO HIDE SSID %d\n" ),pAddBssParams->bHiddenSSIDEn);
     // CR309183. Disable Proxy Probe Rsp.  Host handles Probe Requests.  Until FW fixed. 
     pAddBssParams->bProxyProbeRespEn = 0;
     pAddBssParams->obssProtEnabled = pMlmStartReq->obssProtEnabled;
 
-#endif
 #if defined WLAN_FEATURE_VOWIFI  
     pAddBssParams->maxTxPower = psessionEntry->maxTxPower;
 #endif
@@ -1772,7 +1749,6 @@
         limLog(pMac, LOGP, FL("could not set WNI_CFG_CURRENT_TX_POWER_LEVEL at CFG\n"));
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 #if 0 // Periodic timer for remove WPS PBC proble response entry in PE is disbaled now.
     if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
     {
@@ -1800,7 +1776,6 @@
        }
     }
 #endif
-#endif
 
 
    
@@ -2309,16 +2284,10 @@
           (psessionEntry->limMlmState == eLIM_MLM_BSS_STARTED_STATE))) &&
         (limIsGroupAddr(pMac->lim.gpLimMlmAuthReq->peerMacAddr)
                                                    == false) &&
-#ifdef WLAN_SOFTAP_FEATURE
         (limIsAuthAlgoSupported(
                         pMac,
                         pMac->lim.gpLimMlmAuthReq->authType,
                         psessionEntry) == true)
-#else
-        (limIsAuthAlgoSupported(
-                        pMac,
-                        pMac->lim.gpLimMlmAuthReq->authType) == true)
-#endif
         )        
     {
         /**
@@ -3416,13 +3385,8 @@
 
     pStaDs = dphLookupHashEntry( pMac, pMlmSetKeysReq->peerMacAddr, &aid , &psessionEntry->dph.dphHashTable);
 
-#ifdef WLAN_SOFTAP_FEATURE
     if ((pStaDs == NULL) ||
            ((pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) && (psessionEntry->limSystemRole != eLIM_AP_ROLE))) {
-#else
-    if ((pStaDs == NULL) ||
-           ((pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) )) {
-#endif
         /**
          * Received LIM_MLM_SETKEYS_REQ for STA
          * that does not have context or in some
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index 7f7efd1..5efea22 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -410,12 +410,10 @@
         {
              limLog(pMac, LOG1, FL("*** Started BSS in BT_AMP AP SIDE***\n"));
         }
-#ifdef WLAN_SOFTAP_FEATURE
         else if(psessionEntry->bssType == eSIR_INFRA_AP_MODE)
         {
              limLog(pMac, LOG1, FL("*** Started BSS in INFRA AP SIDE***\n"));
         }
-#endif
         else
             PELOG1(limLog(pMac, LOG1, FL("*** Started BSS ***\n"));)
     }
@@ -429,13 +427,11 @@
     limSendSmeStartBssRsp(pMac, eWNI_SME_START_BSS_RSP,
                           ((tLimMlmStartCnf *) pMsgBuf)->resultCode,psessionEntry,
                           smesessionId,smetransactionId);
-#ifdef WLAN_SOFTAP_FEATURE
     if (((tLimMlmStartCnf *) pMsgBuf)->resultCode == eSIR_SME_SUCCESS)
     {
         //Configure beacon and send beacons to HAL
         limSendBeaconInd(pMac, psessionEntry);
     }
-#endif
 }
 
  /*** end limProcessMlmStartCnf() ***/
@@ -1168,10 +1164,8 @@
                      (tANI_U8 *) &(pAssocInd->supportedChannels.channelList),
                      pAssocInd->supportedChannels.numChnl);
     }
-#ifdef WLAN_SOFTAP_FEATURE
     // Fill in WmmInfo
     pSirSmeAssocInd->wmmEnabledSta = pAssocInd->WmmStaInfoPresent;
-#endif
 } /*** end limAssocIndSerDes() ***/
 
 
@@ -1254,9 +1248,7 @@
         return;
     }
     pSirSmeAssocInd->staId = pStaDs->staIndex;
-#ifdef WLAN_SOFTAP_FEATURE
    pSirSmeAssocInd->reassocReq = pStaDs->mlmStaContext.subType;
-#endif
     MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
     limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_IND_EVENT, psessionEntry, 0, 0);
@@ -1963,9 +1955,7 @@
     //the deffered flag.
     SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
     if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
-#ifdef WLAN_SOFTAP_FEATURE
     || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-#endif
     )
     {
         limProcessBtAmpApMlmAddStaRsp(pMac, limMsgQ,psessionEntry);
@@ -2073,9 +2063,7 @@
 
     if (((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)  ||
          (psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE)
-#ifdef WLAN_SOFTAP_FEATURE
          || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-#endif
          ) &&
         (psessionEntry->statypeForBss == STA_ENTRY_SELF))
     {
@@ -2219,10 +2207,8 @@
 #endif
     dphHashTableClassInit(pMac, &psessionEntry->dph.dphHashTable);//TBD-RAJESH is it needed ?
     limDeletePreAuthList(pMac);
-#ifdef WLAN_SOFTAP_FEATURE
     //Initialize number of associated stations during cleanup
     psessionEntry->gLimNumOfCurrentSTAs = 0;
-#endif
     end:
     limSendSmeRsp(pMac, eWNI_SME_STOP_BSS_RSP, rc,  psessionEntry->smeSessionId,  psessionEntry->transactionId);
     peDeleteSession(pMac, psessionEntry);
@@ -2252,9 +2238,7 @@
     }
 
     if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)
-#ifdef WLAN_SOFTAP_FEATURE
       || (psessionEntry->limSystemRole == eLIM_AP_ROLE)
-#endif
     )
     {
         limProcessBtAmpApMlmDelStaRsp(pMac,limMsgQ,psessionEntry);
@@ -2558,12 +2542,10 @@
         psessionEntry->limSystemRole = eLIM_STA_IN_IBSS_ROLE;
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
         if ( eSIR_INFRA_AP_MODE == pAddBssParams->bssType )
             psessionEntry->limSystemRole = eLIM_AP_ROLE;
         else
             psessionEntry->limSystemRole = eLIM_STA_IN_IBSS_ROLE;
-#endif
         schEdcaProfileUpdate(pMac, psessionEntry);
         limInitPreAuthList(pMac);
         limInitPeerIdxpool(pMac,psessionEntry);
@@ -2968,7 +2950,6 @@
         else
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
         pAddStaParams->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD, psessionEntry);
         pAddStaParams->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry);
         pAddStaParams->mimoPS            = limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE, psessionEntry );
@@ -2981,20 +2962,6 @@
         pAddStaParams->fDsssCckMode40Mhz = limGetHTCapability( pMac, eHT_DSSS_CCK_MODE_40MHZ, psessionEntry);
         pAddStaParams->fShortGI20Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_20MHZ, psessionEntry);
         pAddStaParams->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ, psessionEntry);
-#else
-        pAddStaParams->greenFieldCapable = limGetHTCapability( pMac, eHT_GREENFIELD );
-        pAddStaParams->txChannelWidthSet = limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET );
-        pAddStaParams->mimoPS            = limGetHTCapability( pMac, eHT_MIMO_POWER_SAVE );
-        pAddStaParams->rifsMode          = limGetHTCapability( pMac, eHT_RIFS_MODE );
-        pAddStaParams->lsigTxopProtection = limGetHTCapability( pMac, eHT_LSIG_TXOP_PROTECTION );
-        pAddStaParams->delBASupport      = limGetHTCapability( pMac, eHT_DELAYED_BA );
-        pAddStaParams->maxAmpduDensity   = limGetHTCapability( pMac, eHT_MPDU_DENSITY );
-        pAddStaParams->maxAmpduSize   = limGetHTCapability(pMac, eHT_MAX_RX_AMPDU_FACTOR);
-        pAddStaParams->maxAmsduSize      = limGetHTCapability( pMac, eHT_MAX_AMSDU_LENGTH );
-        pAddStaParams->fDsssCckMode40Mhz = limGetHTCapability( pMac, eHT_DSSS_CCK_MODE_40MHZ);
-        pAddStaParams->fShortGI20Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_20MHZ);
-        pAddStaParams->fShortGI40Mhz     = limGetHTCapability( pMac, eHT_SHORT_GI_40MHZ);
-#endif
     }
 
     if (wlan_cfgGetInt(pMac, WNI_CFG_LISTEN_INTERVAL, &listenInterval) != eSIR_SUCCESS)
@@ -5133,7 +5100,6 @@
 } /*** end __limProcessSmeAssocCnfNew() ***/
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 void
 limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry){
     tBeaconGenParams *pBeaconGenParams = NULL;
@@ -5159,4 +5125,3 @@
     schProcessPreBeaconInd(pMac, &limMsg);
     return;
 }
-#endif
diff --git a/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c b/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
index 0c06bad..890f0c4 100644
--- a/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
@@ -71,7 +71,6 @@
 void limSendP2PProbeResponse(tpAniSirGlobal pMac, tANI_U8 *pBd, 
                       tpPESession psessionEntry);
 #endif
-#ifdef WLAN_SOFTAP_FEATURE
 void
 
 limSendSmeProbeReqInd(tpAniSirGlobal pMac,
@@ -368,7 +367,6 @@
     limRemoveTimeoutPBCsessions(pMac, psessionEntry->pAPWPSPBCSession);
 
 }
-#endif
 
 /**
  * limCheck11bRates
@@ -521,7 +519,6 @@
                     }
                 }
 #endif
-#ifdef WLAN_SOFTAP_FEATURE
                 if ((psessionEntry->limSystemRole == eLIM_AP_ROLE))
                 {
                   
@@ -548,7 +545,6 @@
                 }
                 else
                 {
-#endif
                     if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
                         limLog(pMac, LOGP,"Failed to cfg get id %d\n", WNI_CFG_WPS_ENABLE );
 
@@ -585,9 +581,7 @@
                             PELOG3(limLog(pMac, LOG3, FL("couldnt send the probe req to wsm "));)
                         }
                     }
-#ifdef WLAN_SOFTAP_FEATURE
                 }
-#endif
             }
 
             ssId.length = psessionEntry->ssId.length;
@@ -660,14 +654,12 @@
                 {
                     // Broadcast SSID in the Probe Request.
                     // Reply with SSID we're configured with.
-#ifdef WLAN_SOFTAP_FEATURE
                     //Turn off the SSID length to 0 if hidden SSID feature is present
                     if(psessionEntry->ssidHidden)
                       /*We are returning from here as probe request contains the broadcast SSID.
                         So no need to send the probe resp*/
                         //ssId.length = 0;
                            return;
-#endif
                     limSendProbeRspMgmtFrame(pMac, pHdr->sa, &ssId, DPH_USE_MGMT_STAID,
                                              DPH_NON_KEEPALIVE_FRAME, psessionEntry,
                                              probeReq.p2pIePresent);
@@ -839,7 +831,6 @@
 
 } /*** end limProcessProbeReqFrame_multiple_BSS() ***/
 
-#ifdef WLAN_SOFTAP_FEATURE
 /**
  * limSendSmeProbeReqInd()
  *
@@ -904,7 +895,6 @@
     } 
         
 } /*** end limSendSmeProbeReqInd() ***/
-#endif
 #ifdef WLAN_FEATURE_P2P_INTERNAL
 void limSendP2PProbeResponse(tpAniSirGlobal pMac, tANI_U8 *pBd, 
                       tpPESession psessionEntry)
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 66b9b15..6aee9a3 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -75,9 +75,7 @@
 #include "limApi.h"
 #include "wmmApsd.h"
 
-#ifdef WLAN_SOFTAP_FEATURE
 #include "sapApi.h"
-#endif
 
 #if defined WLAN_FEATURE_VOWIFI
 #include "rrmApi.h"
@@ -684,7 +682,6 @@
 
         switch(pSmeStartBssReq->bssType)
         {
-#ifdef WLAN_SOFTAP_FEATURE
             case eSIR_INFRA_AP_MODE:
                  psessionEntry->limSystemRole = eLIM_AP_ROLE;
                  psessionEntry->privacy = pSmeStartBssReq->privacy;
@@ -716,7 +713,6 @@
                  psessionEntry->wps_state = pSmeStartBssReq->wps_state;
                  psessionEntry->shortSlotTimeSupported = limGetShortSlotFromPhyMode(pMac, psessionEntry, psessionEntry->gLimPhyMode);
                  break;
-#endif
             case eSIR_IBSS_MODE:
                  psessionEntry->limSystemRole = eLIM_STA_IN_IBSS_ROLE;
                  break;
@@ -741,9 +737,7 @@
 
         // BT-AMP: Allocate memory for the array of parsed (Re)Assoc request structure
         if ( (pSmeStartBssReq->bssType == eSIR_BTAMP_AP_MODE)
-#ifdef WLAN_SOFTAP_FEATURE
         || (pSmeStartBssReq->bssType == eSIR_INFRA_AP_MODE)
-#endif
         )
         {
             if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&psessionEntry->parsedAssocReq,
@@ -855,15 +849,12 @@
 
         psessionEntry->htCapability = IS_DOT11_MODE_HT(pSmeStartBssReq->dot11mode);
 
-#ifdef WLAN_SOFTAP_FEATURE
             /* keep the RSN/WPA IE information in PE Session Entry
              * later will be using this to check when received (Re)Assoc req
              * */
         limSetRSNieWPAiefromSmeStartBSSReqMessage(pMac,&pSmeStartBssReq->rsnIE,psessionEntry);
 
-#endif
 
-#ifdef WLAN_SOFTAP_FEATURE
         //Taken care for only softAP case rest need to be done
         if (psessionEntry->limSystemRole == eLIM_AP_ROLE){
             psessionEntry->gLimProtectionControl =  pSmeStartBssReq->protEnabled;
@@ -875,7 +866,6 @@
                           sizeof( tCfgProtection ));
             psessionEntry->pAPWPSPBCSession = NULL; // Initialize WPS PBC session link list
         }
-#endif
 
         // Prepare and Issue LIM_MLM_START_REQ to MLM
         if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pMlmStartReq, sizeof(tLimMlmStartReq)))
@@ -891,10 +881,8 @@
         palCopyMemory( pMac->hHdd, (tANI_U8 *) &pMlmStartReq->ssId,
                           (tANI_U8 *) &pSmeStartBssReq->ssId,
                           pSmeStartBssReq->ssId.length + 1);
-#ifdef WLAN_SOFTAP_FEATURE
         pMlmStartReq->ssidHidden = pSmeStartBssReq->ssidHidden;
         pMlmStartReq->obssProtEnabled = pSmeStartBssReq->obssProtEnabled;
-#endif
 
 
         pMlmStartReq->bssType = psessionEntry->bssType;
@@ -903,9 +891,7 @@
         pMlmStartReq->sessionId = psessionEntry->peSessionId;
 
         if( (pMlmStartReq->bssType == eSIR_BTAMP_STA_MODE) || (pMlmStartReq->bssType == eSIR_BTAMP_AP_MODE )
-#ifdef WLAN_SOFTAP_FEATURE
             || (pMlmStartReq->bssType == eSIR_INFRA_AP_MODE)
-#endif
         )
         {
             //len = sizeof(tSirMacAddr);
@@ -955,13 +941,11 @@
         pMlmStartReq->cbMode = pSmeStartBssReq->cbMode;        
         pMlmStartReq->beaconPeriod = psessionEntry->beaconParams.beaconInterval;
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(psessionEntry->limSystemRole == eLIM_AP_ROLE ){
             pMlmStartReq->dtimPeriod = psessionEntry->dtimPeriod;
             pMlmStartReq->wps_state = psessionEntry->wps_state;
 
         }else
-#endif        
         {
             if (wlan_cfgGetInt(pMac, WNI_CFG_DTIM_PERIOD, &val) != eSIR_SUCCESS)
                 limLog(pMac, LOGP, FL("could not retrieve DTIM Period\n"));
@@ -2505,11 +2489,7 @@
 
         case eLIM_AP_ROLE:
             // Fall through
-#ifdef WLAN_SOFTAP_FEATURE
             break;
-#else
-            return;
-#endif
 
         case eLIM_STA_IN_IBSS_ROLE:
         default: // eLIM_UNKNOWN_ROLE
@@ -2523,9 +2503,7 @@
 
     if ( (psessionEntry->limSmeState == eLIM_SME_WT_DISASSOC_STATE) || 
          (psessionEntry->limSmeState == eLIM_SME_WT_DEAUTH_STATE)
-#ifdef WLAN_SOFTAP_FEATURE
           || (psessionEntry->limSystemRole == eLIM_AP_ROLE )   
-#endif
      )
     {       
         pStaDs = dphLookupHashEntry(pMac, smeDisassocCnf.peerMacAddr, &aid, &psessionEntry->dph.dphHashTable);
@@ -2863,7 +2841,6 @@
            FL("received SETCONTEXT_REQ message sessionId=%d\n"), pMlmSetKeysReq->sessionId););
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(((pSetContextReq->keyMaterial.edType == eSIR_ED_WEP40) || (pSetContextReq->keyMaterial.edType == eSIR_ED_WEP104))
         && (psessionEntry->limSystemRole == eLIM_AP_ROLE))
         {
@@ -2883,7 +2860,6 @@
                 }
             }
         }
-#endif
 
         limPostMlmMessage(pMac, LIM_MLM_SETKEYS_REQ, (tANI_U32 *) pMlmSetKeysReq);
     }
@@ -3102,7 +3078,6 @@
 }
 
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limProcessSmeGetAssocSTAsInfo(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
     tSirSmeGetAssocSTAsReq  getAssocSTAsReq;
@@ -3285,7 +3260,6 @@
     pSapEventCallback(&sapEvent, GetWPSPBCSessionsReq.pUsrContext);
 }
 
-#endif
 
 
 /**
@@ -3320,7 +3294,6 @@
 };
 
 
-#ifdef WLAN_SOFTAP_FEATURE
 void
 limProcessTkipCounterMeasures(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
@@ -3348,7 +3321,6 @@
 
     psessionEntry->bTkipCntrMeasActive = tkipCntrMeasReq.bEnable;
 }
-#endif
 
 
 static void
@@ -3405,12 +3377,10 @@
         return;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
     if (psessionEntry->limSystemRole == eLIM_AP_ROLE )
     {
         limWPSPBCClose(pMac, psessionEntry);
     }
-#endif
     PELOGW(limLog(pMac, LOGW, FL("RECEIVED STOP_BSS_REQ with reason code=%d\n"), stopBssReq.reasonCode);)
 
     prevState = psessionEntry->limSmeState;
@@ -3665,11 +3635,7 @@
           ((pStaDs->mlmStaContext.subType == LIM_ASSOC) &&
            (msgType != eWNI_SME_ASSOC_CNF)) ||
           ((pStaDs->mlmStaContext.subType == LIM_REASSOC) &&
-#ifdef WLAN_SOFTAP_FEATURE
            (msgType != eWNI_SME_ASSOC_CNF))))) // since softap is passing this as ASSOC_CNF and subtype differs
-#else
-           (msgType != eWNI_SME_REASSOC_CNF)))))
-#endif
     {
         limLog(pMac, LOG1,
            FL("Received invalid message %X due to peerMacAddr mismatched or not in eLIM_MLM_WT_ASSOC_CNF_STATE state, for aid %d, peer "),
@@ -4385,7 +4351,6 @@
 }
 
 
-#ifdef WLAN_SOFTAP_FEATURE
 static void
 __limProcessSmeUpdateAPWPSIEs(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
 {
@@ -4566,7 +4531,6 @@
     return;
 } /*** end __limProcessSmeChangeBI(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) ***/
 
-#endif
 
 
 /** -------------------------------------------------------------
@@ -5515,7 +5479,6 @@
         case eWNI_SME_GET_SCANNED_CHANNEL_REQ:
             limProcessSmeGetScanChannelInfo(pMac, pMsgBuf);
             break;
-#ifdef WLAN_SOFTAP_FEATURE
         case eWNI_SME_GET_ASSOC_STAS_REQ:
             limProcessSmeGetAssocSTAsInfo(pMac, pMsgBuf);
             break;
@@ -5541,7 +5504,6 @@
              //Update the beaconInterval
              __limProcessSmeChangeBI(pMac, pMsgBuf );
              break;
-#endif            
             
 #if defined WLAN_FEATURE_VOWIFI 
         case eWNI_SME_NEIGHBOR_REPORT_REQ_IND:
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c
index 316ad2a..0c792f3 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.c
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c
@@ -94,20 +94,14 @@
  *
  * @return true if passed authType is enabled else false
  */
-#ifdef WLAN_SOFTAP_FEATURE
 tANI_U8
 limIsAuthAlgoSupported(tpAniSirGlobal pMac, tAniAuthType authType, tpPESession psessionEntry)
-#else
-tANI_U8
-limIsAuthAlgoSupported(tpAniSirGlobal pMac, tAniAuthType authType)
-#endif
 {
     tANI_U32 algoEnable, privacyOptImp;
 
     if (authType == eSIR_OPEN_SYSTEM)
     {
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
         {
            if((psessionEntry->authType == eSIR_OPEN_SYSTEM) || (psessionEntry->authType == eSIR_AUTO_SWITCH))
@@ -115,7 +109,6 @@
            else
               return false; 
         }
-#endif
 
         if (wlan_cfgGetInt(pMac, WNI_CFG_OPEN_SYSTEM_AUTH_ENABLE,
                       &algoEnable) != eSIR_SUCCESS)
@@ -135,7 +128,6 @@
     else
     {
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
         {
             if((psessionEntry->authType == eSIR_SHARED_KEY) || (psessionEntry->authType == eSIR_AUTO_SWITCH))
@@ -145,7 +137,6 @@
             
         }
         else
-#endif
 
         if (wlan_cfgGetInt(pMac, WNI_CFG_SHARED_KEY_AUTH_ENABLE,
                       &algoEnable) != eSIR_SUCCESS)
@@ -160,13 +151,11 @@
             return false;
         }
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
         {
             privacyOptImp = psessionEntry->privacy;
         }
         else
-#endif
 
         if (wlan_cfgGetInt(pMac, WNI_CFG_PRIVACY_ENABLED,
                       &privacyOptImp) != eSIR_SUCCESS)
@@ -1249,7 +1238,6 @@
   case eSIR_ED_WEP104:
       // FIXME! Is this OK?
       if( 0 == pMlmSetKeysReq->numKeys ) {
-#ifdef WLAN_SOFTAP_FEATURE
           tANI_U32 i;
 
           for(i=0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS ;i++)
@@ -1258,7 +1246,6 @@
                              (tANI_U8 *) &pSetStaKeyParams->key[i],
                              (tANI_U8 *) &pMlmSetKeysReq->key[i], sizeof( tSirKeys ));
           }
-#endif
           pSetStaKeyParams->wepType = eSIR_WEP_STATIC;
           sessionEntry->limMlmState = eLIM_MLM_WT_SET_STA_KEY_STATE;
           MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, sessionEntry->peSessionId, sessionEntry->limMlmState));
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.h b/CORE/MAC/src/pe/lim/limSecurityUtils.h
index e9cb773..5eafbd7 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.h
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.h
@@ -59,11 +59,7 @@
                                 SIR_MAC_WEP_ICV_LENGTH)
 struct tLimPreAuthNode;
 
-#ifdef WLAN_SOFTAP_FEATURE
 tANI_U8        limIsAuthAlgoSupported(tpAniSirGlobal, tAniAuthType, tpPESession);
-#else
-tANI_U8        limIsAuthAlgoSupported(tpAniSirGlobal, tAniAuthType);
-#endif
 
 // MAC based authentication related functions
 void               limInitPreAuthList(tpAniSirGlobal);
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index e8fff9a..ea58603 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -537,26 +537,21 @@
     // Timestamp to be updated by TFP, below.
 
     // Beacon Interval:
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
     {
         pFrm->BeaconInterval.interval = pMac->sch.schObject.gSchBeaconInterval;        
     }
     else
     {
-#endif
-    nSirStatus = wlan_cfgGetInt( pMac, WNI_CFG_BEACON_INTERVAL, &cfg);
-    if (eSIR_SUCCESS != nSirStatus)
-    {
-        limLog( pMac, LOGP, FL("Failed to retrieve WNI_CFG_BEACON_INTERVAL from CFG (%d).\n"),
-                nSirStatus );
-        return;
+        nSirStatus = wlan_cfgGetInt( pMac, WNI_CFG_BEACON_INTERVAL, &cfg);
+        if (eSIR_SUCCESS != nSirStatus)
+        {
+            limLog( pMac, LOGP, FL("Failed to retrieve WNI_CFG_BEACON_INTERVAL from CFG (%d).\n"),
+                    nSirStatus );
+            return;
+        }
+        pFrm->BeaconInterval.interval = ( tANI_U16 ) cfg;
     }
-    pFrm->BeaconInterval.interval = ( tANI_U16 ) cfg;
-#ifdef WLAN_SOFTAP_FEATURE
-    }
-#endif
-
 
     PopulateDot11fCapabilities( pMac, &pFrm->Capabilities, psessionEntry );
     PopulateDot11fSSID( pMac, ( tSirMacSSid* )pSsid, &pFrm->SSID );
@@ -570,7 +565,6 @@
     PopulateDot11fCFParams( pMac, &pFrm->Capabilities, &pFrm->CFParams );
 #endif // AP Image
 
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
     {
         if(psessionEntry->wps_state != SAP_WPS_DISABLED)
@@ -580,31 +574,28 @@
     }
     else
     {
-#endif
-    if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
-        limLog(pMac, LOGP,"Failed to cfg get id %d\n", WNI_CFG_WPS_ENABLE );
-    
-    wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
-    
-    if (wpsApEnable)
-    {
-        PopulateDot11fWscInProbeRes(pMac, &pFrm->WscProbeRes);
-    }
+        if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
+            limLog(pMac, LOGP,"Failed to cfg get id %d\n", WNI_CFG_WPS_ENABLE );
 
-    if (pMac->lim.wscIeInfo.probeRespWscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
-    {
-        PopulateDot11fWscRegistrarInfoInProbeRes(pMac, &pFrm->WscProbeRes);
-        pMac->lim.wscIeInfo.probeRespWscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
-    }
+        wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
 
-    if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
-    {
-        DePopulateDot11fWscRegistrarInfoInProbeRes(pMac, &pFrm->WscProbeRes);
-        pMac->lim.wscIeInfo.probeRespWscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
+        if (wpsApEnable)
+        {
+            PopulateDot11fWscInProbeRes(pMac, &pFrm->WscProbeRes);
+        }
+
+        if (pMac->lim.wscIeInfo.probeRespWscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
+        {
+            PopulateDot11fWscRegistrarInfoInProbeRes(pMac, &pFrm->WscProbeRes);
+            pMac->lim.wscIeInfo.probeRespWscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
+        }
+
+        if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
+        {
+            DePopulateDot11fWscRegistrarInfoInProbeRes(pMac, &pFrm->WscProbeRes);
+            pMac->lim.wscIeInfo.probeRespWscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
+        }
     }
-#ifdef WLAN_SOFTAP_FEATURE
-    }
-#endif
 
     PopulateDot11fCountry( pMac, &pFrm->Country, psessionEntry);
     PopulateDot11fEDCAParamSet( pMac, &pFrm->EDCAParamSet, psessionEntry);
@@ -643,11 +634,7 @@
     if ( psessionEntry->htCapability )
     {
         PopulateDot11fHTCaps( pMac, psessionEntry, &pFrm->HTCaps );
-#ifdef WLAN_SOFTAP_FEATURE
         PopulateDot11fHTInfo( pMac, &pFrm->HTInfo, psessionEntry );
-#else
-        PopulateDot11fHTInfo( pMac, &pFrm->HTInfo );
-#endif
     }
 #ifdef WLAN_FEATURE_11AC
     if(psessionEntry->vhtCapability)
@@ -1526,7 +1513,6 @@
                       pSta->supportedRates.llbRates, pSta->supportedRates.llaRates );
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
     {
         if( pSta != NULL && eSIR_SUCCESS == statusCode )
@@ -1541,7 +1527,6 @@
 #endif
         }
     }
-#endif
 
     if ( NULL != pSta )
     {
@@ -1572,11 +1557,7 @@
             if ( ( ! pSta->aniPeer ) || ( ! PROP_CAPABILITY_GET( WME, pSta->propCapability ) ) )
             {
 
-#ifdef WLAN_SOFTAP_FEATURE
                 PopulateDot11fWMMParams( pMac, &frm.WMMParams, psessionEntry);
-#else
-                PopulateDot11fWMMParams( pMac, &frm.WMMParams );
-#endif
 
                 if ( pSta->wsmEnabled )
                 {
@@ -1599,11 +1580,7 @@
              psessionEntry->htCapability )
         {
             PopulateDot11fHTCaps( pMac, psessionEntry, &frm.HTCaps );
-#ifdef WLAN_SOFTAP_FEATURE
             PopulateDot11fHTInfo( pMac, &frm.HTInfo, psessionEntry );
-#else
-            PopulateDot11fHTInfo( pMac, &frm.HTInfo );
-#endif
         }
 
 #ifdef WLAN_FEATURE_11AC
@@ -1622,12 +1599,10 @@
 
    palZeroMemory( pMac->hHdd, ( tANI_U8* )&beaconParams, sizeof( tUpdateBeaconParams) );
 
-#ifdef WLAN_SOFTAP_FEATURE
     if( psessionEntry->limSystemRole == eLIM_AP_ROLE ){
         if(psessionEntry->gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
         limDecideApProtection(pMac, peerMacAddr, &beaconParams,psessionEntry);
     }
-#endif
 
     limUpdateShortPreamble(pMac, peerMacAddr, &beaconParams, psessionEntry);
     limUpdateShortSlotTime(pMac, peerMacAddr, &beaconParams, psessionEntry);
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index b47cc52..ace58b0 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -204,9 +204,7 @@
                     FL("Posting  WDA_UPDATE_BEACON_IND to WDA failed, reason=%X\n"),
                     retCode );
     }
-#ifdef WLAN_SOFTAP_FEATURE
     limSendBeaconInd(pMac, psessionEntry);
-#endif
     return retCode;
 }
 
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 0a9a033..844d658 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -615,11 +615,9 @@
     pSirSmeRsp->sessionId       = smesessionId;
     pSirSmeRsp->transactionId   = smetransactionId;
     pSirSmeRsp->statusCode      = resultCode;
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry != NULL )
     pSirSmeRsp->staId           = psessionEntry->staId; //else it will be always zero smeRsp StaID = 0 
       
-#endif
 
     mmhMsg.type = msgType;
     mmhMsg.bodyptr = pSirSmeRsp;
@@ -1308,9 +1306,7 @@
     pSirSmeDisassocInd->aid =  pStaDs->assocId;
     limStatSerDes(pMac, &pMac->hal.halMac.macStats.pPerStaStats[pStaDs->assocId].staStat,(tANI_U8*)&pSirSmeDisassocInd-> perStaStats ); 
 #endif   
-#ifdef WLAN_SOFTAP_FEATURE
     pSirSmeDisassocInd->staId = pStaDs->staIndex;
-#endif  
  
     mmhMsg.type = eWNI_SME_DISASSOC_IND;
     mmhMsg.bodyptr = pSirSmeDisassocInd;
@@ -1341,9 +1337,6 @@
 void
 limSendSmeDeauthInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry)                   
 {
-#ifndef WLAN_SOFTAP_FEATURE
-    tANI_U8  *pBuf;
-#endif
     tSirMsgQ  mmhMsg;
     tSirSmeDeauthInd  *pSirSmeDeauthInd;
 
@@ -1361,7 +1354,6 @@
     pSirSmeDeauthInd->length = sizeof(tSirSmeDeauthInd);
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
     pSirSmeDeauthInd->sessionId = psessionEntry->smeSessionId;
     pSirSmeDeauthInd->transactionId = psessionEntry->transactionId;
     if(eSIR_INFRA_AP_MODE == psessionEntry->bssType)
@@ -1378,36 +1370,13 @@
     //peerMacAddr
     palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr));
     pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
-#else
-
-    //sessionId
-    pBuf = (tANI_U8 *) &pSirSmeDeauthInd->sessionId;
-    *pBuf++ = psessionEntry->smeSessionId;
-
-    //transactionId
-    limCopyU16(pBuf, 0);
-    pBuf += sizeof(tANI_U16);
-
-    // status code
-    limCopyU32(pBuf, pStaDs->mlmStaContext.cleanupTrigger);
-    pBuf += sizeof(tSirResultCodes);
-    
-    //bssid
-    palCopyMemory( pMac->hHdd, pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
-    pBuf += sizeof(tSirMacAddr);
-
-    //peerMacAddr
-    palCopyMemory( pMac->hHdd, pBuf, pStaDs->staAddr, sizeof(tSirMacAddr));
-#endif  
 
 #if (WNI_POLARIS_FW_PRODUCT == AP)
     pBuf += sizeof(tSirMacAddr);
     limCopyU16(pBuf, pStaDs->staAddr);
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
     pSirSmeDeauthInd->staId = pStaDs->staIndex;
-#endif
 
     mmhMsg.type = eWNI_SME_DEAUTH_IND;
     mmhMsg.bodyptr = pSirSmeDeauthInd;
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index df45385..b6e7580 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -1441,7 +1441,6 @@
         return eSIR_FAILURE;
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
     // Extract privacy setting
     pStartBssReq->privacy = *pBuf++;
     len--;
@@ -1503,7 +1502,6 @@
     if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
         return eSIR_FAILURE;
 
-#endif
     // Extract bssPersona
     pStartBssReq->bssPersona = *pBuf++;
     len--;
@@ -2284,11 +2282,9 @@
         pBuf += pAssocInd->supportedChannels.numChnl;
         mLen += pAssocInd->supportedChannels.numChnl;
     }
-#ifdef WLAN_SOFTAP_FEATURE
     limCopyU32(pBuf, pAssocInd->WmmStaInfoPresent);
     pBuf += sizeof(tANI_U32);
     mLen += sizeof(tANI_U32);
-#endif
      // Fill in length of SME_ASSOC_IND message
     limCopyU16(pLen, mLen);
 
@@ -2851,11 +2847,9 @@
         pBuf += pReassocInd->supportedChannels.numChnl;
         mLen += pReassocInd->supportedChannels.numChnl;
     }
-#ifdef WLAN_SOFTAP_FEATURE
     limCopyU32(pBuf, pReassocInd->WmmStaInfoPresent);
     pBuf += sizeof(tANI_U32);
     mLen += sizeof(tANI_U32);
-#endif
 
     // Fill in length of SME_REASSOC_IND message
     limCopyU16(pLen, mLen);
@@ -3897,7 +3891,6 @@
 
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 /**
  * limIsSmeGetAssocSTAsReqValid()
  *
@@ -4137,7 +4130,6 @@
     return eSIR_SUCCESS;
 }
 
-#endif
 
 /**---------------------------------------------------------------
 \fn     limGetSessionInfo
@@ -4173,7 +4165,6 @@
     return;
 }
 
-#ifdef WLAN_SOFTAP_FEATURE
 
 /**
  * limUpdateAPWPSIEsReqSerDes()
@@ -4341,4 +4332,3 @@
     return eSIR_SUCCESS;
 } /*** end limUpdateAPWPARSNIEsReqSerDes() ***/
 
-#endif
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.h b/CORE/MAC/src/pe/lim/limSerDesUtils.h
index a08d8c0..e29bba9 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.h
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.h
@@ -95,13 +95,11 @@
 
 tSirRetStatus limRemoveKeyReqSerDes(tpAniSirGlobal pMac, tpSirSmeRemoveKeyReq pRemoveKeyReq, tANI_U8 * pBuf);
 
-#ifdef WLAN_SOFTAP_FEATURE
 tANI_BOOLEAN    limIsSmeGetAssocSTAsReqValid(tpAniSirGlobal pMac, tpSirSmeGetAssocSTAsReq pGetAssocSTAsReq, tANI_U8 *pBuf);
 tSirRetStatus   limTkipCntrMeasReqSerDes(tpAniSirGlobal pMac, tpSirSmeTkipCntrMeasReq  ptkipCntrMeasReq, tANI_U8 *pBuf);
 
 tSirRetStatus limUpdateAPWPSIEsReqSerDes(tpAniSirGlobal pMac, tpSirUpdateAPWPSIEsReq pUpdateAPWPSIEsReq, tANI_U8 *pBuf);
 tSirRetStatus limUpdateAPWPARSNIEsReqSerDes(tpAniSirGlobal pMac, tpSirUpdateAPWPARSNIEsReq pUpdateAPWPARSNIEsReq, tANI_U8 *pBuf);
-#endif
 
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
 tANI_BOOLEAN limIsSmeSwitchChannelReqValid(tpAniSirGlobal, tANI_U8 *, tpSirSmeSwitchChannelReq);
diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.c b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
index 09348ff..b5182fa 100644
--- a/CORE/MAC/src/pe/lim/limSmeReqUtils.c
+++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
@@ -50,7 +50,7 @@
  * Date           Modified by    Modification Information
  * --------------------------------------------------------------------
  * 05/26/10       js             WPA handling in (Re)Assoc frames
- * 
+ *
  */
 
 #include "wniApi.h"
@@ -250,7 +250,6 @@
     return true;
 } /*** end limIsAddieValidInSmeReqMessage() ***/
 
-#ifdef WLAN_SOFTAP_FEATURE
 /**
  * limSetRSNieWPAiefromSmeStartBSSReqMessage()
  *
@@ -396,7 +395,6 @@
 
     return true;
 } /*** end limSetRSNieWPAiefromSmeStartBSSReqMessage() ***/
-#endif
 
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && (WNI_POLARIS_FW_PRODUCT == AP)
 /**
@@ -590,11 +588,9 @@
         case eSIR_BTAMP_AP_MODE:
             break;
 
-#ifdef WLAN_SOFTAP_FEATURE
         /* Added for SoftAP support */
         case eSIR_INFRA_AP_MODE:
             break;
-#endif
         
         default:
             /**
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.c b/CORE/MAC/src/pe/lim/limTimerUtils.c
index 7c46ef5..7abdb89 100644
--- a/CORE/MAC/src/pe/lim/limTimerUtils.c
+++ b/CORE/MAC/src/pe/lim/limTimerUtils.c
@@ -623,7 +623,6 @@
     PELOG1(limLog(pMac, LOG1, FL("alloc and init table for preAuth timers\n"));)
 
 
-#ifdef WLAN_SOFTAP_FEATURE
     {
         /**
          * Create OLBC cache aging timer
@@ -656,7 +655,6 @@
             goto err_timer;
         }
     }
-#endif
 #ifdef WLAN_FEATURE_VOWIFI_11R
     // In future we need to use the auth timer, cause
     // the pre auth session will be introduced before sending
@@ -1000,7 +998,6 @@
  *
  * @return None
  */
-#ifdef WLAN_SOFTAP_FEATURE
 void
 limUpdateOlbcCacheTimerHandler(void *pMacGlobal, tANI_U32 param)
 {
@@ -1015,7 +1012,6 @@
 
     limPostMsgApi(pMac, &msg);
 } /****** end limUpdateOlbcCacheTimerHandler() ******/
-#endif
 
 /**
  * limDeactivateAndChangeTimer()
@@ -1736,7 +1732,6 @@
             break;
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 #if 0
         case eLIM_WPS_OVERLAP_TIMER:
             {
@@ -1770,7 +1765,6 @@
             }
             break;
 #endif
-#endif
 
 #ifdef WLAN_FEATURE_VOWIFI_11R
         case eLIM_FT_PREAUTH_RSP_TIMER:
@@ -2493,7 +2487,6 @@
         FL("Post SIR_LIM_QUIET_BSS_TIMEOUT msg. \n"));)
     limPostMsgApi(pMac, &msg);
 }
-#ifdef WLAN_SOFTAP_FEATURE
 #if 0
 void
 limWPSOverlapTimerHandler(void *pMacGlobal, tANI_U32 param)
@@ -2509,7 +2502,6 @@
     limPostMsgApi(pMac, &msg);
 }
 #endif
-#endif
 
 #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE
 /* ACTIVE_MODE_HB_OFFLOAD */
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.h b/CORE/MAC/src/pe/lim/limTimerUtils.h
index 7f0aa97..ddbea4f 100644
--- a/CORE/MAC/src/pe/lim/limTimerUtils.h
+++ b/CORE/MAC/src/pe/lim/limTimerUtils.h
@@ -67,7 +67,7 @@
     eLIM_ASSOC_FAIL_TIMER,
     eLIM_REASSOC_FAIL_TIMER,
     eLIM_PRE_AUTH_CLEANUP_TIMER,
-    eLIM_HEART_BEAT_TIMER,    
+    eLIM_HEART_BEAT_TIMER,
     eLIM_BACKGROUND_SCAN_TIMER,
 #ifdef ANI_PRODUCT_TYPE_AP
     eLIM_LEARN_INTERVAL_TIMER,
@@ -82,9 +82,7 @@
     eLIM_LEARN_DURATION_TIMER,
     eLIM_QUIET_TIMER,
     eLIM_QUIET_BSS_TIMER,
-#ifdef WLAN_SOFTAP_FEATURE
-    eLIM_WPS_OVERLAP_TIMER, 
-#endif
+    eLIM_WPS_OVERLAP_TIMER,
 #ifdef WLAN_FEATURE_VOWIFI_11R
     eLIM_FT_PREAUTH_RSP_TIMER,
 #endif
@@ -98,7 +96,7 @@
 #ifdef FEATURE_WLAN_TDLS_INTERNAL
     eLIM_TDLS_DISCOVERY_RSP_WAIT,
     eLIM_TDLS_LINK_SETUP_RSP_TIMEOUT,
-    eLIM_TDLS_LINK_SETUP_CNF_TIMEOUT,        
+    eLIM_TDLS_LINK_SETUP_CNF_TIMEOUT,
 #endif
     eLIM_DISASSOC_ACK_TIMER,
     eLIM_DEAUTH_ACK_TIMER,
@@ -127,9 +125,7 @@
 void limDeactivateAndChangePerStaIdTimer(tpAniSirGlobal, tANI_U32, tANI_U16);
 void limActivateCnfTimer(tpAniSirGlobal, tANI_U16, tpPESession);
 void limActivateAuthRspTimer(tpAniSirGlobal, tLimPreAuthNode *);
-#ifdef WLAN_SOFTAP_FEATURE
 void limUpdateOlbcCacheTimerHandler(void *, tANI_U32);
-#endif
 void limAddtsResponseTimerHandler(void *, tANI_U32);
 void limChannelSwitchTimerHandler(void *, tANI_U32);
 void limQuietTimerHandler(void *, tANI_U32);
@@ -156,11 +152,9 @@
  */
 v_UINT_t limActivateHearBeatTimer(tpAniSirGlobal pMac);
 
-#ifdef WLAN_SOFTAP_FEATURE
 #if 0
 void limWPSOverlapTimerHandler(void *pMacGlobal, tANI_U32 param);
 #endif
-#endif
 #ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE
 void limMissedBeaconInActiveMode(void *pMacGlobal);
 #endif
diff --git a/CORE/MAC/src/pe/lim/limTrace.c b/CORE/MAC/src/pe/lim/limTrace.c
index f775901..35157cd 100644
--- a/CORE/MAC/src/pe/lim/limTrace.c
+++ b/CORE/MAC/src/pe/lim/limTrace.c
@@ -98,9 +98,7 @@
         CASE_RETURN_STRING(eLIM_LEARN_DURATION_TIMER);
         CASE_RETURN_STRING(eLIM_QUIET_TIMER);
         CASE_RETURN_STRING(eLIM_QUIET_BSS_TIMER);
-#ifdef WLAN_SOFTAP_FEATURE
         CASE_RETURN_STRING(eLIM_WPS_OVERLAP_TIMER);
-#endif
 #ifdef WLAN_FEATURE_VOWIFI_11R
         CASE_RETURN_STRING(eLIM_FT_PREAUTH_RSP_TIMER);
 #endif
diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h
index 2635018..65d3b49 100644
--- a/CORE/MAC/src/pe/lim/limTypes.h
+++ b/CORE/MAC/src/pe/lim/limTypes.h
@@ -203,11 +203,9 @@
     tSirMacHTOperatingMode     htOperMode;
     tANI_U8                    dualCTSProtection;
     tANI_U8                    txChannelWidthSet;
-#ifdef WLAN_SOFTAP_FEATURE
     tANI_U8              ssidHidden;
     tANI_U8              wps_state;
     tANI_U8              obssProtEnabled;
-#endif
 } tLimMlmStartReq, *tpLimMlmStartReq;
 
 typedef struct sLimMlmStartCnf
@@ -268,9 +266,7 @@
     tANI_U8                 sessionId;
 
 
-#ifdef WLAN_SOFTAP_FEATURE
     tAniBool               WmmStaInfoPresent;
-#endif
 
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) 
     tANI_U16                  seqNum;
@@ -320,9 +316,7 @@
     tSirMacPowerCapInfo     powerCap;
     tSirSupChnl             supportedChannels;
 
-#ifdef WLAN_SOFTAP_FEATURE
     tAniBool               WmmStaInfoPresent;
-#endif
 
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) 
     tANI_U16                  seqNum;
@@ -670,11 +664,7 @@
 // Function to apply CFG parameters before join/reassoc/start BSS
 void limApplyConfiguration(tpAniSirGlobal,tpPESession);
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
-#else
-void limSetCfgProtection(tpAniSirGlobal pMac);
-#endif
 
 
 // Function to Initialize MLM state machine on STA
@@ -1076,7 +1066,6 @@
                    sizeof(tANI_U32) - sizeof(tSirBssDescription)));
 } /*** end limGetIElenFromBssDescription() ***/
 
-#ifdef WLAN_SOFTAP_FEATURE
 /**
  * limSendBeaconInd()
  *
@@ -1093,9 +1082,7 @@
 
 void 
 limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
-#endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 
 void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
 void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
@@ -1107,7 +1094,6 @@
 limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
 
 #define LIM_WPS_OVERLAP_TIMER_MS                 10000
-#endif
 
 void
 limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck,  SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index f59c089..23971c6 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -1071,7 +1071,6 @@
         tx_timer_deactivate(&pMac->lim.limTimers.gLimSendDisassocFrameThresholdTimer);
         tx_timer_delete(&pMac->lim.limTimers.gLimSendDisassocFrameThresholdTimer);
 
-#ifdef WLAN_SOFTAP_FEATURE
         tx_timer_deactivate(&pMac->lim.limTimers.gLimUpdateOlbcCacheTimer);
         tx_timer_delete(&pMac->lim.limTimers.gLimUpdateOlbcCacheTimer);
         tx_timer_deactivate(&pMac->lim.limTimers.gLimPreAuthClnupTimer);
@@ -1088,7 +1087,6 @@
             }
         }
 #endif
-#endif
 #ifdef WLAN_FEATURE_VOWIFI_11R
         // Deactivate and delete FT Preauth response timer
         tx_timer_deactivate(&pMac->lim.limTimers.gLimFTPreAuthRspTimer);
@@ -1627,7 +1625,6 @@
 return "";
 }
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limHandleUpdateOlbcCache(tpAniSirGlobal pMac)
 {
     int i;
@@ -1720,7 +1717,6 @@
         limLog(pMac, LOGE, FL("tx_timer_activate failed\n"));
     }
 }
-#endif
 
 /**
  * limIsNullSsid()
@@ -1810,7 +1806,6 @@
 
 
 
-#ifdef WLAN_SOFTAP_FEATURE
 
 /** -------------------------------------------------------------
 \fn limUpdateProtStaParams
@@ -2012,7 +2007,6 @@
 
     return;
 }
-#endif
 
 
 /** -------------------------------------------------------------
@@ -2071,7 +2065,6 @@
 
                 for (i=0; i<LIM_PROT_STA_CACHE_SIZE; i++)
                 {
-#ifdef WLAN_SOFTAP_FEATURE                                
                 if ((psessionEntry->limSystemRole == eLIM_AP_ROLE )  &&
                      psessionEntry->gLimNoShortParams.staNoShortCache[i].active)
                     {
@@ -2080,7 +2073,6 @@
                                     peerMacAddr, sizeof(tSirMacAddr)))
                             return;
                 }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE)
-#endif
                 {
                     if (pMac->lim.gLimNoShortParams.staNoShortCache[i].active)
                      {
@@ -2095,12 +2087,10 @@
 
             for (i=0; i<LIM_PROT_STA_CACHE_SIZE; i++)
             {
-#ifdef WLAN_SOFTAP_FEATURE                                
                 if ( (psessionEntry->limSystemRole == eLIM_AP_ROLE )  &&
                       !psessionEntry->gLimNoShortParams.staNoShortCache[i].active)
                      break;
                 else        
-#endif        
                 {
                     if (!pMac->lim.gLimNoShortParams.staNoShortCache[i].active)
                     break;
@@ -2109,7 +2099,6 @@
 
             if (i >= LIM_PROT_STA_CACHE_SIZE)
             {
-#ifdef WLAN_SOFTAP_FEATURE
                 if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
                     limLog(pMac, LOGE, FL("No space in Short cache (#active %d, #sta %d) for sta "),
                             i, psessionEntry->gLimNoShortParams.numNonShortPreambleSta);
@@ -2117,7 +2106,6 @@
                     return;
                 }
                 else
-#endif
                 {
                     limLog(pMac, LOGE, FL("No space in Short cache (#active %d, #sta %d) for sta "),
                             i, pMac->lim.gLimNoShortParams.numNonShortPreambleSta);
@@ -2128,14 +2116,12 @@
             }
 
 
-#ifdef WLAN_SOFTAP_FEATURE
             if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
                 palCopyMemory( pMac->hHdd, psessionEntry->gLimNoShortParams.staNoShortCache[i].addr,
                         peerMacAddr,  sizeof(tSirMacAddr));
                 psessionEntry->gLimNoShortParams.staNoShortCache[i].active = true;
                 psessionEntry->gLimNoShortParams.numNonShortPreambleSta++;
             }else
-#endif
             {
                 palCopyMemory( pMac->hHdd, pMac->lim.gLimNoShortParams.staNoShortCache[i].addr,
                                peerMacAddr,  sizeof(tSirMacAddr));
@@ -2147,14 +2133,8 @@
             // enable long preamble
             PELOG1(limLog(pMac, LOG1, FL("Disabling short preamble\n"));)
 
-#ifdef WLAN_SOFTAP_FEATURE
             if (limEnableShortPreamble(pMac, false, pBeaconParams, psessionEntry) != eSIR_SUCCESS)
                 PELOGE(limLog(pMac, LOGE, FL("Cannot enable long preamble\n"));)
-#else
-            if (limEnableShortPreamble(pMac, false, pBeaconParams) != eSIR_SUCCESS)
-                PELOGE(limLog(pMac, LOGE, FL("Cannot enable long preamble\n"));)
-
-#endif
         }
     }
 }
@@ -2197,7 +2177,6 @@
             limPrintMacAddr(pMac, peerMacAddr, LOG1);)
             for (i=0; i<LIM_PROT_STA_CACHE_SIZE; i++)
             {
-#ifdef WLAN_SOFTAP_FEATURE
                 if ((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
                      psessionEntry->gLimNoShortSlotParams.staNoShortSlotCache[i].active)
                 {
@@ -2207,7 +2186,6 @@
                         return;
                 }
                 else if(psessionEntry->limSystemRole != eLIM_AP_ROLE )
-#endif
                 {
                     if (pMac->lim.gLimNoShortSlotParams.staNoShortSlotCache[i].active)
                     {
@@ -2221,12 +2199,10 @@
 
             for (i=0; i<LIM_PROT_STA_CACHE_SIZE; i++)
             {
-#ifdef WLAN_SOFTAP_FEATURE
                 if ((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
                      !psessionEntry->gLimNoShortSlotParams.staNoShortSlotCache[i].active)
                     break;
                  else
-#endif
                  {
                      if (!pMac->lim.gLimNoShortSlotParams.staNoShortSlotCache[i].active)
                           break;
@@ -2235,14 +2211,12 @@
 
             if (i >= LIM_PROT_STA_CACHE_SIZE)
             {
-#ifdef WLAN_SOFTAP_FEATURE
                 if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
                     limLog(pMac, LOGE, FL("No space in ShortSlot cache (#active %d, #sta %d) for sta "),
                             i, psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta);
                     limPrintMacAddr(pMac, peerMacAddr, LOGE);
                     return;
                 }else
-#endif
                 {
                     limLog(pMac, LOGE, FL("No space in ShortSlot cache (#active %d, #sta %d) for sta "),
                            i, pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta);
@@ -2252,14 +2226,12 @@
             }
 
 
-#ifdef WLAN_SOFTAP_FEATURE
             if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
                 palCopyMemory( pMac->hHdd, psessionEntry->gLimNoShortSlotParams.staNoShortSlotCache[i].addr,
                                peerMacAddr, sizeof(tSirMacAddr));
                 psessionEntry->gLimNoShortSlotParams.staNoShortSlotCache[i].active = true;
                 psessionEntry->gLimNoShortSlotParams.numNonShortSlotSta++;
             }else
-#endif
             {
                 palCopyMemory( pMac->hHdd, pMac->lim.gLimNoShortSlotParams.staNoShortSlotCache[i].addr,
                           peerMacAddr, sizeof(tSirMacAddr));
@@ -2268,7 +2240,6 @@
             }
             wlan_cfgGetInt(pMac, WNI_CFG_11G_SHORT_SLOT_TIME_ENABLED, &val);
 
-#ifdef WLAN_SOFTAP_FEATURE
             /* Here we check if we are AP role and short slot enabled (both admin and oper modes) but we have atleast one STA connected with
              * only long slot enabled, we need to change our beacon/pb rsp to broadcast short slot disabled
              */
@@ -2282,7 +2253,6 @@
                 psessionEntry->shortSlotTimeSupported = false;
             }
             else if ( psessionEntry->limSystemRole != eLIM_AP_ROLE)
-#endif            
             {
                 if (val && pMac->lim.gLimNoShortSlotParams.numNonShortSlotSta && psessionEntry->shortSlotTimeSupported)
                 {
@@ -3219,7 +3189,6 @@
     }
   }
 }
-#ifdef WLAN_SOFTAP_FEATURE
 /**
  * limProcessWPSOverlapTimeout
  *
@@ -3260,7 +3229,6 @@
     limWPSPBCTimeout(pMac, psessionEntry);
 }
 #endif
-#endif
 
 /**----------------------------------------------
 \fn        limStartQuietTimer
@@ -3742,13 +3710,8 @@
  *            tANI_U8 variable
  */
 
-#ifdef WLAN_SOFTAP_FEATURE 
 tANI_U8 limGetHTCapability( tpAniSirGlobal pMac,
         tANI_U32 htCap, tpPESession psessionEntry)
-#else
-tANI_U8 limGetHTCapability( tpAniSirGlobal pMac,
-        tANI_U32 htCap )
-#endif
 {
 tANI_U8 retVal = 0;
 tANI_U8 *ptr;
@@ -3917,11 +3880,9 @@
       break;
 
     case eHT_OP_MODE:
-#ifdef WLAN_SOFTAP_FEATURE
       if(psessionEntry->limSystemRole == eLIM_AP_ROLE )
           retVal = psessionEntry->htOperMode;
       else
-#endif
           retVal = pMac->lim.gHTOperMode;
       break;
 
@@ -4160,7 +4121,6 @@
     else
     {
         //normal protection config check
-#ifdef WLAN_SOFTAP_FEATURE
         if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
                 !psessionEntry->cfgProtection.fromllb)
         {
@@ -4168,7 +4128,6 @@
             PELOG1(limLog(pMac, LOG1, FL("protection from 11b is disabled\n"));)
             return eSIR_SUCCESS;
         }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE)
-#endif
         {   
             if(!pMac->lim.cfgProtection.fromllb)
             {
@@ -4183,7 +4142,6 @@
     {
         //If we are AP and HT capable, we need to set the HT OP mode
         //appropriately.
-#ifdef WLAN_SOFTAP_FEATURE
         if(eLIM_AP_ROLE == psessionEntry->limSystemRole)
         {
             if(overlap)
@@ -4221,10 +4179,6 @@
             }
         }else if ((eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole) &&
                 (true == psessionEntry->htCapability))
-#else
-            if(((eLIM_AP_ROLE == psessionEntry->limSystemRole)|| (eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)) &&
-                    (true == psessionEntry->htCapability))
-#endif
             {
                 if(overlap)
                 {
@@ -4266,7 +4220,6 @@
         //for AP role.
         //we need to take care of HT OP mode change if needed.
         //We need to take care of Overlap cases.
-#ifdef WLAN_SOFTAP_FEATURE
         if(eLIM_AP_ROLE == psessionEntry->limSystemRole)
         {
             if(overlap)
@@ -4343,9 +4296,6 @@
                 pBeaconParams->paramChangeBitmap |= PARAM_llBCOEXIST_CHANGED;
             }
         }else if(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)
-#else
-            if((eLIM_AP_ROLE == psessionEntry->limSystemRole)||((eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)))
-#endif
             {
                 if(overlap)
                 {
@@ -4444,16 +4394,12 @@
     //overlapping protection configuration check.
     if(overlap)
     {
-#ifdef WLAN_SOFTAP_FEATURE
         if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) && (!psessionEntry->cfgProtection.overlapFromllg))
         {
             // protection disabled.
             PELOG3(limLog(pMac, LOG3, FL("overlap protection from 11g is disabled\n")););
             return eSIR_SUCCESS;
         }else if ((psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE) && (!pMac->lim.cfgProtection.overlapFromllg))
-#else
-        if(((psessionEntry->limSystemRole == eLIM_AP_ROLE ) ||(psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE)) && (!pMac->lim.cfgProtection.overlapFromllg))
-#endif
         {
             // protection disabled.
             PELOG3(limLog(pMac, LOG3, FL("overlap protection from 11g is disabled\n")););
@@ -4463,14 +4409,12 @@
     else
     {
         //normal protection config check
-#ifdef WLAN_SOFTAP_FEATURE
        if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) && 
            !psessionEntry->cfgProtection.fromllg){
             // protection disabled.
             PELOG3(limLog(pMac, LOG3, FL("protection from 11g is disabled\n"));)
             return eSIR_SUCCESS;
          }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE )
-#endif
        {
           if(!pMac->lim.cfgProtection.fromllg)
            {
@@ -4485,7 +4429,6 @@
         //If we are AP and HT capable, we need to set the HT OP mode
         //appropriately.
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(eLIM_AP_ROLE == psessionEntry->limSystemRole)
         {
             if(overlap)
@@ -4515,9 +4458,6 @@
                 }
             }
         }else if(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)
-#else
-        if((eLIM_AP_ROLE == psessionEntry->limSystemRole)||(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole))
-#endif
         {
             if(overlap)
             {
@@ -4552,7 +4492,6 @@
             pBeaconParams->llgCoexist = psessionEntry->beaconParams.llgCoexist = true;
             pBeaconParams->paramChangeBitmap |= PARAM_llGCOEXIST_CHANGED;
         }
-#ifdef WLAN_SOFTAP_FEATURE
         else if (true == psessionEntry->gLimOverlap11gParams.protectionEnabled)
         {
             // As operating mode changed after G station assoc some way to update beacon
@@ -4560,7 +4499,6 @@
             //pMac->sch.schObject.fBeaconChanged = 1;
             pBeaconParams->paramChangeBitmap |= PARAM_llGCOEXIST_CHANGED;
         }
-#endif
     }
     else if (true == psessionEntry->beaconParams.llgCoexist)
     {
@@ -4568,7 +4506,6 @@
         //we need to take care of HT OP mode change if needed.
         //We need to take care of Overlap cases.
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(eLIM_AP_ROLE == psessionEntry->limSystemRole)
         {
             if(overlap)
@@ -4642,9 +4579,6 @@
                 pBeaconParams->paramChangeBitmap |= PARAM_llGCOEXIST_CHANGED;
             }
         }else if(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)
-#else
-        if((eLIM_AP_ROLE == psessionEntry->limSystemRole)||(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole))
-#endif
         {
             if(overlap)
             {
@@ -4757,14 +4691,12 @@
     else 
     {
         //normal protection config check
-#ifdef WLAN_SOFTAP_FEATURE
         if((psessionEntry->limSystemRole == eLIM_AP_ROLE) && !psessionEntry->cfgProtection.obss) 
         { //ToDo Update this field
             // protection disabled.
             PELOG1(limLog(pMac, LOG1, FL("protection from Obss is disabled\n"));)
             return eSIR_SUCCESS;
         }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE)
-#endif
         {
             if(!pMac->lim.cfgProtection.obss) 
             { //ToDo Update this field
@@ -4776,7 +4708,6 @@
     }
 
 
-#ifdef WLAN_SOFTAP_FEATURE
     if (eLIM_AP_ROLE == psessionEntry->limSystemRole){
         if ((enable) && (false == psessionEntry->beaconParams.gHTObssMode) )
         {
@@ -4798,7 +4729,6 @@
              psessionEntry->gLimOverlap11gParams.protectionEnabled = false;
          }
     } else
-#endif
     {
         if ((enable) && (false == psessionEntry->beaconParams.gHTObssMode) )
         {
@@ -4848,7 +4778,6 @@
         else
         {
             //normal protection config check
-#ifdef WLAN_SOFTAP_FEATURE
             if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
                 !psessionEntry->cfgProtection.ht20)
             {
@@ -4856,7 +4785,6 @@
                 PELOG3(limLog(pMac, LOG3, FL("protection from HT20 is disabled\n"));)
                 return eSIR_SUCCESS;
             }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE )
-#endif
             {
                 if(!pMac->lim.cfgProtection.ht20)
                 {
@@ -4872,7 +4800,6 @@
         //If we are AP and HT capable, we need to set the HT OP mode
         //appropriately.
 
-#ifdef WLAN_SOFTAP_FEATURE
         if(eLIM_AP_ROLE == psessionEntry->limSystemRole){
             if(overlap)
             {
@@ -4897,9 +4824,6 @@
                 }
             }
         }else if(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)
-#else
-        if((eLIM_AP_ROLE == psessionEntry->limSystemRole)||(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole))
-#endif
         {
             if(overlap)
             {
@@ -4936,7 +4860,6 @@
         //for AP role.
         //we need to take care of HT OP mode change if needed.
         //We need to take care of Overlap cases.
-#ifdef WLAN_SOFTAP_FEATURE
         if(eLIM_AP_ROLE == psessionEntry->limSystemRole){
             if(overlap)
             {
@@ -4985,9 +4908,6 @@
             pBeaconParams->ht20MhzCoexist = psessionEntry->beaconParams.ht20Coexist = false;
             pBeaconParams->paramChangeBitmap |= PARAM_HT20MHZCOEXIST_CHANGED;
         }else if(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole)
-#else
-        if((eLIM_AP_ROLE == psessionEntry->limSystemRole)||(eLIM_BT_AMP_AP_ROLE == psessionEntry->limSystemRole))
-#endif
         {
             if(overlap)
             {
@@ -5075,7 +4995,6 @@
         }
         else
         {
-#ifdef WLAN_SOFTAP_FEATURE
             //normal protection config check
             if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
                 !psessionEntry->cfgProtection.nonGf)
@@ -5084,7 +5003,6 @@
                 PELOG3(limLog(pMac, LOG3, FL("protection from NonGf is disabled\n"));)
                 return eSIR_SUCCESS;
             }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE)
-#endif
             {
                 //normal protection config check
                 if(!pMac->lim.cfgProtection.nonGf)
@@ -5095,7 +5013,6 @@
                  }
             }
         }
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
         if ((enable) && (false == psessionEntry->beaconParams.llnNonGFCoexist))
         {
@@ -5110,7 +5027,6 @@
             pBeaconParams->paramChangeBitmap |= PARAM_NON_GF_DEVICES_PRESENT_CHANGED;
         }
     }else
-#endif
     {
         if ((enable) && (false == psessionEntry->beaconParams.llnNonGFCoexist))
         {
@@ -5158,7 +5074,6 @@
         }
         else
         {
-#ifdef WLAN_SOFTAP_FEATURE
             //normal protection config check
             if((psessionEntry->limSystemRole == eLIM_AP_ROLE ) &&
                !psessionEntry->cfgProtection.lsigTxop)
@@ -5167,7 +5082,6 @@
                 PELOG3(limLog(pMac, LOG3, FL(" protection from LsigTxop not supported is disabled\n"));)
                 return eSIR_SUCCESS;
             }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE)
-#endif
             {
                 //normal protection config check
                 if(!pMac->lim.cfgProtection.lsigTxop)
@@ -5180,7 +5094,6 @@
         }
 
 
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
         if ((enable) && (false == psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport))
         {
@@ -5195,7 +5108,6 @@
             pBeaconParams->paramChangeBitmap |= PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED;
         }
     }else
-#endif
     {
         if ((enable) && (false == psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport))
         {
@@ -5244,7 +5156,6 @@
         }
         else
         {
-#ifdef WLAN_SOFTAP_FEATURE
              //normal protection config check
             if((psessionEntry->limSystemRole == eLIM_AP_ROLE) &&
                !psessionEntry->cfgProtection.rifs)
@@ -5253,7 +5164,6 @@
                 PELOG3(limLog(pMac, LOG3, FL(" protection from Rifs is disabled\n"));)
                 return eSIR_SUCCESS;
             }else if(psessionEntry->limSystemRole != eLIM_AP_ROLE )
-#endif
             {
                //normal protection config check
                if(!pMac->lim.cfgProtection.rifs)
@@ -5265,7 +5175,6 @@
             }
         }
 
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE){
         // Disabling the RIFS Protection means Enable the RIFS mode of operation in the BSS
         if ((!enable) && (false == psessionEntry->beaconParams.fRIFSMode))
@@ -5282,7 +5191,6 @@
             pBeaconParams->paramChangeBitmap |= PARAM_RIFS_MODE_CHANGED;
         }
     }else
-#endif
     {
         // Disabling the RIFS Protection means Enable the RIFS mode of operation in the BSS
         if ((!enable) && (false == psessionEntry->beaconParams.fRIFSMode))
@@ -5462,11 +5370,7 @@
 #endif
     
    //If self capability is set to '20Mhz only', then do not change the CB mode.
-#ifdef WLAN_SOFTAP_FEATURE
    if( !limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET, psessionEntry ))
-#else
-   if( !limGetHTCapability( pMac, eHT_SUPPORTED_CHANNEL_WIDTH_SET ))
-#endif
         return;
 
 #if !defined WLAN_FEATURE_VOWIFI  
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index 7a0939c..cc79eac 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -146,14 +146,10 @@
 void limDetectRadar(tpAniSirGlobal, tANI_U32 *);
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limDecideApProtection(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,  tpUpdateBeaconParams pBeaconParams,tpPESession);
 void
 limDecideApProtectionOnDelete(tpAniSirGlobal pMac, 
                               tpDphHashNode pStaDs, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
-#else
-void limDecideApProtection(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,  tpUpdateBeaconParams pBeaconParams);
-#endif
 
 extern tSirRetStatus limEnable11aProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession);
 extern tSirRetStatus limEnable11gProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry);
@@ -162,11 +158,7 @@
 extern tSirRetStatus limEnableHTNonGfProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession);
 extern tSirRetStatus limEnableHtRifsProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry);
 extern tSirRetStatus limEnableHTLsigTxopProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession);
-#ifdef WLAN_SOFTAP_FEATURE
 extern tSirRetStatus limEnableShortPreamble(tpAniSirGlobal pMac, tANI_U8 enable, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
-#else
-extern tSirRetStatus limEnableShortPreamble(tpAniSirGlobal pMac, tANI_U8 enable, tpUpdateBeaconParams pBeaconParams);
-#endif
 extern tSirRetStatus limEnableHtOBSSProtection (tpAniSirGlobal pMac, tANI_U8 enable,  tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams, tpPESession);
 void limDecideStaProtection(tpAniSirGlobal pMac, tpSchBeaconStruct pBeaconStruct, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
 void limDecideStaProtectionOnAssoc(tpAniSirGlobal pMac, tpSchBeaconStruct pBeaconStruct, tpPESession psessionEntry);
@@ -186,9 +178,7 @@
 
 tSirRetStatus limSysProcessMmhMsgApi(tpAniSirGlobal, tSirMsgQ*, tANI_U8);
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limHandleUpdateOlbcCache(tpAniSirGlobal pMac);
-#endif
 
 tANI_U8 limIsNullSsid( tSirMacSSid *pSsid );
 
@@ -205,11 +195,9 @@
 void limProcessQuietTimeout(tpAniSirGlobal);
 void limProcessQuietBssTimeout(tpAniSirGlobal);
 
-#ifdef WLAN_SOFTAP_FEATURE
 #if 0
 void limProcessWPSOverlapTimeout(tpAniSirGlobal pMac);
 #endif
-#endif
 
 void limStartQuietTimer(tpAniSirGlobal pMac, tANI_U8 sessionId);
 void limSwitchPrimaryChannel(tpAniSirGlobal, tANI_U8,tpPESession);
@@ -277,11 +265,7 @@
 void limUtilCountStaAdd(tpAniSirGlobal pMac, tpDphHashNode pSta, tpPESession psessionEntry);
 void limUtilCountStaDel(tpAniSirGlobal pMac, tpDphHashNode pSta, tpPESession psessionEntry);
 
-#ifdef WLAN_SOFTAP_FEATURE
 tANI_U8 limGetHTCapability( tpAniSirGlobal, tANI_U32, tpPESession);
-#else
-tANI_U8 limGetHTCapability( tpAniSirGlobal, tANI_U32 );
-#endif
 void limTxComplete( tHalHandle hHal, void *pData );
 
 /**********Admit Control***************************************/
diff --git a/CORE/MAC/src/pe/pmm/pmmAP.c b/CORE/MAC/src/pe/pmm/pmmAP.c
index 595a3ac..3af455b 100644
--- a/CORE/MAC/src/pe/pmm/pmmAP.c
+++ b/CORE/MAC/src/pe/pmm/pmmAP.c
@@ -227,7 +227,6 @@
 
 #endif
 
-#ifdef WLAN_SOFTAP_FEATURE
 /**
  * pmmGenerateTIM
  *
@@ -280,7 +279,6 @@
     *pPtr = ptr;
 }
 
-#endif
 #ifdef ANI_PRODUCT_TYPE_AP
 /**
  * pmmUpdateTIM
diff --git a/CORE/MAC/src/pe/sch/schApi.c b/CORE/MAC/src/pe/sch/schApi.c
index ef602bd..f9d5239 100644
--- a/CORE/MAC/src/pe/sch/schApi.c
+++ b/CORE/MAC/src/pe/sch/schApi.c
@@ -72,9 +72,7 @@
 
 #include "schSysParams.h"
 #include "limTrace.h"
-#ifdef WLAN_SOFTAP_FEATURE
 #include "limTypes.h"
-#endif
 
 #include "wlan_qct_wda.h"
 
@@ -325,7 +323,6 @@
   // limGetBssid( pMac, beaconParams->bssId);
   palCopyMemory(pMac, beaconParams->bssId, psessionEntry->bssId, sizeof(psessionEntry->bssId));
 
-#ifdef WLAN_SOFTAP_FEATURE
   beaconParams->timIeOffset = pMac->sch.schObject.gSchBeaconOffsetBegin;
 #ifdef WLAN_FEATURE_P2P
   beaconParams->p2pIeOffset = pMac->sch.schObject.p2pIeOffset;
@@ -333,7 +330,6 @@
 #ifdef WLAN_SOFTAP_FW_BEACON_TX_PRNT_LOG
   schLog(pMac, LOGE,FL("TimIeOffset:[%d]\n"),beaconParams->TimIeOffset );
 #endif
-#endif
 
   beaconParams->beacon = beaconPayload;
   beaconParams->beaconLength = (tANI_U32) size;
@@ -368,7 +364,6 @@
     schLog( pMac, LOG2,
         FL("Successfully posted WDA_SEND_BEACON_REQ to HAL\n"));
 
-#ifdef WLAN_SOFTAP_FEATURE
     if( (psessionEntry->limSystemRole == eLIM_AP_ROLE ) 
         && (psessionEntry->proxyProbeRspEn)
         && (pMac->sch.schObject.fBeaconChanged))
@@ -380,13 +375,11 @@
             schLog(pMac, LOGE, FL("FAILED to send probe response template with retCode %d\n"), retCode);
         }
     }
-#endif
   }
 
   return retCode;
 }
 
-#ifdef WLAN_SOFTAP_FEATURE
 tANI_U32 limSendProbeRspTemplateToHal(tpAniSirGlobal pMac,tpPESession psessionEntry
                                     ,tANI_U32* IeBitmap)
 {
@@ -534,5 +527,4 @@
 
     return retCode;
 }
-#endif
 
diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c
index 5def845..90efe93 100644
--- a/CORE/MAC/src/pe/sch/schBeaconGen.c
+++ b/CORE/MAC/src/pe/sch/schBeaconGen.c
@@ -82,7 +82,7 @@
 specialBeaconProcessing(tpAniSirGlobal pMac, tANI_U32 beaconSize);
 #endif
 
-#if defined(WLAN_SOFTAP_FEATURE) && defined(WLAN_FEATURE_P2P)
+#if defined(WLAN_FEATURE_P2P)
 tSirRetStatus schGetP2pIeOffset(tANI_U8 *pExtraIe, tANI_U32 extraIeLen, tANI_U16 *pP2pIeOffset)
 {
     tSirRetStatus status = eSIR_FAILURE;   
@@ -207,7 +207,6 @@
     tDot11fBeacon2 *pBcn2;
     tANI_U32        i, nStatus, nBytes;
     tANI_U32        wpsApEnable=0, tmp;
-#ifdef WLAN_SOFTAP_FEATURE
     tDot11fIEWscProbeRes      *pWscProbeRes;
 #ifdef WLAN_FEATURE_P2P
     tANI_U8  *pExtraIe = NULL;
@@ -216,7 +215,6 @@
     tANI_U16 p2pIeOffset = 0;
     tSirRetStatus status = eSIR_SUCCESS;
 #endif
-#endif
 
     status = palAllocateMemory(pMac->hHdd, (void **)&pBcn1, sizeof(tDot11fBeacon1));
     if(status != eSIR_SUCCESS)
@@ -233,7 +231,6 @@
         return eSIR_FAILURE;
     }
 
-#ifdef WLAN_SOFTAP_FEATURE
     status = palAllocateMemory(pMac->hHdd, (void **)&pWscProbeRes, sizeof(tDot11fIEWscProbeRes));
     if(status != eSIR_SUCCESS)
     {
@@ -242,7 +239,6 @@
         palFreeMemory(pMac->hHdd, pBcn2);
         return eSIR_FAILURE;
     }
-#endif
 
     PELOG1(schLog(pMac, LOG1, FL("Setting fixed beacon fields\n"));)
 
@@ -298,7 +294,6 @@
     offset = sizeof( tAniBeaconStruct );
     ptr    = pMac->sch.schObject.gSchBeaconFrameBegin + offset;
 
-#ifdef WLAN_SOFTAP_FEATURE
     if((psessionEntry->limSystemRole == eLIM_AP_ROLE) 
         && (psessionEntry->proxyProbeRspEn))
     {
@@ -312,7 +307,6 @@
         limUpdateProbeRspTemplateIeBitmapBeacon1(pMac,pBcn1,&psessionEntry->DefProbeRspIeBitmap[0],
                                                 &psessionEntry->probeRespFrame);
     }
-#endif
 
     nStatus = dot11fPackBeacon1( pMac, pBcn1, ptr,
                                  SCH_MAX_BEACON_SIZE - offset,
@@ -323,9 +317,7 @@
                              "8x.).\n"), nStatus );
       palFreeMemory(pMac->hHdd, pBcn1);
       palFreeMemory(pMac->hHdd, pBcn2);
-#ifdef WLAN_SOFTAP_FEATURE
       palFreeMemory(pMac->hHdd, pWscProbeRes);
-#endif
       return eSIR_FAILURE;
     }
     else if ( DOT11F_WARNED( nStatus ) )
@@ -388,11 +380,7 @@
     if(psessionEntry->htCapability)
     {
         PopulateDot11fHTCaps( pMac,psessionEntry, &pBcn2->HTCaps );
-#ifdef WLAN_SOFTAP_FEATURE
         PopulateDot11fHTInfo( pMac, &pBcn2->HTInfo, psessionEntry );
-#else
-        PopulateDot11fHTInfo( pMac, &pBcn2->HTInfo );
-#endif
     }
 #ifdef WLAN_FEATURE_11AC
     if(psessionEntry->vhtCapability)
@@ -423,7 +411,6 @@
     {
         PopulateDot11fWMM( pMac, &pBcn2->WMMInfoAp, &pBcn2->WMMParams, &pBcn2->WMMCaps, psessionEntry);
     }
-#ifdef WLAN_SOFTAP_FEATURE
     if(psessionEntry->limSystemRole == eLIM_AP_ROLE)
     {
         if(psessionEntry->wps_state != SAP_WPS_DISABLED)
@@ -433,33 +420,29 @@
     }
     else
     {
-#endif
-    if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
-        limLog(pMac, LOGP,"Failed to cfg get id %d\n", WNI_CFG_WPS_ENABLE );
-    
-    wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
-    
-    if (wpsApEnable)
-    {
-        PopulateDot11fWsc(pMac, &pBcn2->WscBeacon);
+        if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WPS_ENABLE, &tmp) != eSIR_SUCCESS)
+            limLog(pMac, LOGP,"Failed to cfg get id %d\n", WNI_CFG_WPS_ENABLE );
+
+        wpsApEnable = tmp & WNI_CFG_WPS_ENABLE_AP;
+
+        if (wpsApEnable)
+        {
+            PopulateDot11fWsc(pMac, &pBcn2->WscBeacon);
+        }
+
+        if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
+        {
+            PopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
+            pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
+        }
+
+        if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
+        {
+            DePopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
+            pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
+        }
     }
 
-    if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_BEGIN)
-    {
-        PopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
-        pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_IN_PROGRESS;
-    }
-
-    if (pMac->lim.wscIeInfo.wscEnrollmentState == eLIM_WSC_ENROLL_END)
-    {
-        DePopulateDot11fWscRegistrarInfo(pMac, &pBcn2->WscBeacon);
-        pMac->lim.wscIeInfo.wscEnrollmentState = eLIM_WSC_ENROLL_NOOP;
-    }
-#ifdef WLAN_SOFTAP_FEATURE    
-    }
-#endif
-
-#ifdef WLAN_SOFTAP_FEATURE
     if((psessionEntry->limSystemRole == eLIM_AP_ROLE) 
         && (psessionEntry->proxyProbeRspEn))
     {
@@ -490,7 +473,6 @@
         }
 
     }
-#endif
 
     nStatus = dot11fPackBeacon2( pMac, pBcn2,
                                  pMac->sch.schObject.gSchBeaconFrameEnd,
@@ -501,9 +483,7 @@
                              "8x.).\n"), nStatus );
       palFreeMemory(pMac->hHdd, pBcn1);
       palFreeMemory(pMac->hHdd, pBcn2);
-#ifdef WLAN_SOFTAP_FEATURE
       palFreeMemory(pMac->hHdd, pWscProbeRes);
-#endif
       return eSIR_FAILURE;
     }
     else if ( DOT11F_WARNED( nStatus ) )
@@ -512,7 +492,7 @@
                              "t11fBeacon2 (0x%08x.).\n"), nStatus );
     }
 
-#if defined(WLAN_SOFTAP_FEATURE) && defined(WLAN_FEATURE_P2P)
+#if defined(WLAN_FEATURE_P2P)
     pExtraIe = pMac->sch.schObject.gSchBeaconFrameEnd + nBytes;
     extraIeOffset = nBytes;
 #endif
@@ -524,7 +504,7 @@
 
     pMac->sch.schObject.gSchBeaconOffsetEnd = ( tANI_U16 )nBytes;
 
-#if defined(WLAN_SOFTAP_FEATURE) && defined(WLAN_FEATURE_P2P)
+#if defined(WLAN_FEATURE_P2P)
     extraIeLen = nBytes - extraIeOffset;
 
     //Get the p2p Ie Offset
@@ -549,13 +529,10 @@
     pMac->sch.schObject.fBeaconChanged = 1;
     palFreeMemory(pMac->hHdd, pBcn1);
     palFreeMemory(pMac->hHdd, pBcn2);
-#ifdef WLAN_SOFTAP_FEATURE
     palFreeMemory(pMac->hHdd, pWscProbeRes);
-#endif
     return eSIR_SUCCESS;
 }
 
-#ifdef WLAN_SOFTAP_FEATURE
 void limUpdateProbeRspTemplateIeBitmapBeacon1(tpAniSirGlobal pMac,
                                               tDot11fBeacon1* beacon1,
                                               tANI_U32* DefProbeRspIeBitmap,
@@ -760,7 +737,6 @@
     IeBitmap[index] = temp;
 }
 
-#endif
 
 #ifdef ANI_PRODUCT_TYPE_AP
 
@@ -933,7 +909,6 @@
         PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry\n"));)
         break;
 
-#ifdef WLAN_SOFTAP_FEATURE
     case eLIM_AP_ROLE:{
          tANI_U8 *ptr = &pMac->sch.schObject.gSchBeaconFrameBegin[pMac->sch.schObject.gSchBeaconOffsetBegin];
          tANI_U16 timLength = 0;
@@ -946,7 +921,6 @@
          PELOGE(schLog(pMac, LOGE, FL("can not send beacon for PEER session entry\n"));)
          }
      break;
-#endif
 
 #ifdef ANI_PRODUCT_TYPE_AP
     case eLIM_AP_ROLE: 
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index 012d972..924ebc2 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -194,17 +194,10 @@
                   !(pBcnStruct->erpIEInfo.useProtection || 
                     pBcnStruct->erpIEInfo.nonErpPresent) && !(pBcnStruct->HTInfo.present))
               {
-#ifdef WLAN_SOFTAP_FEATURE
                     limUpdateOverlapStaParam(pMac, pMh->bssId, &(psessionEntry->gLimOverlap11gParams));
 
                   if (psessionEntry->gLimOverlap11gParams.numSta && 
                       !psessionEntry->gLimOverlap11gParams.protectionEnabled)
-#else
-                   limUpdateOverlapStaParam(pMac, pMh->bssId, &(pMac->lim.gLimOverlap11gParams));
-
-                  if (pMac->lim.gLimOverlap11gParams.numSta &&
-                      !pMac->lim.gLimOverlap11gParams.protectionEnabled)
-#endif
                   {
                       limEnableHtProtectionFrom11g(pMac, true, true, pBeaconParams,psessionEntry);
                   }
@@ -226,16 +219,9 @@
                       if((eSIR_HT_OP_MODE_MIXED != pMac->lim.gHTOperMode) &&
                           (eSIR_HT_OP_MODE_OVERLAP_LEGACY != pMac->lim.gHTOperMode))
                       {
-#ifdef WLAN_SOFTAP_FEATURE
                           limUpdateOverlapStaParam(pMac, pMh->bssId, &(psessionEntry->gLimOverlap11gParams));
                           if (psessionEntry->gLimOverlap11gParams.numSta &&
                               !psessionEntry->gLimOverlap11gParams.protectionEnabled)
-#else
-                          limUpdateOverlapStaParam(pMac, pMh->bssId, &(pMac->lim.gLimOverlap11gParams));
-
-                          if (pMac->lim.gLimOverlap11gParams.numSta &&
-                              !pMac->lim.gLimOverlap11gParams.protectionEnabled)
-#endif
                           {
                               limEnableHtProtectionFrom11g(pMac, true, true, pBeaconParams,psessionEntry);
                           }
@@ -243,16 +229,9 @@
                   }           
                   else if(eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT == pBcnStruct->HTInfo.opMode)
                   {
-#ifdef WLAN_SOFTAP_FEATURE
                       limUpdateOverlapStaParam(pMac, pMh->bssId, &(psessionEntry->gLimOverlapHt20Params));
                       if (psessionEntry->gLimOverlapHt20Params.numSta &&
                           !psessionEntry->gLimOverlapHt20Params.protectionEnabled)
-#else
-                      limUpdateOverlapStaParam(pMac, pMh->bssId, &(pMac->lim.gLimOverlapHt20Params));
-
-                      if (pMac->lim.gLimOverlapHt20Params.numSta &&
-                          !pMac->lim.gLimOverlapHt20Params.protectionEnabled)
-#endif
                       {
                           limEnableHT20Protection(pMac, true, true, pBeaconParams,psessionEntry);
                       }
@@ -452,17 +431,10 @@
         limDecideStaProtection(pMac, pBeacon, &beaconParams, psessionEntry);
         if (pBeacon->erpPresent)
         {
-#ifdef WLAN_SOFTAP_FEATURE
             if (pBeacon->erpIEInfo.barkerPreambleMode)
                 limEnableShortPreamble(pMac, false, &beaconParams, psessionEntry);
             else
                 limEnableShortPreamble(pMac, true, &beaconParams, psessionEntry);
-#else
-            if (pBeacon->erpIEInfo.barkerPreambleMode)
-                limEnableShortPreamble(pMac, false, &beaconParams);
-            else
-                limEnableShortPreamble(pMac, true, &beaconParams);
-#endif
           }
         limUpdateShortSlot(pMac, pBeacon, &beaconParams,psessionEntry);
 
@@ -688,11 +660,7 @@
     if((pAPSession = limIsApSessionActive(pMac)) != NULL)
     {
         beaconParams.bssIdx = pAPSession->bssIdx;
-#ifdef WLAN_SOFTAP_FEATURE
         if (pAPSession->gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
-#else
-        if (pMac->lim.gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
-#endif
             ap_beacon_process(pMac,  pRxPacketInfo, &beaconStruct, &beaconParams, pAPSession);
 
         if (beaconParams.paramChangeBitmap)
