Staging: rt28x0: remove typedefs (part one)
Remove typedefs from rtmp_type.h.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/staging/rt2860/common/cmm_wep.c b/drivers/staging/rt2860/common/cmm_wep.c
index db40139..05a9214 100644
--- a/drivers/staging/rt2860/common/cmm_wep.c
+++ b/drivers/staging/rt2860/common/cmm_wep.c
@@ -37,7 +37,7 @@
#include "../rt_config.h"
-UINT FCSTAB_32[256] = {
+u32 FCSTAB_32[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
@@ -105,7 +105,7 @@
};
/*
-UCHAR WEPKEY[] = {
+u8 WEPKEY[] = {
//IV
0x00, 0x11, 0x22,
//WEP KEY
@@ -135,12 +135,12 @@
========================================================================
*/
-VOID RTMPInitWepEngine(IN PRTMP_ADAPTER pAd,
- IN PUCHAR pKey,
- IN UCHAR KeyId, IN UCHAR KeyLen, IN OUT PUCHAR pDest)
+void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd,
+ u8 *pKey,
+ u8 KeyId, u8 KeyLen, IN u8 *pDest)
{
- UINT i;
- UCHAR WEPKEY[] = {
+ u32 i;
+ u8 WEPKEY[] = {
/*IV */
0x00, 0x11, 0x22,
/*WEP KEY */
@@ -184,8 +184,8 @@
========================================================================
*/
-VOID RTMPEncryptData(IN PRTMP_ADAPTER pAd,
- IN PUCHAR pSrc, IN PUCHAR pDest, IN UINT Len)
+void RTMPEncryptData(IN PRTMP_ADAPTER pAd,
+ u8 *pSrc, u8 *pDest, u32 Len)
{
pAd->PrivateInfo.FCSCRC32 =
RTMP_CALC_FCS32(pAd->PrivateInfo.FCSCRC32, pSrc, Len);
@@ -212,21 +212,21 @@
========================================================================
*/
BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd,
- IN PUCHAR pData,
- IN ULONG DataByteCnt, IN PCIPHER_KEY pGroupKey)
+ u8 *pData,
+ unsigned long DataByteCnt, IN PCIPHER_KEY pGroupKey)
{
- UINT trailfcs;
- UINT crc32;
- UCHAR KeyIdx;
- UCHAR WEPKEY[] = {
+ u32 trailfcs;
+ u32 crc32;
+ u8 KeyIdx;
+ u8 WEPKEY[] = {
/*IV */
0x00, 0x11, 0x22,
/*WEP KEY */
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
0xAA, 0xBB, 0xCC
};
- UCHAR *pPayload = (UCHAR *) pData + LENGTH_802_11;
- ULONG payload_len = DataByteCnt - LENGTH_802_11;
+ u8 *pPayload = (u8 *) pData + LENGTH_802_11;
+ unsigned long payload_len = DataByteCnt - LENGTH_802_11;
NdisMoveMemory(WEPKEY, pPayload, 3); /*Get WEP IV */
@@ -271,19 +271,19 @@
========================================================================
*/
-VOID ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, IN PUCHAR pKey, IN UINT KeyLen)
+void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen)
{
- UCHAR t, u;
- UINT keyindex;
- UINT stateindex;
- PUCHAR state;
- UINT counter;
+ u8 t, u;
+ u32 keyindex;
+ u32 stateindex;
+ u8 *state;
+ u32 counter;
state = Ctx->STATE;
Ctx->X = 0;
Ctx->Y = 0;
for (counter = 0; counter < 256; counter++)
- state[counter] = (UCHAR) counter;
+ state[counter] = (u8)counter;
keyindex = 0;
stateindex = 0;
for (counter = 0; counter < 256; counter++) {
@@ -307,18 +307,18 @@
Ctx Pointer to ARCFOUR CONTEXT (SBOX)
Return Value:
- UCHAR - the value of the ARCFOUR CONTEXT (S-BOX)
+ u8 - the value of the ARCFOUR CONTEXT (S-BOX)
Note:
========================================================================
*/
-UCHAR ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx)
+u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx)
{
- UINT x;
- UINT y;
- UCHAR sx, sy;
- PUCHAR state;
+ u32 x;
+ u32 y;
+ u8 sx, sy;
+ u8 *state;
state = Ctx->STATE;
x = (Ctx->X + 1) & 0xff;
@@ -353,10 +353,10 @@
========================================================================
*/
-VOID ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx,
- IN PUCHAR pDest, IN PUCHAR pSrc, IN UINT Len)
+void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx,
+ u8 *pDest, u8 *pSrc, u32 Len)
{
- UINT i;
+ u32 i;
for (i = 0; i < Len; i++)
pDest[i] = pSrc[i] ^ ARCFOUR_BYTE(Ctx);
@@ -383,10 +383,10 @@
========================================================================
*/
-VOID ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
- IN PUCHAR pDest, IN PUCHAR pSrc, IN UINT Len)
+void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
+ u8 *pDest, u8 *pSrc, u32 Len)
{
- UINT i;
+ u32 i;
for (i = 0; i < Len; i++)
pDest[i] = pSrc[i] ^ ARCFOUR_BYTE(Ctx);
@@ -407,10 +407,10 @@
========================================================================
*/
-VOID WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
- IN PUCHAR pDest, IN PUCHAR pSrc, IN UINT Len)
+void WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx,
+ u8 *pDest, u8 *pSrc, u32 Len)
{
- UINT i;
+ u32 i;
/*discard first 256 bytes */
for (i = 0; i < 256; i++)
ARCFOUR_BYTE(Ctx);
@@ -431,7 +431,7 @@
Len the length of the data
Return Value:
- UINT - FCS 32 bits
+ u32 - FCS 32 bits
IRQL = DISPATCH_LEVEL
@@ -439,7 +439,7 @@
========================================================================
*/
-UINT RTMP_CALC_FCS32(IN UINT Fcs, IN PUCHAR Cp, IN INT Len)
+u32 RTMP_CALC_FCS32(u32 Fcs, u8 *Cp, int Len)
{
while (Len--)
Fcs = (((Fcs) >> 8) ^ FCSTAB_32[((Fcs) ^ (*Cp++)) & 0xff]);
@@ -463,11 +463,11 @@
========================================================================
*/
-VOID RTMPSetICV(IN PRTMP_ADAPTER pAd, IN PUCHAR pDest)
+void RTMPSetICV(IN PRTMP_ADAPTER pAd, u8 *pDest)
{
pAd->PrivateInfo.FCSCRC32 ^= 0xffffffff; /* complement */
pAd->PrivateInfo.FCSCRC32 = cpu2le32(pAd->PrivateInfo.FCSCRC32);
ARCFOUR_ENCRYPT(&pAd->PrivateInfo.WEPCONTEXT, pDest,
- (PUCHAR) & pAd->PrivateInfo.FCSCRC32, 4);
+ (u8 *)& pAd->PrivateInfo.FCSCRC32, 4);
}