Staging: rt2860: remove WPA_SUPPLICANT_SUPPORT ifdefs
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:05:56 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:47 +0000 (11:00 -0700)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 files changed:
drivers/staging/rt2860/Makefile
drivers/staging/rt2860/common/cmm_data_2860.c
drivers/staging/rt2860/common/cmm_wpa.c
drivers/staging/rt2860/common/mlme.c
drivers/staging/rt2860/common/rtmp_init.c
drivers/staging/rt2860/oid.h
drivers/staging/rt2860/rt_config.h
drivers/staging/rt2860/rt_profile.c
drivers/staging/rt2860/rtmp.h
drivers/staging/rt2860/sta/connect.c
drivers/staging/rt2860/sta/rtmp_data.c
drivers/staging/rt2860/sta/wpa.c
drivers/staging/rt2860/sta_ioctl.c

index aba64640597f91c229f23de7a6ddc991adc334c3..4d2b6b029ca47d963e44f4434366e9ec4804c792 100644 (file)
@@ -4,7 +4,6 @@ obj-$(CONFIG_RT2860)    += rt2860sta.o
 EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT
 EXTRA_CFLAGS += -DDBG
 EXTRA_CFLAGS += -DDOT11_N_SUPPORT
-EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT
 
 rt2860sta-objs :=      \
        common/md5.o            \
