Staging: rt2860: remove NATIVE_WPA_SUPPLICANT_SUPPORT ifdefs
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:05:51 +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>
12 files changed:
drivers/staging/rt2860/Makefile
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_main_dev.c
drivers/staging/rt2860/rtmp.h
drivers/staging/rt2860/sta/assoc.c
drivers/staging/rt2860/sta/auth_rsp.c
drivers/staging/rt2860/sta/connect.c
drivers/staging/rt2860/sta/sync.c
drivers/staging/rt2860/sta_ioctl.c

index 1a1d91df6eb5e5949343a9698b998c5c585ff832..aba64640597f91c229f23de7a6ddc991adc334c3 100644 (file)
@@ -5,7 +5,6 @@ EXTRA_CFLAGS += -DLINUX -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT
 EXTRA_CFLAGS += -DDBG
 EXTRA_CFLAGS += -DDOT11_N_SUPPORT
 EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT
-EXTRA_CFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT
 
 rt2860sta-objs :=      \
        common/md5.o            \
index 8dbbd28a4e7b73ac1dc334b0ddbf8f086e6453ef..ff810e3c942d0cbd853fbd8ffb7b971461f37b9b 100644 (file)
@@ -1110,26 +1110,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 //
 
                        MlmeAutoReconnectLastSSID(pAd);
                }
index f64162c748b3ee73165b8987e7a8588d6b784f51..53395e655e182a0142de14168e0d17b7a54449b9 100644 (file)
@@ -3071,9 +3071,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 d5f2ad0f4ed8544f4dea884472d5c9c0812f078a..3b4e7890aa9fac303340e8c4de4802ffc8aec598 100644 (file)
@@ -873,19 +873,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 a4da73357197800ca4333cdbbd5ebb6737c8f931..0d82dd53ed8d4c829b21d1fde47ff8f750ee921e 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 f5797f19725bffa32feb9a054893d8ce5eb3a0a3..677c28507c2153950994cffcb54673c0ed2f241b 100644 (file)
@@ -241,18 +241,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);
                pAd->bPCIclkOff = FALSE;
        }
@@ -592,18 +580,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
@@ -734,13 +710,12 @@ INT __devinit   rt28xx_probe(
     }
 
        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 9bb41e241299195f7d60e7b53f0c25a7ac0ad809..3e6a0359b9f73063087072b6f40ddafd25c79436 100644 (file)
@@ -5757,10 +5757,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 c24edfd277e74be2680568ec9f0d24b24d0c0df2..b6092d16d9664bdf623c8dd283903120ced25225 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 //
-
 }
 
 /*
@@ -908,21 +892,6 @@ VOID PeerAssocRspAction(
                                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);
@@ -932,8 +901,6 @@ VOID PeerAssocRspAction(
                     wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
                 }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-
 
                                pAd->StaCfg.CkipFlag = CkipFlag;
                                if (CkipFlag & 0x18)
@@ -1005,21 +972,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);
@@ -1029,7 +981,6 @@ VOID PeerReassocRspAction(
                     wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
                 }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
 
                        }
 
@@ -1224,26 +1175,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
@@ -1526,36 +1462,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)
 {
@@ -1588,5 +1494,3 @@ int wext_notify_event_assoc(
        return 0;
 
 }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
-
index 2038ddec1bd225e9c3e332f6dadf49c4eeb7c75b..cc639b1c6c136b7179f90bf9b3fc88656756680a 100644 (file)
@@ -127,15 +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 94074774c971541491b2c318d683d4bf9274564e..a31f53ddc7755fcf4a638a611dc3803837af9395 100644 (file)
@@ -390,7 +390,7 @@ VOID CntlOidSsidProc(
                        }
 
                        pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
-#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT
+
             {
                 union iwreq_data    wrqu;
 
@@ -399,7 +399,6 @@ VOID CntlOidSsidProc(
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
                }
        }
        else if (INFRA_ON(pAd))
@@ -522,7 +521,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;
 
@@ -531,7 +530,6 @@ VOID CntlOidRTBssidProc(
                 wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
             }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
        }
        else
        {
@@ -1994,25 +1992,11 @@ VOID LinkDown(
        // Allow go to sleep after linkdown steps.
        RTMP_SET_PSFLAG(pAd, fRTMP_PS_CAN_GO_SLEEP);
 
-#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 40545ebb7ba03bcf1f514353712cd4b128a19859..fe80bb1a94f70bab93dc7c738608393b3bd02bbf 100644 (file)
@@ -1365,21 +1365,6 @@ VOID PeerBeacon(
                                                        }
 #endif // DOT11_N_SUPPORT //
 
-#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);
@@ -1389,7 +1374,6 @@ VOID PeerBeacon(
                                    wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL);
 
                                }
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
                                                }
                                        }
                                }
index 1c69a877c3e397422a8516357ad56c1eae36695d..60336d16a5df36025577e62681bb8b73995c283e 100644 (file)
@@ -2649,7 +2649,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)
        {
@@ -2661,7 +2660,6 @@ int rt_ioctl_giwgenie(struct net_device *dev,
        }
        else
 #endif // SIOCSIWGENIE //
-#endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
        {
                UCHAR RSNIe = IE_WPA;