]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/staging/rt2860/common/cmm_wep.c
Staging: rt28x0: updates from vendor's V2.1.0.0 drivers
[net-next-2.6.git] / drivers / staging / rt2860 / common / cmm_wep.c
similarity index 97%
rename from drivers/staging/rt2860/common/rtmp_wep.c
rename to drivers/staging/rt2860/common/cmm_wep.c
index 8e833e7011bdcc1bd663f9a5451966ea618b8623..b13858d0a74a2ce3bf79cbb59dfecdd395dcf1af 100644 (file)
@@ -35,7 +35,7 @@
        Paul Wu         10-28-02                Initial
 */
 
-#include "../rt_config.h"
+#include       "../rt_config.h"
 
 UINT FCSTAB_32[256] =
 {
@@ -105,6 +105,15 @@ UINT FCSTAB_32[256] =
        0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
 };
 
+/*
+UCHAR   WEPKEY[] = {
+               //IV
+               0x00, 0x11, 0x22,
+               //WEP KEY
+               0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC
+       };
+ */
+
 /*
        ========================================================================
 
@@ -144,12 +153,6 @@ VOID       RTMPInitWepEngine(
 
        pAd->PrivateInfo.FCSCRC32 = PPPINITFCS32;   //Init crc32.
 
-    if (pAd->StaCfg.bCkipOn && (pAd->StaCfg.CkipFlag & 0x10) && (pAd->OpMode == OPMODE_STA))
-    {
-        ARCFOUR_INIT(&pAd->PrivateInfo.WEPCONTEXT, pKey, KeyLen);  //INIT SBOX, KEYLEN+3(IV)
-        NdisMoveMemory(pDest, pKey, 3);  //Append Init Vector
-    }
-    else
     {
                NdisMoveMemory(WEPKEY + 3, pKey, KeyLen);
 
@@ -215,7 +218,7 @@ VOID        RTMPEncryptData(
        ========================================================================
 */
 BOOLEAN        RTMPSoftDecryptWEP(
-       IN PRTMP_ADAPTER        pAd,
+       IN PRTMP_ADAPTER        pAd,
        IN PUCHAR                       pData,
        IN ULONG                        DataByteCnt,
        IN PCIPHER_KEY          pGroupKey)
@@ -229,7 +232,7 @@ BOOLEAN     RTMPSoftDecryptWEP(
                //WEP KEY
                0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC
        };
-       UCHAR   *pPayload = (UCHAR *)pData + LENGTH_802_11;
+       UCHAR   *pPayload = (UCHAR *)pData + LENGTH_802_11;
        ULONG   payload_len = DataByteCnt - LENGTH_802_11;
 
        NdisMoveMemory(WEPKEY, pPayload, 3);    //Get WEP IV
@@ -494,4 +497,3 @@ VOID        RTMPSetICV(
 
        ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest, (PUCHAR) &pAd->PrivateInfo.FCSCRC32, 4);
 }
-