index f2749bec22dff2cef1361dfd62aa3292eae2c092..b9e8795845bce41f8d2129e77ceb35f73c1cd6f9 100644 (file)
@@ -481,12 +481,11 @@ NDIS_STATUS RTMPCheckRxError(
                if (pRxD->CipherErr == 2)
                {
                        pWpaKey = &pAd->SharedKey[BSS0][pRxWI->KeyIndex];
-#ifdef WPA_SUPPLICANT_SUPPORT
+
             if (pAd->StaCfg.WpaSupplicantUP)
                 WpaSendMicFailureToWpaSupplicant(pAd,
                                    (pWpaKey->Type == PAIRWISEKEY) ? TRUE:FALSE);
             else
-#endif // WPA_SUPPLICANT_SUPPORT //
                            RTMPReportMicError(pAd, pWpaKey);
 
             if (((pRxD->CipherErr & 2) == 2) && pAd->CommonCfg.bWirelessEvent && INFRA_ON(pAd))
index 8f29d31d89d156d675d432bc5332c3c9cddfd670..4074db23a14ef8baeb38867d39d4b0362c2376a6 100644 (file)
@@ -625,14 +625,12 @@ VOID RTMPMakeRSNIE(
        {
                IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
                {
-#ifdef WPA_SUPPLICANT_SUPPORT
                        if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
                        {
                                if (AuthMode < Ndis802_11AuthModeWPA)
                                        return;
                        }
                        else
-#endif // WPA_SUPPLICANT_SUPPORT //
                        {
                                // Support WPAPSK or WPA2PSK in STA-Infra mode
                                // Support WPANone in STA-Adhoc mode
index ff810e3c942d0cbd853fbd8ffb7b971461f37b9b..e089ea8ea3bdc77b36e7a89dc9d00bc2940f7167 100644 (file)
@@ -1004,9 +1004,7 @@ VOID STAMlmePeriodicExec(
 {
        ULONG                       TxTotalCnt;
 
-#ifdef WPA_SUPPLICANT_SUPPORT
     if (pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_DISABLE)
-#endif // WPA_SUPPLICANT_SUPPORT //
     {
        // WPA MIC error should block association attempt for 60 seconds
        if (pAd->StaCfg.bBlockAssoc && (pAd->StaCfg.LastMicErrorTime + (60 * OS_HZ) < pAd->Mlme.Now32))
index 53395e655e182a0142de14168e0d17b7a54449b9..e150c546a57d85b191b0cc75afc1f4d3a526bec3 100644 (file)
@@ -3067,13 +3067,10 @@ VOID    UserCfgInit(
                NdisZeroMemory(pAd->nickname, IW_ESSID_MAX_SIZE+1);
                sprintf(pAd->nickname, "%s", STA_NIC_DEVICE_NAME);
                RTMPInitTimer(pAd, &pAd->StaCfg.WpaDisassocAndBlockAssocTimer, GET_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc), pAd, FALSE);
-#ifdef WPA_SUPPLICANT_SUPPORT
                pAd->StaCfg.IEEE8021X = FALSE;
                pAd->StaCfg.IEEE8021x_required_keys = FALSE;
                pAd->StaCfg.WpaSupplicantUP = WPA_SUPPLICANT_DISABLE;
                pAd->StaCfg.WpaSupplicantUP = WPA_SUPPLICANT_ENABLE;
-#endif // WPA_SUPPLICANT_SUPPORT //
-
        }
 
        // Default for extra information is not valid
index 3b4e7890aa9fac303340e8c4de4802ffc8aec598..ad4cc74e582b612c7ddb05a1aba35abae3fab32b 100644 (file)
 #define        RT_OID_802_11_QUERY_LAST_RX_RATE                        0x0613
 #define        RT_OID_802_11_TX_POWER_LEVEL_1                          0x0614
 #define        RT_OID_802_11_QUERY_PIDVID                                      0x0615
-//for WPA_SUPPLICANT_SUPPORT
+
 #define OID_SET_COUNTERMEASURES                     0x0616
 #define OID_802_11_SET_IEEE8021X                    0x0617
 #define OID_802_11_SET_IEEE8021X_REQUIRE_KEY        0x0618
index 0d82dd53ed8d4c829b21d1fde47ff8f750ee921e..8944806e7dba75c4e7e8d460453a6b0758032a5c 100644 (file)
 #include "igmp_snoop.h"
 #endif // IGMP_SNOOP_SUPPORT //
 
-#ifndef WPA_SUPPLICANT_SUPPORT
-#error "Build for being controlled by NetworkManager or wext, please set HAS_WPA_SUPPLICANT=y"
-#endif // WPA_SUPPLICANT_SUPPORT //
-
 #ifdef IKANOS_VX_1X0
 #include       "vr_ikans.h"
 #endif // IKANOS_VX_1X0 //
index 35b5425536e7ce7eea36c30665def0df8c3fa757..47180557eff641c2c9749f30928bddf3952e15c7 100644 (file)
@@ -1273,12 +1273,10 @@ NDIS_STATUS     RTMPReadParametersHook(
                                                            pAd->StaCfg.AuthMode = Ndis802_11AuthModeWPANone;
                                                        else if ((strcmp(tmpbuf, "WPA2PSK") == 0) || (strcmp(tmpbuf, "wpa2psk") == 0))
                                                            pAd->StaCfg.AuthMode = Ndis802_11AuthModeWPA2PSK;
-#ifdef WPA_SUPPLICANT_SUPPORT
                                                        else if ((strcmp(tmpbuf, "WPA") == 0) || (strcmp(tmpbuf, "wpa") == 0))
                                                            pAd->StaCfg.AuthMode = Ndis802_11AuthModeWPA;
                                                        else if ((strcmp(tmpbuf, "WPA2") == 0) || (strcmp(tmpbuf, "wpa2") == 0))
                                                            pAd->StaCfg.AuthMode = Ndis802_11AuthModeWPA2;
-#endif // WPA_SUPPLICANT_SUPPORT //
                                                        else
                                                            pAd->StaCfg.AuthMode = Ndis802_11AuthModeOpen;
 
index 3e6a0359b9f73063087072b6f40ddafd25c79436..ae8f13d36ada2699ab69ad6f450661ac0042b387 100644 (file)
@@ -1960,7 +1960,6 @@ typedef struct _STA_ADMIN_CONFIG {
        BOOLEAN                 bFastRoaming;       // 0:disable fast roaming, 1:enable fast roaming
        CHAR                    dBmToRoam;          // the condition to roam when receiving Rssi less than this value. It's negative value.
 
-#ifdef WPA_SUPPLICANT_SUPPORT
     BOOLEAN             IEEE8021X;
     BOOLEAN             IEEE8021x_required_keys;
     CIPHER_KEY         DesireSharedKey[4];     // Record user desired WEP keys
@@ -1971,7 +1970,6 @@ typedef struct _STA_ADMIN_CONFIG {
     // 2: driver takes care of scanning, AP selection, and IEEE 802.11 association parameters
     UCHAR               WpaSupplicantUP;
        UCHAR                           WpaSupplicantScanCount;
-#endif // WPA_SUPPLICANT_SUPPORT //
 
     CHAR                dev_name[16];
     USHORT              OriDevType;
@@ -5742,7 +5740,6 @@ VOID QueryBATABLE(
        OUT PQUERYBA_TABLE pBAT);
 #endif // DOT11_N_SUPPORT //
 
-#ifdef WPA_SUPPLICANT_SUPPORT
 INT        WpaCheckEapCode(
        IN  PRTMP_ADAPTER       pAd,
        IN  PUCHAR                              pFrame,
@@ -5755,7 +5752,6 @@ VOID    WpaSendMicFailureToWpaSupplicant(
 
 VOID    SendAssocIEsToWpaSupplicant(
     IN  PRTMP_ADAPTER       pAd);
-#endif // WPA_SUPPLICANT_SUPPORT //
 
 int wext_notify_event_assoc(
        IN  RTMP_ADAPTER *pAd);
index a31f53ddc7755fcf4a638a611dc3803837af9395..7cede82cc5b70f05319c569c420cb9f4d71993d1 100644 (file)
@@ -230,9 +230,8 @@ VOID CntlIdleProc(
                        DisassocParmFill(pAd, &DisassocReq, pAd->CommonCfg.Bssid, REASON_DISASSOC_STA_LEAVING);
                        MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, sizeof(MLME_DISASSOC_REQ_STRUCT), &DisassocReq);
                        pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_DISASSOC;
-#ifdef WPA_SUPPLICANT_SUPPORT
+
             if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_ENABLE_WITH_WEB_UI)
-#endif // WPA_SUPPLICANT_SUPPORT //
             {
                        // Set the AutoReconnectSsid to prevent it reconnect to old SSID
                        // Since calling this indicate user don't want to connect to that SSID anymore.
@@ -1434,15 +1433,11 @@ VOID LinkUp(
 
 
                // If WEP is enabled, add paiewise and shared key
-#ifdef WPA_SUPPLICANT_SUPPORT
         if (((pAd->StaCfg.WpaSupplicantUP)&&
              (pAd->StaCfg.WepStatus == Ndis802_11WEPEnabled)&&
              (pAd->StaCfg.PortSecured == WPA_802_1X_PORT_SECURED)) ||
             ((pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_DISABLE)&&
               (pAd->StaCfg.WepStatus == Ndis802_11WEPEnabled)))
-#else
-               if (pAd->StaCfg.WepStatus == Ndis802_11WEPEnabled)
-#endif // WPA_SUPPLICANT_SUPPORT //
                {
                        PUCHAR  Key;
                        UCHAR   CipherAlg;
@@ -1894,7 +1889,7 @@ VOID LinkDown(
        }
 
        // 802.1x port control
-#ifdef WPA_SUPPLICANT_SUPPORT
+
        // Prevent clear PortSecured here with static WEP
        // NetworkManger set security policy first then set SSID to connect AP.
        if (pAd->StaCfg.WpaSupplicantUP &&
@@ -1904,7 +1899,6 @@ VOID LinkDown(
                pAd->StaCfg.PortSecured = WPA_802_1X_PORT_SECURED;
        }
        else
-#endif // WPA_SUPPLICANT_SUPPORT //
        {
                pAd->StaCfg.PortSecured = WPA_802_1X_PORT_NOT_SECURED;
                pAd->StaCfg.PrivacyFilter = Ndis802_11PrivFilter8021xWEP;
index 252817e13e77e28520e3a963f901255b085e90bd..fc5b75a5c966aba3c55eacfc59ef0f16b187341f 100644 (file)
@@ -50,7 +50,6 @@ VOID STARxEAPOLFrameIndicate(
        PRXWI_STRUC             pRxWI = pRxBlk->pRxWI;
        UCHAR                   *pTmpBuf;
 
-#ifdef WPA_SUPPLICANT_SUPPORT
        if (pAd->StaCfg.WpaSupplicantUP)
        {
                // All EAPoL frames have to pass to upper layer (ex. WPA_SUPPLICANT daemon)
@@ -103,7 +102,6 @@ VOID STARxEAPOLFrameIndicate(
                }
        }
        else
-#endif // WPA_SUPPLICANT_SUPPORT //
        {
                // Special DATA frame that has to pass to MLME
                //       1. Cisco Aironet frames for CCX2. We need pass it to MLME for special process
@@ -223,13 +221,11 @@ BOOLEAN STACheckTkipMICValue(
        {
                DBGPRINT_RAW(RT_DEBUG_ERROR,("Rx MIC Value error 2\n"));
 
-#ifdef WPA_SUPPLICANT_SUPPORT
                if (pAd->StaCfg.WpaSupplicantUP)
                {
                        WpaSendMicFailureToWpaSupplicant(pAd, (pWpaKey->Type == PAIRWISEKEY) ? TRUE : FALSE);
                }
                else
-#endif // WPA_SUPPLICANT_SUPPORT //
                {
                        RTMPReportMicError(pAd, pWpaKey);
                }
@@ -961,9 +957,7 @@ NDIS_STATUS STASendPacket(
                 (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) ||
                 (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2) ||
                 (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2PSK)
-#ifdef WPA_SUPPLICANT_SUPPORT
                  || (pAd->StaCfg.IEEE8021X == TRUE)
-#endif // WPA_SUPPLICANT_SUPPORT //
                  )
                  && ((pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED) || (pAd->StaCfg.MicErrCnt >= 2))
                  && (RTMP_GET_PACKET_EAPOL(pPacket)== FALSE)
@@ -1204,9 +1198,7 @@ VOID      RTMPSendNullFrame(
          (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) ||
          (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2) ||
          (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2PSK)
-#ifdef WPA_SUPPLICANT_SUPPORT
                          || (pAd->StaCfg.IEEE8021X == TRUE)
-#endif
         ) &&
        (pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED))
        {
@@ -1327,13 +1319,11 @@ VOID STAFindCipherAlgorithm(
                        CipherAlg = CIPHER_NONE;
                else if ((Cipher == Ndis802_11EncryptionDisabled) || (pAd->SharedKey[BSS0][KeyIdx].KeyLen == 0))
                        CipherAlg = CIPHER_NONE;
-#ifdef WPA_SUPPLICANT_SUPPORT
            else if ( pAd->StaCfg.WpaSupplicantUP &&
                     (Cipher == Ndis802_11Encryption1Enabled) &&
                     (pAd->StaCfg.IEEE8021X == TRUE) &&
                     (pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED))
                CipherAlg = CIPHER_NONE;
-#endif // WPA_SUPPLICANT_SUPPORT //
                else
                {
                        //Header_802_11.FC.Wep = 1;
index 2609d845fd5ca16a7e8afbbd7a4d081f4345097c..c906eea163d38557d277c5ca61bbd4fbe598e6ae 100644 (file)
@@ -1915,8 +1915,6 @@ VOID      RTMPReportMicError(
     }
 }
 
-
-#ifdef WPA_SUPPLICANT_SUPPORT
 #define        LENGTH_EAP_H    4
 // If the received frame is EAP-Packet ,find out its EAP-Code (Request(0x01), Response(0x02), Success(0x03), Failure(0x04)).
 INT        WpaCheckEapCode(
@@ -1957,7 +1955,6 @@ VOID    WpaSendMicFailureToWpaSupplicant(
 
     return;
 }
-#endif // WPA_SUPPLICANT_SUPPORT //
 
 VOID   WpaMicFailureReportFrame(
        IN  PRTMP_ADAPTER   pAd,
index 60336d16a5df36025577e62681bb8b73995c283e..217f01f8b251d6cb89e3805c81733239b4d74201 100644 (file)
@@ -160,11 +160,9 @@ INT Set_PSMode_Proc(
     IN  PRTMP_ADAPTER   pAdapter,
     IN  PUCHAR          arg);
 
-#ifdef WPA_SUPPLICANT_SUPPORT
 INT Set_Wpa_Support(
     IN PRTMP_ADAPTER   pAd,
        IN      PUCHAR                  arg);
-#endif // WPA_SUPPLICANT_SUPPORT //
 
 #ifdef DBG
 VOID RTMPIoctlBBP(
@@ -257,13 +255,7 @@ static struct {
 #ifdef DBG
        {"Debug",                                               Set_Debug_Proc},
 #endif
-
-#ifdef WPA_SUPPLICANT_SUPPORT
     {"WpaSupport",                  Set_Wpa_Support},
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-
-
        {"FixedTxMode",                 Set_FixedTxMode_Proc},
 #ifdef DOT11_N_SUPPORT
     {"TGnWifiTest",                 Set_TGnWifiTest_Proc},
@@ -312,14 +304,13 @@ VOID RTMPAddKey(
                    NdisZeroMemory(&pAd->SharedKey[BSS0][0], sizeof(CIPHER_KEY));
             pAd->SharedKey[BSS0][0].KeyLen = LEN_TKIP_EK;
             NdisMoveMemory(pAd->SharedKey[BSS0][0].Key, pKey->KeyMaterial, LEN_TKIP_EK);
-#ifdef WPA_SUPPLICANT_SUPPORT
+
             if (pAd->StaCfg.PairCipher == Ndis802_11Encryption2Enabled)
             {
                 NdisMoveMemory(pAd->SharedKey[BSS0][0].RxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK);
                 NdisMoveMemory(pAd->SharedKey[BSS0][0].TxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK);
             }
             else
-#endif // WPA_SUPPLICANT_SUPPORT //
             {
                NdisMoveMemory(pAd->SharedKey[BSS0][0].TxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK);
                 NdisMoveMemory(pAd->SharedKey[BSS0][0].RxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK);
@@ -372,14 +363,13 @@ VOID RTMPAddKey(
             NdisZeroMemory(&pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId], sizeof(CIPHER_KEY));
             pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].KeyLen = LEN_TKIP_EK;
             NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].Key, pKey->KeyMaterial, LEN_TKIP_EK);
-#ifdef WPA_SUPPLICANT_SUPPORT
+
             if (pAd->StaCfg.GroupCipher == Ndis802_11Encryption2Enabled)
             {
                 NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].RxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK);
                 NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].TxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK);
             }
             else
-#endif // WPA_SUPPLICANT_SUPPORT //
             {
                NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].TxMic, pKey->KeyMaterial + LEN_TKIP_EK, LEN_TKIP_TXMICK);
                 NdisMoveMemory(pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId].RxMic, pKey->KeyMaterial + LEN_TKIP_EK + LEN_TKIP_TXMICK, LEN_TKIP_RXMICK);
@@ -859,14 +849,12 @@ int rt_ioctl_giwap(struct net_device *dev,
                ap_addr->sa_family = ARPHRD_ETHER;
                memcpy(ap_addr->sa_data, &pAdapter->CommonCfg.Bssid, ETH_ALEN);
        }
-#ifdef WPA_SUPPLICANT_SUPPORT
     // Add for RT2870
     else if (pAdapter->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
     {
         ap_addr->sa_family = ARPHRD_ETHER;
         memcpy(ap_addr->sa_data, &pAdapter->MlmeAux.Bssid, ETH_ALEN);
     }
-#endif // WPA_SUPPLICANT_SUPPORT //
        else
        {
                DBGPRINT(RT_DEBUG_TRACE, ("IOCTL::SIOCGIWAP(=EMPTY)\n"));
@@ -984,12 +972,10 @@ int rt_ioctl_siwscan(struct net_device *dev,
        else if (pAdapter->bPCIclkOff == TRUE)
                return 0;
 
-#ifdef WPA_SUPPLICANT_SUPPORT
        if (pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE)
        {
                pAdapter->StaCfg.WpaSupplicantScanCount++;
        }
-#endif // WPA_SUPPLICANT_SUPPORT //
 
     pAdapter->StaCfg.bScanReqIsFromWebUI = TRUE;
        if (RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS))
@@ -997,7 +983,6 @@ int rt_ioctl_siwscan(struct net_device *dev,
        do{
                Now = jiffies;
 
-#ifdef WPA_SUPPLICANT_SUPPORT
                if ((pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE) &&
                        (pAdapter->StaCfg.WpaSupplicantScanCount > 3))
                {
@@ -1005,7 +990,6 @@ int rt_ioctl_siwscan(struct net_device *dev,
                        Status = NDIS_STATUS_SUCCESS;
                        break;
                }
-#endif // WPA_SUPPLICANT_SUPPORT //
 
                if ((OPSTATUS_TEST_FLAG(pAdapter, fOP_STATUS_MEDIA_STATE_CONNECTED)) &&
                        ((pAdapter->StaCfg.AuthMode == Ndis802_11AuthModeWPA) ||
@@ -1065,13 +1049,10 @@ int rt_ioctl_giwscan(struct net_device *dev,
                return -EAGAIN;
        }
 
-
-#ifdef WPA_SUPPLICANT_SUPPORT
        if (pAdapter->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE)
        {
                pAdapter->StaCfg.WpaSupplicantScanCount = 0;
        }
-#endif // WPA_SUPPLICANT_SUPPORT //
 
        if (pAdapter->ScanTab.BssNr == 0)
        {
@@ -1904,10 +1885,7 @@ rt_private_get_statistics(struct net_device *dev, struct iw_request_info *info,
         sprintf(extra+strlen(extra), "RSSI-B (if available)           = %ld\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi1 - pAd->BbpRssiToDbmDelta));
         sprintf(extra+strlen(extra), "RSSI-C (if available)           = %ld\n\n", (LONG)(pAd->StaCfg.RssiSample.LastRssi2 - pAd->BbpRssiToDbmDelta));
        }
-#ifdef WPA_SUPPLICANT_SUPPORT
     sprintf(extra+strlen(extra), "WpaSupplicantUP                 = %d\n\n", pAd->StaCfg.WpaSupplicantUP);
-#endif // WPA_SUPPLICANT_SUPPORT //
-
 
     wrq->length = strlen(extra) + 1; // 1: size of '\0'
     DBGPRINT(RT_DEBUG_TRACE, ("<== rt_private_get_statistics, wrq->length = %d\n", wrq->length));
@@ -2209,9 +2187,7 @@ int rt_ioctl_siwauth(struct net_device *dev,
                 pAdapter->StaCfg.WepStatus = Ndis802_11WEPEnabled;
                 pAdapter->StaCfg.OrigWepStatus = pAdapter->StaCfg.WepStatus;
                 pAdapter->StaCfg.PairCipher = Ndis802_11WEPEnabled;
-#ifdef WPA_SUPPLICANT_SUPPORT
                 pAdapter->StaCfg.IEEE8021X = FALSE;
-#endif // WPA_SUPPLICANT_SUPPORT //
             }
             else if (param->value == IW_AUTH_CIPHER_TKIP)
             {
@@ -2253,22 +2229,16 @@ int rt_ioctl_siwauth(struct net_device *dev,
                 if (pAdapter->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK)
                 {
                     pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA;
-#ifdef WPA_SUPPLICANT_SUPPORT
                     pAdapter->StaCfg.IEEE8021X = FALSE;
-#endif // WPA_SUPPLICANT_SUPPORT //
                 }
                 else if (pAdapter->StaCfg.AuthMode == Ndis802_11AuthModeWPA2PSK)
                 {
                     pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2;
-#ifdef WPA_SUPPLICANT_SUPPORT
                     pAdapter->StaCfg.IEEE8021X = FALSE;
-#endif // WPA_SUPPLICANT_SUPPORT //
                 }
-#ifdef WPA_SUPPLICANT_SUPPORT
                 else
                     // WEP 1x
                     pAdapter->StaCfg.IEEE8021X = TRUE;
-#endif // WPA_SUPPLICANT_SUPPORT //
             }
             else if (param->value == 0)
             {
@@ -3133,12 +3103,10 @@ INT RTMPSetInformation(
 #ifdef DOT11_N_SUPPORT
        OID_SET_HT_PHYMODE                                      HT_PhyMode;     //11n ,kathy
 #endif // DOT11_N_SUPPORT //
-#ifdef WPA_SUPPLICANT_SUPPORT
     PNDIS_802_11_PMKID                  pPmkId = NULL;
     BOOLEAN                                            IEEE8021xState = FALSE;
     BOOLEAN                                            IEEE8021x_required_keys = FALSE;
     UCHAR                               wpa_supplicant_enable = 0;
-#endif // WPA_SUPPLICANT_SUPPORT //
 
 #ifdef DOT11_N_SUPPORT
        MaxPhyMode = PHY_11N_5G;
@@ -4074,18 +4042,15 @@ INT RTMPSetInformation(
                     // Default key for tx (shared key)
                     if (pWepKey->KeyIndex & 0x80000000)
                     {
-#ifdef WPA_SUPPLICANT_SUPPORT
                         // set key material and key length
                         NdisZeroMemory(pAdapter->StaCfg.DesireSharedKey[KeyIdx].Key, 16);
                         pAdapter->StaCfg.DesireSharedKey[KeyIdx].KeyLen = (UCHAR) pWepKey->KeyLength;
                         NdisMoveMemory(pAdapter->StaCfg.DesireSharedKey[KeyIdx].Key, &pWepKey->KeyMaterial, pWepKey->KeyLength);
                         pAdapter->StaCfg.DesireSharedKeyId = KeyIdx;
                         pAdapter->StaCfg.DesireSharedKey[KeyIdx].CipherAlg = CipherAlg;
-#endif // WPA_SUPPLICANT_SUPPORT //
                         pAdapter->StaCfg.DefaultKeyId = (UCHAR) KeyIdx;
                     }
 
-#ifdef WPA_SUPPLICANT_SUPPORT
                                        if ((pAdapter->StaCfg.WpaSupplicantUP != 0) &&
                                                (pAdapter->StaCfg.AuthMode >= Ndis802_11AuthModeWPA))
                                        {
@@ -4103,7 +4068,6 @@ INT RTMPSetInformation(
                                        pAdapter->IndicateMediaState = NdisMediaStateConnected;
                                        }
                     else if (pAdapter->StaCfg.PortSecured == WPA_802_1X_PORT_SECURED)
-#endif // WPA_SUPPLICANT_SUPPORT
                     {
                         Key = pAdapter->SharedKey[BSS0][KeyIdx].Key;
 
@@ -4124,7 +4088,6 @@ INT RTMPSetInformation(
             }
             kfree(pWepKey);
             break;
-#ifdef WPA_SUPPLICANT_SUPPORT
            case OID_SET_COUNTERMEASURES:
             if (wrq->u.data.length != sizeof(int))
                 Status  = -EINVAL;
@@ -4258,8 +4221,6 @@ INT RTMPSetInformation(
                        if(pPmkId)
                                kfree(pPmkId);
                break;
-#endif // WPA_SUPPLICANT_SUPPORT //
-
         default:
             DBGPRINT(RT_DEBUG_TRACE, ("Set::unknown IOCTL's subcmd = 0x%08x\n", cmd));
             Status = -EOPNOTSUPP;
@@ -4795,7 +4756,6 @@ INT RTMPQueryInformation(
                        Status = copy_to_user(wrq->u.data.pointer, &pAdapter->CommonCfg.bWmmCapable, wrq->u.data.length);
                        DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_802_11_QUERY_WMM (=%d)\n",     pAdapter->CommonCfg.bWmmCapable));
                        break;
-#ifdef WPA_SUPPLICANT_SUPPORT
         case RT_OID_NEW_DRIVER:
             {
                 UCHAR enabled = 1;
@@ -4809,8 +4769,6 @@ INT RTMPQueryInformation(
                Status = copy_to_user(wrq->u.data.pointer, &pAdapter->StaCfg.WpaSupplicantUP, wrq->u.data.length);
             DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_WPA_SUPPLICANT_SUPPORT (=%d)\n", pAdapter->StaCfg.WpaSupplicantUP));
                break;
-#endif // WPA_SUPPLICANT_SUPPORT //
-
         case RT_OID_DRIVER_DEVICE_NAME:
             DBGPRINT(RT_DEBUG_TRACE, ("Query::RT_OID_DRIVER_DEVICE_NAME \n"));
                        wrq->u.data.length = 16;
@@ -5491,12 +5449,10 @@ INT Set_AuthMode_Proc(
         pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPANone;
     else if ((strcmp(arg, "WPA2PSK") == 0) || (strcmp(arg, "wpa2psk") == 0))
         pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2PSK;
-#ifdef WPA_SUPPLICANT_SUPPORT
     else if ((strcmp(arg, "WPA") == 0) || (strcmp(arg, "wpa") == 0))
         pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA;
     else if ((strcmp(arg, "WPA2") == 0) || (strcmp(arg, "wpa2") == 0))
         pAdapter->StaCfg.AuthMode = Ndis802_11AuthModeWPA2;
-#endif // WPA_SUPPLICANT_SUPPORT //
     else
         return FALSE;
 
@@ -6038,7 +5994,6 @@ INT Set_PSMode_Proc(
     return TRUE;
 }
 
-#ifdef WPA_SUPPLICANT_SUPPORT
 /*
     ==========================================================================
     Description:
@@ -6069,7 +6024,6 @@ INT Set_Wpa_Support(
 
     return TRUE;
 }
-#endif // WPA_SUPPLICANT_SUPPORT //
 
 #ifdef DBG
 /*