Commit 2986db5f authored by Charles Clément's avatar Charles Clément Committed by Greg Kroah-Hartman

Staging: vt6655: remove WORD typedef

Replace all occurrences with unsigned short type.
Signed-off-by: default avatarCharles Clément <caratorn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0f4c60d6
...@@ -161,21 +161,21 @@ ...@@ -161,21 +161,21 @@
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
/* GET & SET Frame Control bit */ /* GET & SET Frame Control bit */
#define WLAN_GET_FC_PRVER(n) ((((WORD)(n) >> 8) & (BIT0 | BIT1)) #define WLAN_GET_FC_PRVER(n) ((((unsigned short)(n) >> 8) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((WORD)(n) >> 8) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FTYPE(n) ((((unsigned short)(n) >> 8) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4) #define WLAN_GET_FC_FSTYPE(n) ((((unsigned short)(n) >> 8) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((WORD)(n) << 8) & (BIT8)) >> 8) #define WLAN_GET_FC_TODS(n) ((((unsigned short)(n) << 8) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((WORD)(n) << 8) & (BIT9)) >> 9) #define WLAN_GET_FC_FROMDS(n) ((((unsigned short)(n) << 8) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((WORD)(n) << 8) & (BIT10)) >> 10) #define WLAN_GET_FC_MOREFRAG(n) ((((unsigned short)(n) << 8) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((WORD)(n) << 8) & (BIT11)) >> 11) #define WLAN_GET_FC_RETRY(n) ((((unsigned short)(n) << 8) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((WORD)(n) << 8) & (BIT12)) >> 12) #define WLAN_GET_FC_PWRMGT(n) ((((unsigned short)(n) << 8) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((WORD)(n) << 8) & (BIT13)) >> 13) #define WLAN_GET_FC_MOREDATA(n) ((((unsigned short)(n) << 8) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((WORD)(n) << 8) & (BIT14)) >> 14) #define WLAN_GET_FC_ISWEP(n) ((((unsigned short)(n) << 8) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((WORD)(n) << 8) & (BIT15)) >> 15) #define WLAN_GET_FC_ORDER(n) ((((unsigned short)(n) << 8) & (BIT15)) >> 15)
/* Sequence Field bit */ /* Sequence Field bit */
#define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3)) #define WLAN_GET_SEQ_FRGNUM(n) (((unsigned short)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n) >> 8) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) #define WLAN_GET_SEQ_SEQNUM(n) ((((unsigned short)(n) >> 8) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
/* Capability Field bit */ /* Capability Field bit */
...@@ -196,22 +196,22 @@ ...@@ -196,22 +196,22 @@
#else #else
/* GET & SET Frame Control bit */ /* GET & SET Frame Control bit */
#define WLAN_GET_FC_PRVER(n) (((WORD)(n)) & (BIT0 | BIT1)) #define WLAN_GET_FC_PRVER(n) (((unsigned short)(n)) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((WORD)(n)) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FTYPE(n) ((((unsigned short)(n)) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) #define WLAN_GET_FC_FSTYPE(n) ((((unsigned short)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((WORD)(n)) & (BIT8)) >> 8) #define WLAN_GET_FC_TODS(n) ((((unsigned short)(n)) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((WORD)(n)) & (BIT9)) >> 9) #define WLAN_GET_FC_FROMDS(n) ((((unsigned short)(n)) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((WORD)(n)) & (BIT10)) >> 10) #define WLAN_GET_FC_MOREFRAG(n) ((((unsigned short)(n)) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((WORD)(n)) & (BIT11)) >> 11) #define WLAN_GET_FC_RETRY(n) ((((unsigned short)(n)) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((WORD)(n)) & (BIT12)) >> 12) #define WLAN_GET_FC_PWRMGT(n) ((((unsigned short)(n)) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((WORD)(n)) & (BIT13)) >> 13) #define WLAN_GET_FC_MOREDATA(n) ((((unsigned short)(n)) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((WORD)(n)) & (BIT14)) >> 14) #define WLAN_GET_FC_ISWEP(n) ((((unsigned short)(n)) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((WORD)(n)) & (BIT15)) >> 15) #define WLAN_GET_FC_ORDER(n) ((((unsigned short)(n)) & (BIT15)) >> 15)
/* Sequence Field bit */ /* Sequence Field bit */
#define WLAN_GET_SEQ_FRGNUM(n) (((WORD)(n)) & (BIT0|BIT1|BIT2|BIT3)) #define WLAN_GET_SEQ_FRGNUM(n) (((unsigned short)(n)) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) #define WLAN_GET_SEQ_SEQNUM(n) ((((unsigned short)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
/* Capability Field bit */ /* Capability Field bit */
...@@ -246,20 +246,20 @@ ...@@ -246,20 +246,20 @@
#define WLAN_SET_CAP_INFO_GRPACK(n) ((n) << 14) #define WLAN_SET_CAP_INFO_GRPACK(n) ((n) << 14)
#define WLAN_SET_FC_PRVER(n) ((WORD)(n)) #define WLAN_SET_FC_PRVER(n) ((unsigned short)(n))
#define WLAN_SET_FC_FTYPE(n) (((WORD)(n)) << 2) #define WLAN_SET_FC_FTYPE(n) (((unsigned short)(n)) << 2)
#define WLAN_SET_FC_FSTYPE(n) (((WORD)(n)) << 4) #define WLAN_SET_FC_FSTYPE(n) (((unsigned short)(n)) << 4)
#define WLAN_SET_FC_TODS(n) (((WORD)(n)) << 8) #define WLAN_SET_FC_TODS(n) (((unsigned short)(n)) << 8)
#define WLAN_SET_FC_FROMDS(n) (((WORD)(n)) << 9) #define WLAN_SET_FC_FROMDS(n) (((unsigned short)(n)) << 9)
#define WLAN_SET_FC_MOREFRAG(n) (((WORD)(n)) << 10) #define WLAN_SET_FC_MOREFRAG(n) (((unsigned short)(n)) << 10)
#define WLAN_SET_FC_RETRY(n) (((WORD)(n)) << 11) #define WLAN_SET_FC_RETRY(n) (((unsigned short)(n)) << 11)
#define WLAN_SET_FC_PWRMGT(n) (((WORD)(n)) << 12) #define WLAN_SET_FC_PWRMGT(n) (((unsigned short)(n)) << 12)
#define WLAN_SET_FC_MOREDATA(n) (((WORD)(n)) << 13) #define WLAN_SET_FC_MOREDATA(n) (((unsigned short)(n)) << 13)
#define WLAN_SET_FC_ISWEP(n) (((WORD)(n)) << 14) #define WLAN_SET_FC_ISWEP(n) (((unsigned short)(n)) << 14)
#define WLAN_SET_FC_ORDER(n) (((WORD)(n)) << 15) #define WLAN_SET_FC_ORDER(n) (((unsigned short)(n)) << 15)
#define WLAN_SET_SEQ_FRGNUM(n) ((WORD)(n)) #define WLAN_SET_SEQ_FRGNUM(n) ((unsigned short)(n))
#define WLAN_SET_SEQ_SEQNUM(n) (((WORD)(n)) << 4) #define WLAN_SET_SEQ_SEQNUM(n) (((unsigned short)(n)) << 4)
/* ERP Field bit */ /* ERP Field bit */
...@@ -297,8 +297,8 @@ typedef struct { ...@@ -297,8 +297,8 @@ typedef struct {
typedef struct tagWLAN_80211HDR_A2 { typedef struct tagWLAN_80211HDR_A2 {
WORD wFrameCtl; unsigned short wFrameCtl;
WORD wDurationID; unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN]; BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN]; BYTE abyAddr2[WLAN_ADDR_LEN];
...@@ -307,24 +307,24 @@ WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; ...@@ -307,24 +307,24 @@ WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
typedef struct tagWLAN_80211HDR_A3 { typedef struct tagWLAN_80211HDR_A3 {
WORD wFrameCtl; unsigned short wFrameCtl;
WORD wDurationID; unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN]; BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN]; BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN]; BYTE abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl; unsigned short wSeqCtl;
}__attribute__ ((__packed__)) }__attribute__ ((__packed__))
WLAN_80211HDR_A3, *PWLAN_80211HDR_A3; WLAN_80211HDR_A3, *PWLAN_80211HDR_A3;
typedef struct tagWLAN_80211HDR_A4 { typedef struct tagWLAN_80211HDR_A4 {
WORD wFrameCtl; unsigned short wFrameCtl;
WORD wDurationID; unsigned short wDurationID;
BYTE abyAddr1[WLAN_ADDR_LEN]; BYTE abyAddr1[WLAN_ADDR_LEN];
BYTE abyAddr2[WLAN_ADDR_LEN]; BYTE abyAddr2[WLAN_ADDR_LEN];
BYTE abyAddr3[WLAN_ADDR_LEN]; BYTE abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl; unsigned short wSeqCtl;
BYTE abyAddr4[WLAN_ADDR_LEN]; BYTE abyAddr4[WLAN_ADDR_LEN];
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
......
...@@ -262,7 +262,7 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES; ...@@ -262,7 +262,7 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
typedef struct _WLAN_IE_FH_PARMS { typedef struct _WLAN_IE_FH_PARMS {
BYTE byElementID; BYTE byElementID;
BYTE len; BYTE len;
WORD wDwellTime; unsigned short wDwellTime;
BYTE byHopSet; BYTE byHopSet;
BYTE byHopPattern; BYTE byHopPattern;
BYTE byHopIndex; BYTE byHopIndex;
...@@ -285,8 +285,8 @@ typedef struct tagWLAN_IE_CF_PARMS { ...@@ -285,8 +285,8 @@ typedef struct tagWLAN_IE_CF_PARMS {
BYTE len; BYTE len;
BYTE byCFPCount; BYTE byCFPCount;
BYTE byCFPPeriod; BYTE byCFPPeriod;
WORD wCFPMaxDuration; unsigned short wCFPMaxDuration;
WORD wCFPDurRemaining; unsigned short wCFPDurRemaining;
}__attribute__ ((__packed__)) }__attribute__ ((__packed__))
WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS; WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
...@@ -309,7 +309,7 @@ WLAN_IE_TIM, *PWLAN_IE_TIM; ...@@ -309,7 +309,7 @@ WLAN_IE_TIM, *PWLAN_IE_TIM;
typedef struct tagWLAN_IE_IBSS_PARMS { typedef struct tagWLAN_IE_IBSS_PARMS {
BYTE byElementID; BYTE byElementID;
BYTE len; BYTE len;
WORD wATIMWindow; unsigned short wATIMWindow;
}__attribute__ ((__packed__)) }__attribute__ ((__packed__))
WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS; WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
...@@ -329,9 +329,9 @@ typedef struct tagWLAN_IE_RSN_EXT { ...@@ -329,9 +329,9 @@ typedef struct tagWLAN_IE_RSN_EXT {
BYTE byElementID; BYTE byElementID;
BYTE len; BYTE len;
BYTE abyOUI[4]; BYTE abyOUI[4];
WORD wVersion; unsigned short wVersion;
BYTE abyMulticast[4]; BYTE abyMulticast[4];
WORD wPKCount; unsigned short wPKCount;
struct { struct {
BYTE abyOUI[4]; BYTE abyOUI[4];
} PKSList[1]; // the rest is variable so need to } PKSList[1]; // the rest is variable so need to
...@@ -340,7 +340,7 @@ typedef struct tagWLAN_IE_RSN_EXT { ...@@ -340,7 +340,7 @@ typedef struct tagWLAN_IE_RSN_EXT {
#pragma pack(1) #pragma pack(1)
typedef struct tagWLAN_IE_RSN_AUTH { typedef struct tagWLAN_IE_RSN_AUTH {
WORD wAuthCount; unsigned short wAuthCount;
struct { struct {
BYTE abyOUI[4]; BYTE abyOUI[4];
} AuthKSList[1]; } AuthKSList[1];
...@@ -351,7 +351,7 @@ typedef struct tagWLAN_IE_RSN_AUTH { ...@@ -351,7 +351,7 @@ typedef struct tagWLAN_IE_RSN_AUTH {
typedef struct tagWLAN_IE_RSN { typedef struct tagWLAN_IE_RSN {
BYTE byElementID; BYTE byElementID;
BYTE len; BYTE len;
WORD wVersion; unsigned short wVersion;
BYTE abyRSN[WLAN_MIN_ARRAY]; BYTE abyRSN[WLAN_MIN_ARRAY];
} WLAN_IE_RSN, *PWLAN_IE_RSN; } WLAN_IE_RSN, *PWLAN_IE_RSN;
......
...@@ -243,7 +243,7 @@ BYTE abyRoundKey[16]; ...@@ -243,7 +243,7 @@ BYTE abyRoundKey[16];
* Return Value: MIC compare result * Return Value: MIC compare result
* *
*/ */
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, WORD wFrameSize) BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize)
{ {
BYTE abyNonce[13]; BYTE abyNonce[13];
BYTE MIC_IV[16]; BYTE MIC_IV[16];
...@@ -258,11 +258,11 @@ BYTE abyLastCipher[16]; ...@@ -258,11 +258,11 @@ BYTE abyLastCipher[16];
PS802_11Header pMACHeader = (PS802_11Header) pbyFrame; PS802_11Header pMACHeader = (PS802_11Header) pbyFrame;
unsigned char *pbyIV; unsigned char *pbyIV;
unsigned char *pbyPayload; unsigned char *pbyPayload;
WORD wHLen = 22; unsigned short wHLen = 22;
WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC unsigned short wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
BOOL bA4 = FALSE; BOOL bA4 = FALSE;
BYTE byTmp; BYTE byTmp;
WORD wCnt; unsigned short wCnt;
int ii,jj,kk; int ii,jj,kk;
......
...@@ -41,6 +41,6 @@ ...@@ -41,6 +41,6 @@
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, WORD wFrameSize); BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize);
#endif //__AES_H__ #endif //__AES_H__
...@@ -1712,7 +1712,7 @@ BYTE byVT3253B0_AGC[CB_VT3253B0_AGC][2] = { ...@@ -1712,7 +1712,7 @@ BYTE byVT3253B0_AGC[CB_VT3253B0_AGC][2] = {
{0xF0, 0x00}, {0xF0, 0x00},
}; };
const WORD awcFrameTime[MAX_RATE] = const unsigned short awcFrameTime[MAX_RATE] =
{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216}; {10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};
...@@ -1781,7 +1781,7 @@ BBuGetFrameTime ( ...@@ -1781,7 +1781,7 @@ BBuGetFrameTime (
BYTE byPreambleType, BYTE byPreambleType,
BYTE byPktType, BYTE byPktType,
unsigned int cbFrameLength, unsigned int cbFrameLength,
WORD wRate unsigned short wRate
) )
{ {
unsigned int uFrameTime; unsigned int uFrameTime;
...@@ -1847,7 +1847,7 @@ void ...@@ -1847,7 +1847,7 @@ void
BBvCaculateParameter ( BBvCaculateParameter (
PSDevice pDevice, PSDevice pDevice,
unsigned int cbFrameLength, unsigned int cbFrameLength,
WORD wRate, unsigned short wRate,
BYTE byPacketType, BYTE byPacketType,
unsigned short *pwPhyLen, unsigned short *pwPhyLen,
unsigned char *pbyPhySrv, unsigned char *pbyPhySrv,
...@@ -1994,11 +1994,11 @@ BBvCaculateParameter ( ...@@ -1994,11 +1994,11 @@ BBvCaculateParameter (
*pbyPhySrv = 0x00; *pbyPhySrv = 0x00;
if (bExtBit) if (bExtBit)
*pbyPhySrv = *pbyPhySrv | 0x80; *pbyPhySrv = *pbyPhySrv | 0x80;
*pwPhyLen = (WORD)cbUsCount; *pwPhyLen = (unsigned short)cbUsCount;
} }
else { else {
*pbyPhySrv = 0x00; *pbyPhySrv = 0x00;
*pwPhyLen = (WORD)cbFrameLength; *pwPhyLen = (unsigned short)cbFrameLength;
} }
} }
...@@ -2017,7 +2017,7 @@ BBvCaculateParameter ( ...@@ -2017,7 +2017,7 @@ BBvCaculateParameter (
*/ */
BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyData) BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyData)
{ {
WORD ww; unsigned short ww;
BYTE byValue; BYTE byValue;
// BB reg offset // BB reg offset
...@@ -2060,7 +2060,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyDa ...@@ -2060,7 +2060,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, BYTE byBBAddr, unsigned char *pbyDa
*/ */
BOOL BBbWriteEmbeded (unsigned long dwIoBase, BYTE byBBAddr, BYTE byData) BOOL BBbWriteEmbeded (unsigned long dwIoBase, BYTE byBBAddr, BYTE byData)
{ {
WORD ww; unsigned short ww;
BYTE byValue; BYTE byValue;
// BB reg offset // BB reg offset
......
...@@ -123,14 +123,14 @@ BBuGetFrameTime( ...@@ -123,14 +123,14 @@ BBuGetFrameTime(
BYTE byPreambleType, BYTE byPreambleType,
BYTE byPktType, BYTE byPktType,
unsigned int cbFrameLength, unsigned int cbFrameLength,
WORD wRate unsigned short wRate
); );
void void
BBvCaculateParameter ( BBvCaculateParameter (
PSDevice pDevice, PSDevice pDevice,
unsigned int cbFrameLength, unsigned int cbFrameLength,
WORD wRate, unsigned short wRate,
BYTE byPacketType, BYTE byPacketType,
unsigned short *pwPhyLen, unsigned short *pwPhyLen,
unsigned char *pbyPhySrv, unsigned char *pbyPhySrv,
......
...@@ -72,14 +72,14 @@ static int msglevel =MSG_LEVEL_INFO; ...@@ -72,14 +72,14 @@ static int msglevel =MSG_LEVEL_INFO;
const WORD awHWRetry0[5][5] = { const unsigned short awHWRetry0[5][5] = {
{RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M}, {RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M},
{RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M}, {RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M},
{RATE_36M, RATE_36M, RATE_24M, RATE_18M, RATE_18M}, {RATE_36M, RATE_36M, RATE_24M, RATE_18M, RATE_18M},
{RATE_48M, RATE_48M, RATE_36M, RATE_24M, RATE_24M}, {RATE_48M, RATE_48M, RATE_36M, RATE_24M, RATE_24M},
{RATE_54M, RATE_54M, RATE_48M, RATE_36M, RATE_36M} {RATE_54M, RATE_54M, RATE_48M, RATE_36M, RATE_36M}
}; };
const WORD awHWRetry1[5][5] = { const unsigned short awHWRetry1[5][5] = {
{RATE_18M, RATE_18M, RATE_12M, RATE_6M, RATE_6M}, {RATE_18M, RATE_18M, RATE_12M, RATE_6M, RATE_6M},
{RATE_24M, RATE_24M, RATE_18M, RATE_6M, RATE_6M}, {RATE_24M, RATE_24M, RATE_18M, RATE_6M, RATE_6M},
{RATE_36M, RATE_36M, RATE_24M, RATE_12M, RATE_12M}, {RATE_36M, RATE_36M, RATE_24M, RATE_12M, RATE_12M},
...@@ -372,8 +372,8 @@ BSSbInsertToBSSList ( ...@@ -372,8 +372,8 @@ BSSbInsertToBSSList (
void *hDeviceContext, void *hDeviceContext,
unsigned char *abyBSSIDAddr, unsigned char *abyBSSIDAddr,
QWORD qwTimestamp, QWORD qwTimestamp,
WORD wBeaconInterval, unsigned short wBeaconInterval,
WORD wCapInfo, unsigned short wCapInfo,
BYTE byCurrChannel, BYTE byCurrChannel,
PWLAN_IE_SSID pSSID, PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates, PWLAN_IE_SUPP_RATES pSuppRates,
...@@ -587,8 +587,8 @@ BOOL ...@@ -587,8 +587,8 @@ BOOL
BSSbUpdateToBSSList ( BSSbUpdateToBSSList (
void *hDeviceContext, void *hDeviceContext,
QWORD qwTimestamp, QWORD qwTimestamp,
WORD wBeaconInterval, unsigned short wBeaconInterval,
WORD wCapInfo, unsigned short wCapInfo,
BYTE byCurrChannel, BYTE byCurrChannel,
BOOL bChannelHit, BOOL bChannelHit,
PWLAN_IE_SSID pSSID, PWLAN_IE_SSID pSSID,
...@@ -1402,8 +1402,8 @@ BSSvUpdateNodeTxCounter( ...@@ -1402,8 +1402,8 @@ BSSvUpdateNodeTxCounter(
BYTE byTxRetry = (byTsr0 & TSR0_NCR); BYTE byTxRetry = (byTsr0 & TSR0_NCR);
PSTxBufHead pTxBufHead; PSTxBufHead pTxBufHead;
PS802_11Header pMACHeader; PS802_11Header pMACHeader;
WORD wRate; unsigned short wRate;
WORD wFallBackRate = RATE_1M; unsigned short wFallBackRate = RATE_1M;
BYTE byFallBack; BYTE byFallBack;
unsigned int ii; unsigned int ii;
// unsigned int txRetryTemp; // unsigned int txRetryTemp;
......
...@@ -97,7 +97,7 @@ typedef struct tagSERPObject { ...@@ -97,7 +97,7 @@ typedef struct tagSERPObject {
typedef struct tagSRSNCapObject { typedef struct tagSRSNCapObject {
BOOL bRSNCapExist; BOOL bRSNCapExist;
WORD wRSNCap; unsigned short wRSNCap;
}SRSNCapObject, *PSRSNCapObject; }SRSNCapObject, *PSRSNCapObject;
// BSS info(AP) // BSS info(AP)
...@@ -111,12 +111,12 @@ typedef struct tagKnownBSS { ...@@ -111,12 +111,12 @@ typedef struct tagKnownBSS {
BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned int uRSSI; unsigned int uRSSI;
BYTE bySQ; BYTE bySQ;
WORD wBeaconInterval; unsigned short wBeaconInterval;
WORD wCapInfo; unsigned short wCapInfo;
BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE byRxRate; BYTE byRxRate;
// WORD wATIMWindow; // unsigned short wATIMWindow;
BYTE byRSSIStatCnt; BYTE byRSSIStatCnt;
long ldBmMAX; long ldBmMAX;
long ldBmAverage[RSSI_STAT_COUNT]; long ldBmAverage[RSSI_STAT_COUNT];
...@@ -128,9 +128,9 @@ typedef struct tagKnownBSS { ...@@ -128,9 +128,9 @@ typedef struct tagKnownBSS {
BOOL bWPAValid; BOOL bWPAValid;
BYTE byGKType; BYTE byGKType;
BYTE abyPKType[4]; BYTE abyPKType[4];
WORD wPKCount; unsigned short wPKCount;
BYTE abyAuthType[4]; BYTE abyAuthType[4];
WORD wAuthCount; unsigned short wAuthCount;
BYTE byDefaultK_as_PK; BYTE byDefaultK_as_PK;
BYTE byReplayIdx; BYTE byReplayIdx;
//-- //--
...@@ -138,16 +138,16 @@ typedef struct tagKnownBSS { ...@@ -138,16 +138,16 @@ typedef struct tagKnownBSS {
//++ WPA2 informations //++ WPA2 informations
BOOL bWPA2Valid; BOOL bWPA2Valid;
BYTE byCSSGK; BYTE byCSSGK;
WORD wCSSPKCount; unsigned short wCSSPKCount;
BYTE abyCSSPK[4]; BYTE abyCSSPK[4];
WORD wAKMSSAuthCount; unsigned short wAKMSSAuthCount;
BYTE abyAKMSSAuthType[4]; BYTE abyAKMSSAuthType[4];
//++ wpactl //++ wpactl
BYTE byWPAIE[MAX_WPA_IE_LEN]; BYTE byWPAIE[MAX_WPA_IE_LEN];
BYTE byRSNIE[MAX_WPA_IE_LEN]; BYTE byRSNIE[MAX_WPA_IE_LEN];
WORD wWPALen; unsigned short wWPALen;
WORD wRSNLen; unsigned short wRSNLen;
// Clear count // Clear count
unsigned int uClearCount; unsigned int uClearCount;
...@@ -185,22 +185,22 @@ typedef struct tagKnownNodeDB { ...@@ -185,22 +185,22 @@ typedef struct tagKnownNodeDB {
BYTE abyMACAddr[WLAN_ADDR_LEN]; BYTE abyMACAddr[WLAN_ADDR_LEN];
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
WORD wTxDataRate; unsigned short wTxDataRate;
BOOL bShortPreamble; BOOL bShortPreamble;
BOOL bERPExist; BOOL bERPExist;
BOOL bShortSlotTime; BOOL bShortSlotTime;
unsigned int uInActiveCount; unsigned int uInActiveCount;
WORD wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp. unsigned short wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
WORD wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon. unsigned short wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
WORD wSuppRate; unsigned short wSuppRate;
BYTE byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode BYTE byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
BYTE byTopCCKBasicRate; //Records the highest basic rate in CCK mode BYTE byTopCCKBasicRate; //Records the highest basic rate in CCK mode
// For AP mode // For AP mode
struct sk_buff_head sTxPSQueue; struct sk_buff_head sTxPSQueue;
WORD wCapInfo; unsigned short wCapInfo;
WORD wListenInterval; unsigned short wListenInterval;
WORD wAID; unsigned short wAID;
NODE_STATE eNodeState; NODE_STATE eNodeState;
BOOL bPSEnable; BOOL bPSEnable;
BOOL bRxPSPoll; BOOL bRxPSPoll;
...@@ -208,7 +208,7 @@ typedef struct tagKnownNodeDB { ...@@ -208,7 +208,7 @@ typedef struct tagKnownNodeDB {
unsigned long ulLastRxJiffer; unsigned long ulLastRxJiffer;
BYTE bySuppRate; BYTE bySuppRate;
unsigned long dwFlags; unsigned long dwFlags;
WORD wEnQueueCnt; unsigned short wEnQueueCnt;
BOOL bOnFly; BOOL bOnFly;
unsigned long long KeyRSC; unsigned long long KeyRSC;
...@@ -216,7 +216,7 @@ typedef struct tagKnownNodeDB { ...@@ -216,7 +216,7 @@ typedef struct tagKnownNodeDB {
unsigned long dwKeyIndex; unsigned long dwKeyIndex;
BYTE byCipherSuite; BYTE byCipherSuite;
unsigned long dwTSC47_16; unsigned long dwTSC47_16;
WORD wTSC15_0; unsigned short wTSC15_0;
unsigned int uWepKeyLength; unsigned int uWepKeyLength;
BYTE abyWepKey[WLAN_WEPMAX_KEYLEN]; BYTE abyWepKey[WLAN_WEPMAX_KEYLEN];
// //
...@@ -268,8 +268,8 @@ BSSbInsertToBSSList( ...@@ -268,8 +268,8 @@ BSSbInsertToBSSList(
void *hDeviceContext, void *hDeviceContext,
unsigned char *abyBSSIDAddr, unsigned char *abyBSSIDAddr,
QWORD qwTimestamp, QWORD qwTimestamp,
WORD wBeaconInterval, unsigned short wBeaconInterval,
WORD wCapInfo, unsigned short wCapInfo,
BYTE byCurrChannel, BYTE byCurrChannel,
PWLAN_IE_SSID pSSID, PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates, PWLAN_IE_SUPP_RATES pSuppRates,
...@@ -289,8 +289,8 @@ BOOL ...@@ -289,8 +289,8 @@ BOOL
BSSbUpdateToBSSList( BSSbUpdateToBSSList(
void *hDeviceContext, void *hDeviceContext,
QWORD qwTimestamp, QWORD qwTimestamp,
WORD wBeaconInterval, unsigned short wBeaconInterval,
WORD wCapInfo, unsigned short wCapInfo,
BYTE byCurrChannel, BYTE byCurrChannel,
BOOL bChannelHit, BOOL bChannelHit,
PWLAN_IE_SSID pSSID, PWLAN_IE_SSID pSSID,
......
This diff is collapsed.
...@@ -89,14 +89,14 @@ typedef enum _CARD_OP_MODE { ...@@ -89,14 +89,14 @@ typedef enum _CARD_OP_MODE {
void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType); void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
void vUpdateIFS(void *pDeviceHandler); void vUpdateIFS(void *pDeviceHandler);
void CARDvUpdateBasicTopRate(void *pDeviceHandler); void CARDvUpdateBasicTopRate(void *pDeviceHandler);
BOOL CARDbAddBasicRate(void *pDeviceHandler, WORD wRateIdx); BOOL CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx);
BOOL CARDbIsOFDMinBasicRate(void *pDeviceHandler); BOOL CARDbIsOFDMinBasicRate(void *pDeviceHandler);
void CARDvSetLoopbackMode(unsigned long dwIoBase, WORD wLoopbackMode); void CARDvSetLoopbackMode(unsigned long dwIoBase, unsigned short wLoopbackMode);
BOOL CARDbSoftwareReset(void *pDeviceHandler); BOOL CARDbSoftwareReset(void *pDeviceHandler);
void CARDvSetFirstNextTBTT(unsigned long dwIoBase, WORD wBeaconInterval); void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterval);
void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, WORD wBeaconInterval); void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval);
BOOL CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF); BOOL CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF);
QWORD CARDqGetNextTBTT(QWORD qwTSF, WORD wBeaconInterval); QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval);
QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2); QWORD CARDqGetTSFOffset(BYTE byRxRate, QWORD qwTSF1, QWORD qwTSF2);
BOOL CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower); BOOL CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower);
BYTE CARDbyGetPktType(void *pDeviceHandler); BYTE CARDbyGetPktType(void *pDeviceHandler);
...@@ -109,11 +109,11 @@ BOOL CARDbRadioPowerOn(void *pDeviceHandler); ...@@ -109,11 +109,11 @@ BOOL CARDbRadioPowerOn(void *pDeviceHandler);
//BOOL CARDbSendPacket(void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength); //BOOL CARDbSendPacket(void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength);
BOOL CARDbIsShortPreamble(void *pDeviceHandler); BOOL CARDbIsShortPreamble(void *pDeviceHandler);
BOOL CARDbIsShorSlotTime(void *pDeviceHandler); BOOL CARDbIsShorSlotTime(void *pDeviceHandler);
BOOL CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, WORD wCapInfo, BYTE byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs); 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 CARDbUpdateTSF(void *pDeviceHandler, BYTE byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF);
BOOL CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType); BOOL CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
BOOL CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType); BOOL CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
BOOL CARDbSetBeaconPeriod(void *pDeviceHandler, WORD wBeaconInterval); BOOL CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval);
BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode); BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
BOOL BOOL
...@@ -123,7 +123,7 @@ CARDbPowerDown( ...@@ -123,7 +123,7 @@ CARDbPowerDown(
BOOL CARDbSetTxDataRate( BOOL CARDbSetTxDataRate(
void *pDeviceHandler, void *pDeviceHandler,
WORD wDataRate unsigned short wDataRate
); );
...@@ -134,7 +134,7 @@ CARDbAdd_PMKID_Candidate ( ...@@ -134,7 +134,7 @@ CARDbAdd_PMKID_Candidate (
void *pDeviceHandler, void *pDeviceHandler,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
BOOL bRSNCapExist, BOOL bRSNCapExist,
WORD wRSNCap unsigned short wRSNCap
); );
void * void *
...@@ -163,8 +163,8 @@ CARDbSetQuiet ( ...@@ -163,8 +163,8 @@ CARDbSetQuiet (
BOOL bResetQuiet, BOOL bResetQuiet,
BYTE byQuietCount, BYTE byQuietCount,
BYTE byQuietPeriod, BYTE byQuietPeriod,
WORD wQuietDuration, unsigned short wQuietDuration,
WORD wQuietOffset unsigned short wQuietOffset
); );
BOOL BOOL
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
/*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Classes ----------------------------*/
extern WORD TxRate_iwconfig; //2008-5-8 <add> by chester extern unsigned short TxRate_iwconfig; //2008-5-8 <add> by chester
/*--------------------- Static Variables --------------------------*/ /*--------------------- Static Variables --------------------------*/
//static int msglevel =MSG_LEVEL_DEBUG; //static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO; static int msglevel =MSG_LEVEL_INFO;
...@@ -158,12 +158,12 @@ DATARATEbyGetRateIdx ( ...@@ -158,12 +158,12 @@ DATARATEbyGetRateIdx (
* Return Value: RateIdx * Return Value: RateIdx
* *
-*/ -*/
WORD unsigned short
wGetRateIdx( wGetRateIdx(
BYTE byRate BYTE byRate
) )
{ {
WORD ii; unsigned short ii;
//Erase basicRate flag. //Erase basicRate flag.
byRate = byRate & 0x7F;//0111 1111 byRate = byRate & 0x7F;//0111 1111
...@@ -211,7 +211,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler; ...@@ -211,7 +211,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii; unsigned int ii;
BYTE byHighSuppRate = 0; BYTE byHighSuppRate = 0;
BYTE byRate = 0; BYTE byRate = 0;
WORD wOldBasicRate = pDevice->wBasicRate; unsigned short wOldBasicRate = pDevice->wBasicRate;
unsigned int uRateLen; unsigned int uRateLen;
...@@ -314,13 +314,13 @@ RATEvTxRateFallBack ( ...@@ -314,13 +314,13 @@ RATEvTxRateFallBack (
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
WORD wIdxDownRate = 0; unsigned short wIdxDownRate = 0;
unsigned int ii; unsigned int ii;
//unsigned long dwRateTable[MAX_RATE] = {1, 2, 5, 11, 6, 9, 12, 18, 24, 36, 48, 54}; //unsigned long dwRateTable[MAX_RATE] = {1, 2, 5, 11, 6, 9, 12, 18, 24, 36, 48, 54};
BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE};
unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
unsigned long dwThroughput = 0; unsigned long dwThroughput = 0;
WORD wIdxUpRate = 0; unsigned short wIdxUpRate = 0;
unsigned long dwTxDiff = 0; unsigned long dwTxDiff = 0;
if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING) { if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING) {
...@@ -347,7 +347,7 @@ WORD wIdxUpRate = 0; ...@@ -347,7 +347,7 @@ WORD wIdxUpRate = 0;
for(ii=0;ii<MAX_RATE;ii++) { for(ii=0;ii<MAX_RATE;ii++) {
if (psNodeDBTable->wSuppRate & (0x0001<<ii)) { if (psNodeDBTable->wSuppRate & (0x0001<<ii)) {
if (bAutoRate[ii] == TRUE) { if (bAutoRate[ii] == TRUE) {
wIdxUpRate = (WORD) ii; wIdxUpRate = (unsigned short) ii;
} }
} else { } else {
bAutoRate[ii] = FALSE; bAutoRate[ii] = FALSE;
...@@ -374,7 +374,7 @@ WORD wIdxUpRate = 0; ...@@ -374,7 +374,7 @@ WORD wIdxUpRate = 0;
if ( (dwThroughputTbl[ii] > dwThroughput) && if ( (dwThroughputTbl[ii] > dwThroughput) &&
(bAutoRate[ii]==TRUE) ) { (bAutoRate[ii]==TRUE) ) {
dwThroughput = dwThroughputTbl[ii]; dwThroughput = dwThroughputTbl[ii];
wIdxDownRate = (WORD) ii; wIdxDownRate = (unsigned short) ii;
} }
} }
psNodeDBTable->wTxDataRate = wIdxDownRate; psNodeDBTable->wTxDataRate = wIdxDownRate;
......
...@@ -80,7 +80,7 @@ RATEuSetIE( ...@@ -80,7 +80,7 @@ RATEuSetIE(
unsigned int uRateLen unsigned int uRateLen
); );
WORD unsigned short
wGetRateIdx( wGetRateIdx(
BYTE byRate BYTE byRate
); );
......
This diff is collapsed.
...@@ -282,7 +282,7 @@ typedef struct tagSQuietControl { ...@@ -282,7 +282,7 @@ typedef struct tagSQuietControl {
BOOL bEnable; BOOL bEnable;
unsigned long dwStartTime; unsigned long dwStartTime;
BYTE byPeriod; BYTE byPeriod;
WORD wDuration; unsigned short wDuration;
} SQuietControl, *PSQuietControl; } SQuietControl, *PSQuietControl;
//-- //--
...@@ -303,7 +303,7 @@ typedef enum { ...@@ -303,7 +303,7 @@ typedef enum {
// The receive duplicate detection cache entry // The receive duplicate detection cache entry
typedef struct tagSCacheEntry{ typedef struct tagSCacheEntry{
WORD wFmSequence; unsigned short wFmSequence;
BYTE abyAddr2[ETH_ALEN]; BYTE abyAddr2[ETH_ALEN];
} SCacheEntry, *PSCacheEntry; } SCacheEntry, *PSCacheEntry;
...@@ -319,8 +319,8 @@ typedef struct tagSCache{ ...@@ -319,8 +319,8 @@ typedef struct tagSCache{
// DeFragment Control Block, used for collecting fragments prior to reassembly // DeFragment Control Block, used for collecting fragments prior to reassembly
typedef struct tagSDeFragControlBlock typedef struct tagSDeFragControlBlock
{ {
WORD wSequence; unsigned short wSequence;
WORD wFragNum; unsigned short wFragNum;
BYTE abyAddr2[ETH_ALEN]; BYTE abyAddr2[ETH_ALEN];
unsigned int uLifetime; unsigned int uLifetime;
struct sk_buff* skb; struct sk_buff* skb;
...@@ -430,8 +430,8 @@ typedef struct __device_info { ...@@ -430,8 +430,8 @@ typedef struct __device_info {
u32 io_size; u32 io_size;
BYTE byRevId; BYTE byRevId;
WORD SubSystemID; unsigned short SubSystemID;
WORD SubVendorID; unsigned short SubVendorID;
int nTxQueues; int nTxQueues;
volatile int iTDUsed[TYPE_MAXTD]; volatile int iTDUsed[TYPE_MAXTD];
...@@ -525,7 +525,7 @@ typedef struct __device_info { ...@@ -525,7 +525,7 @@ typedef struct __device_info {
VIA_BB_TYPE byBBType; //0: 11A, 1:11B, 2:11G 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) VIA_PKT_TYPE byPacketType; //0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate)
WORD wBasicRate; unsigned short wBasicRate;
BYTE byACKRate; BYTE byACKRate;
BYTE byTopOFDMBasicRate; BYTE byTopOFDMBasicRate;
BYTE byTopCCKBasicRate; BYTE byTopCCKBasicRate;
...@@ -537,20 +537,20 @@ typedef struct __device_info { ...@@ -537,20 +537,20 @@ typedef struct __device_info {
BYTE byPreambleType; BYTE byPreambleType;
BYTE byShortPreamble; BYTE byShortPreamble;
WORD wCurrentRate; unsigned short wCurrentRate;
WORD wRTSThreshold; unsigned short wRTSThreshold;
WORD wFragmentationThreshold; unsigned short wFragmentationThreshold;
BYTE byShortRetryLimit; BYTE byShortRetryLimit;
BYTE byLongRetryLimit; BYTE byLongRetryLimit;
CARD_OP_MODE eOPMode; CARD_OP_MODE eOPMode;
BYTE byOpMode; BYTE byOpMode;
BOOL bBSSIDFilter; BOOL bBSSIDFilter;
WORD wMaxTransmitMSDULifetime; unsigned short wMaxTransmitMSDULifetime;
BYTE abyBSSID[ETH_ALEN]; BYTE abyBSSID[ETH_ALEN];
BYTE abyDesireBSSID[ETH_ALEN]; BYTE abyDesireBSSID[ETH_ALEN];
WORD wCTSDuration; // update while speed change unsigned short wCTSDuration; // update while speed change
WORD wACKDuration; // update while speed change unsigned short wACKDuration; // update while speed change
WORD wRTSTransmitLen; // update while speed change unsigned short wRTSTransmitLen; // update while speed change
BYTE byRTSServiceField; // update while speed change BYTE byRTSServiceField; // update while speed change
BYTE byRTSSignalField; // update while speed change BYTE byRTSSignalField; // update while speed change
...@@ -565,12 +565,12 @@ typedef struct __device_info { ...@@ -565,12 +565,12 @@ typedef struct __device_info {
BOOL bBarkerPreambleMd; BOOL bBarkerPreambleMd;
BYTE byERPFlag; BYTE byERPFlag;
WORD wUseProtectCntDown; unsigned short wUseProtectCntDown;
BOOL bRadioControlOff; BOOL bRadioControlOff;
BOOL bRadioOff; BOOL bRadioOff;
BOOL bEnablePSMode; BOOL bEnablePSMode;
WORD wListenInterval; unsigned short wListenInterval;
BOOL bPWBitOn; BOOL bPWBitOn;
WMAC_POWER_MODE ePSMode; WMAC_POWER_MODE ePSMode;
...@@ -583,8 +583,8 @@ typedef struct __device_info { ...@@ -583,8 +583,8 @@ typedef struct __device_info {
BOOL bGPIOBlockRead; BOOL bGPIOBlockRead;
// Beacon releated // Beacon releated
WORD wSeqCounter; unsigned short wSeqCounter;
WORD wBCNBufLen; unsigned short wBCNBufLen;
BOOL bBeaconBufReady; BOOL bBeaconBufReady;
BOOL bBeaconSent; BOOL bBeaconSent;
BOOL bIsBeaconBufReadySet; BOOL bIsBeaconBufReadySet;
...@@ -748,7 +748,7 @@ typedef struct __device_info { ...@@ -748,7 +748,7 @@ typedef struct __device_info {
unsigned long uNumSQ3[MAX_RATE]; unsigned long uNumSQ3[MAX_RATE];
WORD wAntDiversityMaxRate; unsigned short wAntDiversityMaxRate;
SEthernetHeader sTxEthHeader; SEthernetHeader sTxEthHeader;
...@@ -790,7 +790,7 @@ typedef struct __device_info { ...@@ -790,7 +790,7 @@ typedef struct __device_info {
BOOL bCountryInfo5G; BOOL bCountryInfo5G;
BOOL bCountryInfo24G; BOOL bCountryInfo24G;
WORD wBeaconInterval; unsigned short wBeaconInterval;
//WPA supplicant deamon //WPA supplicant deamon
struct net_device *wpadev; struct net_device *wpadev;
......
...@@ -775,7 +775,7 @@ else ...@@ -775,7 +775,7 @@ else
if (pDevice->uConnectionRate == RATE_AUTO) { if (pDevice->uConnectionRate == RATE_AUTO) {
pDevice->wCurrentRate = RATE_54M; pDevice->wCurrentRate = RATE_54M;
} else { } else {
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
// default G Mode // default G Mode
...@@ -1753,7 +1753,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) { ...@@ -1753,7 +1753,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
(pTD->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)) { (pTD->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)) {
WORD wAID; unsigned short wAID;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
skb = pTD->pTDInfo->skb; skb = pTD->pTDInfo->skb;
...@@ -1798,7 +1798,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) { ...@@ -1798,7 +1798,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
} }
static void device_error(PSDevice pDevice, WORD status) { static void device_error(PSDevice pDevice, unsigned short status) {
if (status & ISR_FETALERR) { if (status & ISR_FETALERR) {
DBG_PRT(MSG_LEVEL_ERR, KERN_ERR DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
...@@ -2176,13 +2176,13 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI ...@@ -2176,13 +2176,13 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
if (pDevice->uConnectionRate >= RATE_11M) { if (pDevice->uConnectionRate >= RATE_11M) {
pDevice->wCurrentRate = RATE_11M; pDevice->wCurrentRate = RATE_11M;
} else { } else {
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
} else { } else {
if (pDevice->uConnectionRate >= RATE_54M) if (pDevice->uConnectionRate >= RATE_54M)
pDevice->wCurrentRate = RATE_54M; pDevice->wCurrentRate = RATE_54M;
else else
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
} }
else { else {
...@@ -2274,7 +2274,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { ...@@ -2274,7 +2274,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
PSTxDesc pHeadTD, pLastTD; PSTxDesc pHeadTD, pLastTD;
unsigned int uNodeIndex = 0; unsigned int uNodeIndex = 0;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
WORD wAID; unsigned short wAID;
unsigned int uMACfragNum = 1; unsigned int uMACfragNum = 1;
unsigned int cbFrameBodySize; unsigned int cbFrameBodySize;
BYTE byPktType; BYTE byPktType;
...@@ -2457,7 +2457,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { ...@@ -2457,7 +2457,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
if (pDevice->uConnectionRate >= RATE_11M) { if (pDevice->uConnectionRate >= RATE_11M) {
pDevice->wCurrentRate = RATE_11M; pDevice->wCurrentRate = RATE_11M;
} else { } else {
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
} else { } else {
if ((pDevice->eCurrentPHYType == PHY_TYPE_11A) && if ((pDevice->eCurrentPHYType == PHY_TYPE_11A) &&
...@@ -2467,7 +2467,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { ...@@ -2467,7 +2467,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
if (pDevice->uConnectionRate >= RATE_54M) if (pDevice->uConnectionRate >= RATE_54M)
pDevice->wCurrentRate = RATE_54M; pDevice->wCurrentRate = RATE_54M;
else else
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
} }
...@@ -2637,7 +2637,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); ...@@ -2637,7 +2637,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
BYTE Protocol_Version; //802.1x Authentication BYTE Protocol_Version; //802.1x Authentication
BYTE Packet_Type; //802.1x Authentication BYTE Packet_Type; //802.1x Authentication
BYTE Descriptor_type; BYTE Descriptor_type;
WORD Key_info; unsigned short Key_info;
BOOL bTxeapol_key = FALSE; BOOL bTxeapol_key = FALSE;
Protocol_Version = skb->data[ETH_HLEN]; Protocol_Version = skb->data[ETH_HLEN];
Packet_Type = skb->data[ETH_HLEN+1]; Packet_Type = skb->data[ETH_HLEN+1];
......
...@@ -359,7 +359,7 @@ device_receive_frame ( ...@@ -359,7 +359,7 @@ device_receive_frame (
BOOL bIsWEP = FALSE; BOOL bIsWEP = FALSE;
unsigned int cbHeaderOffset; unsigned int cbHeaderOffset;
unsigned int FrameSize; unsigned int FrameSize;
WORD wEtherType = 0; unsigned short wEtherType = 0;
int iSANodeIndex = -1; int iSANodeIndex = -1;
int iDANodeIndex = -1; int iDANodeIndex = -1;
unsigned int ii; unsigned int ii;
...@@ -370,7 +370,7 @@ device_receive_frame ( ...@@ -370,7 +370,7 @@ device_receive_frame (
unsigned char *pbySQ; unsigned char *pbySQ;
unsigned int cbHeaderSize; unsigned int cbHeaderSize;
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
WORD wRxTSC15_0 = 0; unsigned short wRxTSC15_0 = 0;
unsigned long dwRxTSC47_16 = 0; unsigned long dwRxTSC47_16 = 0;
SKeyItem STempKey; SKeyItem STempKey;
// 802.11h RPI // 802.11h RPI
...@@ -917,12 +917,12 @@ device_receive_frame ( ...@@ -917,12 +917,12 @@ device_receive_frame (
if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) || if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) ||
(pKey->byCipherSuite == KEY_CTL_CCMP))) { (pKey->byCipherSuite == KEY_CTL_CCMP))) {
if (bIsWEP) { if (bIsWEP) {
WORD wLocalTSC15_0 = 0; unsigned short wLocalTSC15_0 = 0;
unsigned long dwLocalTSC47_16 = 0; unsigned long dwLocalTSC47_16 = 0;
unsigned long long RSC = 0; unsigned long long RSC = 0;
// endian issues // endian issues
RSC = *((unsigned long long *) &(pKey->KeyRSC)); RSC = *((unsigned long long *) &(pKey->KeyRSC));
wLocalTSC15_0 = (WORD) RSC; wLocalTSC15_0 = (unsigned short) RSC;
dwLocalTSC47_16 = (unsigned long) (RSC>>16); dwLocalTSC47_16 = (unsigned long) (RSC>>16);
RSC = dwRxTSC47_16; RSC = dwRxTSC47_16;
...@@ -1452,7 +1452,7 @@ static BOOL s_bAPModeRxData ( ...@@ -1452,7 +1452,7 @@ static BOOL s_bAPModeRxData (
BOOL bRelayAndForward = FALSE; BOOL bRelayAndForward = FALSE;
BOOL bRelayOnly = FALSE; BOOL bRelayOnly = FALSE;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
WORD wAID; unsigned short wAID;
struct sk_buff* skbcpy = NULL; struct sk_buff* skbcpy = NULL;
......
...@@ -267,7 +267,7 @@ static int hostap_add_sta(PSDevice pDevice, ...@@ -267,7 +267,7 @@ static int hostap_add_sta(PSDevice pDevice,
pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble = pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble =
WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo); WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo);
pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)param->u.add_sta.aid; pMgmt->sNodeDBTable[uNodeIndex].wAID = (unsigned short)param->u.add_sta.aid;
pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies;
...@@ -480,7 +480,7 @@ static int hostap_set_encryption(PSDevice pDevice, ...@@ -480,7 +480,7 @@ static int hostap_set_encryption(PSDevice pDevice,
int iNodeIndex = -1; int iNodeIndex = -1;
int ii; int ii;
BOOL bKeyTableFull = FALSE; BOOL bKeyTableFull = FALSE;
WORD wKeyCtl = 0; unsigned short wKeyCtl = 0;
param->u.crypt.err = 0; param->u.crypt.err = 0;
......
...@@ -635,9 +635,9 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -635,9 +635,9 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
pNodeList->sNodeList[jj].wAID = pNode->wAID; pNodeList->sNodeList[jj].wAID = pNode->wAID;
memcpy(pNodeList->sNodeList[jj].abyMACAddr, pNode->abyMACAddr, WLAN_ADDR_LEN); memcpy(pNodeList->sNodeList[jj].abyMACAddr, pNode->abyMACAddr, WLAN_ADDR_LEN);
pNodeList->sNodeList[jj].wTxDataRate = pNode->wTxDataRate; pNodeList->sNodeList[jj].wTxDataRate = pNode->wTxDataRate;
pNodeList->sNodeList[jj].wInActiveCount = (WORD)pNode->uInActiveCount; pNodeList->sNodeList[jj].wInActiveCount = (unsigned short)pNode->uInActiveCount;
pNodeList->sNodeList[jj].wEnQueueCnt = (WORD)pNode->wEnQueueCnt; pNodeList->sNodeList[jj].wEnQueueCnt = (unsigned short)pNode->wEnQueueCnt;
pNodeList->sNodeList[jj].wFlags = (WORD)pNode->dwFlags; pNodeList->sNodeList[jj].wFlags = (unsigned short)pNode->dwFlags;
pNodeList->sNodeList[jj].bPWBitOn = pNode->bPSEnable; pNodeList->sNodeList[jj].bPWBitOn = pNode->bPSEnable;
pNodeList->sNodeList[jj].byKeyIndex = pNode->byKeyIndex; pNodeList->sNodeList[jj].byKeyIndex = pNode->byKeyIndex;
pNodeList->sNodeList[jj].wWepKeyLength = pNode->uWepKeyLength; pNodeList->sNodeList[jj].wWepKeyLength = pNode->uWepKeyLength;
...@@ -652,7 +652,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -652,7 +652,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
pNodeList->sNodeList[jj].bIsInFallback = pNode->bIsInFallback; pNodeList->sNodeList[jj].bIsInFallback = pNode->bIsInFallback;
pNodeList->sNodeList[jj].uTxFailures = pNode->uTxFailures; pNodeList->sNodeList[jj].uTxFailures = pNode->uTxFailures;
pNodeList->sNodeList[jj].uTxAttempts = pNode->uTxAttempts; pNodeList->sNodeList[jj].uTxAttempts = pNode->uTxAttempts;
pNodeList->sNodeList[jj].wFailureRatio = (WORD)pNode->uFailureRatio; pNodeList->sNodeList[jj].wFailureRatio = (unsigned short)pNode->uFailureRatio;
jj ++; jj ++;
if (jj >= pNodeList->uItem) if (jj >= pNodeList->uItem)
break; break;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#endif #endif
#include <net/iw_handler.h> #include <net/iw_handler.h>
extern WORD TxRate_iwconfig;//2008-5-8 <add> by chester extern unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester
/*--------------------- Static Definitions -------------------------*/ /*--------------------- Static Definitions -------------------------*/
......
...@@ -62,7 +62,7 @@ typedef struct tagSKeyItem ...@@ -62,7 +62,7 @@ typedef struct tagSKeyItem
BYTE abyKey[MAX_KEY_LEN]; BYTE abyKey[MAX_KEY_LEN];
QWORD KeyRSC; QWORD KeyRSC;
unsigned long dwTSC47_16; unsigned long dwTSC47_16;
WORD wTSC15_0; unsigned short wTSC15_0;
BYTE byCipherSuite; BYTE byCipherSuite;
BYTE byReserved0; BYTE byReserved0;
unsigned long dwKeyIndex; unsigned long dwKeyIndex;
...@@ -78,10 +78,10 @@ typedef struct tagSKeyTable ...@@ -78,10 +78,10 @@ typedef struct tagSKeyTable
unsigned long dwGTKeyIndex; // GroupTransmitKey Index unsigned long dwGTKeyIndex; // GroupTransmitKey Index
BOOL bInUse; BOOL bInUse;
//2006-1116-01,<Modify> by NomadZhao //2006-1116-01,<Modify> by NomadZhao
//WORD wKeyCtl; //unsigned short wKeyCtl;
//BOOL bSoftWEP; //BOOL bSoftWEP;
BOOL bSoftWEP; BOOL bSoftWEP;
WORD wKeyCtl; // for address of wKeyCtl at align 4 unsigned short wKeyCtl; // for address of wKeyCtl at align 4
BYTE byReserved1[6]; BYTE byReserved1[6];
} SKeyTable, *PSKeyTable; //348 } SKeyTable, *PSKeyTable; //348
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
#include "tether.h" #include "tether.h"
#include "mac.h" #include "mac.h"
WORD TxRate_iwconfig;//2008-5-8 <add> by chester unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester
/*--------------------- Static Definitions -------------------------*/ /*--------------------- Static Definitions -------------------------*/
//static int msglevel =MSG_LEVEL_DEBUG; //static int msglevel =MSG_LEVEL_DEBUG;
static int msglevel =MSG_LEVEL_INFO; static int msglevel =MSG_LEVEL_INFO;
...@@ -583,7 +583,7 @@ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase) ...@@ -583,7 +583,7 @@ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
* Return Value: none * Return Value: none
* *
*/ */
void MACvSetPacketFilter (unsigned long dwIoBase, WORD wFilterType) void MACvSetPacketFilter (unsigned long dwIoBase, unsigned short wFilterType)
{ {
BYTE byOldRCR; BYTE byOldRCR;
BYTE byNewRCR = 0; BYTE byNewRCR = 0;
...@@ -776,7 +776,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) ...@@ -776,7 +776,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
BOOL MACbSoftwareReset (unsigned long dwIoBase) BOOL MACbSoftwareReset (unsigned long dwIoBase)
{ {
BYTE byData; BYTE byData;
WORD ww; unsigned short ww;
// turn on HOSTCR_SOFTRST, just write 0x01 to reset // turn on HOSTCR_SOFTRST, just write 0x01 to reset
//MACvRegBitsOn(dwIoBase, MAC_REG_HOSTCR, HOSTCR_SOFTRST); //MACvRegBitsOn(dwIoBase, MAC_REG_HOSTCR, HOSTCR_SOFTRST);
...@@ -841,7 +841,7 @@ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase) ...@@ -841,7 +841,7 @@ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
*/ */
BOOL MACbSafeRxOff (unsigned long dwIoBase) BOOL MACbSafeRxOff (unsigned long dwIoBase)
{ {
WORD ww; unsigned short ww;
unsigned long dwData; unsigned long dwData;
BYTE byData; BYTE byData;
...@@ -902,7 +902,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase) ...@@ -902,7 +902,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
*/ */
BOOL MACbSafeTxOff (unsigned long dwIoBase) BOOL MACbSafeTxOff (unsigned long dwIoBase)
{ {
WORD ww; unsigned short ww;
unsigned long dwData; unsigned long dwData;
BYTE byData; BYTE byData;
...@@ -1081,7 +1081,7 @@ void MACvInitialize (unsigned long dwIoBase) ...@@ -1081,7 +1081,7 @@ void MACvInitialize (unsigned long dwIoBase)
*/ */
void MACvSetCurrRx0DescAddr (unsigned long dwIoBase, unsigned long dwCurrDescAddr) void MACvSetCurrRx0DescAddr (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{ {
WORD ww; unsigned short ww;
BYTE byData; BYTE byData;
BYTE byOrgDMACtl; BYTE byOrgDMACtl;
...@@ -1119,7 +1119,7 @@ BYTE byOrgDMACtl; ...@@ -1119,7 +1119,7 @@ BYTE byOrgDMACtl;
*/ */
void MACvSetCurrRx1DescAddr (unsigned long dwIoBase, unsigned long dwCurrDescAddr) void MACvSetCurrRx1DescAddr (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{ {
WORD ww; unsigned short ww;
BYTE byData; BYTE byData;
BYTE byOrgDMACtl; BYTE byOrgDMACtl;
...@@ -1157,7 +1157,7 @@ BYTE byOrgDMACtl; ...@@ -1157,7 +1157,7 @@ BYTE byOrgDMACtl;
*/ */
void MACvSetCurrTx0DescAddrEx (unsigned long dwIoBase, unsigned long dwCurrDescAddr) void MACvSetCurrTx0DescAddrEx (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{ {
WORD ww; unsigned short ww;
BYTE byData; BYTE byData;
BYTE byOrgDMACtl; BYTE byOrgDMACtl;
...@@ -1196,7 +1196,7 @@ BYTE byOrgDMACtl; ...@@ -1196,7 +1196,7 @@ BYTE byOrgDMACtl;
//TxDMA1 = AC0DMA //TxDMA1 = AC0DMA
void MACvSetCurrAC0DescAddrEx (unsigned long dwIoBase, unsigned long dwCurrDescAddr) void MACvSetCurrAC0DescAddrEx (unsigned long dwIoBase, unsigned long dwCurrDescAddr)
{ {
WORD ww; unsigned short ww;
BYTE byData; BYTE byData;
BYTE byOrgDMACtl; BYTE byOrgDMACtl;
...@@ -1309,7 +1309,7 @@ void MACvOneShotTimer1MicroSec (unsigned long dwIoBase, unsigned int uDelayTime) ...@@ -1309,7 +1309,7 @@ void MACvOneShotTimer1MicroSec (unsigned long dwIoBase, unsigned int uDelayTime)
} }
void MACvSetMISCFifo (unsigned long dwIoBase, WORD wOffset, unsigned long dwData) void MACvSetMISCFifo (unsigned long dwIoBase, unsigned short wOffset, unsigned long dwData)
{ {
if (wOffset > 273) if (wOffset > 273)
return; return;
...@@ -1455,10 +1455,10 @@ BOOL MACbPSWakeup (unsigned long dwIoBase) ...@@ -1455,10 +1455,10 @@ BOOL MACbPSWakeup (unsigned long dwIoBase)
* *
*/ */
void MACvSetKeyEntry (unsigned long dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, 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, BYTE byLocalID)
{ {
WORD wOffset; unsigned short wOffset;
unsigned long dwData; unsigned long dwData;
int ii; int ii;
...@@ -1524,7 +1524,7 @@ int ii; ...@@ -1524,7 +1524,7 @@ int ii;
*/ */
void MACvDisableKeyEntry (unsigned long dwIoBase, unsigned int uEntryIdx) void MACvDisableKeyEntry (unsigned long dwIoBase, unsigned int uEntryIdx)
{ {
WORD wOffset; unsigned short wOffset;
wOffset = MISCFIFO_KEYETRY0; wOffset = MISCFIFO_KEYETRY0;
wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE); wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE);
...@@ -1553,7 +1553,7 @@ WORD wOffset; ...@@ -1553,7 +1553,7 @@ WORD wOffset;
void MACvSetDefaultKeyEntry (unsigned long dwIoBase, unsigned int uKeyLen, void MACvSetDefaultKeyEntry (unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID) unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID)
{ {
WORD wOffset; unsigned short wOffset;
unsigned long dwData; unsigned long dwData;
int ii; int ii;
...@@ -1603,7 +1603,7 @@ int ii; ...@@ -1603,7 +1603,7 @@ int ii;
/* /*
void MACvEnableDefaultKey (unsigned long dwIoBase, BYTE byLocalID) void MACvEnableDefaultKey (unsigned long dwIoBase, BYTE byLocalID)
{ {
WORD wOffset; unsigned short wOffset;
unsigned long dwData; unsigned long dwData;
...@@ -1638,7 +1638,7 @@ unsigned long dwData; ...@@ -1638,7 +1638,7 @@ unsigned long dwData;
*/ */
void MACvDisableDefaultKey (unsigned long dwIoBase) void MACvDisableDefaultKey (unsigned long dwIoBase)
{ {
WORD wOffset; unsigned short wOffset;
unsigned long dwData; unsigned long dwData;
...@@ -1669,7 +1669,7 @@ unsigned long dwData; ...@@ -1669,7 +1669,7 @@ unsigned long dwData;
void MACvSetDefaultTKIPKeyEntry (unsigned long dwIoBase, unsigned int uKeyLen, void MACvSetDefaultTKIPKeyEntry (unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID) unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID)
{ {
WORD wOffset; unsigned short wOffset;
unsigned long dwData; unsigned long dwData;
int ii; int ii;
...@@ -1723,9 +1723,9 @@ int ii; ...@@ -1723,9 +1723,9 @@ int ii;
* *
*/ */
void MACvSetDefaultKeyCtl (unsigned long dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID) void MACvSetDefaultKeyCtl (unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID)
{ {
WORD wOffset; unsigned short wOffset;
unsigned long dwData; unsigned long dwData;
if (byLocalID <= 1) if (byLocalID <= 1)
......
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,7 @@
#define MACvWordRegBitsOn(dwIoBase, byRegOfs, wBits) \ #define MACvWordRegBitsOn(dwIoBase, byRegOfs, wBits) \
{ \ { \
WORD wData; \ unsigned short wData; \
VNSvInPortW(dwIoBase + byRegOfs, &wData); \ VNSvInPortW(dwIoBase + byRegOfs, &wData); \
VNSvOutPortW(dwIoBase + byRegOfs, wData | (wBits)); \ VNSvOutPortW(dwIoBase + byRegOfs, wData | (wBits)); \
} }
...@@ -699,7 +699,7 @@ ...@@ -699,7 +699,7 @@
#define MACvWordRegBitsOff(dwIoBase, byRegOfs, wBits) \ #define MACvWordRegBitsOff(dwIoBase, byRegOfs, wBits) \
{ \ { \
WORD wData; \ unsigned short wData; \
VNSvInPortW(dwIoBase + byRegOfs, &wData); \ VNSvInPortW(dwIoBase + byRegOfs, &wData); \
VNSvOutPortW(dwIoBase + byRegOfs, wData & ~(wBits)); \ VNSvOutPortW(dwIoBase + byRegOfs, wData & ~(wBits)); \
} }
...@@ -1074,7 +1074,7 @@ ...@@ -1074,7 +1074,7 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
extern WORD TxRate_iwconfig;//2008-5-8 <add> by chester extern unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester
void MACvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyMacRegs); void MACvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyMacRegs);
BOOL MACbIsRegBitsOn(unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits); BOOL MACbIsRegBitsOn(unsigned long dwIoBase, BYTE byRegOfs, BYTE byTestBits);
...@@ -1105,7 +1105,7 @@ void MACvGetLongRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit) ...@@ -1105,7 +1105,7 @@ void MACvGetLongRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit)
void MACvSetLoopbackMode(unsigned long dwIoBase, BYTE byLoopbackMode); void MACvSetLoopbackMode(unsigned long dwIoBase, BYTE byLoopbackMode);
BOOL MACbIsInLoopbackMode(unsigned long dwIoBase); BOOL MACbIsInLoopbackMode(unsigned long dwIoBase);
void MACvSetPacketFilter(unsigned long dwIoBase, WORD wFilterType); void MACvSetPacketFilter(unsigned long dwIoBase, unsigned short wFilterType);
void MACvSaveContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf); void MACvSaveContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf);
void MACvRestoreContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf); void MACvRestoreContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf);
...@@ -1129,7 +1129,7 @@ void MACvTimer0MicroSDelay(unsigned long dwIoBase, unsigned int uDelay); ...@@ -1129,7 +1129,7 @@ void MACvTimer0MicroSDelay(unsigned long dwIoBase, unsigned int uDelay);
void MACvOneShotTimer0MicroSec(unsigned long dwIoBase, unsigned int uDelayTime); void MACvOneShotTimer0MicroSec(unsigned long dwIoBase, unsigned int uDelayTime);
void MACvOneShotTimer1MicroSec(unsigned long dwIoBase, unsigned int uDelayTime); void MACvOneShotTimer1MicroSec(unsigned long dwIoBase, unsigned int uDelayTime);
void MACvSetMISCFifo(unsigned long dwIoBase, WORD wOffset, unsigned long dwData); void MACvSetMISCFifo(unsigned long dwIoBase, unsigned short wOffset, unsigned long dwData);
BOOL MACbTxDMAOff (unsigned long dwIoBase, unsigned int idx); BOOL MACbTxDMAOff (unsigned long dwIoBase, unsigned int idx);
...@@ -1139,7 +1139,7 @@ void MACvEnableBusSusEn(unsigned long dwIoBase); ...@@ -1139,7 +1139,7 @@ void MACvEnableBusSusEn(unsigned long dwIoBase);
BOOL MACbFlushSYNCFifo(unsigned long dwIoBase); BOOL MACbFlushSYNCFifo(unsigned long dwIoBase);
BOOL MACbPSWakeup(unsigned long dwIoBase); BOOL MACbPSWakeup(unsigned long dwIoBase);
void MACvSetKeyEntry(unsigned long dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, 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, BYTE byLocalID);
void MACvDisableKeyEntry(unsigned long dwIoBase, unsigned int uEntryIdx); void MACvDisableKeyEntry(unsigned long dwIoBase, unsigned int uEntryIdx);
void MACvSetDefaultKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen, void MACvSetDefaultKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen,
...@@ -1148,7 +1148,7 @@ void MACvSetDefaultKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen, ...@@ -1148,7 +1148,7 @@ void MACvSetDefaultKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen,
void MACvDisableDefaultKey(unsigned long dwIoBase); void MACvDisableDefaultKey(unsigned long dwIoBase);
void MACvSetDefaultTKIPKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen, void MACvSetDefaultTKIPKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID); unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID);
void MACvSetDefaultKeyCtl(unsigned long dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID); void MACvSetDefaultKeyCtl(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID);
#endif // __MAC_H__ #endif // __MAC_H__
...@@ -77,12 +77,12 @@ static int msglevel =MSG_LEVEL_INFO; ...@@ -77,12 +77,12 @@ static int msglevel =MSG_LEVEL_INFO;
void void
PSvEnablePowerSaving( PSvEnablePowerSaving(
void *hDeviceContext, void *hDeviceContext,
WORD wListenInterval unsigned short wListenInterval
) )
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = pDevice->pMgmt; PSMgmtObject pMgmt = pDevice->pMgmt;
WORD wAID = pMgmt->wCurrAID | BIT14 | BIT15; unsigned short wAID = pMgmt->wCurrAID | BIT14 | BIT15;
// set period of power up before TBTT // set period of power up before TBTT
VNSvOutPortW(pDevice->PortOffset + MAC_REG_PWBT, C_PWBT); VNSvOutPortW(pDevice->PortOffset + MAC_REG_PWBT, C_PWBT);
...@@ -350,7 +350,7 @@ PSbSendNullPacket( ...@@ -350,7 +350,7 @@ PSbSendNullPacket(
} }
if(pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { if(pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1)); pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((unsigned short)WLAN_SET_FC_TODS(1));
} }
memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN); memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN);
......
...@@ -63,7 +63,7 @@ PSvDisablePowerSaving( ...@@ -63,7 +63,7 @@ PSvDisablePowerSaving(
void void
PSvEnablePowerSaving( PSvEnablePowerSaving(
void *hDeviceContext, void *hDeviceContext,
WORD wListenInterval unsigned short wListenInterval
); );
void void
......
...@@ -624,7 +624,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, BYTE byChannel) ...@@ -624,7 +624,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, BYTE byChannel)
*/ */
BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
{ {
WORD ww; unsigned short ww;
unsigned long dwValue; unsigned long dwValue;
VNSvOutPortD(dwIoBase + MAC_REG_IFREGCTL, dwData); VNSvOutPortD(dwIoBase + MAC_REG_IFREGCTL, dwData);
...@@ -932,11 +932,11 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, BYTE byRFType, unsigned int uC ...@@ -932,11 +932,11 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, BYTE byRFType, unsigned int uC
} }
for (ii = 0; ii < CB_AL2230_INIT_SEQ; ii++ ) { for (ii = 0; ii < CB_AL2230_INIT_SEQ; ii++ ) {
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL2230InitTable[ii]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL2230InitTable[ii]);
} }
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL2230ChannelTable0[uChannel-1]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL2230ChannelTable0[uChannel-1]);
ii ++; ii ++;
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL2230ChannelTable1[uChannel-1]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL2230ChannelTable1[uChannel-1]);
break; break;
//{{ RobertYu: 20050104 //{{ RobertYu: 20050104
...@@ -951,21 +951,21 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, BYTE byRFType, unsigned int uC ...@@ -951,21 +951,21 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, BYTE byRFType, unsigned int uC
if (uChannel <= CB_MAX_CHANNEL_24G) if (uChannel <= CB_MAX_CHANNEL_24G)
{ {
for (ii = 0; ii < CB_AL7230_INIT_SEQ; ii++ ) { for (ii = 0; ii < CB_AL7230_INIT_SEQ; ii++ ) {
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230InitTable[ii]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230InitTable[ii]);
} }
} }
else else
{ {
for (ii = 0; ii < CB_AL7230_INIT_SEQ; ii++ ) { for (ii = 0; ii < CB_AL7230_INIT_SEQ; ii++ ) {
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230InitTableAMode[ii]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230InitTableAMode[ii]);
} }
} }
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230ChannelTable0[uChannel-1]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230ChannelTable0[uChannel-1]);
ii ++; ii ++;
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230ChannelTable1[uChannel-1]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230ChannelTable1[uChannel-1]);
ii ++; ii ++;
MACvSetMISCFifo(dwIoBase, (WORD)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230ChannelTable2[uChannel-1]); MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230ChannelTable2[uChannel-1]);
break; break;
//}} RobertYu //}} RobertYu
......
This diff is collapsed.
...@@ -64,10 +64,10 @@ void ...@@ -64,10 +64,10 @@ void
vGenerateMACHeader ( vGenerateMACHeader (
PSDevice pDevice, PSDevice pDevice,
unsigned char *pbyBufferAddr, unsigned char *pbyBufferAddr,
WORD wDuration, unsigned short wDuration,
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
BOOL bNeedEncrypt, BOOL bNeedEncrypt,
WORD wFragType, unsigned short wFragType,
unsigned int uDMAIdx, unsigned int uDMAIdx,
unsigned int uFragIdx unsigned int uFragIdx
); );
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
*/ */
BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset) BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset)
{ {
WORD wDelay, wNoACK; unsigned short wDelay, wNoACK;
BYTE byWait; BYTE byWait;
BYTE byData; BYTE byData;
BYTE byOrg; BYTE byOrg;
...@@ -127,7 +127,7 @@ BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset) ...@@ -127,7 +127,7 @@ BYTE SROMbyReadEmbedded(unsigned long dwIoBase, BYTE byContntOffset)
*/ */
BOOL SROMbWriteEmbedded(unsigned long dwIoBase, BYTE byContntOffset, BYTE byData) BOOL SROMbWriteEmbedded(unsigned long dwIoBase, BYTE byContntOffset, BYTE byData)
{ {
WORD wDelay, wNoACK; unsigned short wDelay, wNoACK;
BYTE byWait; BYTE byWait;
BYTE byOrg; BYTE byOrg;
......
...@@ -97,34 +97,34 @@ ...@@ -97,34 +97,34 @@
// 2048 bits = 256 bytes = 128 words // 2048 bits = 256 bytes = 128 words
// //
typedef struct tagSSromReg { typedef struct tagSSromReg {
BYTE abyPAR[6]; // 0x00 (WORD) BYTE abyPAR[6]; // 0x00 (unsigned short)
WORD wSUB_VID; // 0x03 (WORD) unsigned short wSUB_VID; // 0x03 (unsigned short)
WORD wSUB_SID; unsigned short wSUB_SID;
BYTE byBCFG0; // 0x05 (WORD) BYTE byBCFG0; // 0x05 (unsigned short)
BYTE byBCFG1; BYTE byBCFG1;
BYTE byFCR0; // 0x06 (WORD) BYTE byFCR0; // 0x06 (unsigned short)
BYTE byFCR1; BYTE byFCR1;
BYTE byPMC0; // 0x07 (WORD) BYTE byPMC0; // 0x07 (unsigned short)
BYTE byPMC1; BYTE byPMC1;
BYTE byMAXLAT; // 0x08 (WORD) BYTE byMAXLAT; // 0x08 (unsigned short)
BYTE byMINGNT; BYTE byMINGNT;
BYTE byCFG0; // 0x09 (WORD) BYTE byCFG0; // 0x09 (unsigned short)
BYTE byCFG1; BYTE byCFG1;
WORD wCISPTR; // 0x0A (WORD) unsigned short wCISPTR; // 0x0A (unsigned short)
WORD wRsv0; // 0x0B (WORD) unsigned short wRsv0; // 0x0B (unsigned short)
WORD wRsv1; // 0x0C (WORD) unsigned short wRsv1; // 0x0C (unsigned short)
BYTE byBBPAIR; // 0x0D (WORD) BYTE byBBPAIR; // 0x0D (unsigned short)
BYTE byRFTYPE; BYTE byRFTYPE;
BYTE byMinChannel; // 0x0E (WORD) BYTE byMinChannel; // 0x0E (unsigned short)
BYTE byMaxChannel; BYTE byMaxChannel;
BYTE bySignature; // 0x0F (WORD) BYTE bySignature; // 0x0F (unsigned short)
BYTE byCheckSum; BYTE byCheckSum;
BYTE abyReserved0[96]; // 0x10 (WORD) BYTE abyReserved0[96]; // 0x10 (unsigned short)
BYTE abyCIS[128]; // 0x80 (WORD) BYTE abyCIS[128]; // 0x80 (unsigned short)
} SSromReg, *PSSromReg; } SSromReg, *PSSromReg;
/*--------------------- Export Macros ------------------------------*/ /*--------------------- Export Macros ------------------------------*/
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
typedef struct tagSEthernetHeader { typedef struct tagSEthernetHeader {
BYTE abyDstAddr[ETH_ALEN]; BYTE abyDstAddr[ETH_ALEN];
BYTE abySrcAddr[ETH_ALEN]; BYTE abySrcAddr[ETH_ALEN];
WORD wType; unsigned short wType;
}__attribute__ ((__packed__)) }__attribute__ ((__packed__))
SEthernetHeader, *PSEthernetHeader; SEthernetHeader, *PSEthernetHeader;
...@@ -167,7 +167,7 @@ SEthernetHeader, *PSEthernetHeader; ...@@ -167,7 +167,7 @@ SEthernetHeader, *PSEthernetHeader;
typedef struct tagS802_3Header { typedef struct tagS802_3Header {
BYTE abyDstAddr[ETH_ALEN]; BYTE abyDstAddr[ETH_ALEN];
BYTE abySrcAddr[ETH_ALEN]; BYTE abySrcAddr[ETH_ALEN];
WORD wLen; unsigned short wLen;
}__attribute__ ((__packed__)) }__attribute__ ((__packed__))
S802_3Header, *PS802_3Header; S802_3Header, *PS802_3Header;
...@@ -175,12 +175,12 @@ S802_3Header, *PS802_3Header; ...@@ -175,12 +175,12 @@ S802_3Header, *PS802_3Header;
// 802_11 packet // 802_11 packet
// //
typedef struct tagS802_11Header { typedef struct tagS802_11Header {
WORD wFrameCtl; unsigned short wFrameCtl;
WORD wDurationID; unsigned short wDurationID;
BYTE abyAddr1[ETH_ALEN]; BYTE abyAddr1[ETH_ALEN];
BYTE abyAddr2[ETH_ALEN]; BYTE abyAddr2[ETH_ALEN];
BYTE abyAddr3[ETH_ALEN]; BYTE abyAddr3[ETH_ALEN];
WORD wSeqCtl; unsigned short wSeqCtl;
BYTE abyAddr4[ETH_ALEN]; BYTE abyAddr4[ETH_ALEN];
}__attribute__ ((__packed__)) }__attribute__ ((__packed__))
S802_11Header, *PS802_11Header; S802_11Header, *PS802_11Header;
......
...@@ -186,7 +186,7 @@ unsigned int rotr1(unsigned int a) ...@@ -186,7 +186,7 @@ unsigned int rotr1(unsigned int a)
void TKIPvMixKey( void TKIPvMixKey(
unsigned char *pbyTKey, unsigned char *pbyTKey,
unsigned char *pbyTA, unsigned char *pbyTA,
WORD wTSC15_0, unsigned short wTSC15_0,
unsigned long dwTSC47_16, unsigned long dwTSC47_16,
unsigned char *pbyRC4Key unsigned char *pbyRC4Key
) )
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
void TKIPvMixKey( void TKIPvMixKey(
unsigned char *pbyTKey, unsigned char *pbyTKey,
unsigned char *pbyTA, unsigned char *pbyTA,
WORD wTSC15_0, unsigned short wTSC15_0,
unsigned long dwTSC47_16, unsigned long dwTSC47_16,
unsigned char *pbyRC4Key unsigned char *pbyRC4Key
); );
......
...@@ -37,24 +37,24 @@ ...@@ -37,24 +37,24 @@
#define LOBYTE(w) ((BYTE)(w)) #define LOBYTE(w) ((BYTE)(w))
#endif #endif
#if !defined(HIBYTE) #if !defined(HIBYTE)
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF)) #define HIBYTE(w) ((BYTE)(((unsigned short)(w) >> 8) & 0xFF))
#endif #endif
#if !defined(LOWORD) #if !defined(LOWORD)
#define LOWORD(d) ((WORD)(d)) #define LOWORD(d) ((unsigned short)(d))
#endif #endif
#if !defined(HIWORD) #if !defined(HIWORD)
#define HIWORD(d) ((WORD)((((unsigned long)(d)) >> 16) & 0xFFFF)) #define HIWORD(d) ((unsigned short)((((unsigned long)(d)) >> 16) & 0xFFFF))
#endif #endif
#define LODWORD(q) ((q).u.dwLowDword) #define LODWORD(q) ((q).u.dwLowDword)
#define HIDWORD(q) ((q).u.dwHighDword) #define HIDWORD(q) ((q).u.dwHighDword)
#if !defined(MAKEWORD) #if !defined(MAKEWORD)
#define MAKEWORD(lb, hb) ((WORD)(((BYTE)(lb)) | (((WORD)((BYTE)(hb))) << 8))) #define MAKEWORD(lb, hb) ((unsigned short)(((BYTE)(lb)) | (((unsigned short)((BYTE)(hb))) << 8)))
#endif #endif
#if !defined(MAKEDWORD) #if !defined(MAKEDWORD)
#define MAKEDWORD(lw, hw) ((unsigned long)(((WORD)(lw)) | (((unsigned long)((WORD)(hw))) << 16))) #define MAKEDWORD(lw, hw) ((unsigned long)(((unsigned short)(lw)) | (((unsigned long)((unsigned short)(hw))) << 16)))
#endif #endif
#endif // __TMACRO_H__ #endif // __TMACRO_H__
......
...@@ -69,7 +69,6 @@ typedef int BOOL; ...@@ -69,7 +69,6 @@ typedef int BOOL;
*/ */
typedef unsigned char BYTE; // 8-bit typedef unsigned char BYTE; // 8-bit
typedef unsigned short WORD; // 16-bit
// QWORD is for those situation that we want // QWORD is for those situation that we want
// an 8-byte-aligned 8 byte long structure // an 8-byte-aligned 8 byte long structure
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
#define VNSvInPortW(dwIOAddress, pwData) { \ #define VNSvInPortW(dwIOAddress, pwData) { \
volatile WORD* pwAddr = ((unsigned short *)(dwIOAddress)); \ volatile unsigned short *pwAddr = ((unsigned short *)(dwIOAddress)); \
*(pwData) = readw(pwAddr); \ *(pwData) = readw(pwAddr); \
} }
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
#define VNSvOutPortW(dwIOAddress, wData) { \ #define VNSvOutPortW(dwIOAddress, wData) { \
volatile WORD* pwAddr = ((unsigned short *)(dwIOAddress)); \ volatile unsigned short *pwAddr = ((unsigned short *)(dwIOAddress)); \
writew((WORD)wData, pwAddr); \ writew((unsigned short)wData, pwAddr); \
} }
#define VNSvOutPortD(dwIOAddress, dwData) { \ #define VNSvOutPortD(dwIOAddress, dwData) { \
......
...@@ -101,8 +101,8 @@ VNTWIFIvSetOPMode ( ...@@ -101,8 +101,8 @@ VNTWIFIvSetOPMode (
void void
VNTWIFIvSetIBSSParameter ( VNTWIFIvSetIBSSParameter (
void *pMgmtHandle, void *pMgmtHandle,
WORD wBeaconPeriod, unsigned short wBeaconPeriod,
WORD wATIMWindow, unsigned short wATIMWindow,
unsigned int uChannel unsigned int uChannel
) )
{ {
...@@ -176,7 +176,7 @@ VNTWIFIpGetCurrentChannel ( ...@@ -176,7 +176,7 @@ VNTWIFIpGetCurrentChannel (
* Return Value: current Assoc ID * Return Value: current Assoc ID
* *
-*/ -*/
WORD unsigned short
VNTWIFIwGetAssocID ( VNTWIFIwGetAssocID (
void *pMgmtHandle void *pMgmtHandle
) )
...@@ -499,7 +499,7 @@ VNTWIFIvUpdateNodeTxCounter( ...@@ -499,7 +499,7 @@ VNTWIFIvUpdateNodeTxCounter(
void *pMgmtHandle, void *pMgmtHandle,
unsigned char *pbyDestAddress, unsigned char *pbyDestAddress,
BOOL bTxOk, BOOL bTxOk,
WORD wRate, unsigned short wRate,
unsigned char *pbyTxFailCount unsigned char *pbyTxFailCount
) )
{ {
...@@ -541,7 +541,7 @@ VNTWIFIvGetTxRate( ...@@ -541,7 +541,7 @@ VNTWIFIvGetTxRate(
{ {
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
unsigned int uNodeIndex = 0; unsigned int uNodeIndex = 0;
WORD wTxDataRate = RATE_1M; unsigned short wTxDataRate = RATE_1M;
BYTE byACKRate = RATE_1M; BYTE byACKRate = RATE_1M;
BYTE byCCKBasicRate = RATE_1M; BYTE byCCKBasicRate = RATE_1M;
BYTE byOFDMBasicRate = RATE_24M; BYTE byOFDMBasicRate = RATE_24M;
...@@ -681,12 +681,12 @@ VNTWIFIbSetPMKIDCache ( ...@@ -681,12 +681,12 @@ VNTWIFIbSetPMKIDCache (
WORD unsigned short
VNTWIFIwGetMaxSupportRate( VNTWIFIwGetMaxSupportRate(
void *pMgmtObject void *pMgmtObject
) )
{ {
WORD wRate = RATE_54M; unsigned short wRate = RATE_54M;
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject; PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
for(wRate = RATE_54M; wRate > RATE_1M; wRate--) { for(wRate = RATE_54M; wRate > RATE_1M; wRate--) {
......
...@@ -143,8 +143,8 @@ typedef enum tagWMAC_POWER_MODE { ...@@ -143,8 +143,8 @@ typedef enum tagWMAC_POWER_MODE {
void void
VNTWIFIvSetIBSSParameter ( VNTWIFIvSetIBSSParameter (
void *pMgmtHandle, void *pMgmtHandle,
WORD wBeaconPeriod, unsigned short wBeaconPeriod,
WORD wATIMWindow, unsigned short wATIMWindow,
unsigned int uChannel unsigned int uChannel
); );
...@@ -164,7 +164,7 @@ VNTWIFIpGetCurrentChannel( ...@@ -164,7 +164,7 @@ VNTWIFIpGetCurrentChannel(
void *pMgmtHandle void *pMgmtHandle
); );
WORD unsigned short
VNTWIFIwGetAssocID ( VNTWIFIwGetAssocID (
void *pMgmtHandle void *pMgmtHandle
); );
...@@ -231,7 +231,7 @@ VNTWIFIvUpdateNodeTxCounter( ...@@ -231,7 +231,7 @@ VNTWIFIvUpdateNodeTxCounter(
void *pMgmtHandle, void *pMgmtHandle,
unsigned char *pbyDestAddress, unsigned char *pbyDestAddress,
BOOL bTxOk, BOOL bTxOk,
WORD wRate, unsigned short wRate,
unsigned char *pbyTxFailCount unsigned char *pbyTxFailCount
); );
...@@ -274,7 +274,7 @@ VNTWIFIbCommandRunning ( ...@@ -274,7 +274,7 @@ VNTWIFIbCommandRunning (
void *pMgmtObject void *pMgmtObject
); );
WORD unsigned short
VNTWIFIwGetMaxSupportRate( VNTWIFIwGetMaxSupportRate(
void *pMgmtObject void *pMgmtObject
); );
......
...@@ -904,7 +904,7 @@ s_bCommandComplete ( ...@@ -904,7 +904,7 @@ s_bCommandComplete (
{ {
PWLAN_IE_SSID pSSID; PWLAN_IE_SSID pSSID;
BOOL bRadioCmd = FALSE; BOOL bRadioCmd = FALSE;
//WORD wDeAuthenReason = 0; //unsigned short wDeAuthenReason = 0;
BOOL bForceSCAN = TRUE; BOOL bForceSCAN = TRUE;
PSMgmtObject pMgmt = pDevice->pMgmt; PSMgmtObject pMgmt = pDevice->pMgmt;
......
...@@ -77,7 +77,7 @@ typedef struct tagCMD_ITEM { ...@@ -77,7 +77,7 @@ typedef struct tagCMD_ITEM {
CMD_CODE eCmd; CMD_CODE eCmd;
BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BOOL bNeedRadioOFF; BOOL bNeedRadioOFF;
WORD wDeAuthenReason; unsigned short wDeAuthenReason;
BOOL bRadioCmd; BOOL bRadioCmd;
BOOL bForceSCAN; BOOL bForceSCAN;
} CMD_ITEM, *PCMD_ITEM; } CMD_ITEM, *PCMD_ITEM;
......
This diff is collapsed.
...@@ -276,10 +276,10 @@ typedef struct tagSMgmtObject ...@@ -276,10 +276,10 @@ typedef struct tagSMgmtObject
BYTE abyCurrExtSuppRates[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 abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE abyCurrBSSID[WLAN_BSSID_LEN]; BYTE abyCurrBSSID[WLAN_BSSID_LEN];
WORD wCurrCapInfo; unsigned short wCurrCapInfo;
WORD wCurrAID; unsigned short wCurrAID;
WORD wCurrATIMWindow; unsigned short wCurrATIMWindow;
WORD wCurrBeaconPeriod; unsigned short wCurrBeaconPeriod;
BOOL bIsDS; BOOL bIsDS;
BYTE byERPContext; BYTE byERPContext;
...@@ -292,13 +292,13 @@ typedef struct tagSMgmtObject ...@@ -292,13 +292,13 @@ typedef struct tagSMgmtObject
// Adhoc or AP configuration vars // Adhoc or AP configuration vars
//BYTE abyAdHocSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; //BYTE abyAdHocSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
WORD wIBSSBeaconPeriod; unsigned short wIBSSBeaconPeriod;
WORD wIBSSATIMWindow; unsigned short wIBSSATIMWindow;
unsigned int uIBSSChannel; unsigned int uIBSSChannel;
BYTE abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE byAPBBType; BYTE byAPBBType;
BYTE abyWPAIE[MAX_WPA_IE_LEN]; BYTE abyWPAIE[MAX_WPA_IE_LEN];
WORD wWPAIELen; unsigned short wWPAIELen;
unsigned int uAssocCount; unsigned int uAssocCount;
BOOL bMoreData; BOOL bMoreData;
...@@ -308,7 +308,7 @@ typedef struct tagSMgmtObject ...@@ -308,7 +308,7 @@ typedef struct tagSMgmtObject
WMAC_SCAN_TYPE eScanType; WMAC_SCAN_TYPE eScanType;
unsigned int uScanStartCh; unsigned int uScanStartCh;
unsigned int uScanEndCh; unsigned int uScanEndCh;
WORD wScanSteps; unsigned short wScanSteps;
unsigned int uScanBSSType; unsigned int uScanBSSType;
// Desire scannig vars // Desire scannig vars
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
...@@ -329,8 +329,8 @@ typedef struct tagSMgmtObject ...@@ -329,8 +329,8 @@ typedef struct tagSMgmtObject
// Power saving state vars // Power saving state vars
WMAC_POWER_MODE ePSMode; WMAC_POWER_MODE ePSMode;
WORD wListenInterval; unsigned short wListenInterval;
WORD wCountToWakeUp; unsigned short wCountToWakeUp;
BOOL bInTIMWake; BOOL bInTIMWake;
unsigned char *pbyPSPacketPool; unsigned char *pbyPSPacketPool;
BYTE byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN]; BYTE byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN];
...@@ -433,7 +433,7 @@ vMgrDisassocBeginSta( ...@@ -433,7 +433,7 @@ vMgrDisassocBeginSta(
void *hDeviceContext, void *hDeviceContext,
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
unsigned char *abyDestAddress, unsigned char *abyDestAddress,
WORD wReason, unsigned short wReason,
PCMD_STATUS pStatus PCMD_STATUS pStatus
); );
...@@ -476,7 +476,7 @@ vMgrDeAuthenBeginSta( ...@@ -476,7 +476,7 @@ vMgrDeAuthenBeginSta(
void *hDeviceContext, void *hDeviceContext,
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
unsigned char *abyDestAddress, unsigned char *abyDestAddress,
WORD wReason, unsigned short wReason,
PCMD_STATUS pStatus PCMD_STATUS pStatus
); );
......
...@@ -166,7 +166,7 @@ WPA_ParseRSN ( ...@@ -166,7 +166,7 @@ WPA_ParseRSN (
break; break;
//DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1])); //DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1]));
} //for } //for
pBSSList->wPKCount = (WORD)j; pBSSList->wPKCount = (unsigned short)j;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount);
} }
...@@ -195,7 +195,7 @@ WPA_ParseRSN ( ...@@ -195,7 +195,7 @@ WPA_ParseRSN (
//DBG_PRN_GRP14(("abyAuthType[%d]: %X\n", j-1, pBSSList->abyAuthType[j-1])); //DBG_PRN_GRP14(("abyAuthType[%d]: %X\n", j-1, pBSSList->abyAuthType[j-1]));
} }
if(j > 0) if(j > 0)
pBSSList->wAuthCount = (WORD)j; pBSSList->wAuthCount = (unsigned short)j;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount);
} }
......
...@@ -114,7 +114,7 @@ WPA2vParseRSN ( ...@@ -114,7 +114,7 @@ WPA2vParseRSN (
) )
{ {
int i, j; int i, j;
WORD m = 0, n = 0; unsigned short m = 0, n = 0;
unsigned char *pbyOUI; unsigned char *pbyOUI;
BOOL bUseGK = FALSE; BOOL bUseGK = FALSE;
...@@ -209,7 +209,7 @@ WPA2vParseRSN ( ...@@ -209,7 +209,7 @@ WPA2vParseRSN (
// invalid CSS, No valid PK. // invalid CSS, No valid PK.
return; return;
} }
pBSSNode->wCSSPKCount = (WORD)j; pBSSNode->wCSSPKCount = (unsigned short)j;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount);
} }
...@@ -232,7 +232,7 @@ WPA2vParseRSN ( ...@@ -232,7 +232,7 @@ WPA2vParseRSN (
} else } else
break; break;
} }
pBSSNode->wAKMSSAuthCount = (WORD)j; pBSSNode->wAKMSSAuthCount = (unsigned short)j;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount);
n = *((unsigned short *) &(pRSN->abyRSN[6+4*m]));; n = *((unsigned short *) &(pRSN->abyRSN[6+4*m]));;
......
...@@ -139,7 +139,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat ...@@ -139,7 +139,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat
if (pDevice->uConnectionRate >= RATE_11M) { if (pDevice->uConnectionRate >= RATE_11M) {
pDevice->wCurrentRate = RATE_11M; pDevice->wCurrentRate = RATE_11M;
} else { } else {
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
} else { } else {
if ((pDevice->eCurrentPHYType == PHY_TYPE_11A) && if ((pDevice->eCurrentPHYType == PHY_TYPE_11A) &&
...@@ -149,7 +149,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat ...@@ -149,7 +149,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat
if (pDevice->uConnectionRate >= RATE_54M) if (pDevice->uConnectionRate >= RATE_54M)
pDevice->wCurrentRate = RATE_54M; pDevice->wCurrentRate = RATE_54M;
else else
pDevice->wCurrentRate = (WORD)pDevice->uConnectionRate; pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment