Staging: rt2870: remove dead LEAP_SUPPORT code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2009-04-26 16:05:25 +02:00 committed by Greg Kroah-Hartman
parent 720613f893
commit 86b9f2485d
13 changed files with 1 additions and 547 deletions

View File

@ -962,9 +962,6 @@ BOOLEAN PeerAuthSanity(
NdisMoveMemory(pStatus, &pFrame->Octet[4], 2); NdisMoveMemory(pStatus, &pFrame->Octet[4], 2);
if ((*pAlg == Ndis802_11AuthModeOpen) if ((*pAlg == Ndis802_11AuthModeOpen)
#ifdef LEAP_SUPPORT
|| (*pAlg == CISCO_AuthModeLEAP)
#endif // LEAP_SUPPORT //
) )
{ {
if (*pSeq == 1 || *pSeq == 2) if (*pSeq == 1 || *pSeq == 2)
@ -1025,9 +1022,6 @@ BOOLEAN MlmeAuthReqSanity(
*pAlg = pInfo->Alg; *pAlg = pInfo->Alg;
if (((*pAlg == Ndis802_11AuthModeShared) ||(*pAlg == Ndis802_11AuthModeOpen) if (((*pAlg == Ndis802_11AuthModeShared) ||(*pAlg == Ndis802_11AuthModeOpen)
#ifdef LEAP_SUPPORT
|| (*pAlg == CISCO_AuthModeLEAP)
#endif // LEAP_SUPPORT //
) && ) &&
((*pAddr & 0x01) == 0)) ((*pAddr & 0x01) == 0))
{ {

View File

@ -617,11 +617,6 @@ VOID MlmeHandler(
case WPA_PSK_STATE_MACHINE: case WPA_PSK_STATE_MACHINE:
StateMachinePerformAction(pAd, &pAd->Mlme.WpaPskMachine, Elem); StateMachinePerformAction(pAd, &pAd->Mlme.WpaPskMachine, Elem);
break; break;
#ifdef LEAP_SUPPORT
case LEAP_STATE_MACHINE:
LeapMachinePerformAction(pAd, &pAd->Mlme.LeapMachine, Elem);
break;
#endif
case AIRONET_STATE_MACHINE: case AIRONET_STATE_MACHINE:
StateMachinePerformAction(pAd, &pAd->Mlme.AironetMachine, Elem); StateMachinePerformAction(pAd, &pAd->Mlme.AironetMachine, Elem);
break; break;
@ -4963,16 +4958,6 @@ BOOLEAN MsgTypeSubst(
*MsgType = MT2_AIRONET_MSG; *MsgType = MT2_AIRONET_MSG;
return (TRUE); return (TRUE);
} }
#ifdef LEAP_SUPPORT
if ( pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP ) //LEAP
{
// LEAP frames
*Machine = LEAP_STATE_MACHINE;
EAPType = *((UCHAR*)pFrame + LENGTH_802_11 + LENGTH_802_1_H + 1);
return (LeapMsgTypeSubst(EAPType, MsgType));
}
else
#endif // LEAP_SUPPORT //
{ {
*Machine = WPA_PSK_STATE_MACHINE; *Machine = WPA_PSK_STATE_MACHINE;
EAPType = *((UCHAR*)pFrame + LENGTH_802_11 + LENGTH_802_1_H + 1); EAPType = *((UCHAR*)pFrame + LENGTH_802_11 + LENGTH_802_1_H + 1);

View File

@ -3323,13 +3323,6 @@ VOID UserCfgInit(
pAd->StaCfg.WindowsBatteryPowerMode = Ndis802_11PowerModeCAM; pAd->StaCfg.WindowsBatteryPowerMode = Ndis802_11PowerModeCAM;
pAd->StaCfg.bWindowsACCAMEnable = FALSE; pAd->StaCfg.bWindowsACCAMEnable = FALSE;
#ifdef LEAP_SUPPORT
// CCX v1.0 releated init value
RTMPInitTimer(pAd, &pAd->StaCfg.LeapAuthTimer, GET_TIMER_FUNCTION(LeapAuthTimeout), pAd, FALSE);
pAd->StaCfg.LeapAuthMode = CISCO_AuthModeLEAPNone;
pAd->StaCfg.bCkipOn = FALSE;
#endif // LEAP_SUPPORT //
RTMPInitTimer(pAd, &pAd->StaCfg.StaQuickResponeForRateUpTimer, GET_TIMER_FUNCTION(StaQuickResponeForRateUpExec), pAd, FALSE); RTMPInitTimer(pAd, &pAd->StaCfg.StaQuickResponeForRateUpTimer, GET_TIMER_FUNCTION(StaQuickResponeForRateUpExec), pAd, FALSE);
pAd->StaCfg.StaQuickResponeForRateUpTimerRunning = FALSE; pAd->StaCfg.StaQuickResponeForRateUpTimerRunning = FALSE;

View File

@ -1,215 +0,0 @@
/*
*************************************************************************
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2002-2007, Ralink Technology, Inc.
*
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
*************************************************************************
Module Name:
leap.h
Abstract:
Revision History:
Who When What
-------- ---------- ----------------------------------------------
Name Date Modification logs
*/
#ifndef __LEAP_H__
#define __LEAP_H__
// Messages for Associate state machine
#define LEAP_MACHINE_BASE 30
#define LEAP_MSG_REQUEST_IDENTITY 31
#define LEAP_MSG_REQUEST_LEAP 32
#define LEAP_MSG_SUCCESS 33
#define LEAP_MSG_FAILED 34
#define LEAP_MSG_RESPONSE_LEAP 35
#define LEAP_MSG_EAPOLKEY 36
#define LEAP_MSG_UNKNOWN 37
#define LEAP_MSG 38
//! assoc state-machine states
#define LEAP_IDLE 0
#define LEAP_WAIT_IDENTITY_REQUEST 1
#define LEAP_WAIT_CHANLLENGE_REQUEST 2
#define LEAP_WAIT_SUCCESS 3
#define LEAP_WAIT_CHANLLENGE_RESPONSE 4
#define LEAP_WAIT_EAPOLKEY 5
#define LEAP_REASON_INVALID_AUTH 0x01
#define LEAP_REASON_AUTH_TIMEOUT 0x02
#define LEAP_REASON_CHALLENGE_FROM_AP_FAILED 0x03
#define LEAP_REASON_CHALLENGE_TO_AP_FAILED 0x04
#define CISCO_AuthModeLEAP 0x80
#define CISCO_AuthModeLEAPNone 0x00
#define LEAP_AUTH_TIMEOUT 30000
#define LEAP_CHALLENGE_RESPONSE_LENGTH 24
#define LEAP_CHALLENGE_REQUEST_LENGTH 8
typedef struct _LEAP_EAPOL_HEADER_ {
UCHAR Version;
UCHAR Type;
UCHAR Length[2];
} LEAP_EAPOL_HEADER, *PLEAP_EAPOL_HEADER;
typedef struct _LEAP_EAPOL_PACKET_ {
UCHAR Code;
UCHAR Identifier;
UCHAR Length[2];
UCHAR Type;
} LEAP_EAPOL_PACKET, *PLEAP_EAPOL_PACKET;
typedef struct _LEAP_EAP_CONTENTS_ {
UCHAR Version;
UCHAR Reserved;
UCHAR Length;
} LEAP_EAP_CONTENTS, *PLEAP_EAP_CONTENTS;
/*** EAPOL key ***/
typedef struct _EAPOL_KEY_HEADER_ {
UCHAR Type;
UCHAR Length[2];
UCHAR Counter[8];
UCHAR IV[16];
UCHAR Index;
UCHAR Signature[16];
} EAPOL_KEY_HEADER, *PEAPOL_KEY_HEADER;
BOOLEAN LeapMsgTypeSubst(
IN UCHAR EAPType,
OUT ULONG *MsgType);
VOID LeapMachinePerformAction(
IN PRTMP_ADAPTER pAd,
IN STATE_MACHINE *S,
IN MLME_QUEUE_ELEM *Elem);
VOID LeapMacHeaderInit(
IN PRTMP_ADAPTER pAd,
IN OUT PHEADER_802_11 pHdr80211,
IN UCHAR wep,
IN PUCHAR pAddr3);
VOID LeapStartAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem);
VOID LeapIdentityAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem);
VOID LeapPeerChallengeAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem);
VOID HashPwd(
IN PUCHAR pwd,
IN INT pwdlen,
OUT PUCHAR hash);
VOID PeerChallengeResponse(
IN PUCHAR szChallenge,
IN PUCHAR smbPasswd,
OUT PUCHAR szResponse);
VOID ParityKey(
OUT PUCHAR szOut,
IN PUCHAR szIn);
VOID DesKey(
OUT ULONG k[16][2],
IN PUCHAR key,
IN INT decrypt);
VOID Des(
IN ULONG ks[16][2],
OUT UCHAR block[8]);
VOID DesEncrypt(
IN PUCHAR szClear,
IN PUCHAR szKey,
OUT PUCHAR szOut);
VOID LeapNetworkChallengeAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem);
VOID LeapNetworkChallengeResponse(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem);
VOID HashpwdHash(
IN PUCHAR hash,
IN PUCHAR hashhash);
VOID ProcessSessionKey(
OUT PUCHAR SessionKey,
IN PUCHAR hash2,
IN PUCHAR ChallengeToRadius,
IN PUCHAR ChallengeResponseFromRadius,
IN PUCHAR ChallengeFromRadius,
IN PUCHAR ChallengeResponseToRadius);
VOID LeapEapolKeyAction(
IN PRTMP_ADAPTER pAd,
IN MLME_QUEUE_ELEM *Elem);
VOID RogueApTableInit(
IN ROGUEAP_TABLE *Tab);
ULONG RogueApTableSearch(
IN ROGUEAP_TABLE *Tab,
IN PUCHAR pAddr);
VOID RogueApEntrySet(
IN PRTMP_ADAPTER pAd,
OUT ROGUEAP_ENTRY *pRogueAp,
IN PUCHAR pAddr,
IN UCHAR FaileCode);
ULONG RogueApTableSetEntry(
IN PRTMP_ADAPTER pAd,
OUT ROGUEAP_TABLE *Tab,
IN PUCHAR pAddr,
IN UCHAR FaileCode);
VOID RogueApTableDeleteEntry(
IN OUT ROGUEAP_TABLE *Tab,
IN PUCHAR pAddr);
VOID LeapAuthTimeout(
IN PVOID SystemSpecific1,
IN PVOID FunctionContext,
IN PVOID SystemSpecific2,
IN PVOID SystemSpecific3);
VOID LeapSendRogueAPReport(
IN PRTMP_ADAPTER pAd);
BOOLEAN CCKMAssocRspSanity(
IN PRTMP_ADAPTER pAd,
IN VOID *Msg,
IN ULONG MsgLen);
#endif // __LEAP_H__

View File

@ -63,10 +63,6 @@
#include "spectrum.h" #include "spectrum.h"
#ifdef LEAP_SUPPORT
#include "leap.h"
#endif // LEAP_SUPPORT //
#ifdef IGMP_SNOOP_SUPPORT #ifdef IGMP_SNOOP_SUPPORT
#include "igmp_snoop.h" #include "igmp_snoop.h"
#endif // IGMP_SNOOP_SUPPORT // #endif // IGMP_SNOOP_SUPPORT //

View File

@ -47,9 +47,6 @@ BUILD_TIMER_FUNCTION(AssocTimeout);
BUILD_TIMER_FUNCTION(ReassocTimeout); BUILD_TIMER_FUNCTION(ReassocTimeout);
BUILD_TIMER_FUNCTION(DisassocTimeout); BUILD_TIMER_FUNCTION(DisassocTimeout);
BUILD_TIMER_FUNCTION(LinkDownExec); BUILD_TIMER_FUNCTION(LinkDownExec);
#ifdef LEAP_SUPPORT
BUILD_TIMER_FUNCTION(LeapAuthTimeout);
#endif
BUILD_TIMER_FUNCTION(StaQuickResponeForRateUpExec); BUILD_TIMER_FUNCTION(StaQuickResponeForRateUpExec);
BUILD_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc); BUILD_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc);
#endif // CONFIG_STA_SUPPORT // #endif // CONFIG_STA_SUPPORT //

View File

@ -546,9 +546,6 @@ DECLARE_TIMER_FUNCTION(AssocTimeout);
DECLARE_TIMER_FUNCTION(ReassocTimeout); DECLARE_TIMER_FUNCTION(ReassocTimeout);
DECLARE_TIMER_FUNCTION(DisassocTimeout); DECLARE_TIMER_FUNCTION(DisassocTimeout);
DECLARE_TIMER_FUNCTION(LinkDownExec); DECLARE_TIMER_FUNCTION(LinkDownExec);
#ifdef LEAP_SUPPORT
DECLARE_TIMER_FUNCTION(LeapAuthTimeout);
#endif
DECLARE_TIMER_FUNCTION(StaQuickResponeForRateUpExec); DECLARE_TIMER_FUNCTION(StaQuickResponeForRateUpExec);
DECLARE_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc); DECLARE_TIMER_FUNCTION(WpaDisassocApAndBlockAssoc);
DECLARE_TIMER_FUNCTION(PsPollWakeExec); DECLARE_TIMER_FUNCTION(PsPollWakeExec);

View File

@ -560,34 +560,6 @@ VOID MlmeAssocReqAction(
END_OF_ARGS); END_OF_ARGS);
FrameLen += tmp; FrameLen += tmp;
//
// Add CipherSuite CCKM or LeapTkip if setting.
//
#ifdef LEAP_SUPPORT
if (LEAP_CCKM_ON(pAd))
{
MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp,
CipherSuiteCiscoCCKMLen, CipherSuiteCiscoCCKM,
END_OF_ARGS);
FrameLen += tmp;
// Third add RSN
NdisMoveMemory(pAd->StaCfg.ReqVarIEs + VarIesOffset, CipherSuiteCiscoCCKM, CipherSuiteCiscoCCKMLen); //Save CipherSuite
VarIesOffset += CipherSuiteCiscoCCKMLen;
}
else if ((pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP) && (pAd->StaCfg.WepStatus == Ndis802_11Encryption2Enabled))
{
MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp,
CipherSuiteCCXTkipLen, CipherSuiteCCXTkip,
END_OF_ARGS);
FrameLen += tmp;
// Third add RSN
NdisMoveMemory(pAd->StaCfg.ReqVarIEs + VarIesOffset, CipherSuiteCCXTkip, CipherSuiteCCXTkipLen);
VarIesOffset += CipherSuiteCCXTkipLen;
}
#endif // LEAP_SUPPORT //
// Add by James 03/06/27 // Add by James 03/06/27
// Set Variable IEs Length // Set Variable IEs Length
pAd->StaCfg.ReqVarIELen = VarIesOffset; pAd->StaCfg.ReqVarIELen = VarIesOffset;
@ -647,23 +619,6 @@ VOID MlmeReassocReqAction(
NDIS_STATUS NStatus; NDIS_STATUS NStatus;
ULONG tmp; ULONG tmp;
PUCHAR pOutBuffer = NULL; PUCHAR pOutBuffer = NULL;
//CCX 2.X
#ifdef LEAP_SUPPORT
UCHAR CkipFlag;
UCHAR CkipNegotiationBuffer[CKIP_NEGOTIATION_LENGTH];
UCHAR AironetCkipIe = IE_AIRONET_CKIP;
UCHAR AironetCkipLen = CKIP_NEGOTIATION_LENGTH;
UCHAR AironetIPAddressIE = IE_AIRONET_IPADDRESS;
UCHAR AironetIPAddressLen = AIRONET_IPADDRESS_LENGTH;
UCHAR AironetIPAddressBuffer[AIRONET_IPADDRESS_LENGTH] = {0x00, 0x40, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00};
UCHAR AironetCCKMReassocIE = IE_AIRONET_CCKMREASSOC;
UCHAR AironetCCKMReassocLen = AIRONET_CCKMREASSOC_LENGTH;
UCHAR AironetCCKMReassocBuffer[AIRONET_CCKMREASSOC_LENGTH];
UCHAR AironetOUI[] = {0x00, 0x40, 0x96, 0x00};
UCHAR MICMN[16];
UCHAR CalcMicBuffer[80];
ULONG CalcMicBufferLen = 0;
#endif // LEAP_SUPPORT //
USHORT Status; USHORT Status;
// Block all authentication request durning WPA block period // Block all authentication request durning WPA block period
@ -805,73 +760,6 @@ VOID MlmeReassocReqAction(
END_OF_ARGS); END_OF_ARGS);
FrameLen += TmpLen; FrameLen += TmpLen;
} }
#ifdef LEAP_SUPPORT
if (LEAP_CCKM_ON(pAd) && (pAd->StaCfg.CCKMLinkUpFlag == TRUE))
{
CkipFlag = pAd->StaCfg.CkipFlag; // We have update that at PeerBeaconAtJoinRequest()
if (CkipFlag != 0)
{
NdisZeroMemory(CkipNegotiationBuffer, CKIP_NEGOTIATION_LENGTH);
CkipNegotiationBuffer[2] = 0x66;
// Make it try KP & MIC, since we have to follow the result from AssocRsp
CkipNegotiationBuffer[8] = 0x18;
CkipNegotiationBuffer[CKIP_NEGOTIATION_LENGTH - 1] = 0x22;
MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp,
1, &AironetCkipIe,
1, &AironetCkipLen,
AironetCkipLen, CkipNegotiationBuffer,
END_OF_ARGS);
FrameLen += tmp;
}
MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp,
1, &AironetIPAddressIE,
1, &AironetIPAddressLen,
AironetIPAddressLen, AironetIPAddressBuffer,
END_OF_ARGS);
FrameLen += tmp;
//
// The RN is incremented before each reassociation request.
//
pAd->StaCfg.CCKMRN++;
//
// Calculate MIC = hmac-md5(krk, STA-ID|BSSID|RSNIE|TSF|RN);
//
COPY_MAC_ADDR(CalcMicBuffer, pAd->CurrentAddress);
CalcMicBufferLen = MAC_ADDR_LEN;
COPY_MAC_ADDR(CalcMicBuffer + CalcMicBufferLen, pAd->MlmeAux.Bssid);
CalcMicBufferLen += MAC_ADDR_LEN;
NdisMoveMemory(CalcMicBuffer + CalcMicBufferLen, CipherSuiteCiscoCCKM, CipherSuiteCiscoCCKMLen);
CalcMicBufferLen += CipherSuiteCiscoCCKMLen;
NdisMoveMemory(CalcMicBuffer + CalcMicBufferLen, (PUCHAR) &pAd->StaCfg.CCKMBeaconAtJoinTimeStamp, sizeof(pAd->StaCfg.CCKMBeaconAtJoinTimeStamp));
CalcMicBufferLen += sizeof(pAd->StaCfg.CCKMBeaconAtJoinTimeStamp);
NdisMoveMemory(CalcMicBuffer + CalcMicBufferLen, (PUCHAR)&pAd->StaCfg.CCKMRN, sizeof(pAd->StaCfg.CCKMRN));
CalcMicBufferLen += sizeof(pAd->StaCfg.CCKMRN);
hmac_md5(pAd->StaCfg.KRK, LEN_EAP_MICK, CalcMicBuffer, CalcMicBufferLen, MICMN);
//
// fill up CCKM reassociation request element
//
NdisMoveMemory(AironetCCKMReassocBuffer, AironetOUI, 4);
NdisMoveMemory(AironetCCKMReassocBuffer + 4, (PUCHAR)&pAd->StaCfg.CCKMBeaconAtJoinTimeStamp, 8);
NdisMoveMemory(AironetCCKMReassocBuffer + 12, (PUCHAR) &pAd->StaCfg.CCKMRN, 4);
NdisMoveMemory(AironetCCKMReassocBuffer +16, MICMN, 8);
MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp,
1, &AironetCCKMReassocIE,
1, &AironetCCKMReassocLen,
AironetCCKMReassocLen, AironetCCKMReassocBuffer,
END_OF_ARGS);
FrameLen += tmp;
MakeOutgoingFrame(pOutBuffer + FrameLen, &tmp,
CipherSuiteCiscoCCKMLen,CipherSuiteCiscoCCKM,
END_OF_ARGS);
FrameLen += tmp;
}
#endif // LEAP_SUPPORT //
// Add CCX v2 request if CCX2 admin state is on // Add CCX v2 request if CCX2 admin state is on
if (pAd->StaCfg.CCXControl.field.Enable == 1) if (pAd->StaCfg.CCXControl.field.Enable == 1)
@ -1069,14 +957,6 @@ VOID PeerAssocRspAction(
} }
else else
{ {
// Faile on Association, we need to check the status code
// Is that a Rogue AP?
#ifdef LEAP_SUPPORT
if ((pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP) && (Status == MLME_ALG_NOT_SUPPORT))
{ //Possibly Rogue AP
RogueApTableSetEntry(pAd, &pAd->StaCfg.RogueApTab, pAd->MlmeAux.Bssid, LEAP_REASON_INVALID_AUTH);
}
#endif // LEAP_SUPPORT //
} }
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE; pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_ASSOC_CONF, 2, &Status); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_ASSOC_CONF, 2, &Status);
@ -1160,37 +1040,6 @@ VOID PeerReassocRspAction(
} }
//
// Cisco Leap CCKM supported Re-association.
//
#ifdef LEAP_SUPPORT
if (LEAP_CCKM_ON(pAd) && (pAd->StaCfg.CCKMLinkUpFlag == TRUE))
{
if (CCKMAssocRspSanity(pAd, Elem->Msg, Elem->MsgLen) == TRUE)
{
pAd->StaCfg.CkipFlag = CkipFlag;
if (CkipFlag & 0x18)
{
NdisZeroMemory(pAd->StaCfg.TxSEQ, 4);
NdisZeroMemory(pAd->StaCfg.RxSEQ, 4);
NdisZeroMemory(pAd->StaCfg.CKIPMIC, 4);
pAd->StaCfg.GIV[0] = RandomByte(pAd);
pAd->StaCfg.GIV[1] = RandomByte(pAd);
pAd->StaCfg.GIV[2] = RandomByte(pAd);
pAd->StaCfg.bCkipOn = TRUE;
DBGPRINT(RT_DEBUG_TRACE, ("<CCX> pAd->StaCfg.CkipFlag = 0x%02x\n", pAd->StaCfg.CkipFlag));
}
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_REASSOC_CONF, 2, &Status);
}
else
{
DBGPRINT(RT_DEBUG_TRACE, ("ASSOC - CCKMAssocRspSanity() sanity check fail\n"));
}
}
else
#endif // LEAP_SUPPORT //
{ {
// CkipFlag is no use for reassociate // CkipFlag is no use for reassociate
pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE; pAd->Mlme.AssocMachine.CurrState = ASSOC_IDLE;
@ -1374,21 +1223,6 @@ VOID PeerDisassocAction(
RTMPSendWirelessEvent(pAd, IW_DISASSOC_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0); RTMPSendWirelessEvent(pAd, IW_DISASSOC_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
} }
#ifdef LEAP_SUPPORT
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
// Cisco_LEAP has start a timer
// We should cancel it if using LEAP
RTMPCancelTimer(&pAd->StaCfg.LeapAuthTimer, &TimerCancelled);
//Check is it mach the LEAP Authentication failed as possible a Rogue AP
//on it's PortSecured not equal to WPA_802_1X_PORT_SECURED while process the Association.
if ((pAd->Mlme.LeapMachine.CurrState != LEAP_IDLE) && (pAd->StaCfg.PortSecured != WPA_802_1X_PORT_SECURED))
{
RogueApTableSetEntry(pAd, &pAd->StaCfg.RogueApTab, Addr2, LEAP_REASON_AUTH_TIMEOUT);
}
}
#endif // LEAP_SUPPORT //
// //
// Get Current System time and Turn on AdjacentAPReport // Get Current System time and Turn on AdjacentAPReport
// //

View File

@ -218,15 +218,9 @@ VOID PeerAuthRspAtSeq2Action(
{ {
// Authentication Mode "LEAP" has allow for CCX 1.X // Authentication Mode "LEAP" has allow for CCX 1.X
if ((pAd->MlmeAux.Alg == Ndis802_11AuthModeOpen) if ((pAd->MlmeAux.Alg == Ndis802_11AuthModeOpen)
#ifdef LEAP_SUPPORT
|| (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
#endif // LEAP_SUPPORT //
) )
{ {
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE; pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;
#ifdef LEAP_SUPPORT
pAd->Mlme.LeapMachine.CurrState = LEAP_IDLE;
#endif // LEAP_SUPPORT //
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_AUTH_CONF, 2, &Status); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_AUTH_CONF, 2, &Status);
} }
else else
@ -282,14 +276,6 @@ VOID PeerAuthRspAtSeq2Action(
} }
else else
{ {
#ifdef LEAP_SUPPORT
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
//Invalid Authentication possible rogue AP
//Add this Ap to Rogue AP.
RogueApTableSetEntry(pAd, &pAd->StaCfg.RogueApTab, Addr2, LEAP_REASON_INVALID_AUTH);
}
#endif // LEAP_SUPPORT //
pAd->StaCfg.AuthFailReason = Status; pAd->StaCfg.AuthFailReason = Status;
COPY_MAC_ADDR(pAd->StaCfg.AuthFailSta, Addr2); COPY_MAC_ADDR(pAd->StaCfg.AuthFailSta, Addr2);
pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE; pAd->Mlme.AuthMachine.CurrState = AUTH_REQ_IDLE;

View File

@ -141,21 +141,6 @@ VOID PeerDeauthAction(
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0); RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
LinkDown(pAd, TRUE); LinkDown(pAd, TRUE);
// Authentication Mode Cisco_LEAP has start a timer
// We should cancel it if using LEAP
#ifdef LEAP_SUPPORT
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
RTMPCancelTimer(&pAd->StaCfg.LeapAuthTimer, &TimerCancelled);
//Check is it mach the LEAP Authentication failed as possible a Rogue AP
//on it's PortSecured not equal to WPA_802_1X_PORT_SECURED while process the Authenticaton.
if ((pAd->StaCfg.PortSecured != WPA_802_1X_PORT_SECURED) && (pAd->Mlme.LeapMachine.CurrState != LEAP_IDLE))
{
RogueApTableSetEntry(pAd, &pAd->StaCfg.RogueApTab, Addr2, LEAP_REASON_AUTH_TIMEOUT);
}
}
#endif // LEAP_SUPPORT //
} }
} }
else else

View File

@ -383,9 +383,6 @@ VOID CntlOidSsidProc(
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) || (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPAPSK) ||
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2) || (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2) ||
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2PSK) (pAd->StaCfg.AuthMode == Ndis802_11AuthModeWPA2PSK)
#ifdef LEAP_SUPPORT
|| (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
#endif // LEAP_SUPPORT //
) && ) &&
(pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED)) (pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED))
{ {
@ -770,14 +767,6 @@ VOID CntlWaitJoinProc(
// 2. joined a new INFRA network, start from authentication // 2. joined a new INFRA network, start from authentication
else else
{ {
#ifdef LEAP_SUPPORT
// Add AuthMode "LEAP" for CCX 1.X
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
AuthParmFill(pAd, &AuthReq, pAd->MlmeAux.Bssid, CISCO_AuthModeLEAP);
}
else
#endif // LEAP_SUPPORT //
{ {
// either Ndis802_11AuthModeShared or Ndis802_11AuthModeAutoSwitch, try shared key first // either Ndis802_11AuthModeShared or Ndis802_11AuthModeAutoSwitch, try shared key first
if ((pAd->StaCfg.AuthMode == Ndis802_11AuthModeShared) || if ((pAd->StaCfg.AuthMode == Ndis802_11AuthModeShared) ||
@ -913,21 +902,6 @@ VOID CntlWaitAuthProc(
AssocParmFill(pAd, &AssocReq, pAd->MlmeAux.Bssid, pAd->MlmeAux.CapabilityInfo, AssocParmFill(pAd, &AssocReq, pAd->MlmeAux.Bssid, pAd->MlmeAux.CapabilityInfo,
ASSOC_TIMEOUT, pAd->StaCfg.DefaultListenCount); ASSOC_TIMEOUT, pAd->StaCfg.DefaultListenCount);
#ifdef LEAP_SUPPORT
//
// Cisco Leap CCKM supported Re-association.
//
if (LEAP_CCKM_ON(pAd) && (pAd->StaCfg.CCKMLinkUpFlag == TRUE))
{
//if CCKM is turn on , that's mean Fast Reauthentication
//Use CCKM Reassociation instead of normal association for Fast Roaming.
MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_REASSOC_REQ,
sizeof(MLME_ASSOC_REQ_STRUCT), &AssocReq);
pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_REASSOC;
}
else
#endif // LEAP_SUPPORT //
{ {
MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_ASSOC_REQ, MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_ASSOC_REQ,
sizeof(MLME_ASSOC_REQ_STRUCT), &AssocReq); sizeof(MLME_ASSOC_REQ_STRUCT), &AssocReq);
@ -941,14 +915,7 @@ VOID CntlWaitAuthProc(
// ageing-out. The previous authentication attempt must have let it remove us. // ageing-out. The previous authentication attempt must have let it remove us.
// so try Authentication again may help. For D-Link DWL-900AP+ compatibility. // so try Authentication again may help. For D-Link DWL-900AP+ compatibility.
DBGPRINT(RT_DEBUG_TRACE, ("CNTL - AUTH FAIL, try again...\n")); DBGPRINT(RT_DEBUG_TRACE, ("CNTL - AUTH FAIL, try again...\n"));
#ifdef LEAP_SUPPORT
//Add AuthMode "LEAP" for CCX 1.X
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
AuthParmFill(pAd, &AuthReq, pAd->MlmeAux.Bssid, CISCO_AuthModeLEAP);
}
else
#endif // LEAP_SUPPORT //
{ {
if ((pAd->StaCfg.AuthMode == Ndis802_11AuthModeShared) || if ((pAd->StaCfg.AuthMode == Ndis802_11AuthModeShared) ||
(pAd->StaCfg.AuthMode == Ndis802_11AuthModeAutoSwitch)) (pAd->StaCfg.AuthMode == Ndis802_11AuthModeAutoSwitch))
@ -1000,20 +967,6 @@ VOID CntlWaitAuthProc2(
} }
else else
{ {
#ifdef LEAP_SUPPORT
// Process LEAP first, since it use different control variable
// We don't want to affect other poven operation
if (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
{
// LEAP Auth not success, try next BSS
DBGPRINT(RT_DEBUG_TRACE, ("CNTL - *LEAP* AUTH FAIL, give up; try next BSS\n"));
DBGPRINT(RT_DEBUG_TRACE, ("Total match BSSID [=%d]\n", pAd->MlmeAux.SsidBssTab.BssNr));
pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
pAd->MlmeAux.BssIdx++;
IterateOnBssTab(pAd);
}
else
#endif // LEAP_SUPPORT //
if ((pAd->StaCfg.AuthMode == Ndis802_11AuthModeAutoSwitch) && if ((pAd->StaCfg.AuthMode == Ndis802_11AuthModeAutoSwitch) &&
(pAd->MlmeAux.Alg == Ndis802_11AuthModeShared)) (pAd->MlmeAux.Alg == Ndis802_11AuthModeShared))
{ {
@ -1102,14 +1055,6 @@ VOID CntlWaitReassocProc(
if (pAd->CommonCfg.bWirelessEvent) if (pAd->CommonCfg.bWirelessEvent)
RTMPSendWirelessEvent(pAd, IW_ASSOC_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0); RTMPSendWirelessEvent(pAd, IW_ASSOC_EVENT_FLAG, pAd->MacTab.Content[BSSID_WCID].Addr, BSS0, 0);
#ifdef LEAP_SUPPORT
if (LEAP_CCKM_ON(pAd))
{
STA_PORT_SECURED(pAd);
pAd->StaCfg.WpaState = SS_FINISH;
}
#endif // LEAP_SUPPORT //
pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE; pAd->Mlme.CntlMachine.CurrState = CNTL_IDLE;
DBGPRINT(RT_DEBUG_TRACE, ("CNTL - Re-assocition successful on BSS #%ld\n", pAd->MlmeAux.RoamIdx)); DBGPRINT(RT_DEBUG_TRACE, ("CNTL - Re-assocition successful on BSS #%ld\n", pAd->MlmeAux.RoamIdx));
} }
@ -1612,13 +1557,6 @@ VOID LinkUp(
DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK UP !! (StaActive.bHtEnable =%d, )\n", pAd->StaActive.SupportedPhyInfo.bHtEnable)); DBGPRINT(RT_DEBUG_TRACE, ("!!! LINK UP !! (StaActive.bHtEnable =%d, )\n", pAd->StaActive.SupportedPhyInfo.bHtEnable));
#endif // DOT11_N_SUPPORT // #endif // DOT11_N_SUPPORT //
//
// Report Adjacent AP report.
//
#ifdef LEAP_SUPPORT
CCXAdjacentAPReport(pAd);
#endif // LEAP_SUPPORT //
if (pAd->CommonCfg.bAggregationCapable) if (pAd->CommonCfg.bAggregationCapable)
{ {
if ((pAd->CommonCfg.bPiggyBackCapable) && (pAd->MlmeAux.APRalinkIe & 0x00000003) == 3) if ((pAd->CommonCfg.bPiggyBackCapable) && (pAd->MlmeAux.APRalinkIe & 0x00000003) == 3)

View File

@ -969,9 +969,6 @@ NDIS_STATUS STASendPacket(
#ifdef WPA_SUPPLICANT_SUPPORT #ifdef WPA_SUPPLICANT_SUPPORT
|| (pAd->StaCfg.IEEE8021X == TRUE) || (pAd->StaCfg.IEEE8021X == TRUE)
#endif // WPA_SUPPLICANT_SUPPORT // #endif // WPA_SUPPLICANT_SUPPORT //
#ifdef LEAP_SUPPORT
|| (pAd->StaCfg.LeapAuthMode == CISCO_AuthModeLEAP)
#endif // LEAP_SUPPORT //
) )
&& ((pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED) || (pAd->StaCfg.MicErrCnt >= 2)) && ((pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED) || (pAd->StaCfg.MicErrCnt >= 2))
&& (RTMP_GET_PACKET_EAPOL(pPacket)== FALSE) && (RTMP_GET_PACKET_EAPOL(pPacket)== FALSE)
@ -1332,30 +1329,6 @@ VOID STAFindCipherAlgorithm(
} }
else if (Cipher == Ndis802_11Encryption1Enabled) else if (Cipher == Ndis802_11Encryption1Enabled)
{ {
#ifdef LEAP_SUPPORT
if (pAd->StaCfg.CkipFlag & 0x10) // Cisco CKIP KP is on
{
if (LEAP_CCKM_ON(pAd))
{
if (((*pSrcBufVA & 0x01) && (ADHOC_ON(pAd))))
KeyIdx = 1;
else
KeyIdx = 0;
}
else
KeyIdx = pAd->StaCfg.DefaultKeyId;
}
else if (pAd->StaCfg.CkipFlag & 0x08) // only CKIP CMIC
KeyIdx = pAd->StaCfg.DefaultKeyId;
else if (LEAP_CCKM_ON(pAd))
{
if ((*pSrcBufVA & 0x01) && (ADHOC_ON(pAd)))
KeyIdx = 1;
else
KeyIdx = 0;
}
else // standard WEP64 or WEP128
#endif // LEAP_SUPPORT //
KeyIdx = pAd->StaCfg.DefaultKeyId; KeyIdx = pAd->StaCfg.DefaultKeyId;
} }
else if ((Cipher == Ndis802_11Encryption2Enabled) || else if ((Cipher == Ndis802_11Encryption2Enabled) ||

View File

@ -888,15 +888,6 @@ VOID PeerBeaconAtJoinAction(
DBGPRINT(RT_DEBUG_TRACE, ("SYNC - after JOIN, SupRateLen=%d, ExtRateLen=%d\n", DBGPRINT(RT_DEBUG_TRACE, ("SYNC - after JOIN, SupRateLen=%d, ExtRateLen=%d\n",
pAd->MlmeAux.SupRateLen, pAd->MlmeAux.ExtRateLen)); pAd->MlmeAux.SupRateLen, pAd->MlmeAux.ExtRateLen));
#ifdef LEAP_SUPPORT
// Update CkipFlag
pAd->StaCfg.CkipFlag = CkipFlag;
// Keep TimeStamp for Re-Association used.
if (LEAP_CCKM_ON(pAd) && (pAd->StaCfg.CCKMLinkUpFlag == TRUE))
pAd->StaCfg.CCKMBeaconAtJoinTimeStamp = TimeStamp;
#endif // LEAP_SUPPORT //
if (AironetCellPowerLimit != 0xFF) if (AironetCellPowerLimit != 0xFF)
{ {
//We need to change our TxPower for CCX 2.0 AP Control of Client Transmit Power //We need to change our TxPower for CCX 2.0 AP Control of Client Transmit Power