Staging: rt2870: remove NATIVE_WPA_SUPPLICANT_SUPPORT ifdefs
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:05:53 +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>
drivers/staging/rt2870/Makefile
drivers/staging/rt2870/common/mlme.c
drivers/staging/rt2870/common/rtmp_init.c
drivers/staging/rt2870/oid.h
drivers/staging/rt2870/rt_config.h
drivers/staging/rt2870/rt_main_dev.c
drivers/staging/rt2870/rtmp.h
drivers/staging/rt2870/sta/assoc.c
drivers/staging/rt2870/sta/auth_rsp.c
drivers/staging/rt2870/sta/connect.c
drivers/staging/rt2870/sta_ioctl.c

index 25f74f119da9631b8dcb4923a80bb0ff361fdd3e..de79796d2ba7c138eec0eee015cf956279b01cf1 100644 (file)
@@ -6,7 +6,6 @@ EXTRA_CFLAGS += -DRT2870
 EXTRA_CFLAGS += -DDBG
 EXTRA_CFLAGS += -DDOT11_N_SUPPORT
 EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT
-EXTRA_CFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
 
 rt2870sta-objs :=              \
        common/md5.o            \
index fe9dac863b1aa6d9264fdcaf5126f4e5a3fb23c3..f669e8501c1b94fa5b8b8f0dfc5ac1b92adbff4b 100644 (file)
@@ -1025,26 +1025,11 @@ VOID STAMlmePeriodicExec(
                        // Lost AP, send disconnect & link down event
                        LinkDown(pAd, FALSE);
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-            if (pAd->StaCfg.WpaSupplicantUP)
-                       {
-                union iwreq_data    wrqu;
-                //send disassociate event to wpa_supplicant
-                memset(&wrqu, 0, sizeof(wrqu));
-                wrqu.data.flags = RT_DISASSOC_EVENT_FLAG;
-                wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-            }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
             {
                 union iwreq_data    wrqu;
                 memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 
                        // RTMPPatchMacBbpBug(pAd);
                        MlmeAutoReconnectLastSSID(pAd);
index 4775c17e98341f45e2e07d734681b8163282e931..06cc2a14c887db59c9c3ed2c335aea0770baf187 100644 (file)
@@ -3320,9 +3320,7 @@ VOID      UserCfgInit(
                pAd->StaCfg.IEEE8021X = FALSE;
                pAd->StaCfg.IEEE8021x_required_keys = FALSE;
                pAd->StaCfg.WpaSupplicantUP = WPA_SUPPLICANT_DISABLE;
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
                pAd->StaCfg.WpaSupplicantUP = WPA_SUPPLICANT_ENABLE;
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 #endif // WPA_SUPPLICANT_SUPPORT //
 
        }
index 2512fe4542f80486663335fde4532e6279795758..5c392b2a4f54194d1a6d8da9b72f3229cf76a167 100644 (file)
@@ -896,19 +896,6 @@ typedef struct _RT_LLTD_ASSOICATION_TABLE {
 } RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE;
 #endif // LLTD_SUPPORT //
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-#define        RT_ASSOC_EVENT_FLAG                         0x0101
-#define        RT_DISASSOC_EVENT_FLAG                      0x0102
-#define        RT_REQIE_EVENT_FLAG                         0x0103
-#define        RT_RESPIE_EVENT_FLAG                        0x0104
-#define        RT_ASSOCINFO_EVENT_FLAG                     0x0105
-#define RT_PMKIDCAND_FLAG                           0x0106
-#define RT_INTERFACE_DOWN                           0x0107
-#define RT_INTERFACE_UP                             0x0108
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
 #define MAX_CUSTOM_LEN 128
 
 typedef enum _RT_802_11_D_CLIENT_MODE
index 1373ae2ddf8d1a2c5217da521d1267a20f987ae8..90b1d19302b69d792855806e18080f5c923f6891 100644 (file)
 #include "igmp_snoop.h"
 #endif // IGMP_SNOOP_SUPPORT //
 
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
 #ifndef WPA_SUPPLICANT_SUPPORT
-#error "Build for being controlled by NetworkManager or wext, please set HAS_WPA_SUPPLICANT=y and HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y"
+#error "Build for being controlled by NetworkManager or wext, please set HAS_WPA_SUPPLICANT=y"
 #endif // WPA_SUPPLICANT_SUPPORT //
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 
 #ifdef IKANOS_VX_1X0
 #include       "vr_ikans.h"
index 2d431253c7e1842185c83b162b3efb484481fe8c..474c3adbebe26598aeeb7aa6514ff9d9e8dc8f22 100644 (file)
@@ -250,18 +250,6 @@ int rt28xx_close(IN PNET_DEV dev)
                RTMPCancelTimer(&pAd->StaCfg.StaQuickResponeForRateUpTimer, &Cancelled);
                RTMPCancelTimer(&pAd->StaCfg.WpaDisassocAndBlockAssocTimer, &Cancelled);
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-               {
-                       union iwreq_data    wrqu;
-                       // send wireless event to wpa_supplicant for infroming interface down.
-                       memset(&wrqu, 0, sizeof(wrqu));
-                       wrqu.data.flags = RT_INTERFACE_DOWN;
-                       wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-               }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
                MlmeRadioOff(pAd);
        }
 
@@ -671,18 +659,6 @@ int rt28xx_open(IN PNET_DEV dev)
 
        IF_DEV_CONFIG_OPMODE_ON_STA(pAd)
        {
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-               {
-                       union iwreq_data    wrqu;
-                       // send wireless event to wpa_supplicant for infroming interface down.
-                       memset(&wrqu, 0, sizeof(wrqu));
-                       wrqu.data.flags = RT_INTERFACE_UP;
-                       wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-               }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
        }
 
        // Enable Interrupt
@@ -854,13 +830,12 @@ INT __devinit   rt28xx_probe(
 //             goto err_out;
 
        netif_stop_queue(net_dev);
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
+
 /* for supporting Network Manager */
 /* Set the sysfs physical device reference for the network logical device
  * if set prior to registration will cause a symlink during initialization.
  */
     SET_NETDEV_DEV(net_dev, &(dev_p->dev));
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 
        // Allocate RTMP_ADAPTER miniport adapter structure
        handle = kmalloc(sizeof(struct os_cookie), GFP_KERNEL);
index f572ea374c87c7d32851e8004593200cfa429e78..331ebeb4924f798f7ccb72ef5bccbff1d8fbf6a4 100644 (file)
@@ -5866,10 +5866,8 @@ VOID    SendAssocIEsToWpaSupplicant(
     IN  PRTMP_ADAPTER       pAd);
 #endif // WPA_SUPPLICANT_SUPPORT //
 
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
 int wext_notify_event_assoc(
        IN  RTMP_ADAPTER *pAd);
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 
 #ifdef DOT11_N_SUPPORT
 VOID Handle_BSS_Width_Trigger_Events(
index 67621a42aa5eb3c2aa041a2f21edfd0c29d46e67..3612bf04288e15d02ad13c6c4396b966c99482cf 100644 (file)
@@ -840,27 +840,11 @@ VOID MlmeDisassocReqAction(
        RTMPSetTimer(&pAd->MlmeAux.DisassocTimer, Timeout); /* in mSec */
        pAd->Mlme.AssocMachine.CurrState = DISASSOC_WAIT_RSP;
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-    if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
-       {
-        union iwreq_data    wrqu;
-        //send disassociate event to wpa_supplicant
-        memset(&wrqu, 0, sizeof(wrqu));
-        wrqu.data.flags = RT_DISASSOC_EVENT_FLAG;
-        wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-    }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
     {
         union iwreq_data    wrqu;
         memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
         wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
     }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-
 }
 
 /*
@@ -995,21 +979,6 @@ VOID PeerReassocRspAction(
                                AssocPostProc(pAd, Addr2, CapabilityInfo, Aid, SupRate, SupRateLen, ExtRate, ExtRateLen,
                                         &EdcaParm, &HtCapability, HtCapabilityLen, &AddHtInfo);
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-                if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
-                {
-                    union iwreq_data    wrqu;
-
-                    SendAssocIEsToWpaSupplicant(pAd);
-                    memset(&wrqu, 0, sizeof(wrqu));
-                    wrqu.data.flags = RT_ASSOC_EVENT_FLAG;
-                    wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-                }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
                 {
                     union iwreq_data    wrqu;
                     wext_notify_event_assoc(pAd);
@@ -1019,7 +988,6 @@ VOID PeerReassocRspAction(
                     wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
                 }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 
                        }
 
@@ -1214,26 +1182,11 @@ VOID PeerDisassocAction(
                        LinkDown(pAd, TRUE);
                        pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-            if (pAd->StaCfg.WpaSupplicantUP != WPA_SUPPLICANT_DISABLE)
-                       {
-                union iwreq_data    wrqu;
-                //send disassociate event to wpa_supplicant
-                memset(&wrqu, 0, sizeof(wrqu));
-                wrqu.data.flags = RT_DISASSOC_EVENT_FLAG;
-                wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-            }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
             {
                 union iwreq_data    wrqu;
                 memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
                }
        }
        else
@@ -1516,36 +1469,6 @@ VOID SwitchBetweenWepAndCkip(
        }
 }
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-VOID    SendAssocIEsToWpaSupplicant(
-    IN  PRTMP_ADAPTER pAd)
-{
-    union iwreq_data    wrqu;
-    unsigned char custom[IW_CUSTOM_MAX] = {0};
-
-    if ((pAd->StaCfg.ReqVarIELen + 17) <= IW_CUSTOM_MAX)
-    {
-        sprintf(custom, "ASSOCINFO_ReqIEs=");
-           NdisMoveMemory(custom+17, pAd->StaCfg.ReqVarIEs, pAd->StaCfg.ReqVarIELen);
-           memset(&wrqu, 0, sizeof(wrqu));
-        wrqu.data.length = pAd->StaCfg.ReqVarIELen + 17;
-        wrqu.data.flags = RT_REQIE_EVENT_FLAG;
-        wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, custom);
-
-        memset(&wrqu, 0, sizeof(wrqu));
-        wrqu.data.flags = RT_ASSOCINFO_EVENT_FLAG;
-        wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-    }
-    else
-        DBGPRINT(RT_DEBUG_TRACE, ("pAd->StaCfg.ReqVarIELen + 17 > MAX_CUSTOM_LEN\n"));
-
-    return;
-}
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
 int wext_notify_event_assoc(
        IN  RTMP_ADAPTER *pAd)
 {
@@ -1578,8 +1501,6 @@ int wext_notify_event_assoc(
        return 0;
 
 }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-
 
 BOOLEAN StaAddMacTableEntry(
        IN  PRTMP_ADAPTER               pAd,
@@ -1795,21 +1716,6 @@ BOOLEAN StaAddMacTableEntry(
 
        NdisReleaseSpinLock(&pAd->MacTabLock);
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-    if (pAd->StaCfg.WpaSupplicantUP)
-    {
-        union iwreq_data    wrqu;
-
-        SendAssocIEsToWpaSupplicant(pAd);
-        memset(&wrqu, 0, sizeof(wrqu));
-        wrqu.data.flags = RT_ASSOC_EVENT_FLAG;
-        wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-    }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
     {
         union iwreq_data    wrqu;
         wext_notify_event_assoc(pAd);
@@ -1819,7 +1725,6 @@ BOOLEAN StaAddMacTableEntry(
         wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
     }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
        return TRUE;
 }
 
index d8a806c56e50d9e9a4cc72969f369cb679674f99..cc639b1c6c136b7179f90bf9b3fc88656756680a 100644 (file)
@@ -127,14 +127,11 @@ VOID PeerDeauthAction(
         {
             DBGPRINT(RT_DEBUG_TRACE,("AUTH_RSP - receive DE-AUTH from our AP (Reason=%d)\n", Reason));
 
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
             {
                 union iwreq_data    wrqu;
                 memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-
 
                        // send wireless event - for deauthentication
                        if (pAd->CommonCfg.bWirelessEvent)
index c3a9441f21302cbc7b7b2fddf8baebb840a3a337..d0784be65e435bb1475d87f841a40e1be8c85850 100644 (file)
@@ -416,7 +416,7 @@ VOID CntlOidSsidProc(
                        }
 
                        pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
+
             {
                 union iwreq_data    wrqu;
 
@@ -425,7 +425,6 @@ VOID CntlOidSsidProc(
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
                }
        }
        else if (INFRA_ON(pAd))
@@ -555,7 +554,7 @@ VOID CntlOidRTBssidProc(
                // already connected to the same BSSID, go back to idle state directly
                DBGPRINT(RT_DEBUG_TRACE, ("CNTL - already in this BSSID. ignore this SET_BSSID request\n"));
                pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
+
             {
                 union iwreq_data    wrqu;
 
@@ -564,7 +563,6 @@ VOID CntlOidRTBssidProc(
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
        }
        else
        {
@@ -2015,25 +2013,11 @@ VOID LinkDown(
        RTMP_IO_WRITE32(pAd, MAX_LEN_CFG, 0x1fff);
        RTMP_CLEAR_FLAG(pAd, fRTMP_ADAPTER_BSS_SCAN_IN_PROGRESS);
 
-#ifdef WPA_SUPPLICANT_SUPPORT
-#ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
-       if (pAd->StaCfg.WpaSupplicantUP) {
-               union iwreq_data    wrqu;
-               //send disassociate event to wpa_supplicant
-               memset(&wrqu, 0, sizeof(wrqu));
-               wrqu.data.flags = RT_DISASSOC_EVENT_FLAG;
-               wireless_send_event(pAd->net_dev, IWEVCUSTOM, &wrqu, NULL);
-       }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-#endif // WPA_SUPPLICANT_SUPPORT //
-
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
        {
                union iwreq_data    wrqu;
                memset(wrqu.ap_addr.sa_data, 0, MAC_ADDR_LEN);
                wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
        }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 }
 
 /*
index c05ae3a33e66064ef7aecaafce4a63edf519d02c..4d8aae9b62b46ca89146f61533a0336b201954bf 100644 (file)
@@ -2654,7 +2654,6 @@ int rt_ioctl_giwgenie(struct net_device *dev,
                return 0;
        }
 
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
 #ifdef SIOCSIWGENIE
        if (pAd->StaCfg.WpaSupplicantUP == WPA_SUPPLICANT_ENABLE)
        {
@@ -2666,7 +2665,6 @@ int rt_ioctl_giwgenie(struct net_device *dev,
        }
        else
 #endif // SIOCSIWGENIE //
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
        {
                UCHAR RSNIe = IE_WPA;