Commit e08bae5a authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt2860: remove WPA_SUPPLICANT_SUPPORT ifdefs

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d7738afe
......@@ -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 \
......
......@@ -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))
......
......@@ -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
......
......@@ -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))
......
......@@ -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
......
......@@ -158,7 +158,7 @@
#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
......
......@@ -64,10 +64,6 @@
#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 //
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment