Staging: vt6655: remove BYTE typedef

Replace all occurrences with unsigned char type.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Charles Clément 2010-06-24 11:02:27 -07:00 committed by Greg Kroah-Hartman
parent 2986db5fd3
commit 3fc9b584c2
55 changed files with 961 additions and 963 deletions

View File

@ -290,7 +290,7 @@
#define IEEE_ADDR_GROUP 0x01
typedef struct {
BYTE abyAddr[6];
unsigned char abyAddr[6];
} IEEE_ADDR, *PIEEE_ADDR;
/* 802.11 Header Format */
@ -299,8 +299,8 @@ typedef struct tagWLAN_80211HDR_A2 {
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
unsigned char abyAddr1[WLAN_ADDR_LEN];
unsigned char abyAddr2[WLAN_ADDR_LEN];
} __attribute__ ((__packed__))
WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
@ -309,9 +309,9 @@ typedef struct tagWLAN_80211HDR_A3 {
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN];
unsigned char abyAddr1[WLAN_ADDR_LEN];
unsigned char abyAddr2[WLAN_ADDR_LEN];
unsigned char abyAddr3[WLAN_ADDR_LEN];
unsigned short wSeqCtl;
}__attribute__ ((__packed__))
@ -321,11 +321,11 @@ typedef struct tagWLAN_80211HDR_A4 {
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN];
unsigned char abyAddr1[WLAN_ADDR_LEN];
unsigned char abyAddr2[WLAN_ADDR_LEN];
unsigned char abyAddr3[WLAN_ADDR_LEN];
unsigned short wSeqCtl;
BYTE abyAddr4[WLAN_ADDR_LEN];
unsigned char abyAddr4[WLAN_ADDR_LEN];
} __attribute__ ((__packed__))
WLAN_80211HDR_A4, *PWLAN_80211HDR_A4;

View File

@ -230,8 +230,8 @@
#pragma pack(1)
typedef struct tagWLAN_IE {
BYTE byElementID;
BYTE len;
unsigned char byElementID;
unsigned char len;
}__attribute__ ((__packed__))
WLAN_IE, *PWLAN_IE;
@ -239,9 +239,9 @@ WLAN_IE, *PWLAN_IE;
// Service Set Identity (SSID)
#pragma pack(1)
typedef struct tagWLAN_IE_SSID {
BYTE byElementID;
BYTE len;
BYTE abySSID[1];
unsigned char byElementID;
unsigned char len;
unsigned char abySSID[1];
}__attribute__ ((__packed__))
WLAN_IE_SSID, *PWLAN_IE_SSID;
@ -249,9 +249,9 @@ WLAN_IE_SSID, *PWLAN_IE_SSID;
// Supported Rates
#pragma pack(1)
typedef struct tagWLAN_IE_SUPP_RATES {
BYTE byElementID;
BYTE len;
BYTE abyRates[1];
unsigned char byElementID;
unsigned char len;
unsigned char abyRates[1];
}__attribute__ ((__packed__))
WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
@ -260,20 +260,20 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
// FH Parameter Set
#pragma pack(1)
typedef struct _WLAN_IE_FH_PARMS {
BYTE byElementID;
BYTE len;
unsigned char byElementID;
unsigned char len;
unsigned short wDwellTime;
BYTE byHopSet;
BYTE byHopPattern;
BYTE byHopIndex;
unsigned char byHopSet;
unsigned char byHopPattern;
unsigned char byHopIndex;
} WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS;
// DS Parameter Set
#pragma pack(1)
typedef struct tagWLAN_IE_DS_PARMS {
BYTE byElementID;
BYTE len;
BYTE byCurrChannel;
unsigned char byElementID;
unsigned char len;
unsigned char byCurrChannel;
}__attribute__ ((__packed__))
WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS;
@ -281,10 +281,10 @@ WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS;
// CF Parameter Set
#pragma pack(1)
typedef struct tagWLAN_IE_CF_PARMS {
BYTE byElementID;
BYTE len;
BYTE byCFPCount;
BYTE byCFPPeriod;
unsigned char byElementID;
unsigned char len;
unsigned char byCFPCount;
unsigned char byCFPPeriod;
unsigned short wCFPMaxDuration;
unsigned short wCFPDurRemaining;
}__attribute__ ((__packed__))
@ -294,12 +294,12 @@ WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
// TIM
#pragma pack(1)
typedef struct tagWLAN_IE_TIM {
BYTE byElementID;
BYTE len;
BYTE byDTIMCount;
BYTE byDTIMPeriod;
BYTE byBitMapCtl;
BYTE byVirtBitMap[1];
unsigned char byElementID;
unsigned char len;
unsigned char byDTIMCount;
unsigned char byDTIMPeriod;
unsigned char byBitMapCtl;
unsigned char byVirtBitMap[1];
}__attribute__ ((__packed__))
WLAN_IE_TIM, *PWLAN_IE_TIM;
@ -307,8 +307,8 @@ WLAN_IE_TIM, *PWLAN_IE_TIM;
// IBSS Parameter Set
#pragma pack(1)
typedef struct tagWLAN_IE_IBSS_PARMS {
BYTE byElementID;
BYTE len;
unsigned char byElementID;
unsigned char len;
unsigned short wATIMWindow;
}__attribute__ ((__packed__))
WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
@ -317,23 +317,23 @@ WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
// Challenge Text
#pragma pack(1)
typedef struct tagWLAN_IE_CHALLENGE {
BYTE byElementID;
BYTE len;
BYTE abyChallenge[1];
unsigned char byElementID;
unsigned char len;
unsigned char abyChallenge[1];
}__attribute__ ((__packed__))
WLAN_IE_CHALLENGE, *PWLAN_IE_CHALLENGE;
#pragma pack(1)
typedef struct tagWLAN_IE_RSN_EXT {
BYTE byElementID;
BYTE len;
BYTE abyOUI[4];
unsigned char byElementID;
unsigned char len;
unsigned char abyOUI[4];
unsigned short wVersion;
BYTE abyMulticast[4];
unsigned char abyMulticast[4];
unsigned short wPKCount;
struct {
BYTE abyOUI[4];
unsigned char abyOUI[4];
} PKSList[1]; // the rest is variable so need to
// overlay ieauth structure
} WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
@ -342,59 +342,59 @@ typedef struct tagWLAN_IE_RSN_EXT {
typedef struct tagWLAN_IE_RSN_AUTH {
unsigned short wAuthCount;
struct {
BYTE abyOUI[4];
unsigned char abyOUI[4];
} AuthKSList[1];
} WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
// RSN Identity
#pragma pack(1)
typedef struct tagWLAN_IE_RSN {
BYTE byElementID;
BYTE len;
unsigned char byElementID;
unsigned char len;
unsigned short wVersion;
BYTE abyRSN[WLAN_MIN_ARRAY];
unsigned char abyRSN[WLAN_MIN_ARRAY];
} WLAN_IE_RSN, *PWLAN_IE_RSN;
// ERP
#pragma pack(1)
typedef struct tagWLAN_IE_ERP {
BYTE byElementID;
BYTE len;
BYTE byContext;
unsigned char byElementID;
unsigned char len;
unsigned char byContext;
}__attribute__ ((__packed__))
WLAN_IE_ERP, *PWLAN_IE_ERP;
#pragma pack(1)
typedef struct _MEASEURE_REQ {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
unsigned char byChannel;
unsigned char abyStartTime[8];
unsigned char abyDuration[2];
} MEASEURE_REQ, *PMEASEURE_REQ,
MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
typedef struct _MEASEURE_REP_BASIC {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
BYTE byMap;
unsigned char byChannel;
unsigned char abyStartTime[8];
unsigned char abyDuration[2];
unsigned char byMap;
} MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
typedef struct _MEASEURE_REP_CCA {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
BYTE byCCABusyFraction;
unsigned char byChannel;
unsigned char abyStartTime[8];
unsigned char abyDuration[2];
unsigned char byCCABusyFraction;
} MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
typedef struct _MEASEURE_REP_RPI {
BYTE byChannel;
BYTE abyStartTime[8];
BYTE abyDuration[2];
BYTE abyRPIdensity[8];
unsigned char byChannel;
unsigned char abyStartTime[8];
unsigned char abyDuration[2];
unsigned char abyRPIdensity[8];
} MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
typedef union _MEASEURE_REP {
@ -406,85 +406,85 @@ typedef union _MEASEURE_REP {
} MEASEURE_REP, *PMEASEURE_REP;
typedef struct _WLAN_IE_MEASURE_REQ {
BYTE byElementID;
BYTE len;
BYTE byToken;
BYTE byMode;
BYTE byType;
unsigned char byElementID;
unsigned char len;
unsigned char byToken;
unsigned char byMode;
unsigned char byType;
MEASEURE_REQ sReq;
} WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
typedef struct _WLAN_IE_MEASURE_REP {
BYTE byElementID;
BYTE len;
BYTE byToken;
BYTE byMode;
BYTE byType;
unsigned char byElementID;
unsigned char len;
unsigned char byToken;
unsigned char byMode;
unsigned char byType;
MEASEURE_REP sRep;
} WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
typedef struct _WLAN_IE_CH_SW {
BYTE byElementID;
BYTE len;
BYTE byMode;
BYTE byChannel;
BYTE byCount;
unsigned char byElementID;
unsigned char len;
unsigned char byMode;
unsigned char byChannel;
unsigned char byCount;
} WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
typedef struct _WLAN_IE_QUIET {
BYTE byElementID;
BYTE len;
BYTE byQuietCount;
BYTE byQuietPeriod;
BYTE abyQuietDuration[2];
BYTE abyQuietOffset[2];
unsigned char byElementID;
unsigned char len;
unsigned char byQuietCount;
unsigned char byQuietPeriod;
unsigned char abyQuietDuration[2];
unsigned char abyQuietOffset[2];
} WLAN_IE_QUIET, *PWLAN_IE_QUIET;
typedef struct _WLAN_IE_COUNTRY {
BYTE byElementID;
BYTE len;
BYTE abyCountryString[3];
BYTE abyCountryInfo[3];
unsigned char byElementID;
unsigned char len;
unsigned char abyCountryString[3];
unsigned char abyCountryInfo[3];
} WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
typedef struct _WLAN_IE_PW_CONST {
BYTE byElementID;
BYTE len;
BYTE byPower;
unsigned char byElementID;
unsigned char len;
unsigned char byPower;
} WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
typedef struct _WLAN_IE_PW_CAP {
BYTE byElementID;
BYTE len;
BYTE byMinPower;
BYTE byMaxPower;
unsigned char byElementID;
unsigned char len;
unsigned char byMinPower;
unsigned char byMaxPower;
} WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
typedef struct _WLAN_IE_SUPP_CH {
BYTE byElementID;
BYTE len;
BYTE abyChannelTuple[2];
unsigned char byElementID;
unsigned char len;
unsigned char abyChannelTuple[2];
} WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
typedef struct _WLAN_IE_TPC_REQ {
BYTE byElementID;
BYTE len;
unsigned char byElementID;
unsigned char len;
} WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
typedef struct _WLAN_IE_TPC_REP {
BYTE byElementID;
BYTE len;
BYTE byTxPower;
BYTE byLinkMargin;
unsigned char byElementID;
unsigned char len;
unsigned char byTxPower;
unsigned char byLinkMargin;
} WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
typedef struct _WLAN_IE_IBSS_DFS {
BYTE byElementID;
BYTE len;
BYTE abyDFSOwner[6];
BYTE byDFSRecovery;
BYTE abyChannelMap[2];
unsigned char byElementID;
unsigned char len;
unsigned char abyDFSOwner[6];
unsigned char byDFSRecovery;
unsigned char abyChannelMap[2];
} WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
#pragma pack()

View File

@ -47,40 +47,40 @@ static int msglevel =MSG_LEVEL_INFO;
typedef struct _WLAN_FRAME_ACTION {
WLAN_80211HDR_A3 Header;
BYTE byCategory;
BYTE byAction;
BYTE abyVars[1];
unsigned char byCategory;
unsigned char byAction;
unsigned char abyVars[1];
} WLAN_FRAME_ACTION, *PWLAN_FRAME_ACTION;
typedef struct _WLAN_FRAME_MSRREQ {
WLAN_80211HDR_A3 Header;
BYTE byCategory;
BYTE byAction;
BYTE byDialogToken;
unsigned char byCategory;
unsigned char byAction;
unsigned char byDialogToken;
WLAN_IE_MEASURE_REQ sMSRReqEIDs[1];
} WLAN_FRAME_MSRREQ, *PWLAN_FRAME_MSRREQ;
typedef struct _WLAN_FRAME_MSRREP {
WLAN_80211HDR_A3 Header;
BYTE byCategory;
BYTE byAction;
BYTE byDialogToken;
unsigned char byCategory;
unsigned char byAction;
unsigned char byDialogToken;
WLAN_IE_MEASURE_REP sMSRRepEIDs[1];
} WLAN_FRAME_MSRREP, *PWLAN_FRAME_MSRREP;
typedef struct _WLAN_FRAME_TPCREQ {
WLAN_80211HDR_A3 Header;
BYTE byCategory;
BYTE byAction;
BYTE byDialogToken;
unsigned char byCategory;
unsigned char byAction;
unsigned char byDialogToken;
WLAN_IE_TPC_REQ sTPCReqEIDs;
} WLAN_FRAME_TPCREQ, *PWLAN_FRAME_TPCREQ;
typedef struct _WLAN_FRAME_TPCREP {
WLAN_80211HDR_A3 Header;
BYTE byCategory;
BYTE byAction;
BYTE byDialogToken;
unsigned char byCategory;
unsigned char byAction;
unsigned char byDialogToken;
WLAN_IE_TPC_REP sTPCRepEIDs;
} WLAN_FRAME_TPCREP, *PWLAN_FRAME_TPCREP;
@ -118,7 +118,7 @@ static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
}
static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, BYTE byRate, BYTE byRSSI)
static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned char byRate, unsigned char byRSSI)
{
PWLAN_FRAME_TPCREP pFrame;
PSTxMgmtPacket pTxPacket = NULL;
@ -235,7 +235,7 @@ IEEE11hbMgrRxAction (
return (s_bRxTPCReq(pMgmt,
(PWLAN_FRAME_TPCREQ) pAction,
((PSRxMgmtPacket)pRxPacket)->byRxRate,
(BYTE) ((PSRxMgmtPacket)pRxPacket)->uRSSI));
(unsigned char) ((PSRxMgmtPacket)pRxPacket)->uRSSI));
break;
case ACTION_TPCREP:
break;

View File

