Commit b902fbfe authored by Andres More's avatar Andres More Committed by Greg Kroah-Hartman

staging: vt6656: replaced custom BYTE definition with u8

Checkpatch findings were not resolved, only direct replacement.

sed -i 's/\bBYTE\b/u8/g' drivers/staging/vt6656/*.[ch]
sed -i 's/\bPBYTE\b/u8 */g' drivers/staging/vt6656/*.[ch]
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 175c5125
......@@ -269,15 +269,15 @@
#define WLAN_MGMT_GET_TIM_OFFSET(b) (((b) & ~BIT0) >> 1)
/* 3-Addr & 4-Addr */
#define WLAN_HDR_A3_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR3_LEN)
#define WLAN_HDR_A4_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR4_LEN)
#define WLAN_HDR_A3_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR3_LEN)
#define WLAN_HDR_A4_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR4_LEN)
/* IEEE ADDR */
#define IEEE_ADDR_UNIVERSAL 0x02
#define IEEE_ADDR_GROUP 0x01
typedef struct {
BYTE abyAddr[6];
u8 abyAddr[6];
} IEEE_ADDR, *PIEEE_ADDR;
/* 802.11 Header Format */
......@@ -286,8 +286,8 @@ typedef struct tagWLAN_80211HDR_A2 {
WORD wFrameCtl;
WORD wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
u8 abyAddr1[WLAN_ADDR_LEN];
u8 abyAddr2[WLAN_ADDR_LEN];
} __attribute__ ((__packed__))
WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
......@@ -296,9 +296,9 @@ typedef struct tagWLAN_80211HDR_A3 {
WORD wFrameCtl;
WORD wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN];
u8 abyAddr1[WLAN_ADDR_LEN];
u8 abyAddr2[WLAN_ADDR_LEN];
u8 abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl;
} __attribute__ ((__packed__))
......@@ -308,11 +308,11 @@ typedef struct tagWLAN_80211HDR_A4 {
WORD wFrameCtl;
WORD wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN];
u8 abyAddr1[WLAN_ADDR_LEN];
u8 abyAddr2[WLAN_ADDR_LEN];
u8 abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl;
BYTE abyAddr4[WLAN_ADDR_LEN];
u8 abyAddr4[WLAN_ADDR_LEN];
} __attribute__ ((__packed__))
WLAN_80211HDR_A4, *PWLAN_80211HDR_A4;
......
......@@ -141,9 +141,9 @@ vMgrDecodeBeacon(
+ WLAN_BEACON_OFF_CAPINFO);
/* Information elements */
pItem = (PWLAN_IE)((PBYTE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)))
pItem = (PWLAN_IE)((u8 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)))
+ WLAN_BEACON_OFF_SSID);
while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
......@@ -224,7 +224,7 @@ vMgrDecodeBeacon(
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
}
}
......@@ -376,7 +376,7 @@ vMgrDecodeAssocRequest(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_ASSOCREQ_OFF_SSID);
while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
if (pFrame->pSSID == NULL)
......@@ -407,7 +407,7 @@ vMgrDecodeAssocRequest(
pItem->byElementID);
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
}
}
......@@ -474,9 +474,9 @@ vMgrDecodeAssocResponse(
+ WLAN_ASSOCRESP_OFF_SUPP_RATES);
pItem = (PWLAN_IE)(pFrame->pSuppRates);
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem);
} else
......@@ -545,7 +545,7 @@ vMgrDecodeReassocRequest(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_REASSOCREQ_OFF_SSID);
while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
......@@ -576,7 +576,7 @@ vMgrDecodeReassocRequest(
pItem->byElementID);
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
}
}
......@@ -626,7 +626,7 @@ vMgrDecodeProbeRequest(
/* Information elements */
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)));
while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
......@@ -649,7 +649,7 @@ vMgrDecodeProbeRequest(
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
}
}
......@@ -722,7 +722,7 @@ vMgrDecodeProbeResponse(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_PROBERESP_OFF_SSID);
while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
if (pFrame->pSSID == NULL)
......@@ -796,7 +796,7 @@ vMgrDecodeProbeResponse(
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
}
}
......@@ -862,7 +862,7 @@ vMgrDecodeAuthen(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_AUTHEN_OFF_CHALLENGE);
if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE))
if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE))
pFrame->pChallenge = (PWLAN_IE_CHALLENGE)pItem;
}
......@@ -980,8 +980,8 @@ vMgrDecodeReassocResponse(
+ WLAN_REASSOCRESP_OFF_SUPP_RATES);
pItem = (PWLAN_IE)(pFrame->pSuppRates);
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES))
if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES))
pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
}
This diff is collapsed.
......@@ -43,7 +43,7 @@
* SBOX Table
*/
BYTE sbox_table[256] = {
u8 sbox_table[256] = {
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
......@@ -62,7 +62,7 @@ BYTE sbox_table[256] = {
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
};
BYTE dot2_table[256] = {
u8 dot2_table[256] = {
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e,
0x40, 0x42, 0x44, 0x46, 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e,
......@@ -81,7 +81,7 @@ BYTE dot2_table[256] = {
0xfb, 0xf9, 0xff, 0xfd, 0xf3, 0xf1, 0xf7, 0xf5, 0xeb, 0xe9, 0xef, 0xed, 0xe3, 0xe1, 0xe7, 0xe5
};
BYTE dot3_table[256] = {
u8 dot3_table[256] = {
0x00, 0x03, 0x06, 0x05, 0x0c, 0x0f, 0x0a, 0x09, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11,
0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21,
0x60, 0x63, 0x66, 0x65, 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71,
......@@ -106,7 +106,7 @@ BYTE dot3_table[256] = {
/*--------------------- Export Functions --------------------------*/
static void xor_128(BYTE *a, BYTE *b, BYTE *out)
static void xor_128(u8 *a, u8 *b, u8 *out)
{
PDWORD dwPtrA = (PDWORD) a;
PDWORD dwPtrB = (PDWORD) b;
......@@ -119,7 +119,7 @@ static void xor_128(BYTE *a, BYTE *b, BYTE *out)
}
static void xor_32(BYTE *a, BYTE *b, BYTE *out)
static void xor_32(u8 *a, u8 *b, u8 *out)
{
PDWORD dwPtrA = (PDWORD) a;
PDWORD dwPtrB = (PDWORD) b;
......@@ -128,10 +128,10 @@ static void xor_32(BYTE *a, BYTE *b, BYTE *out)
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
}
void AddRoundKey(BYTE *key, int round)
void AddRoundKey(u8 *key, int round)
{
BYTE sbox_key[4];
BYTE rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};
u8 sbox_key[4];
u8 rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};
sbox_key[0] = sbox_table[key[13]];
sbox_key[1] = sbox_table[key[14]];
......@@ -146,7 +146,7 @@ void AddRoundKey(BYTE *key, int round)
xor_32(&key[12], &key[8], &key[12]);
}
void SubBytes(BYTE *in, BYTE *out)
void SubBytes(u8 *in, u8 *out)
{
int i;
......@@ -154,7 +154,7 @@ void SubBytes(BYTE *in, BYTE *out)
out[i] = sbox_table[in[i]];
}
void ShiftRows(BYTE *in, BYTE *out)
void ShiftRows(u8 *in, u8 *out)
{
out[0] = in[0];
out[1] = in[5];
......@@ -174,7 +174,7 @@ void ShiftRows(BYTE *in, BYTE *out)
out[15] = in[11];
}
void MixColumns(BYTE *in, BYTE *out)
void MixColumns(u8 *in, u8 *out)
{
out[0] = dot2_table[in[0]] ^ dot3_table[in[1]] ^ in[2] ^ in[3];
......@@ -183,13 +183,13 @@ void MixColumns(BYTE *in, BYTE *out)
out[3] = dot3_table[in[0]] ^ in[1] ^ in[2] ^ dot2_table[in[3]];
}
void AESv128(BYTE *key, BYTE *data, BYTE *ciphertext)
void AESv128(u8 *key, u8 *data, u8 *ciphertext)
{
int i;
int round;
BYTE TmpdataA[16];
BYTE TmpdataB[16];
BYTE abyRoundKey[16];
u8 TmpdataA[16];
u8 TmpdataB[16];
u8 abyRoundKey[16];
for (i = 0; i < 16; i++)
abyRoundKey[i] = key[i];
......@@ -231,26 +231,26 @@ void AESv128(BYTE *key, BYTE *data, BYTE *ciphertext)
*
*/
bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize)
{
BYTE abyNonce[13];
BYTE MIC_IV[16];
BYTE MIC_HDR1[16];
BYTE MIC_HDR2[16];
BYTE abyMIC[16];
BYTE abyCTRPLD[16];
BYTE abyTmp[16];
BYTE abyPlainText[16];
BYTE abyLastCipher[16];
u8 abyNonce[13];
u8 MIC_IV[16];
u8 MIC_HDR1[16];
u8 MIC_HDR2[16];
u8 abyMIC[16];
u8 abyCTRPLD[16];
u8 abyTmp[16];
u8 abyPlainText[16];
u8 abyLastCipher[16];
PS802_11Header pMACHeader = (PS802_11Header) pbyFrame;
PBYTE pbyIV;
PBYTE pbyPayload;
u8 * pbyIV;
u8 * pbyPayload;
WORD wHLen = 22;
/* 8 is IV, 8 is MIC, 4 is CRC */
WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;
bool bA4 = false;
BYTE byTmp;
u8 byTmp;
WORD wCnt;
int ii, jj, kk;
......@@ -276,15 +276,15 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
/* MIC_IV */
MIC_IV[0] = 0x59;
memcpy(&(MIC_IV[1]), &(abyNonce[0]), 13);
MIC_IV[14] = (BYTE)(wPayloadSize >> 8);
MIC_IV[15] = (BYTE)(wPayloadSize & 0xff);
MIC_IV[14] = (u8)(wPayloadSize >> 8);
MIC_IV[15] = (u8)(wPayloadSize & 0xff);
/* MIC_HDR1 */
MIC_HDR1[0] = (BYTE)(wHLen >> 8);
MIC_HDR1[1] = (BYTE)(wHLen & 0xff);
byTmp = (BYTE)(pMACHeader->wFrameCtl & 0xff);
MIC_HDR1[0] = (u8)(wHLen >> 8);
MIC_HDR1[1] = (u8)(wHLen & 0xff);
byTmp = (u8)(pMACHeader->wFrameCtl & 0xff);
MIC_HDR1[2] = byTmp & 0x8f;
byTmp = (BYTE)(pMACHeader->wFrameCtl >> 8);
byTmp = (u8)(pMACHeader->wFrameCtl >> 8);
byTmp &= 0x87;
MIC_HDR1[3] = byTmp | 0x40;
memcpy(&(MIC_HDR1[4]), pMACHeader->abyAddr1, ETH_ALEN);
......@@ -292,7 +292,7 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
/* MIC_HDR2 */
memcpy(&(MIC_HDR2[0]), pMACHeader->abyAddr3, ETH_ALEN);
byTmp = (BYTE)(pMACHeader->wSeqCtl & 0xff);
byTmp = (u8)(pMACHeader->wSeqCtl & 0xff);
MIC_HDR2[6] = byTmp & 0x0f;
MIC_HDR2[7] = 0;
......@@ -326,8 +326,8 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
for (jj = wPayloadSize; jj > 16; jj = jj-16) {
abyCTRPLD[14] = (BYTE) (wCnt >> 8);
abyCTRPLD[15] = (BYTE) (wCnt & 0xff);
abyCTRPLD[14] = (u8) (wCnt >> 8);
abyCTRPLD[15] = (u8) (wCnt & 0xff);
AESv128(pbyRxKey, abyCTRPLD, abyTmp);
......@@ -349,8 +349,8 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
for (ii = jj; ii < 16; ii++)
abyLastCipher[ii] = 0x00;
abyCTRPLD[14] = (BYTE) (wCnt >> 8);
abyCTRPLD[15] = (BYTE) (wCnt & 0xff);
abyCTRPLD[14] = (u8) (wCnt >> 8);
abyCTRPLD[15] = (u8) (wCnt & 0xff);
AESv128(pbyRxKey, abyCTRPLD, abyTmp);
for (kk = 0; kk < 16; kk++)
......@@ -370,8 +370,8 @@ bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
/* => above is the calculated MIC */
wCnt = 0;
abyCTRPLD[14] = (BYTE) (wCnt >> 8);
abyCTRPLD[15] = (BYTE) (wCnt & 0xff);
abyCTRPLD[14] = (u8) (wCnt >> 8);
abyCTRPLD[15] = (u8) (wCnt & 0xff);
AESv128(pbyRxKey, abyCTRPLD, abyTmp);
for (kk = 0; kk < 8; kk++)
......
......@@ -41,6 +41,6 @@
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize);
bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize);
#endif /* __AES_CCMP_H__ */
......@@ -66,7 +66,7 @@ static int msglevel =MSG_LEVEL_INFO;
/*--------------------- Static Variables --------------------------*/
BYTE abyVT3184_AGC[] = {
u8 abyVT3184_AGC[] = {
0x00, //0
0x00, //1
0x02, //2
......@@ -134,7 +134,7 @@ BYTE abyVT3184_AGC[] = {
};
BYTE abyVT3184_AL2230[] = {
u8 abyVT3184_AL2230[] = {
0x31,//00
0x00,
0x00,
......@@ -396,7 +396,7 @@ BYTE abyVT3184_AL2230[] = {
//{{RobertYu:20060515, new BB setting for VT3226D0
BYTE abyVT3184_VT3226D0[] = {
u8 abyVT3184_VT3226D0[] = {
0x31,//00
0x00,
0x00,
......@@ -691,8 +691,8 @@ s_vClearSQ3Value(PSDevice pDevice);
*/
unsigned int
BBuGetFrameTime(
BYTE byPreambleType,
BYTE byPktType,
u8 byPreambleType,
u8 byPktType,
unsigned int cbFrameLength,
WORD wRate
)
......@@ -964,10 +964,10 @@ int BBbVT3184Init(struct vnt_private *pDevice)
{
int ntStatus;
WORD wLength;
PBYTE pbyAddr;
PBYTE pbyAgc;
u8 * pbyAddr;
u8 * pbyAgc;
WORD wLengthAgc;
BYTE abyArray[256];
u8 abyArray[256];
ntStatus = CONTROLnsRequestIn(pDevice,
MESSAGE_TYPE_READ,
......@@ -1155,7 +1155,7 @@ else {
*/
void BBvLoopbackOn(struct vnt_private *pDevice)
{
BYTE byData;
u8 byData;
//CR C9 = 0x00
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0xC9, &pDevice->byBBCRc9);//CR201
......@@ -1169,7 +1169,7 @@ void BBvLoopbackOn(struct vnt_private *pDevice)
if (pDevice->wCurrentRate <= RATE_11M) { //CCK
// Enable internal digital loopback: CR33 |= 0000 0001
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x21, &byData);//CR33
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (BYTE)(byData | 0x01));//CR33
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (u8)(byData | 0x01));//CR33
// CR154 = 0x00
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, 0); //CR154
......@@ -1178,7 +1178,7 @@ void BBvLoopbackOn(struct vnt_private *pDevice)
else { //OFDM
// Enable internal digital loopback:CR154 |= 0000 0001
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x9A, &byData);//CR154
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (BYTE)(byData | 0x01));//CR154
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (u8)(byData | 0x01));//CR154
// CR33 = 0x00
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, 0); //CR33
......@@ -1190,7 +1190,7 @@ void BBvLoopbackOn(struct vnt_private *pDevice)
// Disable TX_IQUN
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x09, &pDevice->byBBCR09);
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x09, (BYTE)(pDevice->byBBCR09 & 0xDE));
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x09, (u8)(pDevice->byBBCR09 & 0xDE));
}
/*
......@@ -1218,13 +1218,13 @@ void BBvLoopbackOff(struct vnt_private *pDevice)
if (pDevice->wCurrentRate <= RATE_11M) { // CCK
// Set the CR33 Bit2 to disable internal Loopback.
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x21, &byData);//CR33
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (BYTE)(byData & 0xFE));//CR33
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x21, (u8)(byData & 0xFE));//CR33
} else { /* OFDM */
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x9A, &byData);//CR154
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (BYTE)(byData & 0xFE));//CR154
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x9A, (u8)(byData & 0xFE));//CR154
}
ControlvReadByte (pDevice, MESSAGE_REQUEST_BBREG, 0x0E, &byData);//CR14
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0E, (BYTE)(byData | 0x80));//CR14
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0x0E, (u8)(byData | 0x80));//CR14
}
......@@ -1243,7 +1243,7 @@ void BBvLoopbackOff(struct vnt_private *pDevice)
*/
void BBvSetShortSlotTime(struct vnt_private *pDevice)
{
BYTE byBBVGA=0;
u8 byBBVGA=0;
if (pDevice->bShortSlotTime)
pDevice->byBBRxConf &= 0xDF;//1101 1111
......@@ -1258,7 +1258,7 @@ void BBvSetShortSlotTime(struct vnt_private *pDevice)
}
void BBvSetVGAGainOffset(struct vnt_private *pDevice, BYTE byData)
void BBvSetVGAGainOffset(struct vnt_private *pDevice, u8 byData)
{
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xE7, byData);
......
......@@ -97,8 +97,8 @@
unsigned int
BBuGetFrameTime(
BYTE byPreambleType,
BYTE byFreqType,
u8 byPreambleType,
u8 byFreqType,
unsigned int cbFrameLength,
WORD wRate
);
......
......@@ -430,7 +430,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength -
(unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
(unsigned int) (ULONG_PTR) ((u8 *) pRSNWPA - pbyIEs))) {
pBSSList->wWPALen = uLen;
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
WPA_ParseRSN(pBSSList, pRSNWPA);
......@@ -443,7 +443,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength -
(unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
(unsigned int) (ULONG_PTR) ((u8 *) pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen;
memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
......@@ -483,7 +483,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
if (pDevice->bUpdateBBVGA) {
// Monitor if RSSI is too strong.
pBSSList->byRSSIStatCnt = 0;
RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &pBSSList->ldBmMAX);
RFvRSSITodBm(pDevice, (u8)(pRxPacket->uRSSI), &pBSSList->ldBmMAX);
pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
pBSSList->ldBmAverRange = pBSSList->ldBmMAX;
for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
......@@ -592,7 +592,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
if (pRSNWPA != NULL) {
unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength -
(unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
(unsigned int) (ULONG_PTR) ((u8 *) pRSNWPA - pbyIEs))) {
pBSSList->wWPALen = uLen;
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
WPA_ParseRSN(pBSSList, pRSNWPA);
......@@ -604,7 +604,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
if (pRSN != NULL) {
unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength -
(unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
(unsigned int) (ULONG_PTR) ((u8 *) pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen;
memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
......@@ -612,7 +612,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
}
if (pRxPacket->uRSSI != 0) {
RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &ldBm);
RFvRSSITodBm(pDevice, (u8)(pRxPacket->uRSSI), &ldBm);
// Monitor if RSSI is too strong.
pBSSList->byRSSIStatCnt++;
pBSSList->byRSSIStatCnt %= RSSI_STAT_COUNT;
......@@ -1207,7 +1207,7 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice,
byTxRetry = (byTSR & 0xF0) >> 4;
wRate = (WORD) (byPktNO & 0xF0) >> 4;
wFIFOCtl = pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl;
pbyDestAddr = (PBYTE) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]);
pbyDestAddr = (u8 *) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]);
if (wFIFOCtl & FIFOCTL_AUTO_FB_0) {
byFallBack = AUTO_FB_0;
......@@ -1433,7 +1433,7 @@ if(pDevice->bLinkPass !=true)
}
else
{
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
if(-ldBm < 50) {
RssiRatio = 4000;
}
......@@ -1473,7 +1473,7 @@ static void s_vCheckPreEDThreshold(struct vnt_private *pDevice)
((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) {
pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID)pMgmt->abyCurrSSID);
if (pBSSList != NULL) {
pDevice->byBBPreEDRSSI = (BYTE) (~(pBSSList->ldBmAverRange) + 1);
pDevice->byBBPreEDRSSI = (u8) (~(pBSSList->ldBmAverRange) + 1);
BBvUpdatePreEDThreshold(pDevice, false);
}
}
......
......@@ -80,7 +80,7 @@
typedef struct tagSERPObject {
bool bERPExist;
BYTE byERP;
u8 byERP;
} ERPObject, *PERPObject;
......@@ -93,19 +93,19 @@ typedef struct tagSRSNCapObject {
typedef struct tagKnownBSS {
// BSS info
bool bActive;
BYTE abyBSSID[WLAN_BSSID_LEN];
u8 abyBSSID[WLAN_BSSID_LEN];
unsigned int uChannel;
BYTE abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
u8 abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
u8 abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned int uRSSI;
BYTE bySQ;
u8 bySQ;
WORD wBeaconInterval;
WORD wCapInfo;
BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE byRxRate;
u8 abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
u8 byRxRate;
// WORD wATIMWindow;
BYTE byRSSIStatCnt;
u8 byRSSIStatCnt;
signed long ldBmMAX;
signed long ldBmAverage[RSSI_STAT_COUNT];
signed long ldBmAverRange;
......@@ -114,32 +114,32 @@ typedef struct tagKnownBSS {
//++ WPA informations
bool bWPAValid;
BYTE byGKType;
BYTE abyPKType[4];
u8 byGKType;
u8 abyPKType[4];
WORD wPKCount;
BYTE abyAuthType[4];
u8 abyAuthType[4];
WORD wAuthCount;
BYTE byDefaultK_as_PK;
BYTE byReplayIdx;
u8 byDefaultK_as_PK;
u8 byReplayIdx;
//--
//++ WPA2 informations
bool bWPA2Valid;
BYTE byCSSGK;
u8 byCSSGK;
WORD wCSSPKCount;
BYTE abyCSSPK[4];
u8 abyCSSPK[4];
WORD wAKMSSAuthCount;
BYTE abyAKMSSAuthType[4];
u8 abyAKMSSAuthType[4];
//++ wpactl
BYTE byWPAIE[MAX_WPA_IE_LEN];
BYTE byRSNIE[MAX_WPA_IE_LEN];
u8 byWPAIE[MAX_WPA_IE_LEN];
u8 byRSNIE[MAX_WPA_IE_LEN];
WORD wWPALen;
WORD wRSNLen;
// Clear count
unsigned int uClearCount;
// BYTE abyIEs[WLAN_BEACON_FR_MAXLEN];
// u8 abyIEs[WLAN_BEACON_FR_MAXLEN];
unsigned int uIELength;
u64 qwBSSTimestamp;
u64 qwLocalTSF;/* local TSF timer */
......@@ -148,7 +148,7 @@ typedef struct tagKnownBSS {
ERPObject sERP;
SRSNCapObject sRSNCapObj;
BYTE abyIEs[1024]; // don't move this field !!
u8 abyIEs[1024]; // don't move this field !!
} __attribute__ ((__packed__))
KnownBSS , *PKnownBSS;
......@@ -168,9 +168,9 @@ typedef enum tagNODE_STATE {
typedef struct tagKnownNodeDB {
// STA info
bool bActive;
BYTE abyMACAddr[WLAN_ADDR_LEN];
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
u8 abyMACAddr[WLAN_ADDR_LEN];
u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
WORD wTxDataRate;
bool bShortPreamble;
bool bERPExist;
......@@ -179,8 +179,8 @@ typedef struct tagKnownNodeDB {
WORD wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
WORD wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
WORD wSuppRate;
BYTE byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
BYTE byTopCCKBasicRate; //Records the highest basic rate in CCK mode
u8 byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
u8 byTopCCKBasicRate; //Records the highest basic rate in CCK mode
// For AP mode
struct sk_buff_head sTxPSQueue;
......@@ -190,21 +190,21 @@ typedef struct tagKnownNodeDB {
NODE_STATE eNodeState;
bool bPSEnable;
bool bRxPSPoll;
BYTE byAuthSequence;
u8 byAuthSequence;
unsigned long ulLastRxJiffer;
BYTE bySuppRate;
u8 bySuppRate;
DWORD dwFlags;
WORD wEnQueueCnt;
bool bOnFly;
unsigned long long KeyRSC;
BYTE byKeyIndex;
u8 byKeyIndex;
DWORD dwKeyIndex;
BYTE byCipherSuite;
u8 byCipherSuite;
DWORD dwTSC47_16;
WORD wTSC15_0;
unsigned int uWepKeyLength;
BYTE abyWepKey[WLAN_WEPMAX_KEYLEN];
u8 abyWepKey[WLAN_WEPMAX_KEYLEN];
//
// Auto rate fallback vars
bool bIsInFallback;
......@@ -270,7 +270,7 @@ int BSSbUpdateToBSSList(struct vnt_private *,
u8 *pbyIEs,
void *pRxPacketContext);
int BSSbIsSTAInNodeDB(struct vnt_private *, PBYTE abyDstAddr,
int BSSbIsSTAInNodeDB(struct vnt_private *, u8 * abyDstAddr,
u32 *puNodeIndex);
void BSSvCreateOneNode(struct vnt_private *, u32 *puNodeIndex);
......
......@@ -133,7 +133,7 @@ void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel)
pDevice->byCurPwr = 0xFF;
RFbRawSetPower(pDevice, pDevice->abyCCKPwrTbl[uConnectionChannel-1], RATE_1M);
}
ControlvWriteByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_CHANNEL,(BYTE)(uConnectionChannel|0x80));
ControlvWriteByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_CHANNEL,(u8)(uConnectionChannel|0x80));
}
/*
......@@ -221,9 +221,9 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx)
void
CARDvCalculateOFDMRParameter (
WORD wRate,
BYTE byBBType,
PBYTE pbyTxRate,
PBYTE pbyRsvTime
u8 byBBType,
u8 * pbyTxRate,
u8 * pbyRsvTime
)
{
switch (wRate) {
......@@ -434,23 +434,23 @@ void CARDvSetRSPINF(struct vnt_private *pDevice, u8 byBBType)
&abyTxRate[8],
&abyRsvTime[8]);
abyData[0] = (BYTE)(awLen[0]&0xFF);
abyData[1] = (BYTE)(awLen[0]>>8);
abyData[0] = (u8)(awLen[0]&0xFF);
abyData[1] = (u8)(awLen[0]>>8);
abyData[2] = abySignal[0];
abyData[3] = abyServ[0];
abyData[4] = (BYTE)(awLen[1]&0xFF);
abyData[5] = (BYTE)(awLen[1]>>8);
abyData[4] = (u8)(awLen[1]&0xFF);
abyData[5] = (u8)(awLen[1]>>8);
abyData[6] = abySignal[1];
abyData[7] = abyServ[1];
abyData[8] = (BYTE)(awLen[2]&0xFF);
abyData[9] = (BYTE)(awLen[2]>>8);
abyData[8] = (u8)(awLen[2]&0xFF);
abyData[9] = (u8)(awLen[2]>>8);
abyData[10] = abySignal[2];
abyData[11] = abyServ[2];
abyData[12] = (BYTE)(awLen[3]&0xFF);
abyData[13] = (BYTE)(awLen[3]>>8);
abyData[12] = (u8)(awLen[3]&0xFF);
abyData[13] = (u8)(awLen[3]>>8);
abyData[14] = abySignal[3];
abyData[15] = abyServ[3];
......@@ -500,7 +500,7 @@ void vUpdateIFS(struct vnt_private *pDevice)
byMaxMin = 5;
}
else {// PK_TYPE_11GA & PK_TYPE_11GB
BYTE byRate = 0;
u8 byRate = 0;
bool bOFDMRate = false;
unsigned int ii = 0;
PWLAN_IE_SUPP_RATES pItemRates = NULL;
......@@ -515,7 +515,7 @@ void vUpdateIFS(struct vnt_private *pDevice)
pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt.abyCurrSuppRates;
for (ii = 0; ii < pItemRates->len; ii++) {
byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F);
byRate = (u8)(pItemRates->abyRates[ii]&0x7F);
if (RATEwGetRateIdx(byRate) > RATE_11M) {
bOFDMRate = true;
break;
......@@ -525,7 +525,7 @@ void vUpdateIFS(struct vnt_private *pDevice)
pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt
.abyCurrExtSuppRates;
for (ii = 0; ii < pItemRates->len; ii++) {
byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F);
byRate = (u8)(pItemRates->abyRates[ii]&0x7F);
if (RATEwGetRateIdx(byRate) > RATE_11M) {
bOFDMRate = true;
break;
......@@ -544,10 +544,10 @@ void vUpdateIFS(struct vnt_private *pDevice)
pDevice->uCwMax = C_CWMAX;
pDevice->uEIFS = C_EIFS;
byData[0] = (BYTE)pDevice->uSIFS;
byData[1] = (BYTE)pDevice->uDIFS;
byData[2] = (BYTE)pDevice->uEIFS;
byData[3] = (BYTE)pDevice->uSlot;
byData[0] = (u8)pDevice->uSIFS;
byData[1] = (u8)pDevice->uDIFS;
byData[2] = (u8)pDevice->uEIFS;
byData[3] = (u8)pDevice->uSlot;
CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE,
MAC_REG_SIFS,
......@@ -627,7 +627,7 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice)
{
if (pDevice->byBBType == BB_TYPE_11A || pDevice->byBBType == BB_TYPE_11B) {
return (BYTE)pDevice->byBBType;
return (u8)pDevice->byBBType;
}
else if (CARDbIsOFDMinBasicRate(pDevice)) {
return PK_TYPE_11GA;
......@@ -653,7 +653,7 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice)
* Return Value: TSF Offset value
*
*/
u64 CARDqGetTSFOffset(BYTE byRxRate, u64 qwTSF1, u64 qwTSF2)
u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2)
{
u64 qwTSFOffset = 0;
WORD wRxBcnTSFOffst = 0;
......@@ -996,7 +996,7 @@ void CARDvSetBSSMode(struct vnt_private *pDevice)
}
vUpdateIFS(pDevice);
CARDvSetRSPINF(pDevice, (BYTE)pDevice->byBBType);
CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType);
if ( pDevice->byBBType == BB_TYPE_11A ) {
//request by Jack 2005-04-26
......
......@@ -74,7 +74,7 @@ void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, WORD wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
WORD wBeaconInterval);
u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval);
u64 CARDqGetTSFOffset(BYTE byRxRate, u64 qwTSF1, u64 qwTSF2);
u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
int CARDbRadioPowerOff(struct vnt_private *pDevice);
int CARDbRadioPowerOn(struct vnt_private *pDevice);
u8 CARDbyGetPktType(struct vnt_private *pDevice);
......
......@@ -116,10 +116,10 @@ static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] =
************************************************************************/
static struct
{
BYTE byChannelCountryCode; /* The country code */
u8 byChannelCountryCode; /* The country code */
char chCountryCode[2];
BYTE bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */
BYTE byPower[CB_MAX_CHANNEL];
u8 bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */
u8 byPower[CB_MAX_CHANNEL];
} ChannelRuleTab[] =
{
/************************************************************************
......@@ -425,7 +425,7 @@ ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex)
bool
CHvChannelGetList (
unsigned int uCountryCodeIdx,
PBYTE pbyChannelTable
u8 * pbyChannelTable
)
{
if (uCountryCodeIdx >= CCODE_MAX) {
......@@ -508,10 +508,10 @@ void CHvInitChannelTable(struct vnt_private *pDevice)
}
}
BYTE CHbyGetChannelMapping(BYTE byChannelNumber)
u8 CHbyGetChannelMapping(u8 byChannelNumber)
{
BYTE ii;
BYTE byCHMapping = 0;
u8 ii;
u8 byCHMapping = 0;
for (ii = 1; ii <= CB_MAX_CHANNEL; ii++) {
if (sChannelTbl[ii].byChannelNumber == byChannelNumber)
......
......@@ -38,7 +38,7 @@
/*--------------------- Export Classes ----------------------------*/
typedef struct tagSChannelTblElement {
BYTE byChannelNumber;
u8 byChannelNumber;
unsigned int uFrequency;
bool bValid;
} SChannelTblElement, *PSChannelTblElement;
......@@ -49,8 +49,8 @@ typedef struct tagSChannelTblElement {
bool ChannelValid(unsigned int CountryCode, unsigned int ChannelNum);
void CHvInitChannelTable(struct vnt_private *pDevice);
BYTE CHbyGetChannelMapping(BYTE byChannelNumber);
u8 CHbyGetChannelMapping(u8 byChannelNumber);
bool CHvChannelGetList(unsigned int uCountryCodeIdx, PBYTE pbyChannelTable);
bool CHvChannelGetList(unsigned int uCountryCodeIdx, u8 * pbyChannelTable);
#endif /* _CHANNEL_H_ */
......@@ -57,7 +57,7 @@
/* static int msglevel = MSG_LEVEL_DEBUG; */
static int msglevel =MSG_LEVEL_INFO;
const BYTE acbyIERate[MAX_RATE] =
const u8 acbyIERate[MAX_RATE] =
{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
#define AUTORATE_TXOK_CNT 0x0400
......@@ -70,7 +70,7 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable);
void s_vResetCounter(PKnownNodeDB psNodeDBTable)
{
BYTE ii;
u8 ii;
/* clear statistics counter for auto_rate */
for (ii = 0; ii <= MAX_RATE; ii++) {
......@@ -92,19 +92,19 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable)
*
* Parameters:
* In:
* BYTE - Rate value in SuppRates IE or ExtSuppRates IE
* u8 - Rate value in SuppRates IE or ExtSuppRates IE
* Out:
* none
*
* Return Value: RateIdx
*
-*/
BYTE
u8
DATARATEbyGetRateIdx (
BYTE byRate
u8 byRate
)
{
BYTE ii;
u8 ii;
/* erase BasicRate flag */
byRate = byRate & 0x7F;
......@@ -146,7 +146,7 @@ DATARATEbyGetRateIdx (
*
* Parameters:
* In:
* BYTE - Rate value in SuppRates IE or ExtSuppRates IE
* u8 - Rate value in SuppRates IE or ExtSuppRates IE
* Out:
* none
*
......@@ -155,7 +155,7 @@ DATARATEbyGetRateIdx (
-*/
WORD
RATEwGetRateIdx(
BYTE byRate
u8 byRate
)
{
WORD ii;
......@@ -216,7 +216,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
}
for (ii = 0; ii < uRateLen; ii++) {
byRate = (BYTE)(pItemRates->abyRates[ii]);
byRate = (u8)(pItemRates->abyRates[ii]);
if (WLAN_MGMT_IS_BASICRATE(byRate) &&
(bUpdateBasicRate == true)) {
/*
......@@ -226,7 +226,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate));
}
byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F);
byRate = (u8)(pItemRates->abyRates[ii]&0x7F);
if (byHighSuppRate == 0)
byHighSuppRate = byRate;
if (byRate > byHighSuppRate)
......@@ -242,7 +242,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
uExtRateLen = WLAN_RATES_MAXLEN;
for (ii = 0; ii < uExtRateLen ; ii++) {
byRate = (BYTE)(pItemExtRates->abyRates[ii]);
byRate = (u8)(pItemExtRates->abyRates[ii]);
/* select highest basic rate */
if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) {
/*
......@@ -252,7 +252,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice,
CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", RATEwGetRateIdx(byRate));
}
byRate = (BYTE)(pItemExtRates->abyRates[ii]&0x7F);
byRate = (u8)(pItemExtRates->abyRates[ii]&0x7F);
if (byHighSuppRate == 0)
byHighSuppRate = byRate;
if (byRate > byHighSuppRate)
......@@ -400,7 +400,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
* Return Value: None
*
-*/
BYTE
u8
RATEuSetIE (
PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates,
......@@ -423,6 +423,6 @@ RATEuSetIE (
}
}
}
return (BYTE)uRateCnt;
return (u8)uRateCnt;
}
......@@ -77,7 +77,7 @@ void RATEvParseMaxRate(struct vnt_private *, PWLAN_IE_SUPP_RATES pItemRates,
void RATEvTxRateFallBack(struct vnt_private *pDevice,
PKnownNodeDB psNodeDBTable);
BYTE
u8
RATEuSetIE(
PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates,
......@@ -86,13 +86,13 @@ RATEuSetIE(
WORD
RATEwGetRateIdx(
BYTE byRate
u8 byRate
);
BYTE
u8
DATARATEbyGetRateIdx(
BYTE byRate
u8 byRate
);
#endif /* __DATARATE_H__ */
......@@ -190,19 +190,19 @@ typedef const SRrvTime_atim *PCSRrvTime_atim;
typedef struct tagSRTSData {
WORD wFrameControl;
WORD wDurationID;
BYTE abyRA[ETH_ALEN];
BYTE abyTA[ETH_ALEN];
u8 abyRA[ETH_ALEN];
u8 abyTA[ETH_ALEN];
} __attribute__ ((__packed__))
SRTSData, *PSRTSData;
typedef const SRTSData *PCSRTSData;
typedef struct tagSRTS_g {
BYTE bySignalField_b;
BYTE byServiceField_b;
u8 bySignalField_b;
u8 byServiceField_b;
WORD wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
u8 bySignalField_a;
u8 byServiceField_a;
WORD wTransmitLength_a;
WORD wDuration_ba;
WORD wDuration_aa;
......@@ -214,11 +214,11 @@ SRTS_g, *PSRTS_g;
typedef const SRTS_g *PCSRTS_g;
typedef struct tagSRTS_g_FB {
BYTE bySignalField_b;
BYTE byServiceField_b;
u8 bySignalField_b;
u8 byServiceField_b;
WORD wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
u8 bySignalField_a;
u8 byServiceField_a;
WORD wTransmitLength_a;
WORD wDuration_ba;
WORD wDuration_aa;
......@@ -235,8 +235,8 @@ SRTS_g_FB, *PSRTS_g_FB;
typedef const SRTS_g_FB *PCSRTS_g_FB;
typedef struct tagSRTS_ab {
BYTE bySignalField;
BYTE byServiceField;
u8 bySignalField;
u8 byServiceField;
WORD wTransmitLength;
WORD wDuration;
WORD wReserved;
......@@ -247,8 +247,8 @@ SRTS_ab, *PSRTS_ab;
typedef const SRTS_ab *PCSRTS_ab;
typedef struct tagSRTS_a_FB {
BYTE bySignalField;
BYTE byServiceField;
u8 bySignalField;
u8 byServiceField;
WORD wTransmitLength;
WORD wDuration;
WORD wReserved;
......@@ -266,14 +266,14 @@ typedef const SRTS_a_FB *PCSRTS_a_FB;
typedef struct tagSCTSData {
WORD wFrameControl;
WORD wDurationID;
BYTE abyRA[ETH_ALEN];
u8 abyRA[ETH_ALEN];
WORD wReserved;
} __attribute__ ((__packed__))
SCTSData, *PSCTSData;
typedef struct tagSCTS {
BYTE bySignalField_b;
BYTE byServiceField_b;
u8 bySignalField_b;
u8 byServiceField_b;
WORD wTransmitLength_b;
WORD wDuration_ba;
WORD wReserved;
......@@ -284,8 +284,8 @@ SCTS, *PSCTS;
typedef const SCTS *PCSCTS;
typedef struct tagSCTS_FB {
BYTE bySignalField_b;
BYTE byServiceField_b;
u8 bySignalField_b;
u8 byServiceField_b;
WORD wTransmitLength_b;
WORD wDuration_ba;
WORD wReserved;
......@@ -321,11 +321,11 @@ typedef const STxShortBufHead *PCSTxShortBufHead;
* TX data header
*/
typedef struct tagSTxDataHead_g {
BYTE bySignalField_b;
BYTE byServiceField_b;
u8 bySignalField_b;
u8 byServiceField_b;
WORD wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
u8 bySignalField_a;
u8 byServiceField_a;
WORD wTransmitLength_a;
WORD wDuration_b;
WORD wDuration_a;
......@@ -337,11 +337,11 @@ STxDataHead_g, *PSTxDataHead_g;
typedef const STxDataHead_g *PCSTxDataHead_g;
typedef struct tagSTxDataHead_g_FB {
BYTE bySignalField_b;
BYTE byServiceField_b;
u8 bySignalField_b;
u8 byServiceField_b;
WORD wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
u8 bySignalField_a;
u8 byServiceField_a;
WORD wTransmitLength_a;
WORD wDuration_b;
WORD wDuration_a;
......@@ -354,8 +354,8 @@ STxDataHead_g_FB, *PSTxDataHead_g_FB;
typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB;
typedef struct tagSTxDataHead_ab {
BYTE bySignalField;
BYTE byServiceField;
u8 bySignalField;
u8 byServiceField;
WORD wTransmitLength;
WORD wDuration;
WORD wTimeStampOff;
......@@ -364,8 +364,8 @@ STxDataHead_ab, *PSTxDataHead_ab;
typedef const STxDataHead_ab *PCSTxDataHead_ab;
typedef struct tagSTxDataHead_a_FB {
BYTE bySignalField;
BYTE byServiceField;
u8 bySignalField;
u8 byServiceField;
WORD wTransmitLength;
WORD wDuration;
WORD wTimeStampOff;
......@@ -397,14 +397,14 @@ SBEACONCtl;
typedef struct tagSSecretKey {
u32 dwLowDword;
BYTE byHighByte;
u8 byHighByte;
} __attribute__ ((__packed__))
SSecretKey;
typedef struct tagSKeyEntry {
BYTE abyAddrHi[2];
u8 abyAddrHi[2];
WORD wKCTL;
BYTE abyAddrLo[4];
u8 abyAddrLo[4];
u32 dwKey0[4];
u32 dwKey1[4];
u32 dwKey2[4];
......
......@@ -212,7 +212,7 @@ typedef struct _DEFAULT_CONFIG {
*/
typedef struct {
unsigned int uDataLen;
PBYTE pDataBuf;
u8 * pDataBuf;
/* struct urb *pUrb; */
bool bInUse;
} INT_BUFFER, *PINT_BUFFER;
......@@ -310,14 +310,14 @@ typedef struct tagSPMKIDCandidateEvent {
typedef struct tagSQuietControl {
bool bEnable;
DWORD dwStartTime;
BYTE byPeriod;
u8 byPeriod;
WORD wDuration;
} SQuietControl, *PSQuietControl;
/* The receive duplicate detection cache entry */
typedef struct tagSCacheEntry{
WORD wFmSequence;
BYTE abyAddr2[ETH_ALEN];
u8 abyAddr2[ETH_ALEN];
WORD wFrameCtl;
} SCacheEntry, *PSCacheEntry;
......@@ -337,10 +337,10 @@ typedef struct tagSDeFragControlBlock
{
WORD wSequence;
WORD wFragNum;
BYTE abyAddr2[ETH_ALEN];
u8 abyAddr2[ETH_ALEN];
unsigned int uLifetime;
struct sk_buff* skb;
PBYTE pbyRxBuffer;
u8 * pbyRxBuffer;
unsigned int cbFrameLength;
bool bInUse;
} SDeFragControlBlock, *PSDeFragControlBlock;
......
......@@ -64,7 +64,7 @@
//static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO;
const BYTE acbyRxRate[MAX_RATE] =
const u8 acbyRxRate[MAX_RATE] =
{2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
......@@ -74,12 +74,12 @@ const BYTE acbyRxRate[MAX_RATE] =
/*--------------------- Static Functions --------------------------*/
static BYTE s_byGetRateIdx(BYTE byRate);
static u8 s_byGetRateIdx(u8 byRate);
static
void
s_vGetDASA(
PBYTE pbyRxBufferAddr,
u8 * pbyRxBufferAddr,
unsigned int *pcbHeaderSize,
PSEthernetHeader psEthHeader
);
......@@ -135,7 +135,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
pMACHeader = (PS802_11Header) (pbyRxBufferAddr + cbHeaderSize);
s_vGetDASA((PBYTE)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader);
s_vGetDASA((u8 *)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader);
if (bIsWEP) {
if (bExtIV) {
......@@ -150,7 +150,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
cbHeaderSize += WLAN_HDR_ADDR3_LEN;
};
pbyRxBuffer = (PBYTE) (pbyRxBufferAddr + cbHeaderSize);
pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_Bridgetunnel[0])) {
cbHeaderSize += 6;
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
......@@ -188,7 +188,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
}
cbHeaderSize -= (ETH_ALEN * 2);
pbyRxBuffer = (PBYTE) (pbyRxBufferAddr + cbHeaderSize);
pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
for (ii = 0; ii < ETH_ALEN; ii++)
*pbyRxBuffer++ = pDevice->sRxEthHeader.abyDstAddr[ii];
for (ii = 0; ii < ETH_ALEN; ii++)
......@@ -200,9 +200,9 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
static BYTE s_byGetRateIdx(BYTE byRate)
static u8 s_byGetRateIdx(u8 byRate)
{
BYTE byRateIdx;
u8 byRateIdx;
for (byRateIdx = 0; byRateIdx <MAX_RATE ; byRateIdx++) {
if (acbyRxRate[byRateIdx%MAX_RATE] == byRate)
......@@ -215,7 +215,7 @@ static BYTE s_byGetRateIdx(BYTE byRate)
static
void
s_vGetDASA (
PBYTE pbyRxBufferAddr,
u8 * pbyRxBufferAddr,
unsigned int *pcbHeaderSize,
PSEthernetHeader psEthHeader
)
......@@ -321,7 +321,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
return false;
}
pbyDAddress = (PBYTE)(skb->data);
pbyDAddress = (u8 *)(skb->data);
pbyRxSts = pbyDAddress+4;
pbyRxRate = pbyDAddress+5;
......@@ -407,7 +407,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
// Use for TKIP MIC
s_vGetDASA(pbyFrame, &cbHeaderSize, &pDevice->sRxEthHeader);
if (!compare_ether_addr((PBYTE)&(pDevice->sRxEthHeader.abySrcAddr[0]),
if (!compare_ether_addr((u8 *)&(pDevice->sRxEthHeader.abySrcAddr[0]),
pDevice->abyCurrentNetAddr))
return false;
......@@ -415,7 +415,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) {
p802_11Header = (PS802_11Header) (pbyFrame);
// get SA NodeIndex
if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(p802_11Header->abyAddr2), &iSANodeIndex)) {
if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(p802_11Header->abyAddr2), &iSANodeIndex)) {
pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies;
pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0;
}
......@@ -529,8 +529,8 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
// Handle Control & Manage Frame
if (IS_TYPE_MGMT((pbyFrame))) {
PBYTE pbyData1;
PBYTE pbyData2;
u8 * pbyData1;
u8 * pbyData2;
pRxPacket = &(pRCB->sMngPacket);
pRxPacket->p80211Header = (PUWLAN_80211HDR)(pbyFrame);
......@@ -622,9 +622,9 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
}
//mike add:station mode check eapol-key challenge--->
{
BYTE Protocol_Version; //802.1x Authentication
BYTE Packet_Type; //802.1x Authentication
BYTE Descriptor_type;
u8 Protocol_Version; //802.1x Authentication
u8 Packet_Type; //802.1x Authentication
u8 Descriptor_type;
WORD Key_info;
if (bIsWEP)
cbIVOffset = 8;
......@@ -703,7 +703,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
// -----------------------------------------------
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){
BYTE abyMacHdr[24];
u8 abyMacHdr[24];
// Only 802.1x packet incoming allowed
if (bIsWEP)
......@@ -776,11 +776,11 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
}
MIC_vInit(dwMICKey0, dwMICKey1);
MIC_vAppend((PBYTE)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12);
MIC_vAppend((u8 *)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12);
dwMIC_Priority = 0;
MIC_vAppend((PBYTE)&dwMIC_Priority, 4);
MIC_vAppend((u8 *)&dwMIC_Priority, 4);
// 4 is Rcv buffer header, 24 is MAC Header, and 8 is IV and Ext IV.
MIC_vAppend((PBYTE)(skb->data + 8 + WLAN_HDR_ADDR3_LEN + 8),
MIC_vAppend((u8 *)(skb->data + 8 + WLAN_HDR_ADDR3_LEN + 8),
FrameSize - WLAN_HDR_ADDR3_LEN - 8);
MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R);
MIC_vUnInit();
......@@ -877,7 +877,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
} // ----- End of Reply Counter Check --------------------------
s_vProcessRxMACHeader(pDevice, (PBYTE)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset);
s_vProcessRxMACHeader(pDevice, (u8 *)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset);
FrameSize -= cbHeaderOffset;
cbHeaderOffset += 8; // 8 is Rcv buffer header
......@@ -946,7 +946,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame,
// reason = (6) class 2 received from nonauth sta
vMgrDeAuthenBeginSta(pDevice,
pMgmt,
(PBYTE)(p802_11Header->abyAddr2),
(u8 *)(p802_11Header->abyAddr2),
(WLAN_MGMT_REASON_CLASS2_NONAUTH),
&Status
);
......@@ -958,7 +958,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame,
// reason = (7) class 3 received from nonassoc sta
vMgrDisassocBeginSta(pDevice,
pMgmt,
(PBYTE)(p802_11Header->abyAddr2),
(u8 *)(p802_11Header->abyAddr2),
(WLAN_MGMT_REASON_CLASS3_NONASSOC),
&Status
);
......@@ -1011,7 +1011,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame,
else {
vMgrDeAuthenBeginSta(pDevice,
pMgmt,
(PBYTE)(p802_11Header->abyAddr2),
(u8 *)(p802_11Header->abyAddr2),
(WLAN_MGMT_REASON_CLASS2_NONAUTH),
&Status
);
......@@ -1301,7 +1301,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
if (FrameSize > CB_MAX_BUF_SIZE)
return false;
// check DA
if (is_multicast_ether_addr((PBYTE)(skb->data+cbHeaderOffset))) {
if (is_multicast_ether_addr((u8 *)(skb->data+cbHeaderOffset))) {
if (pMgmt->sNodeDBTable[0].bPSEnable) {
skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz);
......@@ -1326,7 +1326,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
}
else {
// check if relay
if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(skb->data+cbHeaderOffset), &iDANodeIndex)) {
if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(skb->data+cbHeaderOffset), &iDANodeIndex)) {
if (pMgmt->sNodeDBTable[iDANodeIndex].eNodeState >= NODE_ASSOC) {
if (pMgmt->sNodeDBTable[iDANodeIndex].bPSEnable) {
// queue this skb until next PS tx, and then release.
......@@ -1356,7 +1356,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
iDANodeIndex = 0;
if ((pDevice->uAssocCount > 1) && (iDANodeIndex >= 0)) {
bRelayPacketSend(pDevice, (PBYTE) (skb->data + cbHeaderOffset),
bRelayPacketSend(pDevice, (u8 *) (skb->data + cbHeaderOffset),
FrameSize, (unsigned int) iDANodeIndex);
}
......
......@@ -142,7 +142,7 @@ int FIRMWAREbCheckVersion(struct vnt_private *pDevice)
0,
MESSAGE_REQUEST_VERSION,
2,
(PBYTE) &(pDevice->wFirmwareVersion));
(u8 *) &(pDevice->wFirmwareVersion));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion);
if (ntStatus != STATUS_SUCCESS) {
......
......@@ -491,7 +491,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice,
dwKeyIndex = (DWORD)(param->u.crypt.idx);
if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) {
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (u8)dwKeyIndex;
pDevice->bTransmitKey = true;
dwKeyIndex |= (1 << 31);
}
......@@ -515,7 +515,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice,
&param->sta_addr[0],
dwKeyIndex & ~(USE_KEYRSC),
param->u.crypt.key_len,
&KeyRSC, (PBYTE)abyKey,
&KeyRSC, (u8 *)abyKey,
KEY_CTL_WEP
) == true) {
......@@ -585,7 +585,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice,
dwKeyIndex,
param->u.crypt.key_len,
&KeyRSC,
(PBYTE)abyKey,
(u8 *)abyKey,
byKeyDecMode
) == true) {
......@@ -670,7 +670,7 @@ static int hostap_get_encryption(struct vnt_private *pDevice,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: %d\n", iNodeIndex);
memset(param->u.crypt.seq, 0, 8);
for (ii = 0 ; ii < 8 ; ii++) {
param->u.crypt.seq[ii] = (BYTE)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8);
param->u.crypt.seq[ii] = (u8)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8);
}
return ret;
......
......@@ -98,8 +98,8 @@ void INTnsProcessData(struct vnt_private *pDevice)
pINTData = (PSINTData) pDevice->intBuf.pDataBuf;
if (pINTData->byTSR0 & TSR_VALID) {
STAvUpdateTDStatCounter(&(pDevice->scStatistic),
(BYTE)(pINTData->byPkt0 & 0x0F),
(BYTE)(pINTData->byPkt0>>4),
(u8)(pINTData->byPkt0 & 0x0F),
(u8)(pINTData->byPkt0>>4),
pINTData->byTSR0);
BSSvUpdateNodeTxCounter(pDevice,
&(pDevice->scStatistic),
......@@ -109,8 +109,8 @@ void INTnsProcessData(struct vnt_private *pDevice)
}
if (pINTData->byTSR1 & TSR_VALID) {
STAvUpdateTDStatCounter(&(pDevice->scStatistic),
(BYTE)(pINTData->byPkt1 & 0x0F),
(BYTE)(pINTData->byPkt1>>4),
(u8)(pINTData->byPkt1 & 0x0F),
(u8)(pINTData->byPkt1>>4),
pINTData->byTSR1);
BSSvUpdateNodeTxCounter(pDevice,
&(pDevice->scStatistic),
......@@ -120,8 +120,8 @@ void INTnsProcessData(struct vnt_private *pDevice)
}
if (pINTData->byTSR2 & TSR_VALID) {
STAvUpdateTDStatCounter(&(pDevice->scStatistic),
(BYTE)(pINTData->byPkt2 & 0x0F),
(BYTE)(pINTData->byPkt2>>4),
(u8)(pINTData->byPkt2 & 0x0F),
(u8)(pINTData->byPkt2>>4),
pINTData->byTSR2);
BSSvUpdateNodeTxCounter(pDevice,
&(pDevice->scStatistic),
......@@ -131,8 +131,8 @@ void INTnsProcessData(struct vnt_private *pDevice)
}
if (pINTData->byTSR3 & TSR_VALID) {
STAvUpdateTDStatCounter(&(pDevice->scStatistic),
(BYTE)(pINTData->byPkt3 & 0x0F),
(BYTE)(pINTData->byPkt3>>4),
(u8)(pINTData->byPkt3 & 0x0F),
(u8)(pINTData->byPkt3>>4),
pINTData->byTSR3);
BSSvUpdateNodeTxCounter(pDevice,
&(pDevice->scStatistic),
......
......@@ -35,26 +35,26 @@
/*--------------------- Export Definitions -------------------------*/
typedef struct tagSINTData {
BYTE byTSR0;
BYTE byPkt0;
u8 byTSR0;
u8 byPkt0;
WORD wTime0;
BYTE byTSR1;
BYTE byPkt1;
u8 byTSR1;
u8 byPkt1;
WORD wTime1;
BYTE byTSR2;
BYTE byPkt2;
u8 byTSR2;
u8 byPkt2;
WORD wTime2;
BYTE byTSR3;
BYTE byPkt3;
u8 byTSR3;
u8 byPkt3;
WORD wTime3;
u64 qwTSF;
BYTE byISR0;
BYTE byISR1;
BYTE byRTSSuccess;
BYTE byRTSFail;
BYTE byACKFail;
BYTE byFCSErr;
BYTE abySW[2];
u8 byISR0;
u8 byISR1;
u8 byRTSSuccess;
u8 byRTSFail;
u8 byACKFail;
u8 byFCSErr;
u8 abySW[2];
} __attribute__ ((__packed__))
SINTData, *PSINTData;
......
......@@ -61,8 +61,8 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
pDevice->wstats.status = pDevice->eOPMode;
if (pDevice->scStatistic.LinkQuality > 100)
pDevice->scStatistic.LinkQuality = 100;
pDevice->wstats.qual.qual =(BYTE)pDevice->scStatistic.LinkQuality;
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
pDevice->wstats.qual.qual =(u8)pDevice->scStatistic.LinkQuality;
RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
pDevice->wstats.qual.level = ldBm;
pDevice->wstats.qual.noise = 0;
pDevice->wstats.qual.updated = 1;
......@@ -95,7 +95,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *wrq = &wrqu->data;
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
struct iw_scan_req *req = (struct iw_scan_req *)extra;
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
u8 abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
PWLAN_IE_SSID pItemSSID = NULL;
if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
......@@ -238,7 +238,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
// ADD quality
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVQUAL;
RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm);
RFvRSSITodBm(pDevice, (u8)(pBSS->uRSSI), &ldBm);
iwe.u.qual.level = ldBm;
iwe.u.qual.noise = 0;
......@@ -532,7 +532,7 @@ int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
struct iw_range *range = (struct iw_range *)extra;
int i;
int k;
BYTE abySupportedRates[13] = {
u8 abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48,
0x60, 0x6C, 0x90
};
......@@ -635,7 +635,7 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *wrq = &wrqu->ap_addr;
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
int rc = 0;
BYTE ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
u8 ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
PRINT_K(" SIOCSIWAP\n");
......@@ -819,7 +819,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
if (pDevice->bWPASuppWextEnabled == true) {
/*******search if in hidden ssid mode ****/
PKnownBSS pCurr = NULL;
BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
u8 abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned ii;
unsigned uSameBssidNum = 0;
......@@ -913,7 +913,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
int rc = 0;
u8 brate = 0;
int i;
BYTE abySupportedRates[13] = {
u8 abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48,
0x60, 0x6C, 0x90
};
......@@ -996,7 +996,7 @@ int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
return -EFAULT;
{
BYTE abySupportedRates[13] = {
u8 abySupportedRates[13] = {
0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30,
0x48, 0x60, 0x6C, 0x90
};
......@@ -1227,7 +1227,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
KEY_CTL_WEP);
spin_unlock_irq(&pDevice->lock);
}
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (u8)dwKeyIndex;
pDevice->uKeyLength = wrq->length;
pDevice->bTransmitKey = true;
pDevice->bEncryptionEnable = true;
......@@ -1317,7 +1317,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
memcpy(abyKey, pKey->abyKey, pKey->uKeyLength);
memcpy(extra, abyKey, WLAN_WEP232_KEYLEN);
}
} else if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (BYTE)index, &pKey)) {
} else if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (u8)index, &pKey)) {
wrq->length = pKey->uKeyLength;
memcpy(abyKey, pKey->abyKey, pKey->uKeyLength);
memcpy(extra, abyKey, WLAN_WEP232_KEYLEN);
......@@ -1424,7 +1424,7 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n");
if (pDevice->bLinkPass == true) {
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
wrq->value = ldBm;
} else {
wrq->value = 0;
......
......@@ -79,7 +79,7 @@ static void s_vCheckKeyTableValid(struct vnt_private *pDevice,
pTable->KeyTable[i].bInUse = false;
pTable->KeyTable[i].wKeyCtl = 0;
pTable->KeyTable[i].bSoftWEP = false;
pbyData[wLength++] = (BYTE) i;
pbyData[wLength++] = (u8) i;
//MACvDisableKeyEntry(pDevice, i);
}
}
......@@ -130,9 +130,9 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable)
pTable->KeyTable[i].wKeyCtl = 0;
pTable->KeyTable[i].dwGTKeyIndex = 0;
pTable->KeyTable[i].bSoftWEP = false;
pbyData[i] = (BYTE) i;
pbyData[i] = (u8) i;
}
pbyData[i] = (BYTE) i;
pbyData[i] = (u8) i;
CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_CLRKEYENTRY,
0,
......
......@@ -59,27 +59,27 @@ typedef struct tagSKeyItem
{
bool bKeyValid;
u32 uKeyLength;
BYTE abyKey[MAX_KEY_LEN];
u8 abyKey[MAX_KEY_LEN];
u64 KeyRSC;
DWORD dwTSC47_16;
WORD wTSC15_0;
BYTE byCipherSuite;
BYTE byReserved0;
u8 byCipherSuite;
u8 byReserved0;
DWORD dwKeyIndex;
void *pvKeyTable;
} SKeyItem, *PSKeyItem; //64
typedef struct tagSKeyTable
{
BYTE abyBSSID[ETH_ALEN]; /* 6 */
BYTE byReserved0[2]; //8
u8 abyBSSID[ETH_ALEN]; /* 6 */
u8 byReserved0[2]; //8
SKeyItem PairwiseKey;
SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
DWORD dwGTKeyIndex; // GroupTransmitKey Index
bool bInUse;
WORD wKeyCtl;
bool bSoftWEP;
BYTE byReserved1[6];
u8 byReserved1[6];
} SKeyTable, *PSKeyTable; //352
typedef struct tagSKeyManagement
......
......@@ -169,10 +169,10 @@ void MACvSetMISCFifo(struct vnt_private *pDevice, u16 wOffset, u32 dwData)
if (wOffset > 273)
return;
pbyData[0] = (BYTE)dwData;
pbyData[1] = (BYTE)(dwData>>8);
pbyData[2] = (BYTE)(dwData>>16);
pbyData[3] = (BYTE)(dwData>>24);
pbyData[0] = (u8)dwData;
pbyData[1] = (u8)(dwData>>8);
pbyData[2] = (u8)(dwData>>16);
pbyData[3] = (u8)(dwData>>24);
CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE_MISCFF,
......@@ -203,7 +203,7 @@ void MACvDisableKeyEntry(struct vnt_private *pDevice, u32 uEntryIdx)
u8 byData;
byData = (BYTE) uEntryIdx;
byData = (u8) uEntryIdx;
wOffset = MISCFIFO_KEYETRY0;
wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE);
......@@ -294,16 +294,16 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx,
VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE);
}
*/
pbyKey = (PBYTE)pdwKey;
pbyData[0] = (BYTE)dwData1;
pbyData[1] = (BYTE)(dwData1>>8);
pbyData[2] = (BYTE)(dwData1>>16);
pbyData[3] = (BYTE)(dwData1>>24);
pbyData[4] = (BYTE)dwData2;
pbyData[5] = (BYTE)(dwData2>>8);
pbyData[6] = (BYTE)(dwData2>>16);
pbyData[7] = (BYTE)(dwData2>>24);
pbyKey = (u8 *)pdwKey;
pbyData[0] = (u8)dwData1;
pbyData[1] = (u8)(dwData1>>8);
pbyData[2] = (u8)(dwData1>>16);
pbyData[3] = (u8)(dwData1>>24);
pbyData[4] = (u8)dwData2;
pbyData[5] = (u8)(dwData2>>8);
pbyData[6] = (u8)(dwData2>>16);
pbyData[7] = (u8)(dwData2>>24);
for (ii = 8; ii < 24; ii++)
pbyData[ii] = *pbyKey++;
......@@ -358,8 +358,8 @@ void MACvWriteWord(struct vnt_private *pDevice, u8 byRegOfs, u16 wData)
u8 pbyData[2];
pbyData[0] = (BYTE)(wData & 0xff);
pbyData[1] = (BYTE)(wData >> 8);
pbyData[0] = (u8)(wData & 0xff);
pbyData[1] = (u8)(wData >> 8);
CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE,
......@@ -376,12 +376,12 @@ void MACvWriteBSSIDAddress(struct vnt_private *pDevice, u8 *pbyEtherAddr)
u8 pbyData[6];
pbyData[0] = *((PBYTE)pbyEtherAddr);
pbyData[1] = *((PBYTE)pbyEtherAddr+1);
pbyData[2] = *((PBYTE)pbyEtherAddr+2);
pbyData[3] = *((PBYTE)pbyEtherAddr+3);
pbyData[4] = *((PBYTE)pbyEtherAddr+4);
pbyData[5] = *((PBYTE)pbyEtherAddr+5);
pbyData[0] = *((u8 *)pbyEtherAddr);
pbyData[1] = *((u8 *)pbyEtherAddr+1);
pbyData[2] = *((u8 *)pbyEtherAddr+2);
pbyData[3] = *((u8 *)pbyEtherAddr+3);
pbyData[4] = *((u8 *)pbyEtherAddr+4);
pbyData[5] = *((u8 *)pbyEtherAddr+5);
CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE,
......
......@@ -258,8 +258,8 @@ static void usb_device_reset(struct vnt_private *pDevice);
static void
device_set_options(struct vnt_private *pDevice) {
BYTE abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
BYTE abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
u8 abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
u8 abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN);
......@@ -366,8 +366,8 @@ static int device_init_registers(struct vnt_private *pDevice,
}
}
sInitCmd.byInitClass = (BYTE)InitType;
sInitCmd.bExistSWNetAddr = (BYTE) pDevice->bExistSWNetAddr;
sInitCmd.byInitClass = (u8)InitType;
sInitCmd.bExistSWNetAddr = (u8) pDevice->bExistSWNetAddr;
for (ii = 0; ii < 6; ii++)
sInitCmd.bySWNetAddr[ii] = pDevice->abyCurrentNetAddr[ii];
sInitCmd.byShortRetryLimit = pDevice->byShortRetryLimit;
......@@ -379,7 +379,7 @@ static int device_init_registers(struct vnt_private *pDevice,
0,
0,
sizeof(CMD_CARD_INIT),
(PBYTE) &(sInitCmd));
(u8 *) &(sInitCmd));
if ( ntStatus != STATUS_SUCCESS ) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Issue Card init fail \n");
......@@ -388,7 +388,7 @@ static int device_init_registers(struct vnt_private *pDevice,
}
if (InitType == DEVICE_INIT_COLD) {
ntStatus = CONTROLnsRequestIn(pDevice,MESSAGE_TYPE_INIT_RSP,0,0,sizeof(RSP_CARD_INIT), (PBYTE) &(sInitRsp));
ntStatus = CONTROLnsRequestIn(pDevice,MESSAGE_TYPE_INIT_RSP,0,0,sizeof(RSP_CARD_INIT), (u8 *) &(sInitRsp));
if (ntStatus != STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Cardinit request in status fail!\n");
......@@ -1470,8 +1470,8 @@ static void device_set_multi(struct net_device *dev)
mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31));
}
for (ii = 0; ii < 4; ii++) {
MACvWriteMultiAddr(pDevice, ii, *((PBYTE)&mc_filter[0] + ii));
MACvWriteMultiAddr(pDevice, ii+ 4, *((PBYTE)&mc_filter[1] + ii));
MACvWriteMultiAddr(pDevice, ii, *((u8 *)&mc_filter[0] + ii));
MACvWriteMultiAddr(pDevice, ii+ 4, *((u8 *)&mc_filter[1] + ii));
}
pDevice->byRxMode &= ~(RCR_UNICAST);
pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
......
......@@ -89,7 +89,7 @@ void STAvClearAllCounter (PSStatCounter pStatistic)
* Return Value: none
*
*/
void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr1)
void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, u8 byIsr0, u8 byIsr1)
{
/**********************/
/* ABNORMAL interrupt */
......@@ -152,9 +152,9 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr
*
*/
void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR,
BYTE byRxSts, BYTE byRxRate,
PBYTE pbyBuffer, unsigned int cbFrameLength)
u8 byRSR, u8 byNewRSR,
u8 byRxSts, u8 byRxRate,
u8 * pbyBuffer, unsigned int cbFrameLength)
{
/* need change */
PS802_11Header pHeader = (PS802_11Header)pbyBuffer;
......@@ -390,11 +390,11 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
void
STAvUpdateRDStatCounterEx (
PSStatCounter pStatistic,
BYTE byRSR,
BYTE byNewRSR,
BYTE byRxSts,
BYTE byRxRate,
PBYTE pbyBuffer,
u8 byRSR,
u8 byNewRSR,
u8 byRxSts,
u8 byRxRate,
u8 * pbyBuffer,
unsigned int cbFrameLength
)
{
......@@ -411,7 +411,7 @@ STAvUpdateRDStatCounterEx (
// rx length
pStatistic->dwCntRxFrmLength = cbFrameLength;
// rx pattern, we just see 10 bytes for sample
memcpy(pStatistic->abyCntRxPattern, (PBYTE)pbyBuffer, 10);
memcpy(pStatistic->abyCntRxPattern, (u8 *)pbyBuffer, 10);
}
......@@ -435,12 +435,12 @@ STAvUpdateRDStatCounterEx (
void
STAvUpdateTDStatCounter (
PSStatCounter pStatistic,
BYTE byPktNum,
BYTE byRate,
BYTE byTSR
u8 byPktNum,
u8 byRate,
u8 byTSR
)
{
BYTE byRetyCnt;
u8 byRetyCnt;
// increase tx packet count
pStatistic->dwTsrTxPacket++;
......@@ -524,10 +524,10 @@ void
STAvUpdate802_11Counter(
PSDot11Counters p802_11Counter,
PSStatCounter pStatistic,
BYTE byRTSSuccess,
BYTE byRTSFail,
BYTE byACKFail,
BYTE byFCSErr
u8 byRTSSuccess,
u8 byRTSFail,
u8 byACKFail,
u8 byFCSErr
)
{
//p802_11Counter->TransmittedFragmentCount
......
......@@ -92,7 +92,7 @@ typedef struct tagSMib2Counter {
signed long ifType;
signed long ifMtu;
DWORD ifSpeed;
BYTE ifPhysAddress[ETH_ALEN];
u8 ifPhysAddress[ETH_ALEN];
signed long ifAdminStatus;
signed long ifOperStatus;
DWORD ifLastChange;
......@@ -228,10 +228,10 @@ typedef struct tagSISRCounters {
// Tx packet information
//
typedef struct tagSTxPktInfo {
BYTE byBroadMultiUni;
u8 byBroadMultiUni;
WORD wLength;
WORD wFIFOCtl;
BYTE abyDestAddr[ETH_ALEN];
u8 abyDestAddr[ETH_ALEN];
} STxPktInfo, *PSTxPktInfo;
......@@ -318,8 +318,8 @@ typedef struct tagSStatCounter {
DWORD dwCntRxFrmLength;
DWORD dwCntTxBufLength;
BYTE abyCntRxPattern[16];
BYTE abyCntTxPattern[16];
u8 abyCntRxPattern[16];
u8 abyCntTxPattern[16];
......@@ -376,30 +376,30 @@ typedef struct tagSStatCounter {
void STAvClearAllCounter(PSStatCounter pStatistic);
void STAvUpdateIsrStatCounter(PSStatCounter pStatistic,
BYTE byIsr0,
BYTE byIsr1);
u8 byIsr0,
u8 byIsr1);
void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
BYTE byRxRate, PBYTE pbyBuffer,
u8 byRSR, u8 byNewRSR, u8 byRxSts,
u8 byRxRate, u8 * pbyBuffer,
unsigned int cbFrameLength);
void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
BYTE byRxRate, PBYTE pbyBuffer,
u8 byRSR, u8 byNewRSR, u8 byRxSts,
u8 byRxRate, u8 * pbyBuffer,
unsigned int cbFrameLength);
void STAvUpdateTDStatCounter(PSStatCounter pStatistic, BYTE byPktNum,
BYTE byRate, BYTE byTSR);
void STAvUpdateTDStatCounter(PSStatCounter pStatistic, u8 byPktNum,
u8 byRate, u8 byTSR);
void
STAvUpdate802_11Counter(
PSDot11Counters p802_11Counter,
PSStatCounter pStatistic,
BYTE byRTSSuccess,
BYTE byRTSFail,
BYTE byACKFail,
BYTE byFCSErr
u8 byRTSSuccess,
u8 byRTSFail,
u8 byACKFail,
u8 byFCSErr
);
void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
......
......@@ -26,8 +26,8 @@
* Date: Sep 4, 2002
*
* Functions:
* s_dwGetUINT32 - Convert from BYTE[] to DWORD in a portable way
* s_vPutUINT32 - Convert from DWORD to BYTE[] in a portable way
* s_dwGetUINT32 - Convert from u8[] to DWORD in a portable way
* s_vPutUINT32 - Convert from DWORD to u8[] in a portable way
* s_vClear - Reset the state to the empty message.
* s_vSetKey - Set the key.
* MIC_vInit - Set the key.
......@@ -48,16 +48,16 @@
/*--------------------- Static Functions --------------------------*/
/*
* static DWORD s_dwGetUINT32(BYTE * p); Get DWORD from
* static DWORD s_dwGetUINT32(u8 * p); Get DWORD from
* 4 bytes LSByte first
* static void s_vPutUINT32(BYTE* p, DWORD val); Put DWORD into
* static void s_vPutUINT32(u8* p, DWORD val); Put DWORD into
* 4 bytes LSByte first
*/
static void s_vClear(void); /* Clear the internal message,
* resets the object to the
* state just after construction. */
static void s_vSetKey(DWORD dwK0, DWORD dwK1);
static void s_vAppendByte(BYTE b); /* Add a single byte to the internal
static void s_vAppendByte(u8 b); /* Add a single byte to the internal
* message */
/*--------------------- Export Variables --------------------------*/
......@@ -69,8 +69,8 @@ static unsigned int nBytesInM; /* # bytes in M */
/*--------------------- Export Functions --------------------------*/
/*
static DWORD s_dwGetUINT32 (BYTE * p)
// Convert from BYTE[] to DWORD in a portable way
static DWORD s_dwGetUINT32 (u8 * p)
// Convert from u8[] to DWORD in a portable way
{
DWORD res = 0;
unsigned int i;
......@@ -79,12 +79,12 @@ static DWORD s_dwGetUINT32 (BYTE * p)
return res;
}
static void s_vPutUINT32(BYTE *p, DWORD val)
// Convert from DWORD to BYTE[] in a portable way
static void s_vPutUINT32(u8 *p, DWORD val)
// Convert from DWORD to u8[] in a portable way
{
unsigned int i;
for (i = 0; i < 4; i++) {
*p++ = (BYTE) (val & 0xff);
*p++ = (u8) (val & 0xff);
val >>= 8;
}
}
......@@ -108,7 +108,7 @@ static void s_vSetKey(DWORD dwK0, DWORD dwK1)
s_vClear();
}
static void s_vAppendByte(BYTE b)
static void s_vAppendByte(u8 b)
{
/* Append the byte to our word-sized buffer */
M |= b << (8*nBytesInM);
......@@ -148,7 +148,7 @@ void MIC_vUnInit(void)
s_vClear();
}
void MIC_vAppend(PBYTE src, unsigned int nBytes)
void MIC_vAppend(u8 * src, unsigned int nBytes)
{
/* This is simple */
while (nBytes > 0) {
......
......@@ -40,7 +40,7 @@ void MIC_vInit(DWORD dwK0, DWORD dwK1);
void MIC_vUnInit(void);
// Append bytes to the message to be MICed
void MIC_vAppend(PBYTE src, unsigned int nBytes);
void MIC_vAppend(u8 * src, unsigned int nBytes);
// Get the MIC result. Destination should accept 8 bytes of result.
// This also resets the message to empty.
......
......@@ -32,27 +32,27 @@
#include "rc4.h"
void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len)
void rc4_init(PRC4Ext pRC4, u8 * pbyKey, unsigned int cbKey_len)
{
unsigned int ust1, ust2;
unsigned int keyindex;
unsigned int stateindex;
PBYTE pbyst;
u8 * pbyst;
unsigned int idx;
pbyst = pRC4->abystate;
pRC4->ux = 0;
pRC4->uy = 0;
for (idx = 0; idx < 256; idx++)
pbyst[idx] = (BYTE)idx;
pbyst[idx] = (u8)idx;
keyindex = 0;
stateindex = 0;
for (idx = 0; idx < 256; idx++) {
ust1 = pbyst[idx];
stateindex = (stateindex + pbyKey[keyindex] + ust1) & 0xff;
ust2 = pbyst[stateindex];
pbyst[stateindex] = (BYTE)ust1;
pbyst[idx] = (BYTE)ust2;
pbyst[stateindex] = (u8)ust1;
pbyst[idx] = (u8)ust2;
if (++keyindex >= cbKey_len)
keyindex = 0;
}
......@@ -63,7 +63,7 @@ unsigned int rc4_byte(PRC4Ext pRC4)
unsigned int ux;
unsigned int uy;
unsigned int ustx, usty;
PBYTE pbyst;
u8 * pbyst;
pbyst = pRC4->abystate;
ux = (pRC4->ux + 1) & 0xff;
......@@ -72,16 +72,16 @@ unsigned int rc4_byte(PRC4Ext pRC4)
usty = pbyst[uy];
pRC4->ux = ux;
pRC4->uy = uy;
pbyst[uy] = (BYTE)ustx;
pbyst[ux] = (BYTE)usty;
pbyst[uy] = (u8)ustx;
pbyst[ux] = (u8)usty;
return pbyst[(ustx + usty) & 0xff];
}
void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest,
PBYTE pbySrc, unsigned int cbData_len)
void rc4_encrypt(PRC4Ext pRC4, u8 * pbyDest,
u8 * pbySrc, unsigned int cbData_len)
{
unsigned int ii;
for (ii = 0; ii < cbData_len; ii++)
pbyDest[ii] = (BYTE)(pbySrc[ii] ^ rc4_byte(pRC4));
pbyDest[ii] = (u8)(pbySrc[ii] ^ rc4_byte(pRC4));
}
......@@ -37,12 +37,12 @@
typedef struct {
unsigned int ux;
unsigned int uy;
BYTE abystate[256];
u8 abystate[256];
} RC4Ext, *PRC4Ext;
void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len);
void rc4_init(PRC4Ext pRC4, u8 * pbyKey, unsigned int cbKey_len);
unsigned int rc4_byte(PRC4Ext pRC4);
void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc,
void rc4_encrypt(PRC4Ext pRC4, u8 * pbyDest, u8 * pbySrc,
unsigned int cbData_len);
#endif /* __RC4_H__ */
......@@ -74,43 +74,43 @@
typedef struct _CMD_MESSAGE
{
BYTE byData[256];
u8 byData[256];
} CMD_MESSAGE, *PCMD_MESSAGE;
typedef struct _CMD_WRITE_MASK
{
BYTE byData;
BYTE byMask;
u8 byData;
u8 byMask;
} CMD_WRITE_MASK, *PCMD_WRITE_MASK;
typedef struct _CMD_CARD_INIT
{
BYTE byInitClass;
BYTE bExistSWNetAddr;
BYTE bySWNetAddr[6];
BYTE byShortRetryLimit;
BYTE byLongRetryLimit;
u8 byInitClass;
u8 bExistSWNetAddr;
u8 bySWNetAddr[6];
u8 byShortRetryLimit;
u8 byLongRetryLimit;
} CMD_CARD_INIT, *PCMD_CARD_INIT;
typedef struct _RSP_CARD_INIT
{
BYTE byStatus;
BYTE byNetAddr[6];
BYTE byRFType;
BYTE byMinChannel;
BYTE byMaxChannel;
u8 byStatus;
u8 byNetAddr[6];
u8 byRFType;
u8 byMinChannel;
u8 byMaxChannel;
} RSP_CARD_INIT, *PRSP_CARD_INIT;
typedef struct _CMD_SET_KEY
{
WORD wKCTL;
BYTE abyMacAddr[6];
BYTE abyKey[16];
u8 abyMacAddr[6];
u8 abyKey[16];
} CMD_SET_KEY, *PCMD_SET_KEY;
typedef struct _CMD_CLRKEY_ENTRY
{
BYTE abyKeyEntry[11];
u8 abyKeyEntry[11];
} CMD_CLRKEY_ENTRY, *PCMD_CLRKEY_ENTRY;
typedef struct _CMD_WRITE_MISCFF
......@@ -120,29 +120,29 @@ typedef struct _CMD_WRITE_MISCFF
typedef struct _CMD_SET_TSFTBTT
{
BYTE abyTSF_TBTT[8];
u8 abyTSF_TBTT[8];
} CMD_SET_TSFTBTT, *PCMD_SET_TSFTBTT;
typedef struct _CMD_SET_SSTIFS
{
BYTE bySIFS;
BYTE byDIFS;
BYTE byEIFS;
BYTE bySlotTime;
BYTE byCwMax_Min;
BYTE byBBCR10;
u8 bySIFS;
u8 byDIFS;
u8 byEIFS;
u8 bySlotTime;
u8 byCwMax_Min;
u8 byBBCR10;
} CMD_SET_SSTIFS, *PCMD_SET_SSTIFS;
typedef struct _CMD_CHANGE_BBTYPE
{
BYTE bySIFS;
BYTE byDIFS;
BYTE byEIFS;
BYTE bySlotTime;
BYTE byCwMax_Min;
BYTE byBBCR10;
BYTE byBB_BBType; //CR88
BYTE byMAC_BBType;
u8 bySIFS;
u8 byDIFS;
u8 byEIFS;
u8 bySlotTime;
u8 byCwMax_Min;
u8 byBBCR10;
u8 byBB_BBType; //CR88
u8 byMAC_BBType;
DWORD dwRSPINF_b_1;
DWORD dwRSPINF_b_2;
DWORD dwRSPINF_b_55;
......
This diff is collapsed.
This diff is collapsed.
......@@ -86,34 +86,34 @@
// 2048 bits = 256 bytes = 128 words
//
typedef struct tagSSromReg {
BYTE abyPAR[6]; // 0x00 (WORD)
u8 abyPAR[6]; // 0x00 (WORD)
WORD wSUB_VID; // 0x03 (WORD)
WORD wSUB_SID;
BYTE byBCFG0; // 0x05 (WORD)
BYTE byBCFG1;
BYTE byFCR0; // 0x06 (WORD)
BYTE byFCR1;
BYTE byPMC0; // 0x07 (WORD)
BYTE byPMC1;
BYTE byMAXLAT; // 0x08 (WORD)
BYTE byMINGNT;
BYTE byCFG0; // 0x09 (WORD)
BYTE byCFG1;
u8 byBCFG0; // 0x05 (WORD)
u8 byBCFG1;
u8 byFCR0; // 0x06 (WORD)
u8 byFCR1;
u8 byPMC0; // 0x07 (WORD)
u8 byPMC1;
u8 byMAXLAT; // 0x08 (WORD)
u8 byMINGNT;
u8 byCFG0; // 0x09 (WORD)
u8 byCFG1;
WORD wCISPTR; // 0x0A (WORD)
WORD wRsv0; // 0x0B (WORD)
WORD wRsv1; // 0x0C (WORD)
BYTE byBBPAIR; // 0x0D (WORD)
BYTE byRFTYPE;
BYTE byMinChannel; // 0x0E (WORD)
BYTE byMaxChannel;
BYTE bySignature; // 0x0F (WORD)
BYTE byCheckSum;
BYTE abyReserved0[96]; // 0x10 (WORD)
BYTE abyCIS[128]; // 0x80 (WORD)
u8 byBBPAIR; // 0x0D (WORD)
u8 byRFTYPE;
u8 byMinChannel; // 0x0E (WORD)
u8 byMaxChannel;
u8 bySignature; // 0x0F (WORD)
u8 byCheckSum;
u8 abyReserved0[96]; // 0x10 (WORD)
u8 abyCIS[128]; // 0x80 (WORD)
} SSromReg, *PSSromReg;
/*--------------------- Export Macros ------------------------------*/
......
......@@ -132,13 +132,13 @@ static const DWORD s_adwCrc32Table[256] = {
* Return Value: CRC-32
*
-*/
DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed)
DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed)
{
DWORD dwCrc;
dwCrc = dwCrcSeed;
while (cbByte--) {
dwCrc = s_adwCrc32Table[(BYTE)((dwCrc ^ (*pbyData)) & 0xFF)] ^
dwCrc = s_adwCrc32Table[(u8)((dwCrc ^ (*pbyData)) & 0xFF)] ^
(dwCrc >> 8);
pbyData++;
}
......@@ -165,7 +165,7 @@ DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed)
* Return Value: CRC-32
*
-*/
DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte)
DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte)
{
return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL);
}
......@@ -191,7 +191,7 @@ DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte)
* Return Value: CRC-32
*
-*/
DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC)
DWORD CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, DWORD dwPreCRC)
{
return CRCdwCrc32(pbyData, cbByte, dwPreCRC);
}
......
......@@ -43,8 +43,8 @@
/*--------------------- Export Functions --------------------------*/
DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed);
DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte);
DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC);
DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed);
DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte);
DWORD CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, DWORD dwPreCRC);
#endif /* __TCRC_H__ */
......@@ -61,14 +61,14 @@
* Return Value: Hash value
*
*/
BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr)
u8 ETHbyGetHashIndexByCrc32(u8 * pbyMultiAddr)
{
int ii;
BYTE byTmpHash;
BYTE byHash = 0;
u8 byTmpHash;
u8 byHash = 0;
/* get the least 6-bits from CRC generator */
byTmpHash = (BYTE)(CRCdwCrc32(pbyMultiAddr, ETH_ALEN,
byTmpHash = (u8)(CRCdwCrc32(pbyMultiAddr, ETH_ALEN,
0xFFFFFFFFL) & 0x3F);
/* reverse most bit to least bit */
for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) {
......@@ -96,7 +96,7 @@ BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr)
* Return Value: true if ok; false if error.
*
*/
bool ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength)
bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength)
{
DWORD dwCRC;
......
......@@ -120,8 +120,8 @@
// Ethernet packet
//
typedef struct tagSEthernetHeader {
BYTE abyDstAddr[ETH_ALEN];
BYTE abySrcAddr[ETH_ALEN];
u8 abyDstAddr[ETH_ALEN];
u8 abySrcAddr[ETH_ALEN];
WORD wType;
} __attribute__ ((__packed__))
SEthernetHeader, *PSEthernetHeader;
......@@ -131,8 +131,8 @@ SEthernetHeader, *PSEthernetHeader;
// 802_3 packet
//
typedef struct tagS802_3Header {
BYTE abyDstAddr[ETH_ALEN];
BYTE abySrcAddr[ETH_ALEN];
u8 abyDstAddr[ETH_ALEN];
u8 abySrcAddr[ETH_ALEN];
WORD wLen;
} __attribute__ ((__packed__))
S802_3Header, *PS802_3Header;
......@@ -143,11 +143,11 @@ S802_3Header, *PS802_3Header;
typedef struct tagS802_11Header {
WORD wFrameCtl;
WORD wDurationID;
BYTE abyAddr1[ETH_ALEN];
BYTE abyAddr2[ETH_ALEN];
BYTE abyAddr3[ETH_ALEN];
u8 abyAddr1[ETH_ALEN];
u8 abyAddr2[ETH_ALEN];
u8 abyAddr3[ETH_ALEN];
WORD wSeqCtl;
BYTE abyAddr4[ETH_ALEN];
u8 abyAddr4[ETH_ALEN];
} __attribute__ ((__packed__))
S802_11Header, *PS802_11Header;
......@@ -159,8 +159,8 @@ S802_11Header, *PS802_11Header;
/*--------------------- Export Functions --------------------------*/
BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr);
//BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr);
bool ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength);
u8 ETHbyGetHashIndexByCrc32(u8 * pbyMultiAddr);
//u8 ETHbyGetHashIndexByCrc(u8 * pbyMultiAddr);
bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength);
#endif /* __TETHER_H__ */
......@@ -55,7 +55,7 @@
/* The 2nd table is the same as the 1st but with the upper and lower */
/* bytes swapped. To allow an endian tolerant implementation, the byte */
/* halves have been expressed independently here. */
const BYTE TKIP_Sbox_Lower[256] = {
const u8 TKIP_Sbox_Lower[256] = {
0xA5,0x84,0x99,0x8D,0x0D,0xBD,0xB1,0x54,
0x50,0x03,0xA9,0x7D,0x19,0x62,0xE6,0x9A,
0x45,0x9D,0x40,0x87,0x15,0xEB,0xC9,0x0B,
......@@ -90,7 +90,7 @@ const BYTE TKIP_Sbox_Lower[256] = {
0xC3,0xB0,0x77,0x11,0xCB,0xFC,0xD6,0x3A
};
const BYTE TKIP_Sbox_Upper[256] = {
const u8 TKIP_Sbox_Upper[256] = {
0xC6,0xF8,0xEE,0xF6,0xFF,0xD6,0xDE,0x91,
0x60,0x02,0xCE,0x56,0xE7,0xB5,0x4D,0xEC,
0x8F,0x1F,0x89,0xFA,0xEF,0xB2,0x8E,0xFB,
......@@ -182,11 +182,11 @@ static unsigned int rotr1(unsigned int a)
*
*/
void TKIPvMixKey(
PBYTE pbyTKey,
PBYTE pbyTA,
u8 * pbyTKey,
u8 * pbyTA,
WORD wTSC15_0,
DWORD dwTSC47_16,
PBYTE pbyRC4Key
u8 * pbyRC4Key
)
{
u32 p1k[5];
......
......@@ -47,11 +47,11 @@
/*--------------------- Export Functions --------------------------*/
void TKIPvMixKey(
PBYTE pbyTKey,
PBYTE pbyTA,
u8 * pbyTKey,
u8 * pbyTA,
WORD wTSC15_0,
DWORD dwTSC47_16,
PBYTE pbyRC4Key
u8 * pbyRC4Key
);
#endif /* __TKIP_H__ */
......@@ -34,10 +34,10 @@
/****** Common helper macros ***********************************************/
#if !defined(LOBYTE)
#define LOBYTE(w) ((BYTE)(w))
#define LOBYTE(w) ((u8)(w))
#endif
#if !defined(HIBYTE)
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
#define HIBYTE(w) ((u8)(((WORD)(w) >> 8) & 0xFF))
#endif
#if !defined(LOWORD)
......@@ -51,7 +51,7 @@
#define HIDWORD(q) ((q).u.dwHighDword)
#if !defined(MAKEWORD)
#define MAKEWORD(lb, hb) ((WORD)(((BYTE)(lb)) | (((WORD)((BYTE)(hb))) << 8)))
#define MAKEWORD(lb, hb) ((WORD)(((u8)(lb)) | (((WORD)((u8)(hb))) << 8)))
#endif
#if !defined(MAKEDWORD)
#define MAKEDWORD(lw, hw) ((DWORD)(((WORD)(lw)) | (((DWORD)((WORD)(hw))) << 16)))
......
......@@ -35,7 +35,6 @@
/****** Simple typedefs ***************************************************/
typedef u8 BYTE;
typedef u16 WORD;
typedef u32 DWORD;
......@@ -46,8 +45,6 @@ typedef u32 DWORD_PTR;
// boolean pointer
typedef BYTE * PBYTE;
typedef WORD * PWORD;
typedef DWORD * PDWORD;
......
......@@ -260,7 +260,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
+ WLAN_PROBEREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
+ sizeof(struct vnt_tx_mgmt));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
sFrame.len = WLAN_PROBEREQ_FR_MAXLEN;
vMgrEncodeProbeRequest(&sFrame);
sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
......@@ -845,7 +845,7 @@ void vRunCommand(struct vnt_private *pDevice)
{
int ntStatus = STATUS_SUCCESS;
BYTE byTmp;
u8 byTmp;
ntStatus = CONTROLnsRequestIn(pDevice,
MESSAGE_TYPE_READ,
......
......@@ -73,7 +73,7 @@ typedef enum tagCMD_STATUS {
typedef struct tagCMD_ITEM {
CMD_CODE eCmd;
BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
u8 abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
bool bNeedRadioOFF;
bool bRadioCmd;
bool bForceSCAN;
......
......@@ -213,8 +213,8 @@ bool WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader,
}
}
// reserve 8 byte to match MAC RX Buffer
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 8);
// pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (u8 *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 8);
// pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (u8 *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4);
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, pMACHeader, cbFrameLength);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength;
......@@ -229,7 +229,7 @@ bool WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader,
(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum == (pMACHeader->wSeqCtl & 0x000F)) &&
((pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength + cbFrameLength - uHeaderSize) < 2346)) {
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((PBYTE) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize));
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((u8 *) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize));
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength += (cbFrameLength - uHeaderSize);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += (cbFrameLength - uHeaderSize);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;
......
This diff is collapsed.
......@@ -45,12 +45,12 @@
/*--------------------- Static Variables --------------------------*/
static int msglevel =MSG_LEVEL_INFO;
const BYTE abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 };
const BYTE abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 };
const BYTE abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 };
const BYTE abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 };
const BYTE abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 };
const BYTE abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 };
const u8 abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 };
const u8 abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 };
const u8 abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 };
const u8 abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 };
const u8 abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 };
const u8 abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 };
/*+
......@@ -112,7 +112,7 @@ WPA_ParseRSN(
{
PWLAN_IE_RSN_AUTH pIE_RSN_Auth = NULL;
int i, j, m, n = 0;
PBYTE pbyCaps;
u8 * pbyCaps;
WPA_ClearRSN(pBSSList);
......@@ -209,7 +209,7 @@ WPA_ParseRSN(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4);
if(pRSN->len+2 >= 14+4+(m+n)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*n)+Cap(2)
pbyCaps = (PBYTE)pIE_RSN_Auth->AuthKSList[n].abyOUI;
pbyCaps = (u8 *)pIE_RSN_Auth->AuthKSList[n].abyOUI;
pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG;
pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS);
pBSSList->sRSNCapObj.bRSNCapExist = true;
......@@ -241,13 +241,13 @@ WPA_ParseRSN(
-*/
bool
WPA_SearchRSN(
BYTE byCmd,
BYTE byEncrypt,
u8 byCmd,
u8 byEncrypt,
PKnownBSS pBSSList
)
{
int ii;
BYTE byPKType = WPA_NONE;
u8 byPKType = WPA_NONE;
if (pBSSList->bWPAValid == false)
return false;
......
......@@ -71,8 +71,8 @@ WPA_ParseRSN(
bool
WPA_SearchRSN(
BYTE byCmd,
BYTE byEncrypt,
u8 byCmd,
u8 byEncrypt,
PKnownBSS pBSSList
);
......
......@@ -41,14 +41,14 @@ static int msglevel =MSG_LEVEL_INFO;
/*--------------------- Static Variables --------------------------*/
const BYTE abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 };
const BYTE abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const BYTE abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 };
const BYTE abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 };
const BYTE abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 };
const u8 abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 };
const u8 abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const u8 abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 };
const u8 abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 };
const u8 abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 };
const BYTE abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const BYTE abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 };
const u8 abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const u8 abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 };
/*--------------------- Static Functions --------------------------*/
......@@ -114,7 +114,7 @@ WPA2vParseRSN (
{
int i, j;
WORD m = 0, n = 0;
PBYTE pbyOUI;
u8 * pbyOUI;
bool bUseGK = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len);
......@@ -167,7 +167,7 @@ WPA2vParseRSN (
j = 0;
pbyOUI = &(pRSN->abyRSN[6]);
for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(BYTE)); i++) {
for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(u8)); i++) {
if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i)
if ( !memcmp(pbyOUI, abyOUIGK, 4)) {
......@@ -218,7 +218,7 @@ WPA2vParseRSN (
pBSSNode->wAKMSSAuthCount = *((PWORD) &(pRSN->abyRSN[6+4*m]));
j = 0;
pbyOUI = &(pRSN->abyRSN[8+4*m]);
for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(BYTE)); i++) {
for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(u8)); i++) {
if (pRSN->len >= 10+(m+i)*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSS(2)+AKS(4*i)
if ( !memcmp(pbyOUI, abyOUI8021X, 4))
pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_802_1X;
......@@ -274,7 +274,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs)
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
(pMgmt->pCurrBSS != NULL)) {
/* WPA2 IE */
pbyBuffer = (PBYTE) pRSNIEs;
pbyBuffer = (u8 *) pRSNIEs;
pRSNIEs->byElementID = WLAN_EID_RSN;
pRSNIEs->len = 6; //Version(2)+GK(4)
pRSNIEs->wVersion = 1;
......
......@@ -40,8 +40,8 @@
#define MAX_PMKID_CACHE 16
typedef struct tagsPMKIDInfo {
BYTE abyBSSID[6];
BYTE abyPMKID[16];
u8 abyBSSID[6];
u8 abyPMKID[16];
} PMKIDInfo, *PPMKIDInfo;
typedef struct tagSPMKIDCache {
......
......@@ -72,10 +72,10 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
struct viawget_wpa_param *param = ctx;
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
DWORD dwKeyIndex = 0;
BYTE abyKey[MAX_KEY_LEN];
BYTE abySeq[MAX_KEY_LEN];
u8 abyKey[MAX_KEY_LEN];
u8 abySeq[MAX_KEY_LEN];
u64 KeyRSC;
BYTE byKeyDecMode = KEY_CTL_WEP;
u8 byKeyDecMode = KEY_CTL_WEP;
int ret = 0;
int uu;
int ii;
......@@ -108,7 +108,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
return -EINVAL;
} else {
if (param->u.wpa_key.set_tx) {
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (u8)dwKeyIndex;
pDevice->bTransmitKey = true;
dwKeyIndex |= (1 << 31);
}
......@@ -204,7 +204,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
if ((KeybSetAllGroupKey(pDevice, &(pDevice->sKey), dwKeyIndex,
param->u.wpa_key.key_len,
&KeyRSC,
(PBYTE)abyKey,
(u8 *)abyKey,
byKeyDecMode
) == true) &&
(KeybSetDefaultKey(pDevice,
......@@ -212,7 +212,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
dwKeyIndex,
param->u.wpa_key.key_len,
&KeyRSC,
(PBYTE)abyKey,
(u8 *)abyKey,
byKeyDecMode
) == true) ) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n");
......@@ -234,7 +234,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
}
if (KeybSetKey(pDevice, &(pDevice->sKey), &param->addr[0],
dwKeyIndex, param->u.wpa_key.key_len,
&KeyRSC, (PBYTE)abyKey, byKeyDecMode
&KeyRSC, (u8 *)abyKey, byKeyDecMode
) == true) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n");
} else {
......@@ -250,7 +250,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
}
} // BSSID not 0xffffffffffff
if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) {
pDevice->byKeyIndex = (BYTE)param->u.wpa_key.key_index;
pDevice->byKeyIndex = (u8)param->u.wpa_key.key_index;
pDevice->bTransmitKey = true;
}
pDevice->bEncryptionEnable = true;
......
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