diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-26 16:05:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 11:00:47 -0700 |
commit | d7738afe3eb3bd67f4fc2e2d69c49108aed395ce (patch) | |
tree | 054d2b6389bdd974dc987453e1f845486ac9d186 | |
parent | 34b33461e6405ebbf04541efda13a7f48019efcd (diff) | |
download | op-kernel-dev-d7738afe3eb3bd67f4fc2e2d69c49108aed395ce.zip op-kernel-dev-d7738afe3eb3bd67f4fc2e2d69c49108aed395ce.tar.gz |
Staging: rt3070: remove NATIVE_WPA_SUPPLICANT_SUPPORT ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rt3070/Makefile | 1 | ||||
-rw-r--r-- | drivers/staging/rt3070/common/mlme.c | 15 | ||||
-rw-r--r-- | drivers/staging/rt3070/common/rtmp_init.c | 2 | ||||
-rw-r--r-- | drivers/staging/rt3070/oid.h | 13 | ||||
-rw-r--r-- | drivers/staging/rt3070/rt_config.h | 4 | ||||
-rw-r--r-- | drivers/staging/rt3070/rt_main_dev.c | 27 | ||||
-rw-r--r-- | drivers/staging/rt3070/rtmp.h | 2 | ||||
-rw-r--r-- | drivers/staging/rt3070/sta/assoc.c | 101 | ||||
-rw-r--r-- | drivers/staging/rt3070/sta/auth_rsp.c | 3 | ||||
-rw-r--r-- | drivers/staging/rt3070/sta/connect.c | 20 | ||||
-rw-r--r-- | drivers/staging/rt3070/sta_ioctl.c | 2 |
11 files changed, 4 insertions, 186 deletions
diff --git a/drivers/staging/rt3070/Makefile b/drivers/staging/rt3070/Makefile index da1cc1e..d98a797 100644 --- a/drivers/staging/rt3070/Makefile +++ b/drivers/staging/rt3070/Makefile @@ -6,7 +6,6 @@ EXTRA_CFLAGS += -DRT2870 -DRT30xx -DRT3070 EXTRA_CFLAGS += -DDBG EXTRA_CFLAGS += -DDOT11_N_SUPPORT EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT -EXTRA_CFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT rt3070sta-objs := \ common/md5.o \ diff --git a/drivers/staging/rt3070/common/mlme.c b/drivers/staging/rt3070/common/mlme.c index 348d234..ee2a1e2 100644 --- a/drivers/staging/rt3070/common/mlme.c +++ b/drivers/staging/rt3070/common/mlme.c @@ -1037,26 +1037,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); diff --git a/drivers/staging/rt3070/common/rtmp_init.c b/drivers/staging/rt3070/common/rtmp_init.c index bcdf7b0..8800a9e 100644 --- a/drivers/staging/rt3070/common/rtmp_init.c +++ b/drivers/staging/rt3070/common/rtmp_init.c @@ -3394,9 +3394,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 // } diff --git a/drivers/staging/rt3070/oid.h b/drivers/staging/rt3070/oid.h index 506f3c1..f263d44 100644 --- a/drivers/staging/rt3070/oid.h +++ b/drivers/staging/rt3070/oid.h @@ -934,19 +934,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 diff --git a/drivers/staging/rt3070/rt_config.h b/drivers/staging/rt3070/rt_config.h index afc4921..4716ce1 100644 --- a/drivers/staging/rt3070/rt_config.h +++ b/drivers/staging/rt3070/rt_config.h @@ -66,11 +66,9 @@ #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" diff --git a/drivers/staging/rt3070/rt_main_dev.c b/drivers/staging/rt3070/rt_main_dev.c index 103ed70..6e5ea04 100644 --- a/drivers/staging/rt3070/rt_main_dev.c +++ b/drivers/staging/rt3070/rt_main_dev.c @@ -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); } @@ -668,18 +656,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 @@ -836,13 +812,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); diff --git a/drivers/staging/rt3070/rtmp.h b/drivers/staging/rt3070/rtmp.h index 9b24780..7e14795 100644 --- a/drivers/staging/rt3070/rtmp.h +++ b/drivers/staging/rt3070/rtmp.h @@ -5876,10 +5876,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( diff --git a/drivers/staging/rt3070/sta/assoc.c b/drivers/staging/rt3070/sta/assoc.c index 1891a7a..66e71c2 100644 --- a/drivers/staging/rt3070/sta/assoc.c +++ b/drivers/staging/rt3070/sta/assoc.c @@ -456,11 +456,9 @@ VOID MlmeAssocReqAction( RSNIe = IE_WPA2; } -#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT #ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP != 1) #endif // SIOCSIWGENIE // -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // RTMPMakeRSNIE(pAd, pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus, BSS0); // Check for WPA PMK cache list @@ -487,7 +485,6 @@ VOID MlmeAssocReqAction( } } -#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT #ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP == 1) { @@ -497,7 +494,6 @@ VOID MlmeAssocReqAction( } else #endif -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // { MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp, 1, &RSNIe, @@ -508,11 +504,9 @@ VOID MlmeAssocReqAction( FrameLen += tmp; -#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT #ifdef SIOCSIWGENIE if (pAd->StaCfg.WpaSupplicantUP != 1) #endif -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // { // Append Variable IE NdisMoveMemory(pAd->StaCfg.ReqVarIEs + VarIesOffset, &RSNIe, 1); @@ -861,27 +855,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 // - } /* @@ -1016,21 +994,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); @@ -1040,7 +1003,6 @@ VOID PeerReassocRspAction( wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); } -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // } @@ -1235,26 +1197,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 @@ -1537,36 +1484,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) { @@ -1599,8 +1516,6 @@ int wext_notify_event_assoc( return 0; } -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // - BOOLEAN StaAddMacTableEntry( IN PRTMP_ADAPTER pAd, @@ -1816,21 +1731,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); @@ -1840,7 +1740,6 @@ BOOLEAN StaAddMacTableEntry( wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); } -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // return TRUE; } diff --git a/drivers/staging/rt3070/sta/auth_rsp.c b/drivers/staging/rt3070/sta/auth_rsp.c index 2038dde..13919b7 100644 --- a/drivers/staging/rt3070/sta/auth_rsp.c +++ b/drivers/staging/rt3070/sta/auth_rsp.c @@ -128,14 +128,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) diff --git a/drivers/staging/rt3070/sta/connect.c b/drivers/staging/rt3070/sta/connect.c index c1224e4..4644864 100644 --- a/drivers/staging/rt3070/sta/connect.c +++ b/drivers/staging/rt3070/sta/connect.c @@ -418,7 +418,7 @@ VOID CntlOidSsidProc( } pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE; -#ifdef NATIVE_WPA_SUPPLICANT_SUPPORT + { union iwreq_data wrqu; @@ -427,7 +427,6 @@ VOID CntlOidSsidProc( wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); } -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // } } else if (INFRA_ON(pAd)) @@ -557,7 +556,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; @@ -566,7 +565,6 @@ VOID CntlOidRTBssidProc( wireless_send_event(pAd->net_dev, SIOCGIWAP, &wrqu, NULL); } -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // } else { @@ -2034,25 +2032,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 // #ifdef RT30xx if (IS_RT3090(pAd)) diff --git a/drivers/staging/rt3070/sta_ioctl.c b/drivers/staging/rt3070/sta_ioctl.c index 0cbb974..2d05bd8 100644 --- a/drivers/staging/rt3070/sta_ioctl.c +++ b/drivers/staging/rt3070/sta_ioctl.c @@ -2576,7 +2576,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) { @@ -2588,7 +2587,6 @@ int rt_ioctl_giwgenie(struct net_device *dev, } else #endif // SIOCSIWGENIE // -#endif // NATIVE_WPA_SUPPLICANT_SUPPORT // { UCHAR RSNIe = IE_WPA; |