@ -46,7 +46,7 @@
* SBOX Table
*/
BYTE sbox_table[256] =
unsigned char 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,
@ -66,7 +66,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] = {
unsigned char 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,
@ -85,7 +85,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] = {
unsigned char 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,
@ -110,7 +110,7 @@ BYTE dot3_table[256] = {
/*--------------------- Export Functions --------------------------*/
void xor_128(BYTE *a, BYTE *b, BYTE *out)
void xor_128(unsigned char *a, unsigned char *b, unsigned char *out)
{
unsigned long *dwPtrA = (unsigned long *) a;
unsigned long *dwPtrB = (unsigned long *) b;
@ -123,7 +123,7 @@ unsigned long *dwPtrOut =(unsigned long *) out;
}
void xor_32(BYTE *a, BYTE *b, BYTE *out)
void xor_32(unsigned char *a, unsigned char *b, unsigned char *out)
{
unsigned long *dwPtrA = (unsigned long *) a;
unsigned long *dwPtrB = (unsigned long *) b;
@ -132,10 +132,10 @@ unsigned long *dwPtrOut =(unsigned long *) out;
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
}
void AddRoundKey(BYTE *key, int round)
void AddRoundKey(unsigned char *key, int round)
{
BYTE sbox_key[4];
BYTE rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};
unsigned char sbox_key[4];
unsigned char 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]];
@ -150,7 +150,7 @@ BYTE rcon_table[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x
xor_32(&key[12], &key[8], &key[12]);
}
void SubBytes(BYTE *in, BYTE *out)
void SubBytes(unsigned char *in, unsigned char *out)
{
int i;
@ -160,7 +160,7 @@ int i;
}
}
void ShiftRows(BYTE *in, BYTE *out)
void ShiftRows(unsigned char *in, unsigned char *out)
{
out[0] = in[0];
out[1] = in[5];
@ -180,7 +180,7 @@ void ShiftRows(BYTE *in, BYTE *out)
out[15] = in[11];
}
void MixColumns(BYTE *in, BYTE *out)
void MixColumns(unsigned char *in, unsigned char *out)
{
out[0] = dot2_table[in[0]] ^ dot3_table[in[1]] ^ in[2] ^ in[3];
@ -190,13 +190,13 @@ void MixColumns(BYTE *in, BYTE *out)
}
void AESv128(BYTE *key, BYTE *data, BYTE *ciphertext)
void AESv128(unsigned char *key, unsigned char *data, unsigned char *ciphertext)
{
int i;
int round;
BYTE TmpdataA[16];
BYTE TmpdataB[16];
BYTE abyRoundKey[16];
unsigned char TmpdataA[16];
unsigned char TmpdataB[16];
unsigned char abyRoundKey[16];
for(i=0; i<16; i++)
abyRoundKey[i] = key[i];
@ -245,15 +245,15 @@ BYTE abyRoundKey[16];
*/
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short 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];
unsigned char abyNonce[13];
unsigned char MIC_IV[16];
unsigned char MIC_HDR1[16];
unsigned char MIC_HDR2[16];
unsigned char abyMIC[16];
unsigned char abyCTRPLD[16];
unsigned char abyTmp[16];
unsigned char abyPlainText[16];
unsigned char abyLastCipher[16];
PS802_11Header pMACHeader = (PS802_11Header) pbyFrame;
unsigned char *pbyIV;
@ -261,7 +261,7 @@ unsigned char *pbyPayload;
unsigned short wHLen = 22;
unsigned short wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
BOOL bA4 = FALSE;
BYTE byTmp;
unsigned char byTmp;
unsigned short wCnt;
int ii,jj,kk;
@ -288,15 +288,15 @@ int ii,jj,kk;
//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] = (unsigned char)(wPayloadSize >> 8);
MIC_IV[15] = (unsigned char)(wPayloadSize & 0xff);
//MIC_HDR1
MIC_HDR1[0] = (BYTE)(wHLen >> 8);
MIC_HDR1[1] = (BYTE)(wHLen & 0xff);
byTmp = (BYTE)(pMACHeader->wFrameCtl & 0xff);
MIC_HDR1[0] = (unsigned char)(wHLen >> 8);
MIC_HDR1[1] = (unsigned char)(wHLen & 0xff);
byTmp = (unsigned char)(pMACHeader->wFrameCtl & 0xff);
MIC_HDR1[2] = byTmp & 0x8f;
byTmp = (BYTE)(pMACHeader->wFrameCtl >> 8);
byTmp = (unsigned char)(pMACHeader->wFrameCtl >> 8);
byTmp &= 0x87;
MIC_HDR1[3] = byTmp | 0x40;
memcpy(&(MIC_HDR1[4]), pMACHeader->abyAddr1, ETH_ALEN);
@ -304,7 +304,7 @@ int ii,jj,kk;
//MIC_HDR2
memcpy(&(MIC_HDR2[0]), pMACHeader->abyAddr3, ETH_ALEN);
byTmp = (BYTE)(pMACHeader->wSeqCtl & 0xff);
byTmp = (unsigned char)(pMACHeader->wSeqCtl & 0xff);
MIC_HDR2[6] = byTmp & 0x0f;
MIC_HDR2[7] = 0;
if ( bA4 ) {
@ -337,8 +337,8 @@ int ii,jj,kk;
for(jj=wPayloadSize; jj>16; jj=jj-16) {
abyCTRPLD[14] = (BYTE) (wCnt >> 8);
abyCTRPLD[15] = (BYTE) (wCnt & 0xff);
abyCTRPLD[14] = (unsigned char) (wCnt >> 8);
abyCTRPLD[15] = (unsigned char) (wCnt & 0xff);
AESv128(pbyRxKey,abyCTRPLD,abyTmp);
@ -361,8 +361,8 @@ int ii,jj,kk;
abyLastCipher[ii] = 0x00;
}
abyCTRPLD[14] = (BYTE) (wCnt >> 8);
abyCTRPLD[15] = (BYTE) (wCnt & 0xff);
abyCTRPLD[14] = (unsigned char) (wCnt >> 8);
abyCTRPLD[15] = (unsigned char) (wCnt & 0xff);
AESv128(pbyRxKey,abyCTRPLD,abyTmp);
for ( kk=0; kk<16; kk++ ) {
@ -384,8 +384,8 @@ int ii,jj,kk;
//--------------------------------------------
wCnt = 0;
abyCTRPLD[14] = (BYTE) (wCnt >> 8);
abyCTRPLD[15] = (BYTE) (wCnt & 0xff);
abyCTRPLD[14] = (unsigned char) (wCnt >> 8);
abyCTRPLD[15] = (unsigned char) (wCnt & 0xff);
AESv128(pbyRxKey,abyCTRPLD,abyTmp);
for ( kk=0; kk<8; kk++ ) {
abyTmp[kk] = abyTmp[kk] ^ pbyPayload[kk];

View File

@ -79,7 +79,7 @@ static int msglevel =MSG_LEVEL_INFO;
#define CB_VT3253_INIT_FOR_RFMD 446
BYTE byVT3253InitTab_RFMD[CB_VT3253_INIT_FOR_RFMD][2] = {
unsigned char byVT3253InitTab_RFMD[CB_VT3253_INIT_FOR_RFMD][2] = {
{0x00, 0x30},
{0x01, 0x00},
{0x02, 0x00},
@ -529,7 +529,7 @@ BYTE byVT3253InitTab_RFMD[CB_VT3253_INIT_FOR_RFMD][2] = {
};
#define CB_VT3253B0_INIT_FOR_RFMD 256
BYTE byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
{0x00, 0x31},
{0x01, 0x00},
{0x02, 0x00},
@ -790,7 +790,7 @@ BYTE byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
#define CB_VT3253B0_AGC_FOR_RFMD2959 195
// For RFMD2959
BYTE byVT3253B0_AGC4_RFMD2959[CB_VT3253B0_AGC_FOR_RFMD2959][2] = {
unsigned char byVT3253B0_AGC4_RFMD2959[CB_VT3253B0_AGC_FOR_RFMD2959][2] = {
{0xF0, 0x00},
{0xF1, 0x3E},
{0xF0, 0x80},
@ -990,7 +990,7 @@ BYTE byVT3253B0_AGC4_RFMD2959[CB_VT3253B0_AGC_FOR_RFMD2959][2] = {
#define CB_VT3253B0_INIT_FOR_AIROHA2230 256
// For AIROHA
BYTE byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = {
unsigned char byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = {
{0x00, 0x31},
{0x01, 0x00},
{0x02, 0x00},
@ -1254,7 +1254,7 @@ BYTE byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = {
#define CB_VT3253B0_INIT_FOR_UW2451 256
//For UW2451
BYTE byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = {
unsigned char byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = {
{0x00, 0x31},
{0x01, 0x00},
{0x02, 0x00},
@ -1516,7 +1516,7 @@ BYTE byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = {
#define CB_VT3253B0_AGC 193
// For AIROHA
BYTE byVT3253B0_AGC[CB_VT3253B0_AGC][2] = {
unsigned char byVT3253B0_AGC[CB_VT3253B0_AGC][2] = {
{0xF0, 0x00},
{0xF1, 0x00},
{0xF0, 0x80},
@ -1778,8 +1778,8 @@ s_vChangeAntenna (
*/
unsigned int
BBuGetFrameTime (
BYTE byPreambleType,
BYTE byPktType,
unsigned char byPreambleType,
unsigned char byPktType,
unsigned int cbFrameLength,
unsigned short wRate
)
@ -1848,7 +1848,7 @@ BBvCaculateParameter (
PSDevice pDevice,
unsigned int cbFrameLength,
unsigned short wRate,
BYTE byPacketType,
unsigned char byPacketType,
unsigned short *pwPhyLen,
unsigned char *pbyPhySrv,
unsigned char *pbyPhySgn
@ -1858,7 +1858,7 @@ BBvCaculateParameter (
unsigned int cbUsCount = 0;
unsigned int cbTmp;
BOOL bExtBit;
BYTE byPreambleType = pDevice->byPreambleType;
unsigned char byPreambleType = pDevice->byPreambleType;
BOOL bCCK = pDevice->bCCK;
cbBitCount = cbFrameLength * 8;
@ -2015,10 +2015,10 @@ BBvCaculateParameter (
* Return Value: TRUE if succeeded; FALSE if failed.
*
*/
BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyData)
BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
{
unsigned short ww;
BYTE byValue;
unsigned char byValue;
// BB reg offset
VNSvOutPortB(dwIoBase + MAC_REG_BBREGADR, byBBAddr);
@ -2058,10 +2058,10 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyDa
* Return Value: TRUE if succeeded; FALSE if failed.
*
*/
BOOL BBbWriteEmbeded (unsigned long dwIoBase, BYTE byBBAddr, BYTE byData)
BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData)
{
unsigned short ww;
BYTE byValue;
unsigned char byValue;
// BB reg offset
VNSvOutPortB(dwIoBase + MAC_REG_BBREGADR, byBBAddr);
@ -2100,9 +2100,9 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, BYTE byBBAddr, BYTE byData)
* Return Value: TRUE if all TestBits are set; FALSE otherwise.
*
*/
BOOL BBbIsRegBitsOn (unsigned long dwIoBase, BYTE byBBAddr, BYTE byTestBits)
BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
{
BYTE byOrgData;
unsigned char byOrgData;
BBbReadEmbeded(dwIoBase, byBBAddr, &byOrgData);
return (byOrgData & byTestBits) == byTestBits;
@ -2123,9 +2123,9 @@ BOOL BBbIsRegBitsOn (unsigned long dwIoBase, BYTE byBBAddr, BYTE byTestBits)
* Return Value: TRUE if all TestBits are clear; FALSE otherwise.
*
*/
BOOL BBbIsRegBitsOff (unsigned long dwIoBase, BYTE byBBAddr, BYTE byTestBits)
BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
{
BYTE byOrgData;
unsigned char byOrgData;
BBbReadEmbeded(dwIoBase, byBBAddr, &byOrgData);
return (byOrgData & byTestBits) == 0;
@ -2151,8 +2151,8 @@ BOOL BBbVT3253Init (PSDevice pDevice)
BOOL bResult = TRUE;
int ii;
unsigned long dwIoBase = pDevice->PortOffset;
BYTE byRFType = pDevice->byRFType;
BYTE byLocalID = pDevice->byLocalID;
unsigned char byRFType = pDevice->byRFType;
unsigned char byLocalID = pDevice->byLocalID;
if (byRFType == RF_RFMD2959) {
if (byLocalID <= REV_ID_VT3253_A1) {
@ -2324,9 +2324,9 @@ BOOL BBbVT3253Init (PSDevice pDevice)
void BBvReadAllRegs (unsigned long dwIoBase, unsigned char *pbyBBRegs)
{
int ii;
BYTE byBase = 1;
unsigned char byBase = 1;
for (ii = 0; ii < BB_MAX_CONTEXT_SIZE; ii++) {
BBbReadEmbeded(dwIoBase, (BYTE)(ii*byBase), pbyBBRegs);
BBbReadEmbeded(dwIoBase, (unsigned char)(ii*byBase), pbyBBRegs);
pbyBBRegs += byBase;
}
}
@ -2348,7 +2348,7 @@ void BBvReadAllRegs (unsigned long dwIoBase, unsigned char *pbyBBRegs)
void BBvLoopbackOn (PSDevice pDevice)
{
BYTE byData;
unsigned char byData;
unsigned long dwIoBase = pDevice->PortOffset;
//CR C9 = 0x00
@ -2363,7 +2363,7 @@ void BBvLoopbackOn (PSDevice pDevice)
if (pDevice->uConnectionRate <= RATE_11M) { //CCK
// Enable internal digital loopback: CR33 |= 0000 0001
BBbReadEmbeded(dwIoBase, 0x21, &byData);//CR33
BBbWriteEmbeded(dwIoBase, 0x21, (BYTE)(byData | 0x01));//CR33
BBbWriteEmbeded(dwIoBase, 0x21, (unsigned char)(byData | 0x01));//CR33
// CR154 = 0x00
BBbWriteEmbeded(dwIoBase, 0x9A, 0); //CR154
@ -2372,7 +2372,7 @@ void BBvLoopbackOn (PSDevice pDevice)
else { //OFDM
// Enable internal digital loopback:CR154 |= 0000 0001
BBbReadEmbeded(dwIoBase, 0x9A, &byData);//CR154
BBbWriteEmbeded(dwIoBase, 0x9A, (BYTE)(byData | 0x01));//CR154
BBbWriteEmbeded(dwIoBase, 0x9A, (unsigned char)(byData | 0x01));//CR154
// CR33 = 0x00
BBbWriteEmbeded(dwIoBase, 0x21, 0); //CR33
@ -2384,7 +2384,7 @@ void BBvLoopbackOn (PSDevice pDevice)
// Disable TX_IQUN
BBbReadEmbeded(pDevice->PortOffset, 0x09, &pDevice->byBBCR09);
BBbWriteEmbeded(pDevice->PortOffset, 0x09, (BYTE)(pDevice->byBBCR09 & 0xDE));
BBbWriteEmbeded(pDevice->PortOffset, 0x09, (unsigned char)(pDevice->byBBCR09 & 0xDE));
}
/*
@ -2402,7 +2402,7 @@ void BBvLoopbackOn (PSDevice pDevice)
*/
void BBvLoopbackOff (PSDevice pDevice)
{
BYTE byData;
unsigned char byData;
unsigned long dwIoBase = pDevice->PortOffset;
BBbWriteEmbeded(dwIoBase, 0xC9, pDevice->byBBCRc9);//CR201
@ -2413,14 +2413,14 @@ void BBvLoopbackOff (PSDevice pDevice)
if (pDevice->uConnectionRate <= RATE_11M) { // CCK
// Set the CR33 Bit2 to disable internal Loopback.
BBbReadEmbeded(dwIoBase, 0x21, &byData);//CR33
BBbWriteEmbeded(dwIoBase, 0x21, (BYTE)(byData & 0xFE));//CR33
BBbWriteEmbeded(dwIoBase, 0x21, (unsigned char)(byData & 0xFE));//CR33
}
else { // OFDM
BBbReadEmbeded(dwIoBase, 0x9A, &byData);//CR154
BBbWriteEmbeded(dwIoBase, 0x9A, (BYTE)(byData & 0xFE));//CR154
BBbWriteEmbeded(dwIoBase, 0x9A, (unsigned char)(byData & 0xFE));//CR154
}
BBbReadEmbeded(dwIoBase, 0x0E, &byData);//CR14
BBbWriteEmbeded(dwIoBase, 0x0E, (BYTE)(byData | 0x80));//CR14
BBbWriteEmbeded(dwIoBase, 0x0E, (unsigned char)(byData | 0x80));//CR14
}
@ -2441,8 +2441,8 @@ void BBvLoopbackOff (PSDevice pDevice)
void
BBvSetShortSlotTime (PSDevice pDevice)
{
BYTE byBBRxConf=0;
BYTE byBBVGA=0;
unsigned char byBBRxConf=0;
unsigned char byBBVGA=0;
BBbReadEmbeded(pDevice->PortOffset, 0x0A, &byBBRxConf);//CR10
@ -2462,9 +2462,9 @@ BBvSetShortSlotTime (PSDevice pDevice)
}
void BBvSetVGAGainOffset(PSDevice pDevice, BYTE byData)
void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData)
{
BYTE byBBRxConf=0;
unsigned char byBBRxConf=0;
BBbWriteEmbeded(pDevice->PortOffset, 0xE7, byData);
@ -2518,7 +2518,7 @@ BBvSoftwareReset (unsigned long dwIoBase)
void
BBvPowerSaveModeON (unsigned long dwIoBase)
{
BYTE byOrgData;
unsigned char byOrgData;
BBbReadEmbeded(dwIoBase, 0x0D, &byOrgData);
byOrgData |= BIT0;
@ -2540,7 +2540,7 @@ BBvPowerSaveModeON (unsigned long dwIoBase)
void
BBvPowerSaveModeOFF (unsigned long dwIoBase)
{
BYTE byOrgData;
unsigned char byOrgData;
BBbReadEmbeded(dwIoBase, 0x0D, &byOrgData);
byOrgData &= ~(BIT0);
@ -2562,9 +2562,9 @@ BBvPowerSaveModeOFF (unsigned long dwIoBase)
*/
void
BBvSetTxAntennaMode (unsigned long dwIoBase, BYTE byAntennaMode)
BBvSetTxAntennaMode (unsigned long dwIoBase, unsigned char byAntennaMode)
{
BYTE byBBTxConf;
unsigned char byBBTxConf;
#ifdef PLICE_DEBUG
//printk("Enter BBvSetTxAntennaMode\n");
@ -2604,9 +2604,9 @@ BBvSetTxAntennaMode (unsigned long dwIoBase, BYTE byAntennaMode)
*/
void
BBvSetRxAntennaMode (unsigned long dwIoBase, BYTE byAntennaMode)
BBvSetRxAntennaMode (unsigned long dwIoBase, unsigned char byAntennaMode)
{
BYTE byBBRxConf;
unsigned char byBBRxConf;
BBbReadEmbeded(dwIoBase, 0x0A, &byBBRxConf);//CR10
if (byAntennaMode == ANT_DIVERSITY) {
@ -2635,14 +2635,14 @@ BBvSetRxAntennaMode (unsigned long dwIoBase, BYTE byAntennaMode)
*
*/
void
BBvSetDeepSleep (unsigned long dwIoBase, BYTE byLocalID)
BBvSetDeepSleep (unsigned long dwIoBase, unsigned char byLocalID)
{
BBbWriteEmbeded(dwIoBase, 0x0C, 0x17);//CR12
BBbWriteEmbeded(dwIoBase, 0x0D, 0xB9);//CR13
}
void
BBvExitDeepSleep (unsigned long dwIoBase, BYTE byLocalID)
BBvExitDeepSleep (unsigned long dwIoBase, unsigned char byLocalID)
{
BBbWriteEmbeded(dwIoBase, 0x0C, 0x00);//CR12
BBbWriteEmbeded(dwIoBase, 0x0D, 0x01);//CR13
@ -2787,7 +2787,7 @@ BBvClearAntDivSQ3Value (PSDevice pDevice)
*/
void
BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3)
BBvAntennaDiversity (PSDevice pDevice, unsigned char byRxRate, unsigned char bySQ3)
{
if ((byRxRate >= MAX_RATE) || (pDevice->wAntDiversityMaxRate >= MAX_RATE)) {

View File

@ -120,8 +120,8 @@
unsigned int
BBuGetFrameTime(
BYTE byPreambleType,
BYTE byPktType,
unsigned char byPreambleType,
unsigned char byPktType,
unsigned int cbFrameLength,
unsigned short wRate
);
@ -131,32 +131,32 @@ BBvCaculateParameter (
PSDevice pDevice,
unsigned int cbFrameLength,
unsigned short wRate,
BYTE byPacketType,
unsigned char byPacketType,
unsigned short *pwPhyLen,
unsigned char *pbyPhySrv,
unsigned char *pbyPhySgn
);
BOOL BBbReadEmbeded(unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyData);
BOOL BBbWriteEmbeded(unsigned long dwIoBase, BYTE byBBAddr, BYTE byData);
BOOL BBbReadEmbeded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData);
BOOL BBbWriteEmbeded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData);
void BBvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyBBRegs);
void BBvLoopbackOn(PSDevice pDevice);
void BBvLoopbackOff(PSDevice pDevice);
void BBvSetShortSlotTime(PSDevice pDevice);
BOOL BBbIsRegBitsOn(unsigned long dwIoBase, BYTE byBBAddr, BYTE byTestBits);
BOOL BBbIsRegBitsOff(unsigned long dwIoBase, BYTE byBBAddr, BYTE byTestBits);
void BBvSetVGAGainOffset(PSDevice pDevice, BYTE byData);
BOOL BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
BOOL BBbIsRegBitsOff(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData);
// VT3253 Baseband
BOOL BBbVT3253Init(PSDevice pDevice);
void BBvSoftwareReset(unsigned long dwIoBase);
void BBvPowerSaveModeON(unsigned long dwIoBase);
void BBvPowerSaveModeOFF(unsigned long dwIoBase);
void BBvSetTxAntennaMode(unsigned long dwIoBase, BYTE byAntennaMode);
void BBvSetRxAntennaMode(unsigned long dwIoBase, BYTE byAntennaMode);
void BBvSetDeepSleep(unsigned long dwIoBase, BYTE byLocalID);
void BBvExitDeepSleep(unsigned long dwIoBase, BYTE byLocalID);
void BBvSetTxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode);
void BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode);
void BBvSetDeepSleep(unsigned long dwIoBase, unsigned char byLocalID);
void BBvExitDeepSleep(unsigned long dwIoBase, unsigned char byLocalID);
// timer for antenna diversity
@ -170,7 +170,7 @@ TimerState1CallBack(
void *hDeviceContext
);
void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3);
void BBvAntennaDiversity(PSDevice pDevice, unsigned char byRxRate, unsigned char bySQ3);
void
BBvClearAntDivSQ3Value (PSDevice pDevice);

View File

@ -138,7 +138,7 @@ BSSpSearchBSSList(
PWLAN_IE_SSID pSSID = NULL;
PKnownBSS pCurrBSS = NULL;
PKnownBSS pSelect = NULL;
BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00};
unsigned char ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00};
unsigned int ii = 0;
if (pbyDesireBSSID != NULL) {
@ -374,7 +374,7 @@ BSSbInsertToBSSList (
QWORD qwTimestamp,
unsigned short wBeaconInterval,
unsigned short wCapInfo,
BYTE byCurrChannel,
unsigned char byCurrChannel,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates,
PWLAN_IE_SUPP_RATES pExtSuppRates,
@ -520,7 +520,7 @@ BSSbInsertToBSSList (
if (pDevice->bUpdateBBVGA) {
// Moniter if RSSI is too strong.
pBSSList->byRSSIStatCnt = 0;
RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &pBSSList->ldBmMAX);
RFvRSSITodBm(pDevice, (unsigned char)(pRxPacket->uRSSI), &pBSSList->ldBmMAX);
pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
pBSSList->ldBmAverage[ii] = 0;
@ -589,7 +589,7 @@ BSSbUpdateToBSSList (
QWORD qwTimestamp,
unsigned short wBeaconInterval,
unsigned short wCapInfo,
BYTE byCurrChannel,
unsigned char byCurrChannel,
BOOL bChannelHit,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates,
@ -690,7 +690,7 @@ BSSbUpdateToBSSList (
}
if (pRxPacket->uRSSI != 0) {
RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &ldBm);
RFvRSSITodBm(pDevice, (unsigned char)(pRxPacket->uRSSI), &ldBm);
// Moniter if RSSI is too strong.
pBSSList->byRSSIStatCnt++;
pBSSList->byRSSIStatCnt %= RSSI_STAT_COUNT;
@ -870,7 +870,7 @@ BSSvRemoveOneNode(
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = pDevice->pMgmt;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
struct sk_buff *skb;
@ -1390,8 +1390,8 @@ start:
void
BSSvUpdateNodeTxCounter(
void *hDeviceContext,
BYTE byTsr0,
BYTE byTsr1,
unsigned char byTsr0,
unsigned char byTsr1,
unsigned char *pbyBuffer,
unsigned int uFIFOHeaderSize
)
@ -1399,12 +1399,12 @@ BSSvUpdateNodeTxCounter(
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned int uNodeIndex = 0;
BYTE byTxRetry = (byTsr0 & TSR0_NCR);
unsigned char byTxRetry = (byTsr0 & TSR0_NCR);
PSTxBufHead pTxBufHead;
PS802_11Header pMACHeader;
unsigned short wRate;
unsigned short wFallBackRate = RATE_1M;
BYTE byFallBack;
unsigned char byFallBack;
unsigned int ii;
// unsigned int txRetryTemp;
//PLICE_DEBUG->
@ -1700,7 +1700,7 @@ if(pDevice->bLinkPass !=TRUE)
}
else
{
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
if(-ldBm < 50) {
RssiRatio = 4000;
}
@ -1734,7 +1734,7 @@ void s_vCheckPreEDThreshold(
((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 = (unsigned char) (~(pBSSList->ldBmAverRange) + 1);
//BBvUpdatePreEDThreshold(pDevice, FALSE);
}
}

View File

@ -91,7 +91,7 @@ typedef enum _NDIS_802_11_NETWORK_TYPE
typedef struct tagSERPObject {
BOOL bERPExist;
BYTE byERP;
unsigned char byERP;
}ERPObject, *PERPObject;
@ -105,19 +105,19 @@ typedef struct tagSRSNCapObject {
typedef struct tagKnownBSS {
// BSS info
BOOL bActive;
BYTE abyBSSID[WLAN_BSSID_LEN];
unsigned char 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];
unsigned char abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned int uRSSI;
BYTE bySQ;
unsigned char bySQ;
unsigned short wBeaconInterval;
unsigned short wCapInfo;
BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE byRxRate;
unsigned char abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char byRxRate;
// unsigned short wATIMWindow;
BYTE byRSSIStatCnt;
unsigned char byRSSIStatCnt;
long ldBmMAX;
long ldBmAverage[RSSI_STAT_COUNT];
long ldBmAverRange;
@ -126,32 +126,32 @@ typedef struct tagKnownBSS {
//++ WPA informations
BOOL bWPAValid;
BYTE byGKType;
BYTE abyPKType[4];
unsigned char byGKType;
unsigned char abyPKType[4];
unsigned short wPKCount;
BYTE abyAuthType[4];
unsigned char abyAuthType[4];
unsigned short wAuthCount;
BYTE byDefaultK_as_PK;
BYTE byReplayIdx;
unsigned char byDefaultK_as_PK;
unsigned char byReplayIdx;
//--
//++ WPA2 informations
BOOL bWPA2Valid;
BYTE byCSSGK;
unsigned char byCSSGK;
unsigned short wCSSPKCount;
BYTE abyCSSPK[4];
unsigned char abyCSSPK[4];
unsigned short wAKMSSAuthCount;
BYTE abyAKMSSAuthType[4];
unsigned char abyAKMSSAuthType[4];
//++ wpactl
BYTE byWPAIE[MAX_WPA_IE_LEN];
BYTE byRSNIE[MAX_WPA_IE_LEN];
unsigned char byWPAIE[MAX_WPA_IE_LEN];
unsigned char byRSNIE[MAX_WPA_IE_LEN];
unsigned short wWPALen;
unsigned short wRSNLen;
// Clear count
unsigned int uClearCount;
// BYTE abyIEs[WLAN_BEACON_FR_MAXLEN];
// unsigned char abyIEs[WLAN_BEACON_FR_MAXLEN];
unsigned int uIELength;
QWORD qwBSSTimestamp;
QWORD qwLocalTSF; // local TSF timer
@ -161,7 +161,7 @@ typedef struct tagKnownBSS {
ERPObject sERP;
SRSNCapObject sRSNCapObj;
BYTE abyIEs[1024]; // don't move this field !!
unsigned char abyIEs[1024]; // don't move this field !!
}__attribute__ ((__packed__))
KnownBSS , *PKnownBSS;
@ -182,9 +182,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];
unsigned char abyMACAddr[WLAN_ADDR_LEN];
unsigned char abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
unsigned char abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
unsigned short wTxDataRate;
BOOL bShortPreamble;
BOOL bERPExist;
@ -193,8 +193,8 @@ typedef struct tagKnownNodeDB {
unsigned short wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
unsigned short wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
unsigned short wSuppRate;
BYTE byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
BYTE byTopCCKBasicRate; //Records the highest basic rate in CCK mode
unsigned char byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
unsigned char byTopCCKBasicRate; //Records the highest basic rate in CCK mode
// For AP mode
struct sk_buff_head sTxPSQueue;
@ -204,21 +204,21 @@ typedef struct tagKnownNodeDB {
NODE_STATE eNodeState;
BOOL bPSEnable;
BOOL bRxPSPoll;
BYTE byAuthSequence;
unsigned char byAuthSequence;
unsigned long ulLastRxJiffer;
BYTE bySuppRate;
unsigned char bySuppRate;
unsigned long dwFlags;
unsigned short wEnQueueCnt;
BOOL bOnFly;
unsigned long long KeyRSC;
BYTE byKeyIndex;
unsigned char byKeyIndex;
unsigned long dwKeyIndex;
BYTE byCipherSuite;
unsigned char byCipherSuite;
unsigned long dwTSC47_16;
unsigned short wTSC15_0;
unsigned int uWepKeyLength;
BYTE abyWepKey[WLAN_WEPMAX_KEYLEN];
unsigned char abyWepKey[WLAN_WEPMAX_KEYLEN];
//
// Auto rate fallback vars
BOOL bIsInFallback;
@ -270,7 +270,7 @@ BSSbInsertToBSSList(
QWORD qwTimestamp,
unsigned short wBeaconInterval,
unsigned short wCapInfo,
BYTE byCurrChannel,
unsigned char byCurrChannel,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates,
PWLAN_IE_SUPP_RATES pExtSuppRates,
@ -291,7 +291,7 @@ BSSbUpdateToBSSList(
QWORD qwTimestamp,
unsigned short wBeaconInterval,
unsigned short wCapInfo,
BYTE byCurrChannel,
unsigned char byCurrChannel,
BOOL bChannelHit,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates,
@ -339,8 +339,8 @@ BSSvSecondCallBack(
void
BSSvUpdateNodeTxCounter(
void *hDeviceContext,
BYTE byTsr0,
BYTE byTsr1,
unsigned char byTsr0,
unsigned char byTsr1,
unsigned char *pbyBuffer,
unsigned int uFIFOHeaderSize
);

View File

@ -80,13 +80,13 @@ static int msglevel =MSG_LEVEL_INFO;
#define WAIT_BEACON_TX_DOWN_TMO 3 // Times
//1M, 2M, 5M, 11M, 18M, 24M, 36M, 54M
static BYTE abyDefaultSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
static unsigned char abyDefaultSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
//6M, 9M, 12M, 48M
static BYTE abyDefaultExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES, 4, 0x0C, 0x12, 0x18, 0x60};
static unsigned char abyDefaultExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES, 4, 0x0C, 0x12, 0x18, 0x60};
//6M, 9M, 12M, 18M, 24M, 36M, 48M, 54M
static BYTE abyDefaultSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
static unsigned char abyDefaultSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
//1M, 2M, 5M, 11M,
static BYTE abyDefaultSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
static unsigned char abyDefaultSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
/*--------------------- Static Variables --------------------------*/
@ -101,7 +101,7 @@ const unsigned short cwRXBCNTSFOff[MAX_RATE] =
static
void
s_vCaculateOFDMRParameter(
BYTE byRate,
unsigned char byRate,
CARD_PHY_TYPE ePHYType,
unsigned char *pbyTxRate,
unsigned char *pbyRsvTime
@ -127,7 +127,7 @@ s_vCaculateOFDMRParameter(
static
void
s_vCaculateOFDMRParameter (
BYTE byRate,
unsigned char byRate,
CARD_PHY_TYPE ePHYType,
unsigned char *pbyTxRate,
unsigned char *pbyRsvTime
@ -243,9 +243,9 @@ static
void
s_vSetRSPINF (PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, void *pvExtSupportRateIEs)
{
BYTE byServ = 0, bySignal = 0; // For CCK
unsigned char byServ = 0, bySignal = 0; // For CCK
unsigned short wLen = 0;
BYTE byTxRate = 0, byRsvTime = 0; // For OFDM
unsigned char byTxRate = 0, byRsvTime = 0; // For OFDM
//Set to Page1
MACvSelectPage1(pDevice->PortOffset);
@ -437,14 +437,14 @@ BOOL CARDbIsShorSlotTime (void *pDeviceHandler)
* Return Value: None.
*
*/
BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, BYTE byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs)
BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
BYTE byCWMaxMin = 0;
BYTE bySlot = 0;
BYTE bySIFS = 0;
BYTE byDIFS = 0;
BYTE byData;
unsigned char byCWMaxMin = 0;
unsigned char bySlot = 0;
unsigned char bySIFS = 0;
unsigned char byDIFS = 0;
unsigned char byData;
// PWLAN_IE_SUPP_RATES pRates = NULL;
PWLAN_IE_SUPP_RATES pSupportRates = (PWLAN_IE_SUPP_RATES) pvSupportRateIEs;
PWLAN_IE_SUPP_RATES pExtSupportRates = (PWLAN_IE_SUPP_RATES) pvExtSupportRateIEs;
@ -624,7 +624,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne
* Return Value: none
*
*/
BOOL CARDbUpdateTSF (void *pDeviceHandler, BYTE byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF)
BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
QWORD qwTSFOffset;
@ -1269,9 +1269,9 @@ CARDbStartMeasure (
BOOL
CARDbChannelSwitch (
void *pDeviceHandler,
BYTE byMode,
BYTE byNewChannel,
BYTE byCount
unsigned char byMode,
unsigned char byNewChannel,
unsigned char byCount
)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
@ -1313,8 +1313,8 @@ BOOL
CARDbSetQuiet (
void *pDeviceHandler,
BOOL bResetQuiet,
BYTE byQuietCount,
BYTE byQuietPeriod,
unsigned char byQuietCount,
unsigned char byQuietPeriod,
unsigned short wQuietDuration,
unsigned short wQuietOffset
)
@ -1468,7 +1468,7 @@ CARDbStartQuiet (
void
CARDvSetPowerConstraint (
void *pDeviceHandler,
BYTE byChannel,
unsigned char byChannel,
char byPower
)
{
@ -1508,7 +1508,7 @@ CARDvGetPowerCapability (
)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
BYTE byDec = 0;
unsigned char byDec = 0;
*pbyMaxPower = pDevice->abyOFDMDefaultPwr[pDevice->byCurrentCh];
byDec = pDevice->abyOFDMPwrTbl[pDevice->byCurrentCh];
@ -1730,9 +1730,9 @@ unsigned short CARDwGetOFDMControlRate (void *pDeviceHandler, unsigned short wRa
void CARDvSetRSPINF (void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
BYTE byServ = 0x00, bySignal = 0x00; //For CCK
unsigned char byServ = 0x00, bySignal = 0x00; //For CCK
unsigned short wLen = 0x0000;
BYTE byTxRate, byRsvTime; //For OFDM
unsigned char byTxRate, byRsvTime; //For OFDM
//Set to Page1
MACvSelectPage1(pDevice->PortOffset);
@ -1857,7 +1857,7 @@ void vUpdateIFS (void *pDeviceHandler)
//Set SIFS, DIFS, EIFS, SlotTime, CwMin
PSDevice pDevice = (PSDevice) pDeviceHandler;
BYTE byMaxMin = 0;
unsigned char byMaxMin = 0;
if (pDevice->byPacketType==PK_TYPE_11A) {//0000 0000 0000 0000,11a
pDevice->uSlot = C_SLOT_SHORT;
pDevice->uSIFS = C_SIFS_A;
@ -1894,23 +1894,23 @@ void vUpdateIFS (void *pDeviceHandler)
pDevice->uEIFS = C_EIFS;
if (pDevice->byRFType == RF_RFMD2959) {
// bcs TX_PE will reserve 3 us
VNSvOutPortB(pDevice->PortOffset + MAC_REG_SIFS, (BYTE)(pDevice->uSIFS - 3));
VNSvOutPortB(pDevice->PortOffset + MAC_REG_DIFS, (BYTE)(pDevice->uDIFS - 3));
VNSvOutPortB(pDevice->PortOffset + MAC_REG_SIFS, (unsigned char)(pDevice->uSIFS - 3));
VNSvOutPortB(pDevice->PortOffset + MAC_REG_DIFS, (unsigned char)(pDevice->uDIFS - 3));
} else {
VNSvOutPortB(pDevice->PortOffset + MAC_REG_SIFS, (BYTE)pDevice->uSIFS);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_DIFS, (BYTE)pDevice->uDIFS);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_SIFS, (unsigned char)pDevice->uSIFS);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_DIFS, (unsigned char)pDevice->uDIFS);
}
VNSvOutPortB(pDevice->PortOffset + MAC_REG_EIFS, (BYTE)pDevice->uEIFS);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_SLOT, (BYTE)pDevice->uSlot);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_EIFS, (unsigned char)pDevice->uEIFS);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_SLOT, (unsigned char)pDevice->uSlot);
byMaxMin |= 0xA0;//1010 1111,C_CWMAX = 1023
VNSvOutPortB(pDevice->PortOffset + MAC_REG_CWMAXMIN0, (BYTE)byMaxMin);
VNSvOutPortB(pDevice->PortOffset + MAC_REG_CWMAXMIN0, (unsigned char)byMaxMin);
}
void CARDvUpdateBasicTopRate (void *pDeviceHandler)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
BYTE byTopOFDM = RATE_24M, byTopCCK = RATE_1M;
BYTE ii;
unsigned char byTopOFDM = RATE_24M, byTopCCK = RATE_1M;
unsigned char ii;
//Determines the highest basic rate.
for (ii = RATE_54M; ii >= RATE_6M; ii --) {
@ -1971,12 +1971,12 @@ BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler)
return FALSE;
}
BYTE CARDbyGetPktType (void *pDeviceHandler)
unsigned char CARDbyGetPktType (void *pDeviceHandler)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (pDevice->byBBType == BB_TYPE_11A || pDevice->byBBType == BB_TYPE_11B) {
return (BYTE)pDevice->byBBType;
return (unsigned char)pDevice->byBBType;
}
else if (CARDbIsOFDMinBasicRate((void *)pDevice)) {
return PK_TYPE_11GA;
@ -2055,7 +2055,7 @@ BOOL CARDbSoftwareReset (void *pDeviceHandler)
* Return Value: TSF Offset value
*
*/
QWORD CARDqGetTSFOffset (BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2)
QWORD CARDqGetTSFOffset (unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
{
QWORD qwTSFOffset;
unsigned short wRxBcnTSFOffst= 0;;
@ -2095,7 +2095,7 @@ QWORD CARDqGetTSFOffset (BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2)
BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
{
unsigned short ww;
BYTE byData;
unsigned char byData;
MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TSFCNTRRD);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {

View File

@ -97,9 +97,9 @@ void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterva
void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval);
BOOL CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF);
QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval);
QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2);
QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2);
BOOL CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower);
BYTE CARDbyGetPktType(void *pDeviceHandler);
unsigned char CARDbyGetPktType(void *pDeviceHandler);
void CARDvSafeResetTx(void *pDeviceHandler);
void CARDvSafeResetRx(void *pDeviceHandler);
@ -109,8 +109,8 @@ BOOL CARDbRadioPowerOn(void *pDeviceHandler);
//BOOL CARDbSendPacket(void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength);
BOOL CARDbIsShortPreamble(void *pDeviceHandler);
BOOL CARDbIsShorSlotTime(void *pDeviceHandler);
BOOL CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, BYTE byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs);
BOOL CARDbUpdateTSF(void *pDeviceHandler, BYTE byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF);
BOOL CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs);
BOOL CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF);
BOOL CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
BOOL CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
BOOL CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval);
@ -152,17 +152,17 @@ CARDbStartMeasure (
BOOL
CARDbChannelSwitch (
void *pDeviceHandler,
BYTE byMode,
BYTE byNewChannel,
BYTE byCount
unsigned char byMode,
unsigned char byNewChannel,
unsigned char byCount
);
BOOL
CARDbSetQuiet (
void *pDeviceHandler,
BOOL bResetQuiet,
BYTE byQuietCount,
BYTE byQuietPeriod,
unsigned char byQuietCount,
unsigned char byQuietPeriod,
unsigned short wQuietDuration,
unsigned short wQuietOffset
);
@ -175,7 +175,7 @@ CARDbStartQuiet (
void
CARDvSetPowerConstraint (
void *pDeviceHandler,
BYTE byChannel,
unsigned char byChannel,
char byPower
);

View File

@ -101,10 +101,10 @@ static SChannelTblElement sChannelTbl[CARD_MAX_CHANNEL_TBL + 1] =
************************************************************************/
static struct
{
BYTE byChannelCountryCode; /* The country code */
unsigned char byChannelCountryCode; /* The country code */
char chCountryCode[2];
BYTE bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */
BYTE byPower[CB_MAX_CHANNEL];
unsigned char bChannelIdxList[CB_MAX_CHANNEL]; /* Available channels Index */
unsigned char byPower[CB_MAX_CHANNEL];
} ChannelRuleTab[] =
{
/************************************************************************
@ -495,7 +495,7 @@ void init_channel_table(void *pDeviceHandler)
}
}
BYTE get_channel_mapping(void *pDeviceHandler, BYTE byChannelNumber, CARD_PHY_TYPE ePhyType)
unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelNumber, CARD_PHY_TYPE ePhyType)
{
unsigned int ii;
@ -504,13 +504,13 @@ BYTE get_channel_mapping(void *pDeviceHandler, BYTE byChannelNumber, CARD_PHY_TY
for(ii = (CB_MAX_CHANNEL_24G + 1); ii <= CB_MAX_CHANNEL; ) {
if (sChannelTbl[ii].byChannelNumber == byChannelNumber)
return ((BYTE) ii);
return ((unsigned char) ii);
ii++;
}
return 0;
}
BYTE get_channel_number(void *pDeviceHandler, BYTE byChannelIndex)
unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex)
{
//PSDevice pDevice = (PSDevice) pDeviceHandler;
return(sChannelTbl[byChannelIndex].byChannelNumber);
@ -554,20 +554,20 @@ BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
if ( pDevice->byRFType == RF_AIROHA7230 )
{
RFbAL7230SelectChannelPostProcess(pDevice->PortOffset, pDevice->byCurrentCh, (BYTE)uConnectionChannel);
RFbAL7230SelectChannelPostProcess(pDevice->PortOffset, pDevice->byCurrentCh, (unsigned char)uConnectionChannel);
}
//}} RobertYu
pDevice->byCurrentCh = (BYTE)uConnectionChannel;
bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (BYTE)uConnectionChannel);
pDevice->byCurrentCh = (unsigned char)uConnectionChannel;
bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel);
// Init Synthesizer Table
if (pDevice->bEnablePSMode == TRUE)
RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel);
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDbSetMediaChannel: %d\n", (BYTE)uConnectionChannel);
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDbSetMediaChannel: %d\n", (unsigned char)uConnectionChannel);
BBvSoftwareReset(pDevice->PortOffset);
if (pDevice->byLocalID > REV_ID_VT3253_B1) {
@ -609,7 +609,7 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
unsigned int uu = 0;
unsigned int step = 0;
unsigned int uNumOfCountryInfo = 0;
BYTE byCh = 0;
unsigned char byCh = 0;
PWLAN_IE_COUNTRY pIE_Country = (PWLAN_IE_COUNTRY) pIE;
@ -635,7 +635,7 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
for(ii = 0 ; ii < uNumOfCountryInfo ; ii++) {
for(uu = 0 ; uu < pIE_Country->abyCountryInfo[ii*3+1] ; uu++) {
byCh = get_channel_mapping(pDevice, (BYTE)(pIE_Country->abyCountryInfo[ii*3]+step*uu), ePHYType);
byCh = get_channel_mapping(pDevice, (unsigned char)(pIE_Country->abyCountryInfo[ii*3]+step*uu), ePHYType);
sChannelTbl[byCh].bValid = TRUE;
pDevice->abyRegPwr[byCh] = pIE_Country->abyCountryInfo[ii*3+2];
}
@ -652,14 +652,14 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
*
*/
BYTE set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii;
BYTE byCount;
unsigned char byCount;
PWLAN_IE_SUPP_CH pIE = (PWLAN_IE_SUPP_CH) pbyIEs;
unsigned char *pbyChTupple;
BYTE byLen = 0;
unsigned char byLen = 0;
pIE->byElementID = WLAN_EID_SUPP_CH;
@ -758,7 +758,7 @@ BOOL get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
}
void set_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
BYTE byMap)
unsigned char byMap)
{
if (uChannelIndex > CB_MAX_CHANNEL) {
@ -776,22 +776,22 @@ void clear_channel_map_info(void *pDeviceHandler)
}
}
BYTE auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
{
unsigned int ii = 0;
BYTE byOptionChannel = 0;
unsigned char byOptionChannel = 0;
int aiWeight[CB_MAX_CHANNEL_24G+1] = {-1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
if (ePHYType == PHY_TYPE_11A) {
for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CB_MAX_CHANNEL ; ii++) {
if (sChannelTbl[ii].bValid == TRUE) {
if (byOptionChannel == 0) {
byOptionChannel = (BYTE) ii;
byOptionChannel = (unsigned char) ii;
}
if (sChannelTbl[ii].byMAP == 0) {
return ((BYTE) ii);
return ((unsigned char) ii);
} else if ( !(sChannelTbl[ii].byMAP & 0x08)) {
byOptionChannel = (BYTE) ii;
byOptionChannel = (unsigned char) ii;
}
}
}
@ -827,7 +827,7 @@ BYTE auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
if ((sChannelTbl[ii].bValid == TRUE) &&
(aiWeight[ii] > aiWeight[byOptionChannel])) {
byOptionChannel = (BYTE) ii;
byOptionChannel = (unsigned char) ii;
}
}
}

View File

@ -29,10 +29,10 @@
/*--------------------- Export Classes ----------------------------*/
typedef struct tagSChannelTblElement {
BYTE byChannelNumber;
unsigned char byChannelNumber;
unsigned int uFrequency;
BOOL bValid;
BYTE byMAP;
unsigned char byMAP;
}SChannelTblElement, *PSChannelTblElement;
@ -40,19 +40,19 @@ typedef struct tagSChannelTblElement {
BOOL is_channel_valid(unsigned int CountryCode);
void init_channel_table(void *pDeviceHandler);
BYTE get_channel_mapping(void *pDeviceHandler, BYTE byChannelNumber, CARD_PHY_TYPE ePhyType);
unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelNumber, CARD_PHY_TYPE ePhyType);
BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable);
BYTE get_channel_number(void *pDeviceHandler, BYTE byChannelIndex);
unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex);
BOOL set_channel(void *pDeviceHandler, unsigned int uConnectionChannel);
void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE);
BYTE set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs);
unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs);
void set_country_IE(void *pDeviceHandler, void *pIE);
BOOL get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
unsigned char *pbyChannelNumber, unsigned char *pbyMap);
void set_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
BYTE byMap);
unsigned char byMap);
void clear_channel_map_info(void *pDeviceHandler);
BYTE auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
#endif /* _CHANNEL_H_ */

View File

@ -55,7 +55,7 @@
/*--------------------- Static Variables --------------------------*/
//static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO;
const BYTE acbyIERate[MAX_RATE] =
const unsigned char acbyIERate[MAX_RATE] =
{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
#define AUTORATE_TXOK_CNT 0x0400
@ -75,7 +75,7 @@ s_vResetCounter (
PKnownNodeDB psNodeDBTable
)
{
BYTE ii;
unsigned char ii;
// clear statistic counter for auto_rate
for(ii=0;ii<=MAX_RATE;ii++) {
@ -97,19 +97,19 @@ s_vResetCounter (
*
* Parameters:
* In:
* BYTE - Rate value in SuppRates IE or ExtSuppRates IE
* unsigned char - Rate value in SuppRates IE or ExtSuppRates IE
* Out:
* none
*
* Return Value: RateIdx
*
-*/
BYTE
unsigned char
DATARATEbyGetRateIdx (
BYTE byRate
unsigned char byRate
)
{
BYTE ii;
unsigned char ii;
//Erase basicRate flag.
byRate = byRate & 0x7F;//0111 1111
@ -151,7 +151,7 @@ DATARATEbyGetRateIdx (
*
* Parameters:
* In:
* BYTE - Rate value in SuppRates IE or ExtSuppRates IE
* unsigned char - Rate value in SuppRates IE or ExtSuppRates IE
* Out:
* none
*
@ -160,7 +160,7 @@ DATARATEbyGetRateIdx (
-*/
unsigned short
wGetRateIdx(
BYTE byRate
unsigned char byRate
)
{
unsigned short ii;
@ -209,8 +209,8 @@ RATEvParseMaxRate (
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii;
BYTE byHighSuppRate = 0;
BYTE byRate = 0;
unsigned char byHighSuppRate = 0;
unsigned char byRate = 0;
unsigned short wOldBasicRate = pDevice->wBasicRate;
unsigned int uRateLen;
@ -231,14 +231,14 @@ unsigned int uRateLen;
}
for (ii = 0; ii < uRateLen; ii++) {
byRate = (BYTE)(pItemRates->abyRates[ii]);
byRate = (unsigned char)(pItemRates->abyRates[ii]);
if (WLAN_MGMT_IS_BASICRATE(byRate) &&
(bUpdateBasicRate == TRUE)) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
}
byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F);
byRate = (unsigned char)(pItemRates->abyRates[ii]&0x7F);
if (byHighSuppRate == 0)
byHighSuppRate = byRate;
if (byRate > byHighSuppRate)
@ -254,14 +254,14 @@ unsigned int uRateLen;
uExtRateLen = WLAN_RATES_MAXLEN;
for (ii = 0; ii < uExtRateLen ; ii++) {
byRate = (BYTE)(pItemExtRates->abyRates[ii]);
byRate = (unsigned char)(pItemExtRates->abyRates[ii]);
// select highest basic rate
if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
}
byRate = (BYTE)(pItemExtRates->abyRates[ii]&0x7F);
byRate = (unsigned char)(pItemExtRates->abyRates[ii]&0x7F);
if (byHighSuppRate == 0)
byHighSuppRate = byRate;
if (byRate > byHighSuppRate)
@ -409,7 +409,7 @@ TxRate_iwconfig=psNodeDBTable->wTxDataRate;
* Return Value: None
*
-*/
BYTE
unsigned char
RATEuSetIE (
PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates,
@ -432,6 +432,6 @@ RATEuSetIE (
}
}
}
return (BYTE)uRateCnt;
return (unsigned char)uRateCnt;
}

View File

@ -73,7 +73,7 @@ RATEvTxRateFallBack(
PKnownNodeDB psNodeDBTable
);
BYTE
unsigned char
RATEuSetIE(
PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates,
@ -82,13 +82,13 @@ RATEuSetIE(
unsigned short
wGetRateIdx(
BYTE byRate
unsigned char byRate
);
BYTE
unsigned char
DATARATEbyGetRateIdx(
BYTE byRate
unsigned char byRate
);

View File

@ -304,8 +304,8 @@ typedef const SRxDesc *PCSRxDesc;
/*
typedef struct tagTDES0 {
volatile BYTE byTSR0;
volatile BYTE byTSR1;
volatile unsigned char byTSR0;
volatile unsigned char byTSR1;
volatile unsigned short wOwner_Txtime;
// volatile unsigned short f15Txtime : 15;
// volatile unsigned short f1Owner:1;
@ -314,8 +314,8 @@ STDES0;
*/
typedef struct tagTDES0 {
volatile BYTE byTSR0;
volatile BYTE byTSR1;
volatile unsigned char byTSR0;
volatile unsigned char byTSR1;
union {
volatile u16 f15Txtime;
struct {
@ -330,8 +330,8 @@ STDES0, PSTDES0;
#else
typedef struct tagTDES0 {
volatile BYTE byTSR0;
volatile BYTE byTSR1;
volatile unsigned char byTSR0;
volatile unsigned char byTSR1;
volatile unsigned short f15Txtime : 15;
volatile unsigned short f1Owner:1;
} __attribute__ ((__packed__))
@ -342,8 +342,8 @@ STDES0;
typedef struct tagTDES1 {
volatile unsigned short wReqCount;
volatile BYTE byTCR;
volatile BYTE byReserved;
volatile unsigned char byTCR;
volatile unsigned char byReserved;
} __attribute__ ((__packed__))
STDES1;
@ -356,7 +356,7 @@ typedef struct tagDEVICE_TD_INFO{
dma_addr_t curr_desc;
unsigned long dwReqCount;
unsigned long dwHeaderLength;
BYTE byFlags;
unsigned char byFlags;
} DEVICE_TD_INFO, *PDEVICE_TD_INFO;
/*
@ -446,18 +446,18 @@ typedef const SRrvTime_atim *PCSRrvTime_atim;
typedef struct tagSRTSData {
unsigned short wFrameControl;
unsigned short wDurationID;
BYTE abyRA[ETH_ALEN];
BYTE abyTA[ETH_ALEN];
unsigned char abyRA[ETH_ALEN];
unsigned char abyTA[ETH_ALEN];
}__attribute__ ((__packed__))
SRTSData, *PSRTSData;
typedef const SRTSData *PCSRTSData;
typedef struct tagSRTS_g {
BYTE bySignalField_b;
BYTE byServiceField_b;
unsigned char bySignalField_b;
unsigned char byServiceField_b;
unsigned short wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
unsigned char bySignalField_a;
unsigned char byServiceField_a;
unsigned short wTransmitLength_a;
unsigned short wDuration_ba;
unsigned short wDuration_aa;
@ -470,11 +470,11 @@ typedef const SRTS_g *PCSRTS_g;
typedef struct tagSRTS_g_FB {
BYTE bySignalField_b;
BYTE byServiceField_b;
unsigned char bySignalField_b;
unsigned char byServiceField_b;
unsigned short wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
unsigned char bySignalField_a;
unsigned char byServiceField_a;
unsigned short wTransmitLength_a;
unsigned short wDuration_ba;
unsigned short wDuration_aa;
@ -491,8 +491,8 @@ typedef const SRTS_g_FB *PCSRTS_g_FB;
typedef struct tagSRTS_ab {
BYTE bySignalField;
BYTE byServiceField;
unsigned char bySignalField;
unsigned char byServiceField;
unsigned short wTransmitLength;
unsigned short wDuration;
unsigned short wReserved;
@ -503,8 +503,8 @@ typedef const SRTS_ab *PCSRTS_ab;
typedef struct tagSRTS_a_FB {
BYTE bySignalField;
BYTE byServiceField;
unsigned char bySignalField;
unsigned char byServiceField;
unsigned short wTransmitLength;
unsigned short wDuration;
unsigned short wReserved;
@ -522,14 +522,14 @@ typedef const SRTS_a_FB *PCSRTS_a_FB;
typedef struct tagSCTSData {
unsigned short wFrameControl;
unsigned short wDurationID;
BYTE abyRA[ETH_ALEN];
unsigned char abyRA[ETH_ALEN];
unsigned short wReserved;
}__attribute__ ((__packed__))
SCTSData, *PSCTSData;
typedef struct tagSCTS {
BYTE bySignalField_b;
BYTE byServiceField_b;
unsigned char bySignalField_b;
unsigned char byServiceField_b;
unsigned short wTransmitLength_b;
unsigned short wDuration_ba;
unsigned short wReserved;
@ -539,8 +539,8 @@ SCTS, *PSCTS;
typedef const SCTS *PCSCTS;
typedef struct tagSCTS_FB {
BYTE bySignalField_b;
BYTE byServiceField_b;
unsigned char bySignalField_b;
unsigned char byServiceField_b;
unsigned short wTransmitLength_b;
unsigned short wDuration_ba;
unsigned short wReserved;
@ -560,8 +560,8 @@ typedef struct tagSTxBufHead {
unsigned short wFIFOCtl;
unsigned short wTimeStamp;
unsigned short wFragCtl;
BYTE byTxPower;
BYTE wReserved;
unsigned char byTxPower;
unsigned char wReserved;
}__attribute__ ((__packed__))
STxBufHead, *PSTxBufHead;
typedef const STxBufHead *PCSTxBufHead;
@ -577,11 +577,11 @@ typedef const STxShortBufHead *PCSTxShortBufHead;
// Tx data header
//
typedef struct tagSTxDataHead_g {
BYTE bySignalField_b;
BYTE byServiceField_b;
unsigned char bySignalField_b;
unsigned char byServiceField_b;
unsigned short wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
unsigned char bySignalField_a;
unsigned char byServiceField_a;
unsigned short wTransmitLength_a;
unsigned short wDuration_b;
unsigned short wDuration_a;
@ -592,11 +592,11 @@ STxDataHead_g, *PSTxDataHead_g;
typedef const STxDataHead_g *PCSTxDataHead_g;
typedef struct tagSTxDataHead_g_FB {
BYTE bySignalField_b;
BYTE byServiceField_b;
unsigned char bySignalField_b;
unsigned char byServiceField_b;
unsigned short wTransmitLength_b;
BYTE bySignalField_a;
BYTE byServiceField_a;
unsigned char bySignalField_a;
unsigned char byServiceField_a;
unsigned short wTransmitLength_a;
unsigned short wDuration_b;
unsigned short wDuration_a;
@ -610,8 +610,8 @@ typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB;
typedef struct tagSTxDataHead_ab {
BYTE bySignalField;
BYTE byServiceField;
unsigned char bySignalField;
unsigned char byServiceField;
unsigned short wTransmitLength;
unsigned short wDuration;
unsigned short wTimeStampOff;
@ -621,8 +621,8 @@ typedef const STxDataHead_ab *PCSTxDataHead_ab;
typedef struct tagSTxDataHead_a_FB {
BYTE bySignalField;
BYTE byServiceField;
unsigned char bySignalField;
unsigned char byServiceField;
unsigned short wTransmitLength;
unsigned short wDuration;
unsigned short wTimeStampOff;
@ -654,14 +654,14 @@ SBEACONCtl;
typedef struct tagSSecretKey {
u32 dwLowDword;
BYTE byHighByte;
unsigned char byHighByte;
}__attribute__ ((__packed__))
SSecretKey;
typedef struct tagSKeyEntry {
BYTE abyAddrHi[2];
unsigned char abyAddrHi[2];
unsigned short wKCTL;
BYTE abyAddrLo[4];
unsigned char abyAddrLo[4];
u32 dwKey0[4];
u32 dwKey1[4];
u32 dwKey2[4];

View File

@ -281,7 +281,7 @@ typedef struct tagSPMKIDCandidateEvent {
typedef struct tagSQuietControl {
BOOL bEnable;
unsigned long dwStartTime;
BYTE byPeriod;
unsigned char byPeriod;
unsigned short wDuration;
} SQuietControl, *PSQuietControl;
@ -304,7 +304,7 @@ typedef enum {
// The receive duplicate detection cache entry
typedef struct tagSCacheEntry{
unsigned short wFmSequence;
BYTE abyAddr2[ETH_ALEN];
unsigned char abyAddr2[ETH_ALEN];
} SCacheEntry, *PSCacheEntry;
typedef struct tagSCache{
@ -321,7 +321,7 @@ typedef struct tagSDeFragControlBlock
{
unsigned short wSequence;
unsigned short wFragNum;
BYTE abyAddr2[ETH_ALEN];
unsigned char abyAddr2[ETH_ALEN];
unsigned int uLifetime;
struct sk_buff* skb;
unsigned char *pbyRxBuffer;
@ -429,7 +429,7 @@ typedef struct __device_info {
u32 ioaddr;
u32 io_size;
BYTE byRevId;
unsigned char byRevId;
unsigned short SubSystemID;
unsigned short SubVendorID;
@ -458,7 +458,7 @@ typedef struct __device_info {
u32 rx_buf_sz;
int multicast_limit;
BYTE byRxMode;
unsigned char byRxMode;
spinlock_t lock;
//PLICE_DEBUG->
@ -475,16 +475,16 @@ typedef struct __device_info {
u32 rx_bytes;
// Version control
BYTE byLocalID;
BYTE byRFType;
unsigned char byLocalID;
unsigned char byRFType;
BYTE byMaxPwrLevel;
BYTE byZoneType;
unsigned char byMaxPwrLevel;
unsigned char byZoneType;
BOOL bZoneRegExist;
BYTE byOriginalZonetype;
BYTE abyMacContext[MAC_MAX_CONTEXT_REG];
unsigned char byOriginalZonetype;
unsigned char abyMacContext[MAC_MAX_CONTEXT_REG];
BOOL bLinkPass; // link status: OK or fail
BYTE abyCurrentNetAddr[ETH_ALEN];
unsigned char abyCurrentNetAddr[ETH_ALEN];
// Adapter statistics
SStatCounter scStatistic;
@ -498,13 +498,13 @@ typedef struct __device_info {
// 802.11 MAC specific
unsigned int uCurrRSSI;
BYTE byCurrSQ;
unsigned char byCurrSQ;
unsigned long dwTxAntennaSel;
unsigned long dwRxAntennaSel;
BYTE byAntennaCount;
BYTE byRxAntennaMode;
BYTE byTxAntennaMode;
unsigned char byAntennaCount;
unsigned char byRxAntennaMode;
unsigned char byTxAntennaMode;
BOOL bTxRxAntInv;
unsigned char *pbyTmpBuff;
@ -515,44 +515,44 @@ typedef struct __device_info {
unsigned int uCwMin; //Current CwMin
unsigned int uCwMax; //CwMax is fixed on 1023.
// PHY parameter
BYTE bySIFS;
BYTE byDIFS;
BYTE byEIFS;
BYTE bySlot;
BYTE byCWMaxMin;
unsigned char bySIFS;
unsigned char byDIFS;
unsigned char byEIFS;
unsigned char bySlot;
unsigned char byCWMaxMin;
CARD_PHY_TYPE eCurrentPHYType;
VIA_BB_TYPE byBBType; //0: 11A, 1:11B, 2:11G
VIA_PKT_TYPE byPacketType; //0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate)
unsigned short wBasicRate;
BYTE byACKRate;
BYTE byTopOFDMBasicRate;
BYTE byTopCCKBasicRate;
unsigned char byACKRate;
unsigned char byTopOFDMBasicRate;
unsigned char byTopCCKBasicRate;
BYTE byMinChannel;
BYTE byMaxChannel;
unsigned char byMinChannel;
unsigned char byMaxChannel;
unsigned int uConnectionRate;
BYTE byPreambleType;
BYTE byShortPreamble;
unsigned char byPreambleType;
unsigned char byShortPreamble;
unsigned short wCurrentRate;
unsigned short wRTSThreshold;
unsigned short wFragmentationThreshold;
BYTE byShortRetryLimit;
BYTE byLongRetryLimit;
unsigned char byShortRetryLimit;
unsigned char byLongRetryLimit;
CARD_OP_MODE eOPMode;
BYTE byOpMode;
unsigned char byOpMode;
BOOL bBSSIDFilter;
unsigned short wMaxTransmitMSDULifetime;
BYTE abyBSSID[ETH_ALEN];
BYTE abyDesireBSSID[ETH_ALEN];
unsigned char abyBSSID[ETH_ALEN];
unsigned char abyDesireBSSID[ETH_ALEN];
unsigned short wCTSDuration; // update while speed change
unsigned short wACKDuration; // update while speed change
unsigned short wRTSTransmitLen; // update while speed change
BYTE byRTSServiceField; // update while speed change
BYTE byRTSSignalField; // update while speed change
unsigned char byRTSServiceField; // update while speed change
unsigned char byRTSSignalField; // update while speed change
unsigned long dwMaxReceiveLifetime; // dot11MaxReceiveLifetime
@ -564,7 +564,7 @@ typedef struct __device_info {
BOOL bNonERPPresent;
BOOL bBarkerPreambleMd;
BYTE byERPFlag;
unsigned char byERPFlag;
unsigned short wUseProtectCntDown;
BOOL bRadioControlOff;
@ -576,8 +576,8 @@ typedef struct __device_info {
// GPIO Radio Control
BYTE byRadioCtl;
BYTE byGPIO;
unsigned char byRadioCtl;
unsigned char byGPIO;
BOOL bHWRadioOff;
BOOL bPrvActive4RadioOFF;
BOOL bGPIOBlockRead;
@ -590,7 +590,7 @@ typedef struct __device_info {
BOOL bIsBeaconBufReadySet;
unsigned int cbBeaconBufReadySetCnt;
BOOL bFixRate;
BYTE byCurrentCh;
unsigned char byCurrentCh;
unsigned int uScanTime;
CMD_STATE eCommandState;
@ -616,7 +616,7 @@ typedef struct __device_info {
BOOL bRoaming;
//WOW
BYTE abyIPAddr[4];
unsigned char abyIPAddr[4];
unsigned long ulTxPower;
NDIS_802_11_WEP_STATUS eEncryptionStatus;
@ -632,13 +632,13 @@ typedef struct __device_info {
unsigned int uCurrentWEPMode;
RC4Ext SBox;
BYTE abyPRNG[WLAN_WEPMAX_KEYLEN+3];
BYTE byKeyIndex;
unsigned char abyPRNG[WLAN_WEPMAX_KEYLEN+3];
unsigned char byKeyIndex;
unsigned int uKeyLength;
BYTE abyKey[WLAN_WEP232_KEYLEN];
unsigned char abyKey[WLAN_WEP232_KEYLEN];
BOOL bAES;
BYTE byCntMeasure;
unsigned char byCntMeasure;
// for AP mode
unsigned int uAssocCount;
@ -651,7 +651,7 @@ typedef struct __device_info {
BOOL bAssocInfoSet;
BYTE byAutoFBCtrl;
unsigned char byAutoFBCtrl;
BOOL bTxMICFail;
BOOL bRxMICFail;
@ -663,24 +663,24 @@ typedef struct __device_info {
// For Update BaseBand VGA Gain Offset
BOOL bUpdateBBVGA;
unsigned int uBBVGADiffCount;
BYTE byBBVGANew;
BYTE byBBVGACurrent;
BYTE abyBBVGA[BB_VGA_LEVEL];
unsigned char byBBVGANew;
unsigned char byBBVGACurrent;
unsigned char abyBBVGA[BB_VGA_LEVEL];
long ldBmThreshold[BB_VGA_LEVEL];
BYTE byBBPreEDRSSI;
BYTE byBBPreEDIndex;
unsigned char byBBPreEDRSSI;
unsigned char byBBPreEDIndex;
BOOL bRadioCmd;
unsigned long dwDiagRefCount;
// For FOE Tuning
BYTE byFOETuning;
unsigned char byFOETuning;
// For Auto Power Tunning
BYTE byAutoPwrTunning;
unsigned char byAutoPwrTunning;
short sPSetPointCCK;
short sPSetPointOFDMG;
short sPSetPointOFDMA;
@ -690,12 +690,12 @@ typedef struct __device_info {
char cMinTxAGC;
// For RF Power table
BYTE byCCKPwr;
BYTE byOFDMPwrG;
BYTE byCurPwr;
unsigned char byCCKPwr;
unsigned char byOFDMPwrG;
unsigned char byCurPwr;
char byCurPwrdBm;
BYTE abyCCKPwrTbl[CB_MAX_CHANNEL_24G+1];
BYTE abyOFDMPwrTbl[CB_MAX_CHANNEL+1];
unsigned char abyCCKPwrTbl[CB_MAX_CHANNEL_24G+1];
unsigned char abyOFDMPwrTbl[CB_MAX_CHANNEL+1];
char abyCCKDefaultPwr[CB_MAX_CHANNEL_24G+1];
char abyOFDMDefaultPwr[CB_MAX_CHANNEL+1];
char abyRegPwr[CB_MAX_CHANNEL+1];
@ -703,10 +703,10 @@ typedef struct __device_info {
// BaseBand Loopback Use
BYTE byBBCR4d;
BYTE byBBCRc9;
BYTE byBBCR88;
BYTE byBBCR09;
unsigned char byBBCR4d;
unsigned char byBBCRc9;
unsigned char byBBCR88;
unsigned char byBBCR09;
// command timer
struct timer_list sTimerCommand;
@ -720,24 +720,24 @@ typedef struct __device_info {
#ifdef WPA_SM_Transtatus
BOOL fWPA_Authened; //is WPA/WPA-PSK or WPA2/WPA2-PSK authen??
#endif
BYTE byReAssocCount; //mike add:re-association retry times!
BYTE byLinkWaitCount;
unsigned char byReAssocCount; //mike add:re-association retry times!
unsigned char byLinkWaitCount;
BYTE abyNodeName[17];
unsigned char abyNodeName[17];
BOOL bDiversityRegCtlON;
BOOL bDiversityEnable;
unsigned long ulDiversityNValue;
unsigned long ulDiversityMValue;
BYTE byTMax;
BYTE byTMax2;
BYTE byTMax3;
unsigned char byTMax;
unsigned char byTMax2;
unsigned char byTMax3;
unsigned long ulSQ3TH;
// ANT diversity
unsigned long uDiversityCnt;
BYTE byAntennaState;
unsigned char byAntennaState;
unsigned long ulRatio_State0;
unsigned long ulRatio_State1;
@ -753,10 +753,10 @@ typedef struct __device_info {
SEthernetHeader sTxEthHeader;
SEthernetHeader sRxEthHeader;
BYTE abyBroadcastAddr[ETH_ALEN];
BYTE abySNAP_RFC1042[ETH_ALEN];
BYTE abySNAP_Bridgetunnel[ETH_ALEN];
BYTE abyEEPROM[EEP_MAX_CONTEXT_SIZE]; //unsigned long alignment
unsigned char abyBroadcastAddr[ETH_ALEN];
unsigned char abySNAP_RFC1042[ETH_ALEN];
unsigned char abySNAP_Bridgetunnel[ETH_ALEN];
unsigned char abyEEPROM[EEP_MAX_CONTEXT_SIZE]; //unsigned long alignment
// Pre-Authentication & PMK cache
SPMKID gsPMKID;
SPMKIDCandidateEvent gsPMKIDCandidate;
@ -764,25 +764,25 @@ typedef struct __device_info {
// for 802.11h
BOOL b11hEnable;
BYTE abyCountryCode[3];
unsigned char abyCountryCode[3];
// for 802.11h DFS
unsigned int uNumOfMeasureEIDs;
PWLAN_IE_MEASURE_REQ pCurrMeasureEID;
BOOL bMeasureInProgress;
BYTE byOrgChannel;
BYTE byOrgRCR;
unsigned char byOrgChannel;
unsigned char byOrgRCR;
unsigned long dwOrgMAR0;
unsigned long dwOrgMAR4;
BYTE byBasicMap;
BYTE byCCAFraction;
BYTE abyRPIs[8];
unsigned char byBasicMap;
unsigned char byCCAFraction;
unsigned char abyRPIs[8];
unsigned long dwRPIs[8];
BOOL bChannelSwitch;
BYTE byNewChannel;
BYTE byChannelSwitchCount;
unsigned char byNewChannel;
unsigned char byChannelSwitchCount;
BOOL bQuietEnable;
BOOL bEnableFirstQuiet;
BYTE byQuietStartCount;
unsigned char byQuietStartCount;
unsigned int uQuietEnqueue;
unsigned long dwCurrentQuietEndTime;
SQuietControl sQuiet[MAX_QUIET_COUNT];

View File

@ -431,9 +431,9 @@ pOpts->flags|=DEVICE_FLAGS_DiversityANT;
static void
device_set_options(PSDevice pDevice) {
BYTE abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
BYTE abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
BYTE abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
unsigned char abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
unsigned char abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
unsigned char abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN);
@ -480,18 +480,18 @@ pDevice->bUpdateBBVGA = TRUE;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pDevice->bDiversityRegCtlON= %d\n",(int)pDevice->bDiversityRegCtlON);
}
static void s_vCompleteCurrentMeasure (PSDevice pDevice, BYTE byResult)
static void s_vCompleteCurrentMeasure (PSDevice pDevice, unsigned char byResult)
{
unsigned int ii;
unsigned long dwDuration = 0;
BYTE byRPI0 = 0;
unsigned char byRPI0 = 0;
for(ii=1;ii<8;ii++) {
pDevice->dwRPIs[ii] *= 255;
dwDuration |= *((unsigned short *) (pDevice->pCurrMeasureEID->sReq.abyDuration));
dwDuration <<= 10;
pDevice->dwRPIs[ii] /= dwDuration;
pDevice->abyRPIs[ii] = (BYTE) pDevice->dwRPIs[ii];
pDevice->abyRPIs[ii] = (unsigned char) pDevice->dwRPIs[ii];
byRPI0 += pDevice->abyRPIs[ii];
}
pDevice->abyRPIs[0] = (0xFF - byRPI0);
@ -528,10 +528,10 @@ static void s_vCompleteCurrentMeasure (PSDevice pDevice, BYTE byResult)
static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
{
unsigned int ii;
BYTE byValue;
BYTE byValue1;
BYTE byCCKPwrdBm = 0;
BYTE byOFDMPwrdBm = 0;
unsigned char byValue;
unsigned char byValue1;
unsigned char byCCKPwrdBm = 0;
unsigned char byOFDMPwrdBm = 0;
int zonetype=0;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
MACbShutdown(pDevice->PortOffset);
@ -702,11 +702,11 @@ else
for (ii=0;ii<CB_MAX_CHANNEL_24G;ii++) {
pDevice->abyCCKPwrTbl[ii+1] = SROMbyReadEmbedded(pDevice->PortOffset, (BYTE)(ii + EEP_OFS_CCK_PWR_TBL));
pDevice->abyCCKPwrTbl[ii+1] = SROMbyReadEmbedded(pDevice->PortOffset, (unsigned char)(ii + EEP_OFS_CCK_PWR_TBL));
if (pDevice->abyCCKPwrTbl[ii+1] == 0) {
pDevice->abyCCKPwrTbl[ii+1] = pDevice->byCCKPwr;
}
pDevice->abyOFDMPwrTbl[ii+1] = SROMbyReadEmbedded(pDevice->PortOffset, (BYTE)(ii + EEP_OFS_OFDM_PWR_TBL));
pDevice->abyOFDMPwrTbl[ii+1] = SROMbyReadEmbedded(pDevice->PortOffset, (unsigned char)(ii + EEP_OFS_OFDM_PWR_TBL));
if (pDevice->abyOFDMPwrTbl[ii+1] == 0) {
pDevice->abyOFDMPwrTbl[ii+1] = pDevice->byOFDMPwrG;
}
@ -728,8 +728,8 @@ else
// Load OFDM A Power Table
for (ii=0;ii<CB_MAX_CHANNEL_5G;ii++) { //RobertYu:20041224, bug using CB_MAX_CHANNEL
pDevice->abyOFDMPwrTbl[ii+CB_MAX_CHANNEL_24G+1] = SROMbyReadEmbedded(pDevice->PortOffset, (BYTE)(ii + EEP_OFS_OFDMA_PWR_TBL));
pDevice->abyOFDMDefaultPwr[ii+CB_MAX_CHANNEL_24G+1] = SROMbyReadEmbedded(pDevice->PortOffset, (BYTE)(ii + EEP_OFS_OFDMA_PWR_dBm));
pDevice->abyOFDMPwrTbl[ii+CB_MAX_CHANNEL_24G+1] = SROMbyReadEmbedded(pDevice->PortOffset, (unsigned char)(ii + EEP_OFS_OFDMA_PWR_TBL));
pDevice->abyOFDMDefaultPwr[ii+CB_MAX_CHANNEL_24G+1] = SROMbyReadEmbedded(pDevice->PortOffset, (unsigned char)(ii + EEP_OFS_OFDMA_PWR_dBm));
}
init_channel_table((void *)pDevice);
@ -1043,7 +1043,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
dev->base_addr = pDevice->ioaddr;
#ifdef PLICE_DEBUG
BYTE value;
unsigned char value;
VNSvInPortB(pDevice->PortOffset+0x4F, &value);
printk("Before write: value is %x\n",value);
@ -1157,8 +1157,8 @@ static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) {
u8 b;
unsigned int cis_addr;
#ifdef PLICE_DEBUG
BYTE pci_config[256];
BYTE value =0x00;
unsigned char pci_config[256];
unsigned char value =0x00;
int ii,j;
u16 max_lat=0x0000;
memset(pci_config,0x00,256);
@ -1668,8 +1668,8 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
PSTxDesc pTD;
BOOL bFull=FALSE;
int works = 0;
BYTE byTsr0;
BYTE byTsr1;
unsigned char byTsr0;
unsigned char byTsr1;
unsigned int uFrameSize, uFIFOHeaderSize;
PSTxBufHead pTxBufHead;
struct net_device_stats* pStats = &pDevice->stats;
@ -1754,7 +1754,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
(pTD->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)) {
unsigned short wAID;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
skb = pTD->pTDInfo->skb;
if (BSSDBbIsSTAInNodeDB(pMgmt, (unsigned char *)(skb->data), &uNodeIndex)) {
@ -2123,13 +2123,13 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
PSTxDesc pHeadTD, pLastTD;
unsigned int cbFrameBodySize;
unsigned int uMACfragNum;
BYTE byPktType;
unsigned char byPktType;
BOOL bNeedEncryption = FALSE;
PSKeyItem pTransmitKey = NULL;
unsigned int cbHeaderSize;
unsigned int ii;
SKeyItem STempKey;
// BYTE byKeyIndex = 0;
// unsigned char byKeyIndex = 0;
if (pDevice->bStopTx0Pkt == TRUE) {
@ -2168,7 +2168,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
dev_kfree_skb_irq(skb);
return FALSE;
}
byPktType = (BYTE)pDevice->byPacketType;
byPktType = (unsigned char)pDevice->byPacketType;
if (pDevice->bFixRate) {
@ -2273,11 +2273,11 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
PSMgmtObject pMgmt = pDevice->pMgmt;
PSTxDesc pHeadTD, pLastTD;
unsigned int uNodeIndex = 0;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned short wAID;
unsigned int uMACfragNum = 1;
unsigned int cbFrameBodySize;
BYTE byPktType;
unsigned char byPktType;
unsigned int cbHeaderSize;
BOOL bNeedEncryption = FALSE;
PSKeyItem pTransmitKey = NULL;
@ -2446,7 +2446,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}
}
byPktType = (BYTE)pDevice->byPacketType;
byPktType = (unsigned char)pDevice->byPacketType;
if (pDevice->bFixRate) {
#ifdef PLICE_DEBUG
@ -2471,7 +2471,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}
}
pDevice->byACKRate = (BYTE) pDevice->wCurrentRate;
pDevice->byACKRate = (unsigned char) pDevice->wCurrentRate;
pDevice->byTopCCKBasicRate = RATE_1M;
pDevice->byTopOFDMBasicRate = RATE_6M;
}
@ -2634,9 +2634,9 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
//#endif
{
BYTE Protocol_Version; //802.1x Authentication
BYTE Packet_Type; //802.1x Authentication
BYTE Descriptor_type;
unsigned char Protocol_Version; //802.1x Authentication
unsigned char Packet_Type; //802.1x Authentication
unsigned char Descriptor_type;
unsigned short Key_info;
BOOL bTxeapol_key = FALSE;
Protocol_Version = skb->data[ETH_HLEN];
@ -2679,11 +2679,11 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
int max_count=0;
unsigned long dwMIBCounter=0;
PSMgmtObject pMgmt = pDevice->pMgmt;
BYTE byOrgPageSel=0;
unsigned char byOrgPageSel=0;
int handled = 0;
BYTE byData = 0;
unsigned char byData = 0;
int ii= 0;
// BYTE byRSSI;
// unsigned char byRSSI;
MACvReadISR(pDevice->PortOffset, &pDevice->dwIsr);
@ -2835,7 +2835,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == TRUE) && (pDevice->uCurrRSSI != 0)) {
long ldBm;
RFvRSSITodBm(pDevice, (BYTE) pDevice->uCurrRSSI, &ldBm);
RFvRSSITodBm(pDevice, (unsigned char) pDevice->uCurrRSSI, &ldBm);
for (ii=0;ii<BB_VGA_LEVEL;ii++) {
if (ldBm < pDevice->ldBmThreshold[ii]) {
pDevice->byBBVGANew = pDevice->abyBBVGA[ii];

View File

@ -66,7 +66,7 @@
//static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO;
const BYTE acbyRxRate[MAX_RATE] =
const unsigned char acbyRxRate[MAX_RATE] =
{2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
@ -76,7 +76,7 @@ const BYTE acbyRxRate[MAX_RATE] =
/*--------------------- Static Functions --------------------------*/
static BYTE s_byGetRateIdx(BYTE byRate);
static unsigned char s_byGetRateIdx(unsigned char byRate);
static
@ -249,9 +249,9 @@ s_vProcessRxMACHeader (
static BYTE s_byGetRateIdx (BYTE byRate)
static unsigned char s_byGetRateIdx (unsigned char byRate)
{
BYTE byRateIdx;
unsigned char byRateIdx;
for (byRateIdx = 0; byRateIdx <MAX_RATE ; byRateIdx++) {
if (acbyRxRate[byRateIdx%MAX_RATE] == byRate)
@ -684,8 +684,8 @@ device_receive_frame (
}
//mike add:station mode check eapol-key challenge--->
{
BYTE Protocol_Version; //802.1x Authentication
BYTE Packet_Type; //802.1x Authentication
unsigned char Protocol_Version; //802.1x Authentication
unsigned char Packet_Type; //802.1x Authentication
if (bIsWEP)
cbIVOffset = 8;
else
@ -753,7 +753,7 @@ device_receive_frame (
// -----------------------------------------------
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == TRUE)){
BYTE abyMacHdr[24];
unsigned char abyMacHdr[24];
// Only 802.1x packet incoming allowed
if (bIsWEP)
@ -1176,9 +1176,9 @@ static BOOL s_bHandleRxEncryption (
{
unsigned int PayloadLen = FrameSize;
unsigned char *pbyIV;
BYTE byKeyIdx;
unsigned char byKeyIdx;
PSKeyItem pKey = NULL;
BYTE byDecMode = KEY_CTL_WEP;
unsigned char byDecMode = KEY_CTL_WEP;
PSMgmtObject pMgmt = pDevice->pMgmt;
@ -1323,8 +1323,8 @@ static BOOL s_bHostWepRxEncryption (
{
unsigned int PayloadLen = FrameSize;
unsigned char *pbyIV;
BYTE byKeyIdx;
BYTE byDecMode = KEY_CTL_WEP;
unsigned char byKeyIdx;
unsigned char byDecMode = KEY_CTL_WEP;
PS802_11Header pMACHeader;
@ -1451,7 +1451,7 @@ static BOOL s_bAPModeRxData (
PSMgmtObject pMgmt = pDevice->pMgmt;
BOOL bRelayAndForward = FALSE;
BOOL bRelayOnly = FALSE;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned short wAID;

View File

@ -472,10 +472,10 @@ static int hostap_set_encryption(PSDevice pDevice,
{
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned long dwKeyIndex = 0;
BYTE abyKey[MAX_KEY_LEN];
BYTE abySeq[MAX_KEY_LEN];
unsigned char abyKey[MAX_KEY_LEN];
unsigned char abySeq[MAX_KEY_LEN];
NDIS_802_11_KEY_RSC KeyRSC;
BYTE byKeyDecMode = KEY_CTL_WEP;
unsigned char byKeyDecMode = KEY_CTL_WEP;
int ret = 0;
int iNodeIndex = -1;
int ii;
@ -555,7 +555,7 @@ static int hostap_set_encryption(PSDevice pDevice,
dwKeyIndex = (unsigned long)(param->u.crypt.idx);
if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) {
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->bTransmitKey = TRUE;
dwKeyIndex |= (1 << 31);
}
@ -736,7 +736,7 @@ static int hostap_get_encryption(PSDevice 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] = (unsigned char)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8);
}
return ret;

View File

@ -75,10 +75,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
PKnownNodeDB pNode;
unsigned int ii, jj;
SCmdLinkStatus sLinkStatus;
BYTE abySuppRates[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
BYTE abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
unsigned char abySuppRates[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
unsigned char abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
unsigned long dwKeyIndex= 0;
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
long ldBm;
pReq->wResult = 0;
@ -147,7 +147,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
}
else {
///////read zonetype
BYTE zonetype=0;
unsigned char zonetype=0;
if(zonetype == 0x00) { //USA
@ -340,7 +340,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
pList->sBSSIDList[ii].wBeaconInterval = pBSS->wBeaconInterval;
pList->sBSSIDList[ii].wCapInfo = pBSS->wCapInfo;
// pList->sBSSIDList[ii].uRSSI = pBSS->uRSSI;
RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm);
RFvRSSITodBm(pDevice, (unsigned char)(pBSS->uRSSI), &ldBm);
pList->sBSSIDList[ii].uRSSI = (unsigned int)ldBm;
memcpy(pList->sBSSIDList[ii].abyBSSID, pBSS->abyBSSID, WLAN_BSSID_LEN);
pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID;

View File

@ -104,11 +104,11 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
#endif
if(pDevice->scStatistic.LinkQuality > 100)
pDevice->scStatistic.LinkQuality = 100;
pDevice->wstats.qual.qual =(BYTE) pDevice->scStatistic.LinkQuality;
pDevice->wstats.qual.qual =(unsigned char) pDevice->scStatistic.LinkQuality;
#else
pDevice->wstats.qual.qual = pDevice->byCurrSQ;
#endif
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
pDevice->wstats.qual.level = ldBm;
//pDevice->wstats.qual.level = 0x100 - pDevice->uCurrRSSI;
pDevice->wstats.qual.noise = 0;
@ -175,7 +175,7 @@ int iwctl_siwscan(struct net_device *dev,
PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct iw_scan_req *req = (struct iw_scan_req *)extra;
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
PWLAN_IE_SSID pItemSSID=NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n");
@ -309,7 +309,7 @@ int iwctl_giwscan(struct net_device *dev,
//ADD quality
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVQUAL;
RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm);
RFvRSSITodBm(pDevice, (unsigned char)(pBSS->uRSSI), &ldBm);
iwe.u.qual.level = ldBm;
iwe.u.qual.noise = 0;
//2008-0409-01, <Add> by Einsn Liu
@ -577,7 +577,7 @@ int iwctl_giwrange(struct net_device *dev,
{
struct iw_range *range = (struct iw_range *) extra;
int i,k;
BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
unsigned char abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE \n");
@ -688,7 +688,7 @@ int iwctl_siwap(struct net_device *dev,
PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int rc = 0;
BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00};
unsigned char ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00};
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAP \n");
if (pMgmt->eScanState == WMAC_IS_SCANNING) {
@ -830,7 +830,7 @@ int iwctl_siwessid(struct net_device *dev,
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PWLAN_IE_SSID pItemSSID;
//2008-0409-05, <Add> by Einsn Liu
BYTE len;
unsigned char len;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID \n");
@ -885,7 +885,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
/*******search if in hidden ssid mode ****/
{
PKnownBSS pCurr = NULL;
BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned int ii , uSameBssidNum=0;
memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID));
@ -981,7 +981,7 @@ int iwctl_siwrate(struct net_device *dev,
int rc = 0;
u8 brate = 0;
int i;
BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
unsigned char abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n");
@ -1068,7 +1068,7 @@ int iwctl_giwrate(struct net_device *dev,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n");
{
BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
unsigned char abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90};
int brate = 0;
//2008-5-8 <modify> by chester
if(pDevice->bLinkPass){
@ -1368,7 +1368,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
);
spin_unlock_irq(&pDevice->lock);
}
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->uKeyLength = wrq->length;
pDevice->bTransmitKey = TRUE;
pDevice->bEncryptionEnable = TRUE;
@ -1384,14 +1384,14 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Just set Default key Index:\n");
pkeytab=&(pDevice->sKey.KeyTable[MAX_KEY_TABLE-1]);
if(pkeytab->GroupKey[(BYTE)dwKeyIndex].uKeyLength==0){
if(pkeytab->GroupKey[(unsigned char)dwKeyIndex].uKeyLength==0){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Default key len is 0\n");
rc = -EINVAL;
return rc;
}
pDevice->byKeyIndex =(BYTE)dwKeyIndex;
pDevice->byKeyIndex =(unsigned char)dwKeyIndex;
pkeytab->dwGTKeyIndex =dwKeyIndex | (1 << 31);
pkeytab->GroupKey[(BYTE)dwKeyIndex].dwKeyIndex=dwKeyIndex | (1 << 31);
pkeytab->GroupKey[(unsigned char)dwKeyIndex].dwKeyIndex=dwKeyIndex | (1 << 31);
}
}else {//disable the key
@ -1460,7 +1460,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
);
spin_unlock_irq(&pDevice->lock);
}
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->uKeyLength = wrq->length;
pDevice->bTransmitKey = TRUE;
pDevice->bEncryptionEnable = TRUE;
@ -1549,7 +1549,7 @@ int iwctl_giwencode(struct net_device *dev,
else
wrq->flags |= IW_ENCODE_OPEN;
if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (BYTE)index , &pKey)){
if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (unsigned char)index , &pKey)){
wrq->length = pKey->uKeyLength;
memcpy(abyKey, pKey->abyKey, pKey->uKeyLength);
//2007-0207-06,<Modify> by EinsnLiu
@ -1622,7 +1622,7 @@ int iwctl_giwencode(struct net_device *dev,
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, (unsigned char)index , &pKey)){
wrq->length = pKey->uKeyLength;
memcpy(abyKey, pKey->abyKey, pKey->uKeyLength);
memcpy(extra, abyKey, WLAN_WEP232_KEYLEN);
@ -1730,7 +1730,7 @@ int iwctl_giwsens(struct net_device *dev,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n");
if (pDevice->bLinkPass == TRUE) {
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
wrq->value = ldBm;
}
else {

View File

@ -196,9 +196,9 @@ BOOL KeybSetKey (
unsigned long uKeyLength,
PQWORD pKeyRSC,
unsigned char *pbyKey,
BYTE byKeyDecMode,
unsigned char byKeyDecMode,
unsigned long dwIoBase,
BYTE byLocalID
unsigned char byLocalID
)
{
int i,j;
@ -637,9 +637,9 @@ BOOL KeybSetDefaultKey (
unsigned long uKeyLength,
PQWORD pKeyRSC,
unsigned char *pbyKey,
BYTE byKeyDecMode,
unsigned char byKeyDecMode,
unsigned long dwIoBase,
BYTE byLocalID
unsigned char byLocalID
)
{
unsigned int ii;
@ -744,9 +744,9 @@ BOOL KeybSetAllGroupKey (
unsigned long uKeyLength,
PQWORD pKeyRSC,
unsigned char *pbyKey,
BYTE byKeyDecMode,
unsigned char byKeyDecMode,
unsigned long dwIoBase,
BYTE byLocalID
unsigned char byLocalID
)
{
int i;

View File

@ -59,20 +59,20 @@ typedef struct tagSKeyItem
{
BOOL bKeyValid;
unsigned long uKeyLength;
BYTE abyKey[MAX_KEY_LEN];
unsigned char abyKey[MAX_KEY_LEN];
QWORD KeyRSC;
unsigned long dwTSC47_16;
unsigned short wTSC15_0;
BYTE byCipherSuite;
BYTE byReserved0;
unsigned char byCipherSuite;
unsigned char byReserved0;
unsigned long dwKeyIndex;
void *pvKeyTable;
} SKeyItem, *PSKeyItem; //64
typedef struct tagSKeyTable
{
BYTE abyBSSID[ETH_ALEN]; //6
BYTE byReserved0[2]; //8
unsigned char abyBSSID[ETH_ALEN]; //6
unsigned char byReserved0[2]; //8
SKeyItem PairwiseKey;
SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
unsigned long dwGTKeyIndex; // GroupTransmitKey Index
@ -83,7 +83,7 @@ typedef struct tagSKeyTable
BOOL bSoftWEP;
unsigned short wKeyCtl; // for address of wKeyCtl at align 4
BYTE byReserved1[6];
unsigned char byReserved1[6];
} SKeyTable, *PSKeyTable; //348
typedef struct tagSKeyManagement
@ -117,9 +117,9 @@ BOOL KeybSetKey(
unsigned long uKeyLength,
PQWORD pKeyRSC,
unsigned char *pbyKey,
BYTE byKeyDecMode,
unsigned char byKeyDecMode,
unsigned long dwIoBase,
BYTE byLocalID
unsigned char byLocalID
);
BOOL KeybSetDefaultKey(
@ -128,9 +128,9 @@ BOOL KeybSetDefaultKey(
unsigned long uKeyLength,
PQWORD pKeyRSC,
unsigned char *pbyKey,
BYTE byKeyDecMode,
unsigned char byKeyDecMode,
unsigned long dwIoBase,
BYTE byLocalID
unsigned char byLocalID
);
BOOL KeybRemoveKey(
@ -175,9 +175,9 @@ BOOL KeybSetAllGroupKey (
unsigned long uKeyLength,
PQWORD pKeyRSC,
unsigned char *pbyKey,
BYTE byKeyDecMode,
unsigned char byKeyDecMode,
unsigned long dwIoBase,
BYTE byLocalID
unsigned char byLocalID
);
#endif // __KEY_H__

View File

@ -140,9 +140,9 @@ void MACvReadAllRegs (unsigned long dwIoBase, unsigned char *pbyMacRegs)
* Return Value: TRUE if all test bits On; otherwise FALSE
*
*/
BOOL MACbIsRegBitsOn (unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits)
BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
{
BYTE byData;
unsigned char byData;
VNSvInPortB(dwIoBase + byRegOfs, &byData);
return (byData & byTestBits) == byTestBits;
@ -163,9 +163,9 @@ BOOL MACbIsRegBitsOn (unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits)
* Return Value: TRUE if all test bits Off; otherwise FALSE
*
*/
BOOL MACbIsRegBitsOff (unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits)
BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
{
BYTE byData;
unsigned char byData;
VNSvInPortB(dwIoBase + byRegOfs, &byData);
return !(byData & byTestBits);
@ -209,9 +209,9 @@ BOOL MACbIsIntDisable (unsigned long dwIoBase)
* Return Value: Mask Value read
*
*/
BYTE MACbyReadMultiAddr (unsigned long dwIoBase, unsigned int uByteIdx)
unsigned char MACbyReadMultiAddr (unsigned long dwIoBase, unsigned int uByteIdx)
{
BYTE byData;
unsigned char byData;
MACvSelectPage1(dwIoBase);
VNSvInPortB(dwIoBase + MAC_REG_MAR0 + uByteIdx, &byData);
@ -234,7 +234,7 @@ BYTE MACbyReadMultiAddr (unsigned long dwIoBase, unsigned int uByteIdx)
* Return Value: none
*
*/
void MACvWriteMultiAddr (unsigned long dwIoBase, unsigned int uByteIdx, BYTE byData)
void MACvWriteMultiAddr (unsigned long dwIoBase, unsigned int uByteIdx, unsigned char byData)
{
MACvSelectPage1(dwIoBase);
VNSvOutPortB(dwIoBase + MAC_REG_MAR0 + uByteIdx, byData);
@ -255,11 +255,11 @@ void MACvWriteMultiAddr (unsigned long dwIoBase, unsigned int uByteIdx, BYTE byD
* Return Value: none
*
*/
void MACvSetMultiAddrByHash (unsigned long dwIoBase, BYTE byHashIdx)
void MACvSetMultiAddrByHash (unsigned long dwIoBase, unsigned char byHashIdx)
{
unsigned int uByteIdx;
BYTE byBitMask;
BYTE byOrgValue;
unsigned char byBitMask;
unsigned char byOrgValue;
// calculate byte position
uByteIdx = byHashIdx / 8;
@ -269,7 +269,7 @@ void MACvSetMultiAddrByHash (unsigned long dwIoBase, BYTE byHashIdx)
byBitMask <<= (byHashIdx % 8);
// turn on the bit
byOrgValue = MACbyReadMultiAddr(dwIoBase, uByteIdx);
MACvWriteMultiAddr(dwIoBase, uByteIdx, (BYTE)(byOrgValue | byBitMask));
MACvWriteMultiAddr(dwIoBase, uByteIdx, (unsigned char)(byOrgValue | byBitMask));
}
/*
@ -286,11 +286,11 @@ void MACvSetMultiAddrByHash (unsigned long dwIoBase, BYTE byHashIdx)
* Return Value: none
*
*/
void MACvResetMultiAddrByHash (unsigned long dwIoBase, BYTE byHashIdx)
void MACvResetMultiAddrByHash (unsigned long dwIoBase, unsigned char byHashIdx)
{
unsigned int uByteIdx;
BYTE byBitMask;
BYTE byOrgValue;
unsigned char byBitMask;
unsigned char byOrgValue;
// calculate byte position
uByteIdx = byHashIdx / 8;
@ -300,7 +300,7 @@ void MACvResetMultiAddrByHash (unsigned long dwIoBase, BYTE byHashIdx)
byBitMask <<= (byHashIdx % 8);
// turn off the bit
byOrgValue = MACbyReadMultiAddr(dwIoBase, uByteIdx);
MACvWriteMultiAddr(dwIoBase, uByteIdx, (BYTE)(byOrgValue & (~byBitMask)));
MACvWriteMultiAddr(dwIoBase, uByteIdx, (unsigned char)(byOrgValue & (~byBitMask)));
}
/*
@ -317,9 +317,9 @@ void MACvResetMultiAddrByHash (unsigned long dwIoBase, BYTE byHashIdx)
* Return Value: none
*
*/
void MACvSetRxThreshold (unsigned long dwIoBase, BYTE byThreshold)
void MACvSetRxThreshold (unsigned long dwIoBase, unsigned char byThreshold)
{
BYTE byOrgValue;
unsigned char byOrgValue;
ASSERT(byThreshold < 4);
@ -363,9 +363,9 @@ void MACvGetRxThreshold (unsigned long dwIoBase, unsigned char *pbyThreshold)
* Return Value: none
*
*/
void MACvSetTxThreshold (unsigned long dwIoBase, BYTE byThreshold)
void MACvSetTxThreshold (unsigned long dwIoBase, unsigned char byThreshold)
{
BYTE byOrgValue;
unsigned char byOrgValue;
ASSERT(byThreshold < 4);
@ -409,9 +409,9 @@ void MACvGetTxThreshold (unsigned long dwIoBase, unsigned char *pbyThreshold)
* Return Value: none
*
*/
void MACvSetDmaLength (unsigned long dwIoBase, BYTE byDmaLength)
void MACvSetDmaLength (unsigned long dwIoBase, unsigned char byDmaLength)
{
BYTE byOrgValue;
unsigned char byOrgValue;
ASSERT(byDmaLength < 4);
@ -455,7 +455,7 @@ void MACvGetDmaLength (unsigned long dwIoBase, unsigned char *pbyDmaLength)
* Return Value: none
*
*/
void MACvSetShortRetryLimit (unsigned long dwIoBase, BYTE byRetryLimit)
void MACvSetShortRetryLimit (unsigned long dwIoBase, unsigned char byRetryLimit)
{
// set SRT
VNSvOutPortB(dwIoBase + MAC_REG_SRT, byRetryLimit);
@ -494,7 +494,7 @@ void MACvGetShortRetryLimit (unsigned long dwIoBase, unsigned char *pbyRetryLimi
* Return Value: none
*
*/
void MACvSetLongRetryLimit (unsigned long dwIoBase, BYTE byRetryLimit)
void MACvSetLongRetryLimit (unsigned long dwIoBase, unsigned char byRetryLimit)
{
// set LRT
VNSvOutPortB(dwIoBase + MAC_REG_LRT, byRetryLimit);
@ -533,9 +533,9 @@ void MACvGetLongRetryLimit (unsigned long dwIoBase, unsigned char *pbyRetryLimit
* Return Value: none
*
*/
void MACvSetLoopbackMode (unsigned long dwIoBase, BYTE byLoopbackMode)
void MACvSetLoopbackMode (unsigned long dwIoBase, unsigned char byLoopbackMode)
{
BYTE byOrgValue;
unsigned char byOrgValue;
ASSERT(byLoopbackMode < 3);
byLoopbackMode <<= 6;
@ -561,7 +561,7 @@ void MACvSetLoopbackMode (unsigned long dwIoBase, BYTE byLoopbackMode)
*/
BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
{
BYTE byOrgValue;
unsigned char byOrgValue;
VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue);
if (byOrgValue & (TEST_LBINT | TEST_LBEXT))
@ -585,8 +585,8 @@ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
*/
void MACvSetPacketFilter (unsigned long dwIoBase, unsigned short wFilterType)
{
BYTE byOldRCR;
BYTE byNewRCR = 0;
unsigned char byOldRCR;
unsigned char byNewRCR = 0;
// if only in DIRECTED mode, multicast-address will set to zero,
// but if other mode exist (e.g. PROMISCUOUS), multicast-address
@ -775,7 +775,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
*/
BOOL MACbSoftwareReset (unsigned long dwIoBase)
{
BYTE byData;
unsigned char byData;
unsigned short ww;
// turn on HOSTCR_SOFTRST, just write 0x01 to reset
@ -808,7 +808,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase)
*/
BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
{
BYTE abyTmpRegData[MAC_MAX_CONTEXT_SIZE_PAGE0+MAC_MAX_CONTEXT_SIZE_PAGE1];
unsigned char abyTmpRegData[MAC_MAX_CONTEXT_SIZE_PAGE0+MAC_MAX_CONTEXT_SIZE_PAGE1];
BOOL bRetVal;
// PATCH....
@ -843,7 +843,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
{
unsigned short ww;
unsigned long dwData;
BYTE byData;
unsigned char byData;
// turn off wow temp for turn off Rx safely
@ -904,7 +904,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase)
{
unsigned short ww;
unsigned long dwData;
BYTE byData;
unsigned char byData;
// Clear TX DMA
//Tx0
@ -1082,8 +1082,8 @@ void MACvInitialize (unsigned long dwIoBase)
void MACvSetCurrRx0DescAddr (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{
unsigned short ww;
BYTE byData;
BYTE byOrgDMACtl;
unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(dwIoBase + MAC_REG_RXDMACTL0, &byOrgDMACtl);
if (byOrgDMACtl & DMACTL_RUN) {
@ -1120,8 +1120,8 @@ BYTE byOrgDMACtl;
void MACvSetCurrRx1DescAddr (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{
unsigned short ww;
BYTE byData;
BYTE byOrgDMACtl;
unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(dwIoBase + MAC_REG_RXDMACTL1, &byOrgDMACtl);
if (byOrgDMACtl & DMACTL_RUN) {
@ -1158,8 +1158,8 @@ BYTE byOrgDMACtl;
void MACvSetCurrTx0DescAddrEx (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{
unsigned short ww;
BYTE byData;
BYTE byOrgDMACtl;
unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(dwIoBase + MAC_REG_TXDMACTL0, &byOrgDMACtl);
if (byOrgDMACtl & DMACTL_RUN) {
@ -1197,8 +1197,8 @@ BYTE byOrgDMACtl;
void MACvSetCurrAC0DescAddrEx (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{
unsigned short ww;
BYTE byData;
BYTE byOrgDMACtl;
unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(dwIoBase + MAC_REG_AC0DMACTL, &byOrgDMACtl);
if (byOrgDMACtl & DMACTL_RUN) {
@ -1246,7 +1246,7 @@ void MACvSetCurrTXDescAddr (int iTxType, unsigned long dwIoBase, unsigned long d
*/
void MACvTimer0MicroSDelay (unsigned long dwIoBase, unsigned int uDelay)
{
BYTE byValue;
unsigned char byValue;
unsigned int uu,ii;
VNSvOutPortB(dwIoBase + MAC_REG_TMCTL0, 0);
@ -1321,7 +1321,7 @@ void MACvSetMISCFifo (unsigned long dwIoBase, unsigned short wOffset, unsigned l
BOOL MACbTxDMAOff (unsigned long dwIoBase, unsigned int idx)
{
BYTE byData;
unsigned char byData;
unsigned int ww = 0;
if (idx == TYPE_TXDMA0) {
@ -1371,7 +1371,7 @@ void MACvClearBusSusInd (unsigned long dwIoBase)
void MACvEnableBusSusEn (unsigned long dwIoBase)
{
BYTE byOrgValue;
unsigned char byOrgValue;
unsigned long dwOrgValue;
unsigned int ww;
// check if BcnSusInd enabled
@ -1393,7 +1393,7 @@ void MACvEnableBusSusEn (unsigned long dwIoBase)
BOOL MACbFlushSYNCFifo (unsigned long dwIoBase)
{
BYTE byOrgValue;
unsigned char byOrgValue;
unsigned int ww;
// Read MACCR
VNSvInPortB(dwIoBase + MAC_REG_MACCR , &byOrgValue);
@ -1417,7 +1417,7 @@ BOOL MACbFlushSYNCFifo (unsigned long dwIoBase)
BOOL MACbPSWakeup (unsigned long dwIoBase)
{
BYTE byOrgValue;
unsigned char byOrgValue;
unsigned int ww;
// Read PSCTL
if (MACbIsRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PS)) {
@ -1456,7 +1456,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase)
*/
void MACvSetKeyEntry (unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, BYTE byLocalID)
unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, unsigned char byLocalID)
{
unsigned short wOffset;
unsigned long dwData;
@ -1551,7 +1551,7 @@ unsigned short wOffset;
*/
void MACvSetDefaultKeyEntry (unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID)
unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID)
{
unsigned short wOffset;
unsigned long dwData;
@ -1601,7 +1601,7 @@ int ii;
*
*/
/*
void MACvEnableDefaultKey (unsigned long dwIoBase, BYTE byLocalID)
void MACvEnableDefaultKey (unsigned long dwIoBase, unsigned char byLocalID)
{
unsigned short wOffset;
unsigned long dwData;
@ -1667,7 +1667,7 @@ unsigned long dwData;
*
*/
void MACvSetDefaultTKIPKeyEntry (unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID)
unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID)
{
unsigned short wOffset;
unsigned long dwData;
@ -1723,7 +1723,7 @@ int ii;
*
*/
void MACvSetDefaultKeyCtl (unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID)
void MACvSetDefaultKeyCtl (unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, unsigned char byLocalID)
{
unsigned short wOffset;
unsigned long dwData;

View File

@ -663,7 +663,7 @@
#define MACvRegBitsOn(dwIoBase, byRegOfs, byBits) \
{ \
BYTE byData; \
unsigned char byData; \
VNSvInPortB(dwIoBase + byRegOfs, &byData); \
VNSvOutPortB(dwIoBase + byRegOfs, byData | (byBits)); \
}
@ -684,7 +684,7 @@
#define MACvRegBitsOnEx(dwIoBase, byRegOfs, byMask, byBits) \
{ \
BYTE byData; \
unsigned char byData; \
VNSvInPortB(dwIoBase + byRegOfs, &byData); \
byData &= byMask; \
VNSvOutPortB(dwIoBase + byRegOfs, byData | (byBits)); \
@ -692,7 +692,7 @@
#define MACvRegBitsOff(dwIoBase, byRegOfs, byBits) \
{ \
BYTE byData; \
unsigned char byData; \
VNSvInPortB(dwIoBase + byRegOfs, &byData); \
VNSvOutPortB(dwIoBase + byRegOfs, byData & ~(byBits)); \
}
@ -955,7 +955,7 @@
#define MACvClearStckDS(dwIoBase) \
{ \
BYTE byOrgValue; \
unsigned char byOrgValue; \
VNSvInPortB(dwIoBase + MAC_REG_STICKHW, &byOrgValue); \
byOrgValue = byOrgValue & 0xFC; \
VNSvOutPortB(dwIoBase + MAC_REG_STICKHW, byOrgValue); \
@ -1077,32 +1077,32 @@
extern unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester
void MACvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyMacRegs);
BOOL MACbIsRegBitsOn(unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits);
BOOL MACbIsRegBitsOff(unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits);
BOOL MACbIsRegBitsOn(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
BOOL MACbIsRegBitsOff(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
BOOL MACbIsIntDisable(unsigned long dwIoBase);
BYTE MACbyReadMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx);
void MACvWriteMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx, BYTE byData);
void MACvSetMultiAddrByHash(unsigned long dwIoBase, BYTE byHashIdx);
void MACvResetMultiAddrByHash(unsigned long dwIoBase, BYTE byHashIdx);
unsigned char MACbyReadMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx);
void MACvWriteMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx, unsigned char byData);
void MACvSetMultiAddrByHash(unsigned long dwIoBase, unsigned char byHashIdx);
void MACvResetMultiAddrByHash(unsigned long dwIoBase, unsigned char byHashIdx);
void MACvSetRxThreshold(unsigned long dwIoBase, BYTE byThreshold);
void MACvSetRxThreshold(unsigned long dwIoBase, unsigned char byThreshold);
void MACvGetRxThreshold(unsigned long dwIoBase, unsigned char *pbyThreshold);
void MACvSetTxThreshold(unsigned long dwIoBase, BYTE byThreshold);
void MACvSetTxThreshold(unsigned long dwIoBase, unsigned char byThreshold);
void MACvGetTxThreshold(unsigned long dwIoBase, unsigned char *pbyThreshold);
void MACvSetDmaLength(unsigned long dwIoBase, BYTE byDmaLength);
void MACvSetDmaLength(unsigned long dwIoBase, unsigned char byDmaLength);
void MACvGetDmaLength(unsigned long dwIoBase, unsigned char *pbyDmaLength);
void MACvSetShortRetryLimit(unsigned long dwIoBase, BYTE byRetryLimit);
void MACvSetShortRetryLimit(unsigned long dwIoBase, unsigned char byRetryLimit);
void MACvGetShortRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit);
void MACvSetLongRetryLimit(unsigned long dwIoBase, BYTE byRetryLimit);
void MACvSetLongRetryLimit(unsigned long dwIoBase, unsigned char byRetryLimit);
void MACvGetLongRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit);
void MACvSetLoopbackMode(unsigned long dwIoBase, BYTE byLoopbackMode);
void MACvSetLoopbackMode(unsigned long dwIoBase, unsigned char byLoopbackMode);
BOOL MACbIsInLoopbackMode(unsigned long dwIoBase);
void MACvSetPacketFilter(unsigned long dwIoBase, unsigned short wFilterType);
@ -1140,15 +1140,15 @@ BOOL MACbFlushSYNCFifo(unsigned long dwIoBase);
BOOL MACbPSWakeup(unsigned long dwIoBase);
void MACvSetKeyEntry(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, BYTE byLocalID);
unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, unsigned char byLocalID);
void MACvDisableKeyEntry(unsigned long dwIoBase, unsigned int uEntryIdx);
void MACvSetDefaultKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID);
//void MACvEnableDefaultKey(unsigned long dwIoBase, BYTE byLocalID);
unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID);
//void MACvEnableDefaultKey(unsigned long dwIoBase, unsigned char byLocalID);
void MACvDisableDefaultKey(unsigned long dwIoBase);
void MACvSetDefaultTKIPKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID);
void MACvSetDefaultKeyCtl(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID);
unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID);
void MACvSetDefaultKeyCtl(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, unsigned char byLocalID);
#endif // __MAC_H__

View File

@ -177,7 +177,7 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, unsigned long dwIsr)
*
*/
void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxRate,
unsigned char byRSR, unsigned char byNewRSR, unsigned char byRxRate,
unsigned char *pbyBuffer, unsigned int cbFrameLength)
{
//need change
@ -389,9 +389,9 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
void
STAvUpdateRDStatCounterEx (
PSStatCounter pStatistic,
BYTE byRSR,
BYTE byNewRSR,
BYTE byRxRate,
unsigned char byRSR,
unsigned char byNewRSR,
unsigned char byRxRate,
unsigned char *pbyBuffer,
unsigned int cbFrameLength
)
@ -432,8 +432,8 @@ STAvUpdateRDStatCounterEx (
void
STAvUpdateTDStatCounter (
PSStatCounter pStatistic,
BYTE byTSR0,
BYTE byTSR1,
unsigned char byTSR0,
unsigned char byTSR1,
unsigned char *pbyBuffer,
unsigned int cbFrameLength,
unsigned int uIdx
@ -441,7 +441,7 @@ STAvUpdateTDStatCounter (
{
PWLAN_80211HDR_A4 pHeader;
unsigned char *pbyDestAddr;
BYTE byTSR0_NCR = byTSR0 & TSR0_NCR;
unsigned char byTSR0_NCR = byTSR0 & TSR0_NCR;

View File

@ -78,7 +78,7 @@ typedef struct tagSMib2Counter {
long ifType;
long ifMtu;
unsigned long ifSpeed;
BYTE ifPhysAddress[ETH_ALEN];
unsigned char ifPhysAddress[ETH_ALEN];
long ifAdminStatus;
long ifOperStatus;
unsigned long ifLastChange;
@ -292,8 +292,8 @@ typedef struct tagSStatCounter {
unsigned long dwCntRxFrmLength;
unsigned long dwCntTxBufLength;
BYTE abyCntRxPattern[16];
BYTE abyCntTxPattern[16];
unsigned char abyCntRxPattern[16];
unsigned char abyCntTxPattern[16];
@ -347,14 +347,14 @@ void STAvClearAllCounter(PSStatCounter pStatistic);
void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr);
void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxRate,
unsigned char byRSR, unsigned char byNewRSR, unsigned char byRxRate,
unsigned char *pbyBuffer, unsigned int cbFrameLength);
void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRsr, BYTE byRxRate,
unsigned char byRSR, unsigned char byNewRsr, unsigned char byRxRate,
unsigned char *pbyBuffer, unsigned int cbFrameLength);
void STAvUpdateTDStatCounter(PSStatCounter pStatistic, BYTE byTSR0, BYTE byTSR1,
void STAvUpdateTDStatCounter(PSStatCounter pStatistic, unsigned char byTSR0, unsigned char byTSR1,
unsigned char *pbyBuffer, unsigned int cbFrameLength, unsigned int uIdx);
void STAvUpdateTDStatCounterEx(

View File

@ -26,8 +26,8 @@
* Date: Sep 4, 2002
*
* Functions:
* s_dwGetUINT32 - Convert from BYTE[] to unsigned long in a portable way
* s_vPutUINT32 - Convert from unsigned long to BYTE[] in a portable way
* s_dwGetUINT32 - Convert from unsigned char [] to unsigned long in a portable way
* s_vPutUINT32 - Convert from unsigned long to unsigned char [] in a portable way
* s_vClear - Reset the state to the empty message.
* s_vSetKey - Set the key.
* MIC_vInit - Set the key.
@ -48,13 +48,13 @@
/*--------------------- Static Functions --------------------------*/
/*
static unsigned long s_dwGetUINT32(BYTE * p); // Get unsigned long from 4 bytes LSByte first
static void s_vPutUINT32(BYTE* p, unsigned long val); // Put unsigned long into 4 bytes LSByte first
static unsigned long s_dwGetUINT32(unsigned char *p); // Get unsigned long from 4 bytes LSByte first
static void s_vPutUINT32(unsigned char *p, unsigned long val); // Put unsigned long 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(unsigned long dwK0, unsigned long dwK1);
static void s_vAppendByte(BYTE b); // Add a single byte to the internal message
static void s_vAppendByte(unsigned char b); // Add a single byte to the internal message
/*--------------------- Export Variables --------------------------*/
static unsigned long L, R; // Current state
@ -66,8 +66,8 @@ static unsigned int nBytesInM; // # bytes in M
/*--------------------- Export Functions --------------------------*/
/*
static unsigned long s_dwGetUINT32 (BYTE * p)
// Convert from BYTE[] to unsigned long in a portable way
static unsigned long s_dwGetUINT32 (unsigned char *p)
// Convert from unsigned char [] to unsigned long in a portable way
{
unsigned long res = 0;
unsigned int i;
@ -78,13 +78,13 @@ static unsigned long s_dwGetUINT32 (BYTE * p)
return res;
}
static void s_vPutUINT32 (BYTE* p, unsigned long val)
// Convert from unsigned long to BYTE[] in a portable way
static void s_vPutUINT32 (unsigned char *p, unsigned long val)
// Convert from unsigned long to unsigned char [] in a portable way
{
unsigned int i;
for(i=0; i<4; i++ )
{
*p++ = (BYTE) (val & 0xff);
*p++ = (unsigned char) (val & 0xff);
val >>= 8;
}
}
@ -108,7 +108,7 @@ static void s_vSetKey (unsigned long dwK0, unsigned long dwK1)
s_vClear();
}
static void s_vAppendByte (BYTE b)
static void s_vAppendByte (unsigned char b)
{
// Append the byte to our word-sized buffer
M |= b << (8*nBytesInM);

View File

@ -44,15 +44,15 @@ void rc4_init(PRC4Ext pRC4, unsigned char *pbyKey, unsigned int cbKey_len)
pRC4->ux = 0;
pRC4->uy = 0;
for (idx = 0; idx < 256; idx++)
pbyst[idx] = (BYTE)idx;
pbyst[idx] = (unsigned char)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] = (unsigned char)ust1;
pbyst[idx] = (unsigned char)ust2;
if (++keyindex >= cbKey_len)
keyindex = 0;
}
@ -72,8 +72,8 @@ 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] = (unsigned char)ustx;
pbyst[ux] = (unsigned char)usty;
return pbyst[(ustx + usty) & 0xff];
}
@ -83,5 +83,5 @@ void rc4_encrypt(PRC4Ext pRC4, unsigned char *pbyDest,
{
unsigned int ii;
for (ii = 0; ii < cbData_len; ii++)
pbyDest[ii] = (BYTE)(pbySrc[ii] ^ rc4_byte(pRC4));
pbyDest[ii] = (unsigned char)(pbySrc[ii] ^ rc4_byte(pRC4));
}

View File

@ -37,7 +37,7 @@
typedef struct {
unsigned int ux;
unsigned int uy;
BYTE abystate[256];
unsigned char abystate[256];
} RC4Ext, *PRC4Ext;
void rc4_init(PRC4Ext pRC4, unsigned char *pbyKey, unsigned int cbKey_len);

View File

@ -517,7 +517,7 @@ BOOL s_bAL7230Init (unsigned long dwIoBase)
}
// Need to Pull PLLON low when writing channel registers through 3-wire interface
BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, BYTE byChannel)
BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
{
BOOL bResult;
@ -734,7 +734,7 @@ MACvTimer0MicroSDelay(dwIoBase, 30); //delay 30 us
return bResult;
}
BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, BYTE byChannel)
BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
{
BOOL bResult;
@ -875,7 +875,7 @@ BOOL bResult = TRUE;
* Return Value: TRUE if succeeded; FALSE if failed.
*
*/
BOOL RFbSelectChannel (unsigned long dwIoBase, BYTE byRFType, BYTE byChannel)
BOOL RFbSelectChannel (unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel)
{
BOOL bResult = TRUE;
switch (byRFType) {
@ -911,11 +911,11 @@ BOOL bResult = TRUE;
* Return Value: None.
*
*/
BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, BYTE byRFType, unsigned int uChannel)
BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel)
{
int ii;
BYTE byInitCount = 0;
BYTE bySleepCount = 0;
unsigned char byInitCount = 0;
unsigned char bySleepCount = 0;
VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, 0);
switch (byRFType) {
@ -1003,9 +1003,9 @@ BOOL RFbSetPower (
)
{
BOOL bResult = TRUE;
BYTE byPwr = 0;
BYTE byDec = 0;
BYTE byPwrdBm = 0;
unsigned char byPwr = 0;
unsigned char byDec = 0;
unsigned char byPwrdBm = 0;
if (pDevice->dwDiagRefCount != 0) {
return TRUE;
@ -1137,7 +1137,7 @@ BYTE byPwrdBm = 0;
BOOL RFbRawSetPower (
PSDevice pDevice,
BYTE byPwr,
unsigned char byPwr,
unsigned int uRATE
)
{
@ -1204,14 +1204,14 @@ unsigned long dwMax7230Pwr = 0;
void
RFvRSSITodBm (
PSDevice pDevice,
BYTE byCurrRSSI,
unsigned char byCurrRSSI,
long * pldBm
)
{
BYTE byIdx = (((byCurrRSSI & 0xC0) >> 6) & 0x03);
unsigned char byIdx = (((byCurrRSSI & 0xC0) >> 6) & 0x03);
long b = (byCurrRSSI & 0x3F);
long a = 0;
BYTE abyAIROHARF[4] = {0, 18, 0, 40};
unsigned char abyAIROHARF[4] = {0, 18, 0, 40};
switch (pDevice->byRFType) {
case RF_AIROHA:
@ -1232,7 +1232,7 @@ RFvRSSITodBm (
// Post processing for the 11b/g and 11a.
// for save time on changing Reg2,3,5,7,10,12,15
BOOL RFbAL7230SelectChannelPostProcess (unsigned long dwIoBase, BYTE byOldChannel, BYTE byNewChannel)
BOOL RFbAL7230SelectChannelPostProcess (unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel)
{
BOOL bResult;

View File

@ -77,27 +77,27 @@
/*--------------------- Export Functions --------------------------*/
BOOL IFRFbWriteEmbeded(unsigned long dwIoBase, unsigned long dwData);
BOOL RFbSelectChannel(unsigned long dwIoBase, BYTE byRFType, BYTE byChannel);
BOOL RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel);
BOOL RFbInit (
PSDevice pDevice
);
BOOL RFvWriteWakeProgSyn(unsigned long dwIoBase, BYTE byRFType, unsigned int uChannel);
BOOL RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel);
BOOL RFbSetPower(PSDevice pDevice, unsigned int uRATE, unsigned int uCH);
BOOL RFbRawSetPower(
PSDevice pDevice,
BYTE byPwr,
unsigned char byPwr,
unsigned int uRATE
);
void
RFvRSSITodBm(
PSDevice pDevice,
BYTE byCurrRSSI,
unsigned char byCurrRSSI,
long *pldBm
);
//{{ RobertYu: 20050104
BOOL RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, BYTE byOldChannel, BYTE byNewChannel);
BOOL RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel);
//}} RobertYu
#endif // __RF_H__

View File

@ -132,21 +132,21 @@ static
void
s_vFillRTSHead(
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
void * pvRTS,
unsigned int cbFrameLength,
BOOL bNeedAck,
BOOL bDisCRC,
PSEthernetHeader psEthHeader,
unsigned short wCurrentRate,
BYTE byFBOption
unsigned char byFBOption
);
static
void
s_vGenerateTxParameter(
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
void * pTxBufHead,
void * pvRrvTime,
void * pvRTS,
@ -174,7 +174,7 @@ static
unsigned int
s_cbFillTxBufHead (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
unsigned char *pbyTxBufferAddr,
unsigned int cbFrameBodySize,
unsigned int uDMAIdx,
@ -192,7 +192,7 @@ static
unsigned int
s_uFillDataHead (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
void * pTxDataHead,
unsigned int cbFrameLength,
unsigned int uDMAIdx,
@ -200,7 +200,7 @@ s_uFillDataHead (
unsigned int uFragIdx,
unsigned int cbLastFragmentSize,
unsigned int uMACfragNum,
BYTE byFBOption,
unsigned char byFBOption,
unsigned short wCurrentRate
);
@ -226,7 +226,7 @@ s_vFillTxKey (
unsigned short wValue;
PS802_11Header pMACHeader = (PS802_11Header)pbyHdrBuf;
unsigned long dwRevIVCounter;
BYTE byKeyIndex = 0;
unsigned char byKeyIndex = 0;
@ -270,7 +270,7 @@ s_vFillTxKey (
// Make IV
memcpy(pdwIV, pDevice->abyPRNG, 3);
*(pbyIVHead+3) = (BYTE)(((byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV
*(pbyIVHead+3) = (unsigned char)(((byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV
// Append IV&ExtIV after Mac Header
*pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFillTxKey()---- pdwExtIV: %lx\n", *pdwExtIV);
@ -284,7 +284,7 @@ s_vFillTxKey (
// Make IV
*pdwIV = 0;
*(pbyIVHead+3) = (BYTE)(((byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV
*(pbyIVHead+3) = (unsigned char)(((byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV
*pdwIV |= cpu_to_le16((unsigned short)(pTransmitKey->wTSC15_0));
//Append IV&ExtIV after Mac Header
*pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
@ -380,7 +380,7 @@ static
unsigned int
s_uGetTxRsvTime (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
unsigned int cbFrameLength,
unsigned short wRate,
BOOL bNeedAck
@ -411,8 +411,8 @@ static
unsigned int
s_uGetRTSCTSRsvTime (
PSDevice pDevice,
BYTE byRTSRsvType,
BYTE byPktType,
unsigned char byRTSRsvType,
unsigned char byPktType,
unsigned int cbFrameLength,
unsigned short wCurrentRate
)
@ -453,15 +453,15 @@ static
unsigned int
s_uGetDataDuration (
PSDevice pDevice,
BYTE byDurType,
unsigned char byDurType,
unsigned int cbFrameLength,
BYTE byPktType,
unsigned char byPktType,
unsigned short wRate,
BOOL bNeedAck,
unsigned int uFragIdx,
unsigned int cbLastFragmentSize,
unsigned int uMACfragNum,
BYTE byFBOption
unsigned char byFBOption
)
{
BOOL bLastFrag = 0;
@ -624,12 +624,12 @@ static
unsigned int
s_uGetRTSCTSDuration (
PSDevice pDevice,
BYTE byDurType,
unsigned char byDurType,
unsigned int cbFrameLength,
BYTE byPktType,
unsigned char byPktType,
unsigned short wRate,
BOOL bNeedAck,
BYTE byFBOption
unsigned char byFBOption
)
{
unsigned int uCTSTime = 0, uDurTime = 0;
@ -722,7 +722,7 @@ static
unsigned int
s_uFillDataHead (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
void * pTxDataHead,
unsigned int cbFrameLength,
unsigned int uDMAIdx,
@ -730,7 +730,7 @@ s_uFillDataHead (
unsigned int uFragIdx,
unsigned int cbLastFragmentSize,
unsigned int uMACfragNum,
BYTE byFBOption,
unsigned char byFBOption,
unsigned short wCurrentRate
)
{
@ -854,14 +854,14 @@ static
void
s_vFillRTSHead (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
void * pvRTS,
unsigned int cbFrameLength,
BOOL bNeedAck,
BOOL bDisCRC,
PSEthernetHeader psEthHeader,
unsigned short wCurrentRate,
BYTE byFBOption
unsigned char byFBOption
)
{
unsigned int uRTSFrameLen = 20;
@ -1049,13 +1049,13 @@ void
s_vFillCTSHead (
PSDevice pDevice,
unsigned int uDMAIdx,
BYTE byPktType,
unsigned char byPktType,
void * pvCTS,
unsigned int cbFrameLength,
BOOL bNeedAck,
BOOL bDisCRC,
unsigned short wCurrentRate,
BYTE byFBOption
unsigned char byFBOption
)
{
unsigned int uCTSFrameLen = 14;
@ -1153,7 +1153,7 @@ static
void
s_vGenerateTxParameter (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
void * pTxBufHead,
void * pvRrvTime,
void * pvRTS,
@ -1168,7 +1168,7 @@ s_vGenerateTxParameter (
unsigned int cbMACHdLen = WLAN_HDR_ADDR3_LEN; //24
unsigned short wFifoCtl;
BOOL bDisCRC = FALSE;
BYTE byFBOption = AUTO_FB_NONE;
unsigned char byFBOption = AUTO_FB_NONE;
// unsigned short wCurrentRate = pDevice->wCurrentRate;
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter...\n");
@ -1319,7 +1319,7 @@ static
unsigned int
s_cbFillTxBufHead (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
unsigned char *pbyTxBufferAddr,
unsigned int cbFrameBodySize,
unsigned int uDMAIdx,
@ -1346,7 +1346,7 @@ s_cbFillTxBufHead (
unsigned int uDuration;
unsigned char *pbyBuffer;
// unsigned int uKeyEntryIdx = NUM_KEY_ENTRY+1;
// BYTE byKeySel = 0xFF;
// unsigned char byKeySel = 0xFF;
unsigned int cbIVlen = 0;
unsigned int cbICVlen = 0;
unsigned int cbMIClen = 0;
@ -1354,7 +1354,7 @@ s_cbFillTxBufHead (
unsigned int cb802_1_H_len = 0;
unsigned int uLength = 0;
unsigned int uTmpLen = 0;
// BYTE abyTmp[8];
// unsigned char abyTmp[8];
// unsigned long dwCRC;
unsigned int cbMICHDR = 0;
unsigned long dwMICKey0, dwMICKey1;
@ -1383,7 +1383,7 @@ s_cbFillTxBufHead (
void * pvTxDataHd;
unsigned short wTxBufSize; // FFinfo size
unsigned int uTotalCopyLength = 0;
BYTE byFBOption = AUTO_FB_NONE;
unsigned char byFBOption = AUTO_FB_NONE;
BOOL bIsWEP256 = FALSE;
PSMgmtObject pMgmt = pDevice->pMgmt;
@ -2096,7 +2096,7 @@ s_cbFillTxBufHead (
void
vGenerateFIFOHeader (
PSDevice pDevice,
BYTE byPktType,
unsigned char byPktType,
unsigned char *pbyTxBufferAddr,
BOOL bNeedEncrypt,
unsigned int cbPayloadSize,
@ -2340,7 +2340,7 @@ vGenerateMACHeader (
CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
PSTxDesc pFrstTD;
BYTE byPktType;
unsigned char byPktType;
unsigned char *pbyTxBufferAddr;
void * pvRTS;
PSCTS pCTS;
@ -2661,7 +2661,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
BYTE byPktType;
unsigned char byPktType;
unsigned char *pbyBuffer = (unsigned char *)pDevice->tx_beacon_bufs;
unsigned int cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN;
unsigned int cbHeaderSize = 0;
@ -2829,7 +2829,7 @@ void
vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, unsigned int cbMPDULen) {
PSTxDesc pFrstTD;
BYTE byPktType;
unsigned char byPktType;
unsigned char *pbyTxBufferAddr;
void * pvRTS;
void * pvCTS;

View File

@ -85,7 +85,7 @@ cbGetFragCount(
void
vGenerateFIFOHeader (
PSDevice pDevice,
BYTE byPktTyp,
unsigned char byPktTyp,
unsigned char *pbyTxBufferAddr,
BOOL bNeedEncrypt,
unsigned int cbPayloadSize,

View File

@ -76,12 +76,12 @@
* Return Value: data read
*
*/
BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset)
unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntOffset)
{
unsigned short wDelay, wNoACK;
BYTE byWait;
BYTE byData;
BYTE byOrg;
unsigned char byWait;
unsigned char byData;
unsigned char byOrg;
byData = 0xFF;
VNSvInPortB(dwIoBase + MAC_REG_I2MCFG, &byOrg);
@ -125,12 +125,12 @@ BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset)
* Return Value: TRUE if succeeded; FALSE if failed.
*
*/
BOOL SROMbWriteEmbedded(unsigned long dwIoBase, BYTE byContntOffset, BYTE byData)
BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData)
{
unsigned short wDelay, wNoACK;
BYTE byWait;
unsigned char byWait;
BYTE byOrg;
unsigned char byOrg;
VNSvInPortB(dwIoBase + MAC_REG_I2MCFG, &byOrg);
/* turn off hardware retry for getting NACK */
@ -178,12 +178,12 @@ BOOL SROMbWriteEmbedded(unsigned long dwIoBase, BYTE byContntOffset, BYTE byData
* Return Value: none
*
*/
void SROMvRegBitsOn(unsigned long dwIoBase, BYTE byContntOffset, BYTE byBits)
void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits)
{
BYTE byOrgData;
unsigned char byOrgData;
byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
SROMbWriteEmbedded(dwIoBase, byContntOffset,(BYTE)(byOrgData | byBits));
SROMbWriteEmbedded(dwIoBase, byContntOffset,(unsigned char)(byOrgData | byBits));
}
@ -199,12 +199,12 @@ void SROMvRegBitsOn(unsigned long dwIoBase, BYTE byContntOffset, BYTE byBits)
* none
*
*/
void SROMvRegBitsOff(unsigned long dwIoBase, BYTE byContntOffset, BYTE byBits)
void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits)
{
BYTE byOrgData;
unsigned char byOrgData;
byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
SROMbWriteEmbedded(dwIoBase, byContntOffset,(BYTE)(byOrgData & (~byBits)));
SROMbWriteEmbedded(dwIoBase, byContntOffset,(unsigned char)(byOrgData & (~byBits)));
}
@ -222,9 +222,9 @@ void SROMvRegBitsOff(unsigned long dwIoBase, BYTE byContntOffset, BYTE byBits)
* Return Value: TRUE if all test bits on; otherwise FALSE
*
*/
BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, BYTE byContntOffset, BYTE byTestBits)
BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
{
BYTE byOrgData;
unsigned char byOrgData;
byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
return (byOrgData & byTestBits) == byTestBits;
@ -245,9 +245,9 @@ BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, BYTE byContntOffset, BYTE byTestBi
* Return Value: TRUE if all test bits off; otherwise FALSE
*
*/
BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, BYTE byContntOffset, BYTE byTestBits)
BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
{
BYTE byOrgData;
unsigned char byOrgData;
byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset);
return !(byOrgData & byTestBits);
@ -272,7 +272,7 @@ void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs)
/* ii = Rom Address */
for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) {
*pbyEepromRegs = SROMbyReadEmbedded(dwIoBase,(BYTE) ii);
*pbyEepromRegs = SROMbyReadEmbedded(dwIoBase,(unsigned char) ii);
pbyEepromRegs++;
}
}
@ -297,7 +297,7 @@ void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs)
/* ii = Rom Address */
for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) {
SROMbWriteEmbedded(dwIoBase,(BYTE) ii, *pbyEepromRegs);
SROMbWriteEmbedded(dwIoBase,(unsigned char) ii, *pbyEepromRegs);
pbyEepromRegs++;
}
}
@ -317,7 +317,7 @@ void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs)
*/
void SROMvReadEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress)
{
BYTE ii;
unsigned char ii;
/* ii = Rom Address */
for (ii = 0; ii < ETH_ALEN; ii++) {
@ -342,7 +342,7 @@ void SROMvReadEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddres
*/
void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress)
{
BYTE ii;
unsigned char ii;
/* ii = Rom Address */
for (ii = 0; ii < ETH_ALEN; ii++) {
@ -391,10 +391,10 @@ void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId)
*/
BOOL SROMbAutoLoad(unsigned long dwIoBase)
{
BYTE byWait;
unsigned char byWait;
int ii;
BYTE byOrg;
unsigned char byOrg;
VNSvInPortB(dwIoBase + MAC_REG_I2MCFG, &byOrg);
/* turn on hardware retry */

View File

@ -97,34 +97,34 @@
// 2048 bits = 256 bytes = 128 words
//
typedef struct tagSSromReg {
BYTE abyPAR[6]; // 0x00 (unsigned short)
unsigned char abyPAR[6]; // 0x00 (unsigned short)
unsigned short wSUB_VID; // 0x03 (unsigned short)
unsigned short wSUB_SID;
BYTE byBCFG0; // 0x05 (unsigned short)
BYTE byBCFG1;
unsigned char byBCFG0; // 0x05 (unsigned short)
unsigned char byBCFG1;
BYTE byFCR0; // 0x06 (unsigned short)
BYTE byFCR1;
BYTE byPMC0; // 0x07 (unsigned short)
BYTE byPMC1;
BYTE byMAXLAT; // 0x08 (unsigned short)
BYTE byMINGNT;
BYTE byCFG0; // 0x09 (unsigned short)
BYTE byCFG1;
unsigned char byFCR0; // 0x06 (unsigned short)
unsigned char byFCR1;
unsigned char byPMC0; // 0x07 (unsigned short)
unsigned char byPMC1;
unsigned char byMAXLAT; // 0x08 (unsigned short)
unsigned char byMINGNT;
unsigned char byCFG0; // 0x09 (unsigned short)
unsigned char byCFG1;
unsigned short wCISPTR; // 0x0A (unsigned short)
unsigned short wRsv0; // 0x0B (unsigned short)
unsigned short wRsv1; // 0x0C (unsigned short)
BYTE byBBPAIR; // 0x0D (unsigned short)
BYTE byRFTYPE;
BYTE byMinChannel; // 0x0E (unsigned short)
BYTE byMaxChannel;
BYTE bySignature; // 0x0F (unsigned short)
BYTE byCheckSum;
unsigned char byBBPAIR; // 0x0D (unsigned short)
unsigned char byRFTYPE;
unsigned char byMinChannel; // 0x0E (unsigned short)
unsigned char byMaxChannel;
unsigned char bySignature; // 0x0F (unsigned short)
unsigned char byCheckSum;
BYTE abyReserved0[96]; // 0x10 (unsigned short)
BYTE abyCIS[128]; // 0x80 (unsigned short)
unsigned char abyReserved0[96]; // 0x10 (unsigned short)
unsigned char abyCIS[128]; // 0x80 (unsigned short)
} SSromReg, *PSSromReg;
/*--------------------- Export Macros ------------------------------*/
@ -135,14 +135,14 @@ typedef struct tagSSromReg {
/*--------------------- Export Functions --------------------------*/
BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset);
BOOL SROMbWriteEmbedded(unsigned long dwIoBase, BYTE byContntOffset, BYTE byData);
unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntOffset);
BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData);
void SROMvRegBitsOn(unsigned long dwIoBase, BYTE byContntOffset, BYTE byBits);
void SROMvRegBitsOff(unsigned long dwIoBase, BYTE byContntOffset, BYTE byBits);
void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits);
void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits);
BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, BYTE byContntOffset, BYTE byTestBits);
BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, BYTE byContntOffset, BYTE byTestBits);
BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs);
void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs);

View File

@ -138,7 +138,7 @@ unsigned long CRCdwCrc32 (unsigned char *pbyData, unsigned int cbByte, unsigned
dwCrc = dwCrcSeed;
while (cbByte--) {
dwCrc = s_adwCrc32Table[(BYTE)((dwCrc ^ (*pbyData)) & 0xFF)] ^ (dwCrc >> 8);
dwCrc = s_adwCrc32Table[(unsigned char)((dwCrc ^ (*pbyData)) & 0xFF)] ^ (dwCrc >> 8);
pbyData++;
}

View File

@ -61,14 +61,14 @@
* Return Value: Hash value
*
*/
BYTE ETHbyGetHashIndexByCrc32 (unsigned char *pbyMultiAddr)
unsigned char ETHbyGetHashIndexByCrc32 (unsigned char *pbyMultiAddr)
{
int ii;
BYTE byTmpHash;
BYTE byHash = 0;
unsigned char byTmpHash;
unsigned char byHash = 0;
// get the least 6-bits from CRC generator
byTmpHash = (BYTE)(CRCdwCrc32(pbyMultiAddr, ETH_ALEN,
byTmpHash = (unsigned char)(CRCdwCrc32(pbyMultiAddr, ETH_ALEN,
0xFFFFFFFFL) & 0x3F);
// reverse most bit to least bit
for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) {

View File

@ -154,8 +154,8 @@
// Ethernet packet
//
typedef struct tagSEthernetHeader {
BYTE abyDstAddr[ETH_ALEN];
BYTE abySrcAddr[ETH_ALEN];
unsigned char abyDstAddr[ETH_ALEN];
unsigned char abySrcAddr[ETH_ALEN];
unsigned short wType;
}__attribute__ ((__packed__))
SEthernetHeader, *PSEthernetHeader;
@ -165,8 +165,8 @@ SEthernetHeader, *PSEthernetHeader;
// 802_3 packet
//
typedef struct tagS802_3Header {
BYTE abyDstAddr[ETH_ALEN];
BYTE abySrcAddr[ETH_ALEN];
unsigned char abyDstAddr[ETH_ALEN];
unsigned char abySrcAddr[ETH_ALEN];
unsigned short wLen;
}__attribute__ ((__packed__))
S802_3Header, *PS802_3Header;
@ -177,11 +177,11 @@ S802_3Header, *PS802_3Header;
typedef struct tagS802_11Header {
unsigned short wFrameCtl;
unsigned short wDurationID;
BYTE abyAddr1[ETH_ALEN];
BYTE abyAddr2[ETH_ALEN];
BYTE abyAddr3[ETH_ALEN];
unsigned char abyAddr1[ETH_ALEN];
unsigned char abyAddr2[ETH_ALEN];
unsigned char abyAddr3[ETH_ALEN];
unsigned short wSeqCtl;
BYTE abyAddr4[ETH_ALEN];
unsigned char abyAddr4[ETH_ALEN];
}__attribute__ ((__packed__))
S802_11Header, *PS802_11Header;
@ -193,8 +193,8 @@ S802_11Header, *PS802_11Header;
/*--------------------- Export Functions --------------------------*/
BYTE ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr);
//BYTE ETHbyGetHashIndexByCrc(unsigned char *pbyMultiAddr);
unsigned char ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr);
//unsigned char ETHbyGetHashIndexByCrc(unsigned char *pbyMultiAddr);
BOOL ETHbIsBufferCrc32Ok(unsigned char *pbyBuffer, unsigned int cbFrameLength);
#endif // __TETHER_H__

View File

@ -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 unsigned char 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 unsigned char 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,

View File

@ -34,10 +34,10 @@
/****** Common helper macros ***********************************************/
#if !defined(LOBYTE)
#define LOBYTE(w) ((BYTE)(w))
#define LOBYTE(w) ((unsigned char)(w))
#endif
#if !defined(HIBYTE)
#define HIBYTE(w) ((BYTE)(((unsigned short)(w) >> 8) & 0xFF))
#define HIBYTE(w) ((unsigned char)(((unsigned short)(w) >> 8) & 0xFF))
#endif
#if !defined(LOWORD)
@ -51,7 +51,7 @@
#define HIDWORD(q) ((q).u.dwHighDword)
#if !defined(MAKEWORD)
#define MAKEWORD(lb, hb) ((unsigned short)(((BYTE)(lb)) | (((unsigned short)((BYTE)(hb))) << 8)))
#define MAKEWORD(lb, hb) ((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8)))
#endif
#if !defined(MAKEDWORD)
#define MAKEDWORD(lw, hw) ((unsigned long)(((unsigned short)(lw)) | (((unsigned long)((unsigned short)(hw))) << 16)))

View File

@ -68,8 +68,6 @@ typedef int BOOL;
* but it doesn't matter if they're signed or unsigned.
*/
typedef unsigned char BYTE; // 8-bit
// QWORD is for those situation that we want
// an 8-byte-aligned 8 byte long structure
// which is NOT really a floating point number.

View File

@ -76,7 +76,7 @@
#define VNSvInPortB(dwIOAddress, pbyData) { \
volatile BYTE* pbyAddr = ((unsigned char *)(dwIOAddress)); \
volatile unsigned char * pbyAddr = ((unsigned char *)(dwIOAddress)); \
*(pbyData) = readb(pbyAddr); \
}
@ -93,8 +93,8 @@
#define VNSvOutPortB(dwIOAddress, byData) { \
volatile BYTE* pbyAddr = ((unsigned char *)(dwIOAddress)); \
writeb((BYTE)byData, pbyAddr); \
volatile unsigned char * pbyAddr = ((unsigned char *)(dwIOAddress)); \
writeb((unsigned char)byData, pbyAddr); \
}
@ -140,7 +140,7 @@
#define PCAvDelayByIO(uDelayUnit) { \
BYTE byData; \
unsigned char byData; \
unsigned long ii; \
\
if (uDelayUnit <= 50) { \

View File

@ -202,14 +202,14 @@ VNTWIFIwGetAssocID (
* Return Value: max support rate
*
-*/
BYTE
unsigned char
VNTWIFIbyGetMaxSupportRate (
PWLAN_IE_SUPP_RATES pSupportRateIEs,
PWLAN_IE_SUPP_RATES pExtSupportRateIEs
)
{
BYTE byMaxSupportRate = RATE_1M;
BYTE bySupportRate = RATE_1M;
unsigned char byMaxSupportRate = RATE_1M;
unsigned char bySupportRate = RATE_1M;
unsigned int ii = 0;
if (pSupportRateIEs) {
@ -248,15 +248,15 @@ VNTWIFIbyGetMaxSupportRate (
* Return Value: max support rate
*
-*/
BYTE
unsigned char
VNTWIFIbyGetACKTxRate (
BYTE byRxDataRate,
unsigned char byRxDataRate,
PWLAN_IE_SUPP_RATES pSupportRateIEs,
PWLAN_IE_SUPP_RATES pExtSupportRateIEs
)
{
BYTE byMaxAckRate;
BYTE byBasicRate;
unsigned char byMaxAckRate;
unsigned char byBasicRate;
unsigned int ii;
if (byRxDataRate <= RATE_11M) {
@ -542,9 +542,9 @@ VNTWIFIvGetTxRate(
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
unsigned int uNodeIndex = 0;
unsigned short wTxDataRate = RATE_1M;
BYTE byACKRate = RATE_1M;
BYTE byCCKBasicRate = RATE_1M;
BYTE byOFDMBasicRate = RATE_24M;
unsigned char byACKRate = RATE_1M;
unsigned char byCCKBasicRate = RATE_1M;
unsigned char byOFDMBasicRate = RATE_24M;
PWLAN_IE_SUPP_RATES pSupportRateIEs = NULL;
PWLAN_IE_SUPP_RATES pExtSupportRateIEs = NULL;
@ -579,12 +579,12 @@ VNTWIFIvGetTxRate(
pSupportRateIEs = (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates;
pExtSupportRateIEs = (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrExtSuppRates;
}
byACKRate = VNTWIFIbyGetACKTxRate( (BYTE) wTxDataRate,
byACKRate = VNTWIFIbyGetACKTxRate( (unsigned char) wTxDataRate,
pSupportRateIEs,
pExtSupportRateIEs
);
if (byACKRate > (BYTE) wTxDataRate) {
byACKRate = (BYTE) wTxDataRate;
if (byACKRate > (unsigned char) wTxDataRate) {
byACKRate = (unsigned char) wTxDataRate;
}
byCCKBasicRate = VNTWIFIbyGetACKTxRate( RATE_11M,
pSupportRateIEs,
@ -601,7 +601,7 @@ VNTWIFIvGetTxRate(
return;
}
BYTE
unsigned char
VNTWIFIbyGetKeyCypher(
void *pMgmtHandle,
BOOL bGroupKey
@ -718,9 +718,9 @@ VNTWIFIbMeasureReport(
void *pMgmtObject,
BOOL bEndOfReport,
void *pvMeasureEID,
BYTE byReportMode,
BYTE byBasicMap,
BYTE byCCAFraction,
unsigned char byReportMode,
unsigned char byBasicMap,
unsigned char byCCAFraction,
unsigned char *pbyRPIs
)
{
@ -776,7 +776,7 @@ VNTWIFIbMeasureReport(
BOOL
VNTWIFIbChannelSwitch(
void *pMgmtObject,
BYTE byNewChannel
unsigned char byNewChannel
)
{
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
@ -792,16 +792,16 @@ VNTWIFIbChannelSwitch(
BOOL
VNTWIFIbRadarPresent(
void *pMgmtObject,
BYTE byChannel
unsigned char byChannel
)
{
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
(byChannel == (BYTE) pMgmt->uCurrChannel) &&
(byChannel == (unsigned char) pMgmt->uCurrChannel) &&
(pMgmt->bSwitchChannel != TRUE) &&
(pMgmt->b11hEnable == TRUE)) {
if (!compare_ether_addr(pMgmt->abyIBSSDFSOwner, CARDpGetCurrentAddress(pMgmt->pAdapter))) {
pMgmt->byNewChannel = CARDbyAutoChannelSelect(pMgmt->pAdapter,(BYTE) pMgmt->uCurrChannel);
pMgmt->byNewChannel = CARDbyAutoChannelSelect(pMgmt->pAdapter,(unsigned char) pMgmt->uCurrChannel);
pMgmt->bSwitchChannel = TRUE;
}
BEACONbSendBeacon(pMgmt);

View File

@ -169,15 +169,15 @@ VNTWIFIwGetAssocID (
void *pMgmtHandle
);
BYTE
unsigned char
VNTWIFIbyGetMaxSupportRate (
PWLAN_IE_SUPP_RATES pSupportRateIEs,
PWLAN_IE_SUPP_RATES pExtSupportRateIEs
);
BYTE
unsigned char
VNTWIFIbyGetACKTxRate (
BYTE byRxDataRate,
unsigned char byRxDataRate,
PWLAN_IE_SUPP_RATES pSupportRateIEs,
PWLAN_IE_SUPP_RATES pExtSupportRateIEs
);
@ -253,7 +253,7 @@ VNTWIFIbInit(
);
*/
BYTE
unsigned char
VNTWIFIbyGetKeyCypher(
void *pMgmtHandle,
BOOL bGroupKey
@ -291,22 +291,22 @@ VNTWIFIbMeasureReport(
void *pMgmtObject,
BOOL bEndOfReport,
void *pvMeasureEID,
BYTE byReportMode,
BYTE byBasicMap,
BYTE byCCAFraction,
unsigned char byReportMode,
unsigned char byBasicMap,
unsigned char byCCAFraction,
unsigned char *pbyRPIs
);
BOOL
VNTWIFIbChannelSwitch(
void *pMgmtObject,
BYTE byNewChannel
unsigned char byNewChannel
);
/*
BOOL
VNTWIFIbRadarPresent(
void *pMgmtObject,
BYTE byChannel
unsigned char byChannel
);
*/

View File

@ -209,11 +209,11 @@ s_vProbeChannel(
)
{
//1M, 2M, 5M, 11M, 18M, 24M, 36M, 54M
BYTE abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
BYTE abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES, 4, 0x0C, 0x12, 0x18, 0x60};
unsigned char abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
unsigned char abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES, 4, 0x0C, 0x12, 0x18, 0x60};
//6M, 9M, 12M, 48M
BYTE abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
BYTE abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
unsigned char abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
unsigned char abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
unsigned char *pbyRate;
PSTxMgmtPacket pTxPacket;
PSMgmtObject pMgmt = pDevice->pMgmt;
@ -349,7 +349,7 @@ vCommandTimer (
PWLAN_IE_SSID pItemSSIDCurr;
CMD_STATUS Status;
unsigned int ii;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
struct sk_buff *skb;

View File

@ -75,7 +75,7 @@ typedef enum tagCMD_STATUS {
typedef struct tagCMD_ITEM {
CMD_CODE eCmd;
BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BOOL bNeedRadioOFF;
unsigned short wDeAuthenReason;
BOOL bRadioCmd;

View File

@ -96,7 +96,7 @@ static int msglevel =MSG_LEVEL_INFO;
//2008-8-4 <add> by chester
static BOOL ChannelExceedZoneType(
PSDevice pDevice,
BYTE byCurrChannel
unsigned char byCurrChannel
);
// Association/diassociation functions
@ -295,7 +295,7 @@ s_MgrMakeProbeResponse(
unsigned char *pCurrBSSID,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates,
BYTE byPHYType
unsigned char byPHYType
);
// received status
@ -693,8 +693,8 @@ s_vMgrRxAssocRequest(
unsigned short wAssocStatus = 0;
unsigned short wAssocAID = 0;
unsigned int uRateLen = WLAN_RATES_MAXLEN;
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP)
@ -855,8 +855,8 @@ s_vMgrRxReAssocRequest(
unsigned short wAssocStatus = 0;
unsigned short wAssocAID = 0;
unsigned int uRateLen = WLAN_RATES_MAXLEN;
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP)
return;
@ -1076,7 +1076,7 @@ s_vMgrRxAssocResponse(
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//if(pDevice->bWPADevEnable == TRUE)
{
BYTE buf[512];
unsigned char buf[512];
size_t len;
union iwreq_data wrqu;
int we_event;
@ -1829,7 +1829,7 @@ s_vMgrRxDeauthentication(
static BOOL
ChannelExceedZoneType(
PSDevice pDevice,
BYTE byCurrChannel
unsigned char byCurrChannel
)
{
BOOL exceed=FALSE;
@ -1884,19 +1884,19 @@ s_vMgrRxBeacon(
BOOL bIsAPBeacon = FALSE;
BOOL bIsChannelEqual = FALSE;
unsigned int uLocateByteIndex;
BYTE byTIMBitOn = 0;
unsigned char byTIMBitOn = 0;
unsigned short wAIDNumber = 0;
unsigned int uNodeIndex;
QWORD qwTimestamp, qwLocalTSF;
QWORD qwCurrTSF;
unsigned short wStartIndex = 0;
unsigned short wAIDIndex = 0;
BYTE byCurrChannel = pRxPacket->byRxChannel;
unsigned char byCurrChannel = pRxPacket->byRxChannel;
ERPObject sERP;
unsigned int uRateLen = WLAN_RATES_MAXLEN;
BOOL bChannelHit = FALSE;
BOOL bUpdatePhyParameter = FALSE;
BYTE byIEChannel = 0;
unsigned char byIEChannel = 0;
memset(&sFrame, 0, sizeof(WLAN_FR_BEACON));
@ -1994,7 +1994,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
return;
}
if(byCurrChannel == (BYTE)pMgmt->uCurrChannel)
if(byCurrChannel == (unsigned char)pMgmt->uCurrChannel)
bIsChannelEqual = TRUE;
if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
@ -2116,7 +2116,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
}
if (sFrame.pIE_PowerConstraint != NULL) {
CARDvSetPowerConstraint(pMgmt->pAdapter,
(BYTE) pBSSList->uChannel,
(unsigned char) pBSSList->uChannel,
sFrame.pIE_PowerConstraint->byPower
);
}
@ -2395,13 +2395,13 @@ vMgrCreateOwnIBSS(
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned short wMaxBasicRate;
unsigned short wMaxSuppRate;
BYTE byTopCCKBasicRate;
BYTE byTopOFDMBasicRate;
unsigned char byTopCCKBasicRate;
unsigned char byTopOFDMBasicRate;
QWORD qwCurrTSF;
unsigned int ii;
BYTE abyRATE[] = {0x82, 0x84, 0x8B, 0x96, 0x24, 0x30, 0x48, 0x6C, 0x0C, 0x12, 0x18, 0x60};
BYTE abyCCK_RATE[] = {0x82, 0x84, 0x8B, 0x96};
BYTE abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
unsigned char abyRATE[] = {0x82, 0x84, 0x8B, 0x96, 0x24, 0x30, 0x48, 0x6C, 0x0C, 0x12, 0x18, 0x60};
unsigned char abyCCK_RATE[] = {0x82, 0x84, 0x8B, 0x96};
unsigned char abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
unsigned short wSuppRate;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create Basic Service Set .......\n");
@ -2534,12 +2534,12 @@ vMgrCreateOwnIBSS(
if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
// BSSID selected must be randomized as spec 11.1.3
pMgmt->abyCurrBSSID[5] = (BYTE) (LODWORD(qwCurrTSF)& 0x000000ff);
pMgmt->abyCurrBSSID[4] = (BYTE)((LODWORD(qwCurrTSF)& 0x0000ff00) >> 8);
pMgmt->abyCurrBSSID[3] = (BYTE)((LODWORD(qwCurrTSF)& 0x00ff0000) >> 16);
pMgmt->abyCurrBSSID[2] = (BYTE)((LODWORD(qwCurrTSF)& 0x00000ff0) >> 4);
pMgmt->abyCurrBSSID[1] = (BYTE)((LODWORD(qwCurrTSF)& 0x000ff000) >> 12);
pMgmt->abyCurrBSSID[0] = (BYTE)((LODWORD(qwCurrTSF)& 0x0ff00000) >> 20);
pMgmt->abyCurrBSSID[5] = (unsigned char) (LODWORD(qwCurrTSF)& 0x000000ff);
pMgmt->abyCurrBSSID[4] = (unsigned char)((LODWORD(qwCurrTSF)& 0x0000ff00) >> 8);
pMgmt->abyCurrBSSID[3] = (unsigned char)((LODWORD(qwCurrTSF)& 0x00ff0000) >> 16);
pMgmt->abyCurrBSSID[2] = (unsigned char)((LODWORD(qwCurrTSF)& 0x00000ff0) >> 4);
pMgmt->abyCurrBSSID[1] = (unsigned char)((LODWORD(qwCurrTSF)& 0x000ff000) >> 12);
pMgmt->abyCurrBSSID[0] = (unsigned char)((LODWORD(qwCurrTSF)& 0x0ff00000) >> 20);
pMgmt->abyCurrBSSID[5] ^= pMgmt->abyMACAddr[0];
pMgmt->abyCurrBSSID[4] ^= pMgmt->abyMACAddr[1];
pMgmt->abyCurrBSSID[3] ^= pMgmt->abyMACAddr[2];
@ -2670,8 +2670,8 @@ vMgrJoinBSSBegin(
unsigned short wMaxBasicRate = RATE_1M;
unsigned short wMaxSuppRate = RATE_1M;
unsigned short wSuppRate;
BYTE byTopCCKBasicRate = RATE_1M;
BYTE byTopOFDMBasicRate = RATE_1M;
unsigned char byTopCCKBasicRate = RATE_1M;
unsigned char byTopOFDMBasicRate = RATE_1M;
for (ii = 0; ii < MAX_BSS_NUM; ii++) {
@ -2771,9 +2771,9 @@ vMgrJoinBSSBegin(
if (pItemExtRates->len <= ii)
break;
}
pItemRates->len += (BYTE)ii;
pItemRates->len += (unsigned char)ii;
if (pItemExtRates->len - ii > 0) {
pItemExtRates->len -= (BYTE)ii;
pItemExtRates->len -= (unsigned char)ii;
for (uu = 0; uu < pItemExtRates->len; uu ++) {
pItemExtRates->abyRates[uu] = pItemExtRates->abyRates[uu + ii];
}
@ -2933,11 +2933,11 @@ s_vMgrSynchBSS (
PSMgmtObject pMgmt = pDevice->pMgmt;
// int ii;
//1M, 2M, 5M, 11M, 18M, 24M, 36M, 54M
BYTE abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
BYTE abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES, 4, 0x0C, 0x12, 0x18, 0x60};
unsigned char abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES, 8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
unsigned char abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES, 4, 0x0C, 0x12, 0x18, 0x60};
//6M, 9M, 12M, 48M
BYTE abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
BYTE abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
unsigned char abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
unsigned char abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
*pStatus = CMD_STATUS_FAILURE;
@ -3152,8 +3152,8 @@ s_vMgrFormatTIM(
PWLAN_IE_TIM pTIM
)
{
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
BYTE byMap;
unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
unsigned char byMap;
unsigned int ii, jj;
BOOL bStartFound = FALSE;
BOOL bMulticast = FALSE;
@ -3237,7 +3237,7 @@ s_MgrMakeBeacon(
{
PSTxMgmtPacket pTxPacket = NULL;
WLAN_FR_BEACON sFrame;
BYTE abyBroadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
unsigned char abyBroadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
unsigned char *pbyBuffer;
unsigned int uLength = 0;
PWLAN_IE_IBSS_DFS pIBSSDFS = NULL;
@ -3287,7 +3287,7 @@ s_MgrMakeBeacon(
sFrame.len += (1) + WLAN_IEHDR_LEN;
sFrame.pDSParms->byElementID = WLAN_EID_DS_PARMS;
sFrame.pDSParms->len = 1;
sFrame.pDSParms->byCurrChannel = (BYTE)uCurrChannel;
sFrame.pDSParms->byCurrChannel = (unsigned char)uCurrChannel;
}
// TIM field
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
@ -3463,7 +3463,7 @@ s_MgrMakeProbeResponse(
unsigned char *pCurrBSSID,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates,
BYTE byPHYType
unsigned char byPHYType
)
{
PSTxMgmtPacket pTxPacket = NULL;
@ -3519,7 +3519,7 @@ s_MgrMakeProbeResponse(
sFrame.len += (1) + WLAN_IEHDR_LEN;
sFrame.pDSParms->byElementID = WLAN_EID_DS_PARMS;
sFrame.pDSParms->len = 1;
sFrame.pDSParms->byCurrChannel = (BYTE)uCurrChannel;
sFrame.pDSParms->byCurrChannel = (unsigned char)uCurrChannel;
}
if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP) {
@ -4323,9 +4323,9 @@ s_vMgrRxProbeResponse(
{
PKnownBSS pBSSList = NULL;
WLAN_FR_PROBERESP sFrame;
BYTE byCurrChannel = pRxPacket->byRxChannel;
unsigned char byCurrChannel = pRxPacket->byRxChannel;
ERPObject sERP;
BYTE byIEChannel = 0;
unsigned char byIEChannel = 0;
BOOL bChannelHit = TRUE;
@ -4449,7 +4449,7 @@ s_vMgrRxProbeRequest(
WLAN_FR_PROBEREQ sFrame;
CMD_STATUS Status;
PSTxMgmtPacket pTxPacket;
BYTE byPHYType = BB_TYPE_11B;
unsigned char byPHYType = BB_TYPE_11B;
// STA in Ad-hoc mode: when latest TBTT beacon transmit success,
// STA have to response this request.
@ -4890,8 +4890,8 @@ s_bCipherMatch (
unsigned char *pbyCCSGK
)
{
BYTE byMulticastCipher = KEY_CTL_INVALID;
BYTE byCipherMask = 0x00;
unsigned char byMulticastCipher = KEY_CTL_INVALID;
unsigned char byCipherMask = 0x00;
int i;
if (pBSSNode == NULL)

View File

@ -120,10 +120,10 @@ typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
typedef struct tagSAssocInfo {
NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo;
BYTE abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN];
unsigned char abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN];
// store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION
unsigned long RequestIELength;
BYTE abyReqIEs[WLAN_BEACON_FR_MAXLEN];
unsigned char abyReqIEs[WLAN_BEACON_FR_MAXLEN];
} SAssocInfo, *PSAssocInfo;
//---
@ -238,9 +238,9 @@ typedef struct tagSRxMgmtPacket {
unsigned int cbMPDULen;
unsigned int cbPayloadLen;
unsigned int uRSSI;
BYTE bySQ;
BYTE byRxRate;
BYTE byRxChannel;
unsigned char bySQ;
unsigned char byRxRate;
unsigned char byRxChannel;
} SRxMgmtPacket, *PSRxMgmtPacket;
@ -251,7 +251,7 @@ typedef struct tagSMgmtObject
void * pAdapter;
// MAC address
BYTE abyMACAddr[WLAN_ADDR_LEN];
unsigned char abyMACAddr[WLAN_ADDR_LEN];
// Configuration Mode
WMAC_CONFIG_MODE eConfigMode; // MAC pre-configed mode
@ -264,40 +264,40 @@ typedef struct tagSMgmtObject
WMAC_BSS_STATE eCurrState; // MAC current BSS state
PKnownBSS pCurrBSS;
BYTE byCSSGK;
BYTE byCSSPK;
unsigned char byCSSGK;
unsigned char byCSSPK;
// BYTE abyNewSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
// BYTE abyNewExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
// unsigned char abyNewSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
// unsigned char abyNewExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
// Current state vars
unsigned int uCurrChannel;
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE abyCurrBSSID[WLAN_BSSID_LEN];
unsigned char abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyCurrBSSID[WLAN_BSSID_LEN];
unsigned short wCurrCapInfo;
unsigned short wCurrAID;
unsigned short wCurrATIMWindow;
unsigned short wCurrBeaconPeriod;
BOOL bIsDS;
BYTE byERPContext;
unsigned char byERPContext;
CMD_STATE eCommandState;
unsigned int uScanChannel;
// Desire joinning BSS vars
BYTE abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE abyDesireBSSID[WLAN_BSSID_LEN];
unsigned char abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyDesireBSSID[WLAN_BSSID_LEN];
// Adhoc or AP configuration vars
//BYTE abyAdHocSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
//unsigned char abyAdHocSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned short wIBSSBeaconPeriod;
unsigned short wIBSSATIMWindow;
unsigned int uIBSSChannel;
BYTE abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE byAPBBType;
BYTE abyWPAIE[MAX_WPA_IE_LEN];
unsigned char abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned char byAPBBType;
unsigned char abyWPAIE[MAX_WPA_IE_LEN];
unsigned short wWPAIELen;
unsigned int uAssocCount;
@ -311,21 +311,21 @@ typedef struct tagSMgmtObject
unsigned short wScanSteps;
unsigned int uScanBSSType;
// Desire scannig vars
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE abyScanBSSID[WLAN_BSSID_LEN];
unsigned char abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
unsigned char abyScanBSSID[WLAN_BSSID_LEN];
// Privacy
WMAC_AUTHENTICATION_MODE eAuthenMode;
WMAC_ENCRYPTION_MODE eEncryptionMode;
BOOL bShareKeyAlgorithm;
BYTE abyChallenge[WLAN_CHALLENGE_LEN];
unsigned char abyChallenge[WLAN_CHALLENGE_LEN];
BOOL bPrivacyInvoked;
// Received beacon state vars
BOOL bInTIM;
BOOL bMulticastTIM;
BYTE byDTIMCount;
BYTE byDTIMPeriod;
unsigned char byDTIMCount;
unsigned char byDTIMPeriod;
// Power saving state vars
WMAC_POWER_MODE ePSMode;
@ -333,9 +333,9 @@ typedef struct tagSMgmtObject
unsigned short wCountToWakeUp;
BOOL bInTIMWake;
unsigned char *pbyPSPacketPool;
BYTE byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN];
unsigned char byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN];
BOOL bRxBeaconInTBTTWake;
BYTE abyPSTxMap[MAX_NODE_NUM + 1];
unsigned char abyPSTxMap[MAX_NODE_NUM + 1];
// management command related
unsigned int uCmdBusy;
@ -343,7 +343,7 @@ typedef struct tagSMgmtObject
// management packet pool
unsigned char *pbyMgmtPacketPool;
BYTE byMgmtPacketPool[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
unsigned char byMgmtPacketPool[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
// One second callback timer
@ -379,14 +379,14 @@ typedef struct tagSMgmtObject
// for 802.11h
BOOL b11hEnable;
BOOL bSwitchChannel;
BYTE byNewChannel;
unsigned char byNewChannel;
PWLAN_IE_MEASURE_REP pCurrMeasureEIDRep;
unsigned int uLengthOfRepEIDs;
BYTE abyCurrentMSRReq[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
BYTE abyCurrentMSRRep[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
BYTE abyIECountry[WLAN_A3FR_MAXLEN];
BYTE abyIBSSDFSOwner[6];
BYTE byIBSSDFSRecovery;
unsigned char abyCurrentMSRReq[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
unsigned char abyCurrentMSRRep[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
unsigned char abyIECountry[WLAN_A3FR_MAXLEN];
unsigned char abyIBSSDFSOwner[6];
unsigned char byIBSSDFSRecovery;
struct sk_buff skb;

View File

@ -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 unsigned char abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 };
const unsigned char abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 };
const unsigned char abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 };
const unsigned char abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 };
const unsigned char abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 };
const unsigned char abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 };
/*+
@ -148,7 +148,7 @@ WPA_ParseRSN (
{
j = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %zu\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType));
for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(BYTE)); i++) {
for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(unsigned char)); i++) {
if(pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i)
if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI00, 4))
pBSSList->abyPKType[j++] = WPA_NONE;
@ -180,7 +180,7 @@ WPA_ParseRSN (
j = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %zu\n",
pIE_RSN_Auth->wAuthCount, sizeof(pBSSList->abyAuthType));
for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(BYTE)); i++) {
for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(unsigned char)); i++) {
if(pRSN->len >= 14+4+(m+i)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*i)
if ( !memcmp(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI01, 4))
pBSSList->abyAuthType[j++] = WPA_AUTH_IEEE802_1X;
@ -239,13 +239,13 @@ WPA_ParseRSN (
-*/
BOOL
WPA_SearchRSN (
BYTE byCmd,
BYTE byEncrypt,
unsigned char byCmd,
unsigned char byEncrypt,
PKnownBSS pBSSList
)
{
int ii;
BYTE byPKType = WPA_NONE;
unsigned char byPKType = WPA_NONE;
if (pBSSList->bWPAValid == FALSE)
return FALSE;

View File

@ -71,8 +71,8 @@ WPA_ParseRSN(
BOOL
WPA_SearchRSN(
BYTE byCmd,
BYTE byEncrypt,
unsigned char byCmd,
unsigned char byEncrypt,
PKnownBSS pBSSList
);

View File

@ -42,14 +42,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 unsigned char abyOUIGK[4] = { 0x00, 0x0F, 0xAC, 0x00 };
const unsigned char abyOUIWEP40[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const unsigned char abyOUIWEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 };
const unsigned char abyOUITKIP[4] = { 0x00, 0x0F, 0xAC, 0x02 };
const unsigned char abyOUICCMP[4] = { 0x00, 0x0F, 0xAC, 0x04 };
const BYTE abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const BYTE abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 };
const unsigned char abyOUI8021X[4] = { 0x00, 0x0F, 0xAC, 0x01 };
const unsigned char abyOUIPSK[4] = { 0x00, 0x0F, 0xAC, 0x02 };
/*--------------------- Static Functions --------------------------*/
@ -168,7 +168,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(unsigned char)); i++) {
if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i)
if ( !memcmp(pbyOUI, abyOUIGK, 4)) {
@ -219,7 +219,7 @@ WPA2vParseRSN (
pBSSNode->wAKMSSAuthCount = *((unsigned short *) &(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(unsigned char)); 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;

View File

@ -40,8 +40,8 @@
#define MAX_PMKID_CACHE 16
typedef struct tagsPMKIDInfo {
BYTE abyBSSID[6];
BYTE abyPMKID[16];
unsigned char abyBSSID[6];
unsigned char abyPMKID[16];
} PMKIDInfo, *PPMKIDInfo;
typedef struct tagSPMKIDCache {

View File

@ -204,11 +204,11 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
struct viawget_wpa_param *param=ctx;
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned long dwKeyIndex = 0;
BYTE abyKey[MAX_KEY_LEN];
BYTE abySeq[MAX_KEY_LEN];
unsigned char abyKey[MAX_KEY_LEN];
unsigned char abySeq[MAX_KEY_LEN];
QWORD KeyRSC;
// NDIS_802_11_KEY_RSC KeyRSC;
BYTE byKeyDecMode = KEY_CTL_WEP;
unsigned char byKeyDecMode = KEY_CTL_WEP;
int ret = 0;
int uu, ii;
@ -251,7 +251,7 @@ spin_lock_irq(&pDevice->lock);
}
else {
if (param->u.wpa_key.set_tx) {
pDevice->byKeyIndex = (BYTE)dwKeyIndex;
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->bTransmitKey = TRUE;
dwKeyIndex |= (1 << 31);
}
@ -422,7 +422,7 @@ spin_lock_irq(&pDevice->lock);
}
} // BSSID not 0xffffffffffff
if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) {
pDevice->byKeyIndex = (BYTE)param->u.wpa_key.key_index;
pDevice->byKeyIndex = (unsigned char)param->u.wpa_key.key_index;
pDevice->bTransmitKey = TRUE;
}
pDevice->bEncryptionEnable = TRUE;
@ -752,8 +752,8 @@ static int wpa_set_associate(PSDevice pDevice,
{
PSMgmtObject pMgmt = pDevice->pMgmt;
PWLAN_IE_SSID pItemSSID;
BYTE abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
BYTE abyWPAIE[64];
unsigned char abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
unsigned char abyWPAIE[64];
int ret = 0;
BOOL bWepEnabled=FALSE;

View File

@ -71,7 +71,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat
PSTxDesc pHeadTD, pLastTD;
unsigned int cbFrameBodySize;
unsigned int uMACfragNum;
BYTE byPktType;
unsigned char byPktType;
BOOL bNeedEncryption = FALSE;
SKeyItem STempKey;
PSKeyItem pTransmitKey = NULL;
@ -132,7 +132,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat
if (uMACfragNum > AVAIL_TD(pDevice,TYPE_AC0DMA)) {
return FALSE;
}
byPktType = (BYTE)pDevice->byPacketType;
byPktType = (unsigned char)pDevice->byPacketType;
if (pDevice->bFixRate) {
if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {