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

staging: vt6656: replaced custom WORD definition with u16

Checkpatch findings were not resolved.

sed -i 's/\bWORD\b/u16/g' drivers/staging/vt6656/*.[ch]
sed -i 's/\bPWORD\b/u16 */g' drivers/staging/vt6656/*.[ch]
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b902fbfe
...@@ -155,22 +155,22 @@ ...@@ -155,22 +155,22 @@
#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) ((((u16)(n) >> 8) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((WORD)(n) >> 8) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FTYPE(n) ((((u16)(n) >> 8) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n) >> 8) \ #define WLAN_GET_FC_FSTYPE(n) ((((u16)(n) >> 8) \
& (BIT4|BIT5|BIT6|BIT7)) >> 4) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((WORD)(n) << 8) & (BIT8)) >> 8) #define WLAN_GET_FC_TODS(n) ((((u16)(n) << 8) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((WORD)(n) << 8) & (BIT9)) >> 9) #define WLAN_GET_FC_FROMDS(n) ((((u16)(n) << 8) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((WORD)(n) << 8) & (BIT10)) >> 10) #define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n) << 8) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((WORD)(n) << 8) & (BIT11)) >> 11) #define WLAN_GET_FC_RETRY(n) ((((u16)(n) << 8) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((WORD)(n) << 8) & (BIT12)) >> 12) #define WLAN_GET_FC_PWRMGT(n) ((((u16)(n) << 8) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((WORD)(n) << 8) & (BIT13)) >> 13) #define WLAN_GET_FC_MOREDATA(n) ((((u16)(n) << 8) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((WORD)(n) << 8) & (BIT14)) >> 14) #define WLAN_GET_FC_ISWEP(n) ((((u16)(n) << 8) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((WORD)(n) << 8) & (BIT15)) >> 15) #define WLAN_GET_FC_ORDER(n) ((((u16)(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) (((u16)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n) >> 8) \ #define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n) >> 8) \
& (~(BIT0|BIT1|BIT2|BIT3))) >> 4) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
/* Capability Field bit */ /* Capability Field bit */
...@@ -190,21 +190,21 @@ ...@@ -190,21 +190,21 @@
#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) (((u16)(n)) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((WORD)(n)) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((WORD)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) #define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((WORD)(n)) & (BIT8)) >> 8) #define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((WORD)(n)) & (BIT9)) >> 9) #define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((WORD)(n)) & (BIT10)) >> 10) #define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((WORD)(n)) & (BIT11)) >> 11) #define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((WORD)(n)) & (BIT12)) >> 12) #define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((WORD)(n)) & (BIT13)) >> 13) #define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((WORD)(n)) & (BIT14)) >> 14) #define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((WORD)(n)) & (BIT15)) >> 15) #define WLAN_GET_FC_ORDER(n) ((((u16)(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) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((WORD)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) #define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
/* Capability Field bit */ /* Capability Field bit */
#define WLAN_GET_CAP_INFO_ESS(n) ((n) & BIT0) #define WLAN_GET_CAP_INFO_ESS(n) ((n) & BIT0)
...@@ -235,20 +235,20 @@ ...@@ -235,20 +235,20 @@
#define WLAN_SET_CAP_INFO_DSSSOFDM(n) ((n) << 13) #define WLAN_SET_CAP_INFO_DSSSOFDM(n) ((n) << 13)
#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) ((u16)(n))
#define WLAN_SET_FC_FTYPE(n) (((WORD)(n)) << 2) #define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2)
#define WLAN_SET_FC_FSTYPE(n) (((WORD)(n)) << 4) #define WLAN_SET_FC_FSTYPE(n) (((u16)(n)) << 4)
#define WLAN_SET_FC_TODS(n) (((WORD)(n)) << 8) #define WLAN_SET_FC_TODS(n) (((u16)(n)) << 8)
#define WLAN_SET_FC_FROMDS(n) (((WORD)(n)) << 9) #define WLAN_SET_FC_FROMDS(n) (((u16)(n)) << 9)
#define WLAN_SET_FC_MOREFRAG(n) (((WORD)(n)) << 10) #define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10)
#define WLAN_SET_FC_RETRY(n) (((WORD)(n)) << 11) #define WLAN_SET_FC_RETRY(n) (((u16)(n)) << 11)
#define WLAN_SET_FC_PWRMGT(n) (((WORD)(n)) << 12) #define WLAN_SET_FC_PWRMGT(n) (((u16)(n)) << 12)
#define WLAN_SET_FC_MOREDATA(n) (((WORD)(n)) << 13) #define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13)
#define WLAN_SET_FC_ISWEP(n) (((WORD)(n)) << 14) #define WLAN_SET_FC_ISWEP(n) (((u16)(n)) << 14)
#define WLAN_SET_FC_ORDER(n) (((WORD)(n)) << 15) #define WLAN_SET_FC_ORDER(n) (((u16)(n)) << 15)
#define WLAN_SET_SEQ_FRGNUM(n) ((WORD)(n)) #define WLAN_SET_SEQ_FRGNUM(n) ((u16)(n))
#define WLAN_SET_SEQ_SEQNUM(n) (((WORD)(n)) << 4) #define WLAN_SET_SEQ_SEQNUM(n) (((u16)(n)) << 4)
/* ERP Field bit */ /* ERP Field bit */
...@@ -284,8 +284,8 @@ typedef struct { ...@@ -284,8 +284,8 @@ typedef struct {
typedef struct tagWLAN_80211HDR_A2 { typedef struct tagWLAN_80211HDR_A2 {
WORD wFrameCtl; u16 wFrameCtl;
WORD wDurationID; u16 wDurationID;
u8 abyAddr1[WLAN_ADDR_LEN]; u8 abyAddr1[WLAN_ADDR_LEN];
u8 abyAddr2[WLAN_ADDR_LEN]; u8 abyAddr2[WLAN_ADDR_LEN];
...@@ -294,24 +294,24 @@ WLAN_80211HDR_A2, *PWLAN_80211HDR_A2; ...@@ -294,24 +294,24 @@ WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
typedef struct tagWLAN_80211HDR_A3 { typedef struct tagWLAN_80211HDR_A3 {
WORD wFrameCtl; u16 wFrameCtl;
WORD wDurationID; u16 wDurationID;
u8 abyAddr1[WLAN_ADDR_LEN]; u8 abyAddr1[WLAN_ADDR_LEN];
u8 abyAddr2[WLAN_ADDR_LEN]; u8 abyAddr2[WLAN_ADDR_LEN];
u8 abyAddr3[WLAN_ADDR_LEN]; u8 abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl; u16 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; u16 wFrameCtl;
WORD wDurationID; u16 wDurationID;
u8 abyAddr1[WLAN_ADDR_LEN]; u8 abyAddr1[WLAN_ADDR_LEN];
u8 abyAddr2[WLAN_ADDR_LEN]; u8 abyAddr2[WLAN_ADDR_LEN];
u8 abyAddr3[WLAN_ADDR_LEN]; u8 abyAddr3[WLAN_ADDR_LEN];
WORD wSeqCtl; u16 wSeqCtl;
u8 abyAddr4[WLAN_ADDR_LEN]; u8 abyAddr4[WLAN_ADDR_LEN];
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
......
This diff is collapsed.
...@@ -251,7 +251,7 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES; ...@@ -251,7 +251,7 @@ WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
typedef struct _WLAN_IE_FH_PARMS { typedef struct _WLAN_IE_FH_PARMS {
u8 byElementID; u8 byElementID;
u8 len; u8 len;
WORD wDwellTime; u16 wDwellTime;
u8 byHopSet; u8 byHopSet;
u8 byHopPattern; u8 byHopPattern;
u8 byHopIndex; u8 byHopIndex;
...@@ -273,8 +273,8 @@ typedef struct tagWLAN_IE_CF_PARMS { ...@@ -273,8 +273,8 @@ typedef struct tagWLAN_IE_CF_PARMS {
u8 len; u8 len;
u8 byCFPCount; u8 byCFPCount;
u8 byCFPPeriod; u8 byCFPPeriod;
WORD wCFPMaxDuration; u16 wCFPMaxDuration;
WORD wCFPDurRemaining; u16 wCFPDurRemaining;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS; WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
...@@ -295,7 +295,7 @@ WLAN_IE_TIM, *PWLAN_IE_TIM; ...@@ -295,7 +295,7 @@ WLAN_IE_TIM, *PWLAN_IE_TIM;
typedef struct tagWLAN_IE_IBSS_PARMS { typedef struct tagWLAN_IE_IBSS_PARMS {
u8 byElementID; u8 byElementID;
u8 len; u8 len;
WORD wATIMWindow; u16 wATIMWindow;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS; WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
...@@ -313,9 +313,9 @@ typedef struct tagWLAN_IE_RSN_EXT { ...@@ -313,9 +313,9 @@ typedef struct tagWLAN_IE_RSN_EXT {
u8 byElementID; u8 byElementID;
u8 len; u8 len;
u8 abyOUI[4]; u8 abyOUI[4];
WORD wVersion; u16 wVersion;
u8 abyMulticast[4]; u8 abyMulticast[4];
WORD wPKCount; u16 wPKCount;
struct { struct {
u8 abyOUI[4]; u8 abyOUI[4];
} PKSList[1]; } PKSList[1];
...@@ -324,7 +324,7 @@ typedef struct tagWLAN_IE_RSN_EXT { ...@@ -324,7 +324,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; u16 wAuthCount;
struct { struct {
u8 abyOUI[4]; u8 abyOUI[4];
} AuthKSList[1]; } AuthKSList[1];
...@@ -335,7 +335,7 @@ typedef struct tagWLAN_IE_RSN_AUTH { ...@@ -335,7 +335,7 @@ typedef struct tagWLAN_IE_RSN_AUTH {
typedef struct tagWLAN_IE_RSN { typedef struct tagWLAN_IE_RSN {
u8 byElementID; u8 byElementID;
u8 len; u8 len;
WORD wVersion; u16 wVersion;
u8 abyRSN[WLAN_MIN_ARRAY]; u8 abyRSN[WLAN_MIN_ARRAY];
} WLAN_IE_RSN, *PWLAN_IE_RSN; } WLAN_IE_RSN, *PWLAN_IE_RSN;
...@@ -514,8 +514,8 @@ typedef struct tagWLAN_FR_BEACON { ...@@ -514,8 +514,8 @@ typedef struct tagWLAN_FR_BEACON {
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
u64 *pqwTimestamp; u64 *pqwTimestamp;
PWORD pwBeaconInterval; u16 * pwBeaconInterval;
PWORD pwCapInfo; u16 * pwCapInfo;
/* info elements */ /* info elements */
PWLAN_IE_SSID pSSID; PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pSuppRates;
...@@ -558,7 +558,7 @@ typedef struct tagWLAN_FR_DISASSOC { ...@@ -558,7 +558,7 @@ typedef struct tagWLAN_FR_DISASSOC {
u8 * pBuf; u8 * pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwReason; u16 * pwReason;
/* info elements */ /* info elements */
} WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC; } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
...@@ -571,8 +571,8 @@ typedef struct tagWLAN_FR_ASSOCREQ { ...@@ -571,8 +571,8 @@ typedef struct tagWLAN_FR_ASSOCREQ {
u8 * pBuf; u8 * pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwCapInfo; u16 * pwCapInfo;
PWORD pwListenInterval; u16 * pwListenInterval;
/* info elements */ /* info elements */
PWLAN_IE_SSID pSSID; PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pSuppRates;
...@@ -595,9 +595,9 @@ typedef struct tagWLAN_FR_ASSOCRESP { ...@@ -595,9 +595,9 @@ typedef struct tagWLAN_FR_ASSOCRESP {
u8 * pBuf; u8 * pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwCapInfo; u16 * pwCapInfo;
PWORD pwStatus; u16 * pwStatus;
PWORD pwAid; u16 * pwAid;
/* info elements */ /* info elements */
PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_SUPP_RATES pExtSuppRates; PWLAN_IE_SUPP_RATES pExtSuppRates;
...@@ -613,8 +613,8 @@ typedef struct tagWLAN_FR_REASSOCREQ { ...@@ -613,8 +613,8 @@ typedef struct tagWLAN_FR_REASSOCREQ {
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwCapInfo; u16 * pwCapInfo;
PWORD pwListenInterval; u16 * pwListenInterval;
PIEEE_ADDR pAddrCurrAP; PIEEE_ADDR pAddrCurrAP;
/* info elements */ /* info elements */
...@@ -637,9 +637,9 @@ typedef struct tagWLAN_FR_REASSOCRESP { ...@@ -637,9 +637,9 @@ typedef struct tagWLAN_FR_REASSOCRESP {
u8 * pBuf; u8 * pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwCapInfo; u16 * pwCapInfo;
PWORD pwStatus; u16 * pwStatus;
PWORD pwAid; u16 * pwAid;
/* info elements */ /* info elements */
PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pSuppRates;
PWLAN_IE_SUPP_RATES pExtSuppRates; PWLAN_IE_SUPP_RATES pExtSuppRates;
...@@ -670,8 +670,8 @@ typedef struct tagWLAN_FR_PROBERESP { ...@@ -670,8 +670,8 @@ typedef struct tagWLAN_FR_PROBERESP {
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
u64 *pqwTimestamp; u64 *pqwTimestamp;
PWORD pwBeaconInterval; u16 * pwBeaconInterval;
PWORD pwCapInfo; u16 * pwCapInfo;
/* info elements */ /* info elements */
PWLAN_IE_SSID pSSID; PWLAN_IE_SSID pSSID;
PWLAN_IE_SUPP_RATES pSuppRates; PWLAN_IE_SUPP_RATES pSuppRates;
...@@ -698,9 +698,9 @@ typedef struct tagWLAN_FR_AUTHEN { ...@@ -698,9 +698,9 @@ typedef struct tagWLAN_FR_AUTHEN {
u8 * pBuf; u8 * pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwAuthAlgorithm; u16 * pwAuthAlgorithm;
PWORD pwAuthSequence; u16 * pwAuthSequence;
PWORD pwStatus; u16 * pwStatus;
/* info elements */ /* info elements */
PWLAN_IE_CHALLENGE pChallenge; PWLAN_IE_CHALLENGE pChallenge;
...@@ -714,7 +714,7 @@ typedef struct tagWLAN_FR_DEAUTHEN { ...@@ -714,7 +714,7 @@ typedef struct tagWLAN_FR_DEAUTHEN {
u8 * pBuf; u8 * pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/* fixed fields */ /* fixed fields */
PWORD pwReason; u16 * pwReason;
/* info elements */ /* info elements */
......
...@@ -231,7 +231,7 @@ void AESv128(u8 *key, u8 *data, u8 *ciphertext) ...@@ -231,7 +231,7 @@ void AESv128(u8 *key, u8 *data, u8 *ciphertext)
* *
*/ */
bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize) bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize)
{ {
u8 abyNonce[13]; u8 abyNonce[13];
u8 MIC_IV[16]; u8 MIC_IV[16];
...@@ -246,17 +246,17 @@ bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize) ...@@ -246,17 +246,17 @@ bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize)
PS802_11Header pMACHeader = (PS802_11Header) pbyFrame; PS802_11Header pMACHeader = (PS802_11Header) pbyFrame;
u8 * pbyIV; u8 * pbyIV;
u8 * pbyPayload; u8 * pbyPayload;
WORD wHLen = 22; u16 wHLen = 22;
/* 8 is IV, 8 is MIC, 4 is CRC */ /* 8 is IV, 8 is MIC, 4 is CRC */
WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN; u16 wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;
bool bA4 = false; bool bA4 = false;
u8 byTmp; u8 byTmp;
WORD wCnt; u16 wCnt;
int ii, jj, kk; int ii, jj, kk;
pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
if (WLAN_GET_FC_TODS(*(PWORD) pbyFrame) && if (WLAN_GET_FC_TODS(*(u16 *) pbyFrame) &&
WLAN_GET_FC_FROMDS(*(PWORD) pbyFrame)) { WLAN_GET_FC_FROMDS(*(u16 *) pbyFrame)) {
bA4 = true; bA4 = true;
pbyIV += 6; /* 6 is 802.11 address4 */ pbyIV += 6; /* 6 is 802.11 address4 */
wHLen += 6; wHLen += 6;
......
...@@ -41,6 +41,6 @@ ...@@ -41,6 +41,6 @@
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, WORD wFrameSize); bool AESbGenCCMP(u8 * pbyRxKey, u8 * pbyFrame, u16 wFrameSize);
#endif /* __AES_CCMP_H__ */ #endif /* __AES_CCMP_H__ */
...@@ -655,7 +655,7 @@ u8 abyVT3184_VT3226D0[] = { ...@@ -655,7 +655,7 @@ u8 abyVT3184_VT3226D0[] = {
0x00, 0x00,
}; };
const WORD awcFrameTime[MAX_RATE] = const u16 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};
/*--------------------- Static Functions --------------------------*/ /*--------------------- Static Functions --------------------------*/
...@@ -694,7 +694,7 @@ BBuGetFrameTime( ...@@ -694,7 +694,7 @@ BBuGetFrameTime(
u8 byPreambleType, u8 byPreambleType,
u8 byPktType, u8 byPktType,
unsigned int cbFrameLength, unsigned int cbFrameLength,
WORD wRate u16 wRate
) )
{ {
unsigned int uFrameTime; unsigned int uFrameTime;
...@@ -900,11 +900,11 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, ...@@ -900,11 +900,11 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength,
*pbyPhySrv = 0x00; *pbyPhySrv = 0x00;
if (bExtBit) if (bExtBit)
*pbyPhySrv = *pbyPhySrv | 0x80; *pbyPhySrv = *pbyPhySrv | 0x80;
*pwPhyLen = (WORD) cbUsCount; *pwPhyLen = (u16) cbUsCount;
} }
else { else {
*pbyPhySrv = 0x00; *pbyPhySrv = 0x00;
*pwPhyLen = (WORD)cbFrameLength; *pwPhyLen = (u16)cbFrameLength;
} }
} }
...@@ -940,7 +940,7 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode) ...@@ -940,7 +940,7 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode)
CONTROLnsRequestOut(pDevice, CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_SET_ANTMD, MESSAGE_TYPE_SET_ANTMD,
(WORD) byAntennaMode, (u16) byAntennaMode,
0, 0,
0, 0,
NULL); NULL);
...@@ -963,10 +963,10 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode) ...@@ -963,10 +963,10 @@ void BBvSetAntennaMode(struct vnt_private *pDevice, u8 byAntennaMode)
int BBbVT3184Init(struct vnt_private *pDevice) int BBbVT3184Init(struct vnt_private *pDevice)
{ {
int ntStatus; int ntStatus;
WORD wLength; u16 wLength;
u8 * pbyAddr; u8 * pbyAddr;
u8 * pbyAgc; u8 * pbyAgc;
WORD wLengthAgc; u16 wLengthAgc;
u8 abyArray[256]; u8 abyArray[256];
ntStatus = CONTROLnsRequestIn(pDevice, ntStatus = CONTROLnsRequestIn(pDevice,
......
...@@ -100,7 +100,7 @@ BBuGetFrameTime( ...@@ -100,7 +100,7 @@ BBuGetFrameTime(
u8 byPreambleType, u8 byPreambleType,
u8 byFreqType, u8 byFreqType,
unsigned int cbFrameLength, unsigned int cbFrameLength,
WORD wRate u16 wRate
); );
void BBvCalculateParameter(struct vnt_private *, u32 cbFrameLength, void BBvCalculateParameter(struct vnt_private *, u32 cbFrameLength,
......
...@@ -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 u16 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 u16 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},
...@@ -1205,7 +1205,7 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, ...@@ -1205,7 +1205,7 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice,
byPktNum = (byPktNO & 0x0F) >> 4; byPktNum = (byPktNO & 0x0F) >> 4;
byTxRetry = (byTSR & 0xF0) >> 4; byTxRetry = (byTSR & 0xF0) >> 4;
wRate = (WORD) (byPktNO & 0xF0) >> 4; wRate = (u16) (byPktNO & 0xF0) >> 4;
wFIFOCtl = pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl; wFIFOCtl = pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl;
pbyDestAddr = (u8 *) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]); pbyDestAddr = (u8 *) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]);
......
...@@ -86,7 +86,7 @@ typedef struct tagSERPObject { ...@@ -86,7 +86,7 @@ typedef struct tagSERPObject {
typedef struct tagSRSNCapObject { typedef struct tagSRSNCapObject {
bool bRSNCapExist; bool bRSNCapExist;
WORD wRSNCap; u16 wRSNCap;
} SRSNCapObject, *PSRSNCapObject; } SRSNCapObject, *PSRSNCapObject;
// BSS info(AP) // BSS info(AP)
...@@ -99,12 +99,12 @@ typedef struct tagKnownBSS { ...@@ -99,12 +99,12 @@ typedef struct tagKnownBSS {
u8 abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; u8 abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
unsigned int uRSSI; unsigned int uRSSI;
u8 bySQ; u8 bySQ;
WORD wBeaconInterval; u16 wBeaconInterval;
WORD wCapInfo; u16 wCapInfo;
u8 abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; u8 abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
u8 byRxRate; u8 byRxRate;
// WORD wATIMWindow; // u16 wATIMWindow;
u8 byRSSIStatCnt; u8 byRSSIStatCnt;
signed long ldBmMAX; signed long ldBmMAX;
signed long ldBmAverage[RSSI_STAT_COUNT]; signed long ldBmAverage[RSSI_STAT_COUNT];
...@@ -116,9 +116,9 @@ typedef struct tagKnownBSS { ...@@ -116,9 +116,9 @@ typedef struct tagKnownBSS {
bool bWPAValid; bool bWPAValid;
u8 byGKType; u8 byGKType;
u8 abyPKType[4]; u8 abyPKType[4];
WORD wPKCount; u16 wPKCount;
u8 abyAuthType[4]; u8 abyAuthType[4];
WORD wAuthCount; u16 wAuthCount;
u8 byDefaultK_as_PK; u8 byDefaultK_as_PK;
u8 byReplayIdx; u8 byReplayIdx;
//-- //--
...@@ -126,16 +126,16 @@ typedef struct tagKnownBSS { ...@@ -126,16 +126,16 @@ typedef struct tagKnownBSS {
//++ WPA2 informations //++ WPA2 informations
bool bWPA2Valid; bool bWPA2Valid;
u8 byCSSGK; u8 byCSSGK;
WORD wCSSPKCount; u16 wCSSPKCount;
u8 abyCSSPK[4]; u8 abyCSSPK[4];
WORD wAKMSSAuthCount; u16 wAKMSSAuthCount;
u8 abyAKMSSAuthType[4]; u8 abyAKMSSAuthType[4];
//++ wpactl //++ wpactl
u8 byWPAIE[MAX_WPA_IE_LEN]; u8 byWPAIE[MAX_WPA_IE_LEN];
u8 byRSNIE[MAX_WPA_IE_LEN]; u8 byRSNIE[MAX_WPA_IE_LEN];
WORD wWPALen; u16 wWPALen;
WORD wRSNLen; u16 wRSNLen;
// Clear count // Clear count
unsigned int uClearCount; unsigned int uClearCount;
...@@ -171,22 +171,22 @@ typedef struct tagKnownNodeDB { ...@@ -171,22 +171,22 @@ typedef struct tagKnownNodeDB {
u8 abyMACAddr[WLAN_ADDR_LEN]; u8 abyMACAddr[WLAN_ADDR_LEN];
u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
WORD wTxDataRate; u16 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. u16 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. u16 wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
WORD wSuppRate; u16 wSuppRate;
u8 byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode u8 byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
u8 byTopCCKBasicRate; //Records the highest basic rate in CCK mode u8 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; u16 wCapInfo;
WORD wListenInterval; u16 wListenInterval;
WORD wAID; u16 wAID;
NODE_STATE eNodeState; NODE_STATE eNodeState;
bool bPSEnable; bool bPSEnable;
bool bRxPSPoll; bool bRxPSPoll;
...@@ -194,7 +194,7 @@ typedef struct tagKnownNodeDB { ...@@ -194,7 +194,7 @@ typedef struct tagKnownNodeDB {
unsigned long ulLastRxJiffer; unsigned long ulLastRxJiffer;
u8 bySuppRate; u8 bySuppRate;
DWORD dwFlags; DWORD dwFlags;
WORD wEnQueueCnt; u16 wEnQueueCnt;
bool bOnFly; bool bOnFly;
unsigned long long KeyRSC; unsigned long long KeyRSC;
...@@ -202,7 +202,7 @@ typedef struct tagKnownNodeDB { ...@@ -202,7 +202,7 @@ typedef struct tagKnownNodeDB {
DWORD dwKeyIndex; DWORD dwKeyIndex;
u8 byCipherSuite; u8 byCipherSuite;
DWORD dwTSC47_16; DWORD dwTSC47_16;
WORD wTSC15_0; u16 wTSC15_0;
unsigned int uWepKeyLength; unsigned int uWepKeyLength;
u8 abyWepKey[WLAN_WEPMAX_KEYLEN]; u8 abyWepKey[WLAN_WEPMAX_KEYLEN];
// //
......
...@@ -71,10 +71,10 @@ static int msglevel =MSG_LEVEL_INFO; ...@@ -71,10 +71,10 @@ static int msglevel =MSG_LEVEL_INFO;
/*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Classes ----------------------------*/
/*--------------------- Static Variables --------------------------*/ /*--------------------- Static Variables --------------------------*/
//const WORD cwRXBCNTSFOff[MAX_RATE] = //const u16 cwRXBCNTSFOff[MAX_RATE] =
//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; //{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
const WORD cwRXBCNTSFOff[MAX_RATE] = const u16 cwRXBCNTSFOff[MAX_RATE] =
{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3}; {192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3};
/*--------------------- Static Functions --------------------------*/ /*--------------------- Static Functions --------------------------*/
...@@ -114,7 +114,7 @@ void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel) ...@@ -114,7 +114,7 @@ void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel)
CONTROLnsRequestOut(pDevice, CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_SELECT_CHANNLE, MESSAGE_TYPE_SELECT_CHANNLE,
(WORD) uConnectionChannel, (u16) uConnectionChannel,
0, 0,
0, 0,
NULL NULL
...@@ -220,7 +220,7 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx) ...@@ -220,7 +220,7 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx)
*/ */
void void
CARDvCalculateOFDMRParameter ( CARDvCalculateOFDMRParameter (
WORD wRate, u16 wRate,
u8 byBBType, u8 byBBType,
u8 * pbyTxRate, u8 * pbyTxRate,
u8 * pbyRsvTime u8 * pbyRsvTime
...@@ -571,7 +571,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *pDevice) ...@@ -571,7 +571,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *pDevice)
//Determines the highest basic rate. //Determines the highest basic rate.
for (ii = RATE_54M; ii >= RATE_6M; ii --) { for (ii = RATE_54M; ii >= RATE_6M; ii --) {
if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) ) { if ( (pDevice->wBasicRate) & ((u16)(1<<ii)) ) {
byTopOFDM = ii; byTopOFDM = ii;
break; break;
} }
...@@ -579,7 +579,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *pDevice) ...@@ -579,7 +579,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *pDevice)
pDevice->byTopOFDMBasicRate = byTopOFDM; pDevice->byTopOFDMBasicRate = byTopOFDM;
for (ii = RATE_11M;; ii --) { for (ii = RATE_11M;; ii --) {
if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) ) { if ( (pDevice->wBasicRate) & ((u16)(1<<ii)) ) {
byTopCCK = ii; byTopCCK = ii;
break; break;
} }
...@@ -617,7 +617,7 @@ int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice) ...@@ -617,7 +617,7 @@ int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice)
int ii; int ii;
for (ii = RATE_54M; ii >= RATE_6M; ii --) { for (ii = RATE_54M; ii >= RATE_6M; ii --) {
if ((pDevice->wBasicRate) & ((WORD)(1<<ii))) if ((pDevice->wBasicRate) & ((u16)(1<<ii)))
return true; return true;
} }
return false; return false;
...@@ -656,7 +656,7 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice) ...@@ -656,7 +656,7 @@ u8 CARDbyGetPktType(struct vnt_private *pDevice)
u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2) u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2)
{ {
u64 qwTSFOffset = 0; u64 qwTSFOffset = 0;
WORD wRxBcnTSFOffst = 0; u16 wRxBcnTSFOffst = 0;
wRxBcnTSFOffst = cwRXBCNTSFOff[byRxRate % MAX_RATE]; wRxBcnTSFOffst = cwRXBCNTSFOff[byRxRate % MAX_RATE];
...@@ -770,7 +770,7 @@ bool CARDbClearCurrentTSF(struct vnt_private *pDevice) ...@@ -770,7 +770,7 @@ bool CARDbClearCurrentTSF(struct vnt_private *pDevice)
* Return Value: TSF value of next Beacon * Return Value: TSF value of next Beacon
* *
*/ */
u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval) u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval)
{ {
unsigned int uLowNextTBTT; unsigned int uLowNextTBTT;
...@@ -811,7 +811,7 @@ u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval) ...@@ -811,7 +811,7 @@ u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval)
* Return Value: none * Return Value: none
* *
*/ */
void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, WORD wBeaconInterval) void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval)
{ {
u64 qwNextTBTT = 0; u64 qwNextTBTT = 0;
u8 pbyData[8]; u8 pbyData[8];
......
...@@ -70,10 +70,10 @@ void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate, ...@@ -70,10 +70,10 @@ void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate,
u64 qwBSSTimestamp, u64 qwLocalTSF); u64 qwBSSTimestamp, u64 qwLocalTSF);
bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF); bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF);
bool CARDbClearCurrentTSF(struct vnt_private *pDevice); bool CARDbClearCurrentTSF(struct vnt_private *pDevice);
void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, WORD wBeaconInterval); void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF, void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
WORD wBeaconInterval); u16 wBeaconInterval);
u64 CARDqGetNextTBTT(u64 qwTSF, WORD wBeaconInterval); u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval);
u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2); u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
int CARDbRadioPowerOff(struct vnt_private *pDevice); int CARDbRadioPowerOff(struct vnt_private *pDevice);
int CARDbRadioPowerOn(struct vnt_private *pDevice); int CARDbRadioPowerOn(struct vnt_private *pDevice);
......
...@@ -153,12 +153,12 @@ DATARATEbyGetRateIdx ( ...@@ -153,12 +153,12 @@ DATARATEbyGetRateIdx (
* Return Value: RateIdx * Return Value: RateIdx
* *
-*/ -*/
WORD u16
RATEwGetRateIdx( RATEwGetRateIdx(
u8 byRate u8 byRate
) )
{ {
WORD ii; u16 ii;
/* erase BasicRate flag */ /* erase BasicRate flag */
byRate = byRate & 0x7F; byRate = byRate & 0x7F;
...@@ -336,7 +336,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice, ...@@ -336,7 +336,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
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 = (u16) ii;
} }
} else { } else {
bAutoRate[ii] = false; bAutoRate[ii] = false;
...@@ -363,7 +363,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice, ...@@ -363,7 +363,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice,
if ( (dwThroughputTbl[ii] > dwThroughput) && if ( (dwThroughputTbl[ii] > dwThroughput) &&
(bAutoRate[ii]==true) ) { (bAutoRate[ii]==true) ) {
dwThroughput = dwThroughputTbl[ii]; dwThroughput = dwThroughputTbl[ii];
wIdxDownRate = (WORD) ii; wIdxDownRate = (u16) ii;
} }
} }
psNodeDBTable->wTxDataRate = wIdxDownRate; psNodeDBTable->wTxDataRate = wIdxDownRate;
......
...@@ -84,7 +84,7 @@ RATEuSetIE( ...@@ -84,7 +84,7 @@ RATEuSetIE(
unsigned int uRateLen unsigned int uRateLen
); );
WORD u16
RATEwGetRateIdx( RATEwGetRateIdx(
u8 byRate u8 byRate
); );
......
...@@ -147,38 +147,38 @@ ...@@ -147,38 +147,38 @@
* RsvTime buffer header * RsvTime buffer header
*/ */
typedef struct tagSRrvTime_gRTS { typedef struct tagSRrvTime_gRTS {
WORD wRTSTxRrvTime_ba; u16 wRTSTxRrvTime_ba;
WORD wRTSTxRrvTime_aa; u16 wRTSTxRrvTime_aa;
WORD wRTSTxRrvTime_bb; u16 wRTSTxRrvTime_bb;
WORD wReserved; u16 wReserved;
WORD wTxRrvTime_b; u16 wTxRrvTime_b;
WORD wTxRrvTime_a; u16 wTxRrvTime_a;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRrvTime_gRTS, *PSRrvTime_gRTS; SRrvTime_gRTS, *PSRrvTime_gRTS;
typedef const SRrvTime_gRTS *PCSRrvTime_gRTS; typedef const SRrvTime_gRTS *PCSRrvTime_gRTS;
typedef struct tagSRrvTime_gCTS { typedef struct tagSRrvTime_gCTS {
WORD wCTSTxRrvTime_ba; u16 wCTSTxRrvTime_ba;
WORD wReserved; u16 wReserved;
WORD wTxRrvTime_b; u16 wTxRrvTime_b;
WORD wTxRrvTime_a; u16 wTxRrvTime_a;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRrvTime_gCTS, *PSRrvTime_gCTS; SRrvTime_gCTS, *PSRrvTime_gCTS;
typedef const SRrvTime_gCTS *PCSRrvTime_gCTS; typedef const SRrvTime_gCTS *PCSRrvTime_gCTS;
typedef struct tagSRrvTime_ab { typedef struct tagSRrvTime_ab {
WORD wRTSTxRrvTime; u16 wRTSTxRrvTime;
WORD wTxRrvTime; u16 wTxRrvTime;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRrvTime_ab, *PSRrvTime_ab; SRrvTime_ab, *PSRrvTime_ab;
typedef const SRrvTime_ab *PCSRrvTime_ab; typedef const SRrvTime_ab *PCSRrvTime_ab;
typedef struct tagSRrvTime_atim { typedef struct tagSRrvTime_atim {
WORD wCTSTxRrvTime_ba; u16 wCTSTxRrvTime_ba;
WORD wTxRrvTime_a; u16 wTxRrvTime_a;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRrvTime_atim, *PSRrvTime_atim; SRrvTime_atim, *PSRrvTime_atim;
...@@ -188,8 +188,8 @@ typedef const SRrvTime_atim *PCSRrvTime_atim; ...@@ -188,8 +188,8 @@ typedef const SRrvTime_atim *PCSRrvTime_atim;
* RTS buffer header * RTS buffer header
*/ */
typedef struct tagSRTSData { typedef struct tagSRTSData {
WORD wFrameControl; u16 wFrameControl;
WORD wDurationID; u16 wDurationID;
u8 abyRA[ETH_ALEN]; u8 abyRA[ETH_ALEN];
u8 abyTA[ETH_ALEN]; u8 abyTA[ETH_ALEN];
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
...@@ -200,14 +200,14 @@ typedef const SRTSData *PCSRTSData; ...@@ -200,14 +200,14 @@ typedef const SRTSData *PCSRTSData;
typedef struct tagSRTS_g { typedef struct tagSRTS_g {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
WORD wTransmitLength_b; u16 wTransmitLength_b;
u8 bySignalField_a; u8 bySignalField_a;
u8 byServiceField_a; u8 byServiceField_a;
WORD wTransmitLength_a; u16 wTransmitLength_a;
WORD wDuration_ba; u16 wDuration_ba;
WORD wDuration_aa; u16 wDuration_aa;
WORD wDuration_bb; u16 wDuration_bb;
WORD wReserved; u16 wReserved;
SRTSData Data; SRTSData Data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_g, *PSRTS_g; SRTS_g, *PSRTS_g;
...@@ -216,18 +216,18 @@ typedef const SRTS_g *PCSRTS_g; ...@@ -216,18 +216,18 @@ typedef const SRTS_g *PCSRTS_g;
typedef struct tagSRTS_g_FB { typedef struct tagSRTS_g_FB {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
WORD wTransmitLength_b; u16 wTransmitLength_b;
u8 bySignalField_a; u8 bySignalField_a;
u8 byServiceField_a; u8 byServiceField_a;
WORD wTransmitLength_a; u16 wTransmitLength_a;
WORD wDuration_ba; u16 wDuration_ba;
WORD wDuration_aa; u16 wDuration_aa;
WORD wDuration_bb; u16 wDuration_bb;
WORD wReserved; u16 wReserved;
WORD wRTSDuration_ba_f0; u16 wRTSDuration_ba_f0;
WORD wRTSDuration_aa_f0; u16 wRTSDuration_aa_f0;
WORD wRTSDuration_ba_f1; u16 wRTSDuration_ba_f1;
WORD wRTSDuration_aa_f1; u16 wRTSDuration_aa_f1;
SRTSData Data; SRTSData Data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_g_FB, *PSRTS_g_FB; SRTS_g_FB, *PSRTS_g_FB;
...@@ -237,9 +237,9 @@ typedef const SRTS_g_FB *PCSRTS_g_FB; ...@@ -237,9 +237,9 @@ typedef const SRTS_g_FB *PCSRTS_g_FB;
typedef struct tagSRTS_ab { typedef struct tagSRTS_ab {
u8 bySignalField; u8 bySignalField;
u8 byServiceField; u8 byServiceField;
WORD wTransmitLength; u16 wTransmitLength;
WORD wDuration; u16 wDuration;
WORD wReserved; u16 wReserved;
SRTSData Data; SRTSData Data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_ab, *PSRTS_ab; SRTS_ab, *PSRTS_ab;
...@@ -249,11 +249,11 @@ typedef const SRTS_ab *PCSRTS_ab; ...@@ -249,11 +249,11 @@ typedef const SRTS_ab *PCSRTS_ab;
typedef struct tagSRTS_a_FB { typedef struct tagSRTS_a_FB {
u8 bySignalField; u8 bySignalField;
u8 byServiceField; u8 byServiceField;
WORD wTransmitLength; u16 wTransmitLength;
WORD wDuration; u16 wDuration;
WORD wReserved; u16 wReserved;
WORD wRTSDuration_f0; u16 wRTSDuration_f0;
WORD wRTSDuration_f1; u16 wRTSDuration_f1;
SRTSData Data; SRTSData Data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_a_FB, *PSRTS_a_FB; SRTS_a_FB, *PSRTS_a_FB;
...@@ -264,19 +264,19 @@ typedef const SRTS_a_FB *PCSRTS_a_FB; ...@@ -264,19 +264,19 @@ typedef const SRTS_a_FB *PCSRTS_a_FB;
* CTS buffer header * CTS buffer header
*/ */
typedef struct tagSCTSData { typedef struct tagSCTSData {
WORD wFrameControl; u16 wFrameControl;
WORD wDurationID; u16 wDurationID;
u8 abyRA[ETH_ALEN]; u8 abyRA[ETH_ALEN];
WORD wReserved; u16 wReserved;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SCTSData, *PSCTSData; SCTSData, *PSCTSData;
typedef struct tagSCTS { typedef struct tagSCTS {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
WORD wTransmitLength_b; u16 wTransmitLength_b;
WORD wDuration_ba; u16 wDuration_ba;
WORD wReserved; u16 wReserved;
SCTSData Data; SCTSData Data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SCTS, *PSCTS; SCTS, *PSCTS;
...@@ -286,11 +286,11 @@ typedef const SCTS *PCSCTS; ...@@ -286,11 +286,11 @@ typedef const SCTS *PCSCTS;
typedef struct tagSCTS_FB { typedef struct tagSCTS_FB {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
WORD wTransmitLength_b; u16 wTransmitLength_b;
WORD wDuration_ba; u16 wDuration_ba;
WORD wReserved; u16 wReserved;
WORD wCTSDuration_ba_f0; u16 wCTSDuration_ba_f0;
WORD wCTSDuration_ba_f1; u16 wCTSDuration_ba_f1;
SCTSData Data; SCTSData Data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SCTS_FB, *PSCTS_FB; SCTS_FB, *PSCTS_FB;
...@@ -302,17 +302,17 @@ typedef const SCTS_FB *PCSCTS_FB; ...@@ -302,17 +302,17 @@ typedef const SCTS_FB *PCSCTS_FB;
*/ */
typedef struct tagSTxBufHead { typedef struct tagSTxBufHead {
u32 adwTxKey[4]; u32 adwTxKey[4];
WORD wFIFOCtl; u16 wFIFOCtl;
WORD wTimeStamp; u16 wTimeStamp;
WORD wFragCtl; u16 wFragCtl;
WORD wReserved; u16 wReserved;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
STxBufHead, *PSTxBufHead; STxBufHead, *PSTxBufHead;
typedef const STxBufHead *PCSTxBufHead; typedef const STxBufHead *PCSTxBufHead;
typedef struct tagSTxShortBufHead { typedef struct tagSTxShortBufHead {
WORD wFIFOCtl; u16 wFIFOCtl;
WORD wTimeStamp; u16 wTimeStamp;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
STxShortBufHead, *PSTxShortBufHead; STxShortBufHead, *PSTxShortBufHead;
typedef const STxShortBufHead *PCSTxShortBufHead; typedef const STxShortBufHead *PCSTxShortBufHead;
...@@ -323,14 +323,14 @@ typedef const STxShortBufHead *PCSTxShortBufHead; ...@@ -323,14 +323,14 @@ typedef const STxShortBufHead *PCSTxShortBufHead;
typedef struct tagSTxDataHead_g { typedef struct tagSTxDataHead_g {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
WORD wTransmitLength_b; u16 wTransmitLength_b;
u8 bySignalField_a; u8 bySignalField_a;
u8 byServiceField_a; u8 byServiceField_a;
WORD wTransmitLength_a; u16 wTransmitLength_a;
WORD wDuration_b; u16 wDuration_b;
WORD wDuration_a; u16 wDuration_a;
WORD wTimeStampOff_b; u16 wTimeStampOff_b;
WORD wTimeStampOff_a; u16 wTimeStampOff_a;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
STxDataHead_g, *PSTxDataHead_g; STxDataHead_g, *PSTxDataHead_g;
...@@ -339,16 +339,16 @@ typedef const STxDataHead_g *PCSTxDataHead_g; ...@@ -339,16 +339,16 @@ typedef const STxDataHead_g *PCSTxDataHead_g;
typedef struct tagSTxDataHead_g_FB { typedef struct tagSTxDataHead_g_FB {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
WORD wTransmitLength_b; u16 wTransmitLength_b;
u8 bySignalField_a; u8 bySignalField_a;
u8 byServiceField_a; u8 byServiceField_a;
WORD wTransmitLength_a; u16 wTransmitLength_a;
WORD wDuration_b; u16 wDuration_b;
WORD wDuration_a; u16 wDuration_a;
WORD wDuration_a_f0; u16 wDuration_a_f0;
WORD wDuration_a_f1; u16 wDuration_a_f1;
WORD wTimeStampOff_b; u16 wTimeStampOff_b;
WORD wTimeStampOff_a; u16 wTimeStampOff_a;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
STxDataHead_g_FB, *PSTxDataHead_g_FB; STxDataHead_g_FB, *PSTxDataHead_g_FB;
typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB; typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB;
...@@ -356,9 +356,9 @@ typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB; ...@@ -356,9 +356,9 @@ typedef const STxDataHead_g_FB *PCSTxDataHead_g_FB;
typedef struct tagSTxDataHead_ab { typedef struct tagSTxDataHead_ab {
u8 bySignalField; u8 bySignalField;
u8 byServiceField; u8 byServiceField;
WORD wTransmitLength; u16 wTransmitLength;
WORD wDuration; u16 wDuration;
WORD wTimeStampOff; u16 wTimeStampOff;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
STxDataHead_ab, *PSTxDataHead_ab; STxDataHead_ab, *PSTxDataHead_ab;
typedef const STxDataHead_ab *PCSTxDataHead_ab; typedef const STxDataHead_ab *PCSTxDataHead_ab;
...@@ -366,11 +366,11 @@ typedef const STxDataHead_ab *PCSTxDataHead_ab; ...@@ -366,11 +366,11 @@ typedef const STxDataHead_ab *PCSTxDataHead_ab;
typedef struct tagSTxDataHead_a_FB { typedef struct tagSTxDataHead_a_FB {
u8 bySignalField; u8 bySignalField;
u8 byServiceField; u8 byServiceField;
WORD wTransmitLength; u16 wTransmitLength;
WORD wDuration; u16 wDuration;
WORD wTimeStampOff; u16 wTimeStampOff;
WORD wDuration_f0; u16 wDuration_f0;
WORD wDuration_f1; u16 wDuration_f1;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
STxDataHead_a_FB, *PSTxDataHead_a_FB; STxDataHead_a_FB, *PSTxDataHead_a_FB;
typedef const STxDataHead_a_FB *PCSTxDataHead_a_FB; typedef const STxDataHead_a_FB *PCSTxDataHead_a_FB;
...@@ -403,7 +403,7 @@ SSecretKey; ...@@ -403,7 +403,7 @@ SSecretKey;
typedef struct tagSKeyEntry { typedef struct tagSKeyEntry {
u8 abyAddrHi[2]; u8 abyAddrHi[2];
WORD wKCTL; u16 wKCTL;
u8 abyAddrLo[4]; u8 abyAddrLo[4];
u32 dwKey0[4]; u32 dwKey0[4];
u32 dwKey1[4]; u32 dwKey1[4];
......
...@@ -311,14 +311,14 @@ typedef struct tagSQuietControl { ...@@ -311,14 +311,14 @@ typedef struct tagSQuietControl {
bool bEnable; bool bEnable;
DWORD dwStartTime; DWORD dwStartTime;
u8 byPeriod; u8 byPeriod;
WORD wDuration; u16 wDuration;
} SQuietControl, *PSQuietControl; } SQuietControl, *PSQuietControl;
/* The receive duplicate detection cache entry */ /* The receive duplicate detection cache entry */
typedef struct tagSCacheEntry{ typedef struct tagSCacheEntry{
WORD wFmSequence; u16 wFmSequence;
u8 abyAddr2[ETH_ALEN]; u8 abyAddr2[ETH_ALEN];
WORD wFrameCtl; u16 wFrameCtl;
} SCacheEntry, *PSCacheEntry; } SCacheEntry, *PSCacheEntry;
typedef struct tagSCache{ typedef struct tagSCache{
...@@ -335,8 +335,8 @@ typedef struct tagSCache{ ...@@ -335,8 +335,8 @@ typedef struct tagSCache{
*/ */
typedef struct tagSDeFragControlBlock typedef struct tagSDeFragControlBlock
{ {
WORD wSequence; u16 wSequence;
WORD wFragNum; u16 wFragNum;
u8 abyAddr2[ETH_ALEN]; u8 abyAddr2[ETH_ALEN];
unsigned int uLifetime; unsigned int uLifetime;
struct sk_buff* skb; struct sk_buff* skb;
......
...@@ -155,11 +155,11 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, ...@@ -155,11 +155,11 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
cbHeaderSize += 6; cbHeaderSize += 6;
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
cbHeaderSize += 6; cbHeaderSize += 6;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
if ((*pwType == cpu_to_be16(ETH_P_IPX)) || if ((*pwType == cpu_to_be16(ETH_P_IPX)) ||
(*pwType == cpu_to_le16(0xF380))) { (*pwType == cpu_to_le16(0xF380))) {
cbHeaderSize -= 8; cbHeaderSize -= 8;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
if (bIsWEP) { if (bIsWEP) {
if (bExtIV) { if (bExtIV) {
*pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV
...@@ -174,7 +174,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice, ...@@ -174,7 +174,7 @@ static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
} }
else { else {
cbHeaderSize -= 2; cbHeaderSize -= 2;
pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
if (bIsWEP) { if (bIsWEP) {
if (bExtIV) { if (bExtIV) {
*pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8); // 8 is IV&ExtIV
...@@ -328,7 +328,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, ...@@ -328,7 +328,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
//real Frame Size = USBFrameSize -4WbkStatus - 4RxStatus - 8TSF - 4RSR - 4SQ3 - ?Padding //real Frame Size = USBFrameSize -4WbkStatus - 4RxStatus - 8TSF - 4RSR - 4SQ3 - ?Padding
//if SQ3 the range is 24~27, if no SQ3 the range is 20~23 //if SQ3 the range is 24~27, if no SQ3 the range is 20~23
//real Frame size in PLCPLength field. //real Frame size in PLCPLength field.
pwPLCP_Length = (PWORD) (pbyDAddress + 6); pwPLCP_Length = (u16 *) (pbyDAddress + 6);
//Fix hardware bug => PLCP_Length error //Fix hardware bug => PLCP_Length error
if ( ((BytesToIndicate - (*pwPLCP_Length)) > 27) || if ( ((BytesToIndicate - (*pwPLCP_Length)) > 27) ||
((BytesToIndicate - (*pwPLCP_Length)) < 24) || ((BytesToIndicate - (*pwPLCP_Length)) < 24) ||
...@@ -625,7 +625,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, ...@@ -625,7 +625,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
u8 Protocol_Version; //802.1x Authentication u8 Protocol_Version; //802.1x Authentication
u8 Packet_Type; //802.1x Authentication u8 Packet_Type; //802.1x Authentication
u8 Descriptor_type; u8 Descriptor_type;
WORD Key_info; u16 Key_info;
if (bIsWEP) if (bIsWEP)
cbIVOffset = 8; cbIVOffset = 8;
else else
...@@ -837,12 +837,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, ...@@ -837,12 +837,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
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; u16 wLocalTSC15_0 = 0;
DWORD dwLocalTSC47_16 = 0; DWORD 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 = (u16) RSC;
dwLocalTSC47_16 = (DWORD) (RSC>>16); dwLocalTSC47_16 = (DWORD) (RSC>>16);
RSC = dwRxTSC47_16; RSC = dwRxTSC47_16;
...@@ -1047,8 +1047,8 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, ...@@ -1047,8 +1047,8 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
*pdwRxTSC47_16 = 0; *pdwRxTSC47_16 = 0;
pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
if ( WLAN_GET_FC_TODS(*(PWORD)pbyFrame) && if ( WLAN_GET_FC_TODS(*(u16 *)pbyFrame) &&
WLAN_GET_FC_FROMDS(*(PWORD)pbyFrame) ) { WLAN_GET_FC_FROMDS(*(u16 *)pbyFrame) ) {
pbyIV += 6; // 6 is 802.11 address4 pbyIV += 6; // 6 is 802.11 address4
PayloadLen -= 6; PayloadLen -= 6;
} }
...@@ -1141,7 +1141,7 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, ...@@ -1141,7 +1141,7 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
if (byDecMode == KEY_CTL_TKIP) { if (byDecMode == KEY_CTL_TKIP) {
*pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
} else { } else {
*pwRxTSC15_0 = cpu_to_le16(*(PWORD)pbyIV); *pwRxTSC15_0 = cpu_to_le16(*(u16 *)pbyIV);
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0);
...@@ -1183,8 +1183,8 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, ...@@ -1183,8 +1183,8 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
*pdwRxTSC47_16 = 0; *pdwRxTSC47_16 = 0;
pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
if ( WLAN_GET_FC_TODS(*(PWORD)pbyFrame) && if ( WLAN_GET_FC_TODS(*(u16 *)pbyFrame) &&
WLAN_GET_FC_FROMDS(*(PWORD)pbyFrame) ) { WLAN_GET_FC_FROMDS(*(u16 *)pbyFrame) ) {
pbyIV += 6; // 6 is 802.11 address4 pbyIV += 6; // 6 is 802.11 address4
PayloadLen -= 6; PayloadLen -= 6;
} }
...@@ -1241,7 +1241,7 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, ...@@ -1241,7 +1241,7 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
if (byDecMode == KEY_CTL_TKIP) { if (byDecMode == KEY_CTL_TKIP) {
*pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
} else { } else {
*pwRxTSC15_0 = cpu_to_le16(*(PWORD)pbyIV); *pwRxTSC15_0 = cpu_to_le16(*(u16 *)pbyIV);
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0);
......
...@@ -242,7 +242,7 @@ static int hostap_add_sta(struct vnt_private *pDevice, ...@@ -242,7 +242,7 @@ static int hostap_add_sta(struct vnt_private *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 = (u16)param->u.add_sta.aid;
pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies;
......
...@@ -37,16 +37,16 @@ ...@@ -37,16 +37,16 @@
typedef struct tagSINTData { typedef struct tagSINTData {
u8 byTSR0; u8 byTSR0;
u8 byPkt0; u8 byPkt0;
WORD wTime0; u16 wTime0;
u8 byTSR1; u8 byTSR1;
u8 byPkt1; u8 byPkt1;
WORD wTime1; u16 wTime1;
u8 byTSR2; u8 byTSR2;
u8 byPkt2; u8 byPkt2;
WORD wTime2; u16 wTime2;
u8 byTSR3; u8 byTSR3;
u8 byPkt3; u8 byPkt3;
WORD wTime3; u16 wTime3;
u64 qwTSF; u64 qwTSF;
u8 byISR0; u8 byISR0;
u8 byISR1; u8 byISR1;
......
...@@ -62,7 +62,7 @@ typedef struct tagSKeyItem ...@@ -62,7 +62,7 @@ typedef struct tagSKeyItem
u8 abyKey[MAX_KEY_LEN]; u8 abyKey[MAX_KEY_LEN];
u64 KeyRSC; u64 KeyRSC;
DWORD dwTSC47_16; DWORD dwTSC47_16;
WORD wTSC15_0; u16 wTSC15_0;
u8 byCipherSuite; u8 byCipherSuite;
u8 byReserved0; u8 byReserved0;
DWORD dwKeyIndex; DWORD dwKeyIndex;
...@@ -77,7 +77,7 @@ typedef struct tagSKeyTable ...@@ -77,7 +77,7 @@ typedef struct tagSKeyTable
SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328 SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
DWORD dwGTKeyIndex; // GroupTransmitKey Index DWORD dwGTKeyIndex; // GroupTransmitKey Index
bool bInUse; bool bInUse;
WORD wKeyCtl; u16 wKeyCtl;
bool bSoftWEP; bool bSoftWEP;
u8 byReserved1[6]; u8 byReserved1[6];
} SKeyTable, *PSKeyTable; //352 } SKeyTable, *PSKeyTable; //352
......
...@@ -88,7 +88,7 @@ void MACvSetMultiAddrByHash(struct vnt_private *pDevice, u8 byHashIdx) ...@@ -88,7 +88,7 @@ void MACvSetMultiAddrByHash(struct vnt_private *pDevice, u8 byHashIdx)
CONTROLnsRequestOut(pDevice, CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE_MASK, MESSAGE_TYPE_WRITE_MASK,
(WORD) (MAC_REG_MAR0 + uByteIdx), (u16) (MAC_REG_MAR0 + uByteIdx),
MESSAGE_REQUEST_MACREG, MESSAGE_REQUEST_MACREG,
2, 2,
pbyData); pbyData);
...@@ -117,7 +117,7 @@ void MACvWriteMultiAddr(struct vnt_private *pDevice, u32 uByteIdx, u8 byData) ...@@ -117,7 +117,7 @@ void MACvWriteMultiAddr(struct vnt_private *pDevice, u32 uByteIdx, u8 byData)
byData1 = byData; byData1 = byData;
CONTROLnsRequestOut(pDevice, CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_WRITE, MESSAGE_TYPE_WRITE,
(WORD) (MAC_REG_MAR0 + uByteIdx), (u16) (MAC_REG_MAR0 + uByteIdx),
MESSAGE_REQUEST_MACREG, MESSAGE_REQUEST_MACREG,
1, 1,
&byData1); &byData1);
...@@ -310,7 +310,7 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx, ...@@ -310,7 +310,7 @@ void MACvSetKeyEntry(struct vnt_private *pDevice, u16 wKeyCtl, u32 uEntryIdx,
CONTROLnsRequestOut(pDevice, CONTROLnsRequestOut(pDevice,
MESSAGE_TYPE_SETKEY, MESSAGE_TYPE_SETKEY,
wOffset, wOffset,
(WORD)uKeyIdx, (u16)uKeyIdx,
24, 24,
pbyData pbyData
); );
......
...@@ -418,7 +418,7 @@ static int device_init_registers(struct vnt_private *pDevice, ...@@ -418,7 +418,7 @@ static int device_init_registers(struct vnt_private *pDevice,
pDevice->bNonERPPresent = false; pDevice->bNonERPPresent = false;
pDevice->bBarkerPreambleMd = false; pDevice->bBarkerPreambleMd = false;
if ( pDevice->bFixRate ) { if ( pDevice->bFixRate ) {
pDevice->wCurrentRate = (WORD) pDevice->uConnectionRate; pDevice->wCurrentRate = (u16) pDevice->uConnectionRate;
} else { } else {
if ( pDevice->byBBType == BB_TYPE_11B ) if ( pDevice->byBBType == BB_TYPE_11B )
pDevice->wCurrentRate = RATE_11M; pDevice->wCurrentRate = RATE_11M;
......
...@@ -229,8 +229,8 @@ typedef struct tagSISRCounters { ...@@ -229,8 +229,8 @@ typedef struct tagSISRCounters {
// //
typedef struct tagSTxPktInfo { typedef struct tagSTxPktInfo {
u8 byBroadMultiUni; u8 byBroadMultiUni;
WORD wLength; u16 wLength;
WORD wFIFOCtl; u16 wFIFOCtl;
u8 abyDestAddr[ETH_ALEN]; u8 abyDestAddr[ETH_ALEN];
} STxPktInfo, *PSTxPktInfo; } STxPktInfo, *PSTxPktInfo;
......
...@@ -290,7 +290,7 @@ int PSbSendNullPacket(struct vnt_private *pDevice) ...@@ -290,7 +290,7 @@ int PSbSendNullPacket(struct vnt_private *pDevice)
pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags); pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);
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((u16)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);
memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN); memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
......
...@@ -103,7 +103,7 @@ typedef struct _RSP_CARD_INIT ...@@ -103,7 +103,7 @@ typedef struct _RSP_CARD_INIT
typedef struct _CMD_SET_KEY typedef struct _CMD_SET_KEY
{ {
WORD wKCTL; u16 wKCTL;
u8 abyMacAddr[6]; u8 abyMacAddr[6];
u8 abyKey[16]; u8 abyKey[16];
} CMD_SET_KEY, *PCMD_SET_KEY; } CMD_SET_KEY, *PCMD_SET_KEY;
...@@ -147,12 +147,12 @@ typedef struct _CMD_CHANGE_BBTYPE ...@@ -147,12 +147,12 @@ typedef struct _CMD_CHANGE_BBTYPE
DWORD dwRSPINF_b_2; DWORD dwRSPINF_b_2;
DWORD dwRSPINF_b_55; DWORD dwRSPINF_b_55;
DWORD dwRSPINF_b_11; DWORD dwRSPINF_b_11;
WORD wRSPINF_a[9]; u16 wRSPINF_a[9];
} CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE; } CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE;
/*--------------------- Export Macros -------------------------*/ /*--------------------- Export Macros -------------------------*/
#define EXCH_WORD(w) ((WORD)((WORD)(w)<<8) | (WORD)((WORD)(w)>>8)) #define EXCH_WORD(w) ((u16)((u16)(w)<<8) | (u16)((u16)(w)>>8))
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
......
This diff is collapsed.
This diff is collapsed.
...@@ -86,34 +86,34 @@ ...@@ -86,34 +86,34 @@
// 2048 bits = 256 bytes = 128 words // 2048 bits = 256 bytes = 128 words
// //
typedef struct tagSSromReg { typedef struct tagSSromReg {
u8 abyPAR[6]; // 0x00 (WORD) u8 abyPAR[6]; // 0x00 (u16)
WORD wSUB_VID; // 0x03 (WORD) u16 wSUB_VID; // 0x03 (u16)
WORD wSUB_SID; u16 wSUB_SID;
u8 byBCFG0; // 0x05 (WORD) u8 byBCFG0; // 0x05 (u16)
u8 byBCFG1; u8 byBCFG1;
u8 byFCR0; // 0x06 (WORD) u8 byFCR0; // 0x06 (u16)
u8 byFCR1; u8 byFCR1;
u8 byPMC0; // 0x07 (WORD) u8 byPMC0; // 0x07 (u16)
u8 byPMC1; u8 byPMC1;
u8 byMAXLAT; // 0x08 (WORD) u8 byMAXLAT; // 0x08 (u16)
u8 byMINGNT; u8 byMINGNT;
u8 byCFG0; // 0x09 (WORD) u8 byCFG0; // 0x09 (u16)
u8 byCFG1; u8 byCFG1;
WORD wCISPTR; // 0x0A (WORD) u16 wCISPTR; // 0x0A (u16)
WORD wRsv0; // 0x0B (WORD) u16 wRsv0; // 0x0B (u16)
WORD wRsv1; // 0x0C (WORD) u16 wRsv1; // 0x0C (u16)
u8 byBBPAIR; // 0x0D (WORD) u8 byBBPAIR; // 0x0D (u16)
u8 byRFTYPE; u8 byRFTYPE;
u8 byMinChannel; // 0x0E (WORD) u8 byMinChannel; // 0x0E (u16)
u8 byMaxChannel; u8 byMaxChannel;
u8 bySignature; // 0x0F (WORD) u8 bySignature; // 0x0F (u16)
u8 byCheckSum; u8 byCheckSum;
u8 abyReserved0[96]; // 0x10 (WORD) u8 abyReserved0[96]; // 0x10 (u16)
u8 abyCIS[128]; // 0x80 (WORD) u8 abyCIS[128]; // 0x80 (u16)
} SSromReg, *PSSromReg; } SSromReg, *PSSromReg;
/*--------------------- Export Macros ------------------------------*/ /*--------------------- Export Macros ------------------------------*/
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
typedef struct tagSEthernetHeader { typedef struct tagSEthernetHeader {
u8 abyDstAddr[ETH_ALEN]; u8 abyDstAddr[ETH_ALEN];
u8 abySrcAddr[ETH_ALEN]; u8 abySrcAddr[ETH_ALEN];
WORD wType; u16 wType;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SEthernetHeader, *PSEthernetHeader; SEthernetHeader, *PSEthernetHeader;
...@@ -133,7 +133,7 @@ SEthernetHeader, *PSEthernetHeader; ...@@ -133,7 +133,7 @@ SEthernetHeader, *PSEthernetHeader;
typedef struct tagS802_3Header { typedef struct tagS802_3Header {
u8 abyDstAddr[ETH_ALEN]; u8 abyDstAddr[ETH_ALEN];
u8 abySrcAddr[ETH_ALEN]; u8 abySrcAddr[ETH_ALEN];
WORD wLen; u16 wLen;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
S802_3Header, *PS802_3Header; S802_3Header, *PS802_3Header;
...@@ -141,12 +141,12 @@ S802_3Header, *PS802_3Header; ...@@ -141,12 +141,12 @@ S802_3Header, *PS802_3Header;
// 802_11 packet // 802_11 packet
// //
typedef struct tagS802_11Header { typedef struct tagS802_11Header {
WORD wFrameCtl; u16 wFrameCtl;
WORD wDurationID; u16 wDurationID;
u8 abyAddr1[ETH_ALEN]; u8 abyAddr1[ETH_ALEN];
u8 abyAddr2[ETH_ALEN]; u8 abyAddr2[ETH_ALEN];
u8 abyAddr3[ETH_ALEN]; u8 abyAddr3[ETH_ALEN];
WORD wSeqCtl; u16 wSeqCtl;
u8 abyAddr4[ETH_ALEN]; u8 abyAddr4[ETH_ALEN];
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
S802_11Header, *PS802_11Header; S802_11Header, *PS802_11Header;
......
...@@ -184,7 +184,7 @@ static unsigned int rotr1(unsigned int a) ...@@ -184,7 +184,7 @@ static unsigned int rotr1(unsigned int a)
void TKIPvMixKey( void TKIPvMixKey(
u8 * pbyTKey, u8 * pbyTKey,
u8 * pbyTA, u8 * pbyTA,
WORD wTSC15_0, u16 wTSC15_0,
DWORD dwTSC47_16, DWORD dwTSC47_16,
u8 * pbyRC4Key u8 * pbyRC4Key
) )
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
void TKIPvMixKey( void TKIPvMixKey(
u8 * pbyTKey, u8 * pbyTKey,
u8 * pbyTA, u8 * pbyTA,
WORD wTSC15_0, u16 wTSC15_0,
DWORD dwTSC47_16, DWORD dwTSC47_16,
u8 * pbyRC4Key u8 * pbyRC4Key
); );
......
...@@ -37,24 +37,24 @@ ...@@ -37,24 +37,24 @@
#define LOBYTE(w) ((u8)(w)) #define LOBYTE(w) ((u8)(w))
#endif #endif
#if !defined(HIBYTE) #if !defined(HIBYTE)
#define HIBYTE(w) ((u8)(((WORD)(w) >> 8) & 0xFF)) #define HIBYTE(w) ((u8)(((u16)(w) >> 8) & 0xFF))
#endif #endif
#if !defined(LOWORD) #if !defined(LOWORD)
#define LOWORD(d) ((WORD)(d)) #define LOWORD(d) ((u16)(d))
#endif #endif
#if !defined(HIWORD) #if !defined(HIWORD)
#define HIWORD(d) ((WORD)((((DWORD)(d)) >> 16) & 0xFFFF)) #define HIWORD(d) ((u16)((((DWORD)(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)(((u8)(lb)) | (((WORD)((u8)(hb))) << 8))) #define MAKEWORD(lb, hb) ((u16)(((u8)(lb)) | (((u16)((u8)(hb))) << 8)))
#endif #endif
#if !defined(MAKEDWORD) #if !defined(MAKEDWORD)
#define MAKEDWORD(lw, hw) ((DWORD)(((WORD)(lw)) | (((DWORD)((WORD)(hw))) << 16))) #define MAKEDWORD(lw, hw) ((DWORD)(((u16)(lw)) | (((DWORD)((u16)(hw))) << 16)))
#endif #endif
#endif /* __TMACRO_H__ */ #endif /* __TMACRO_H__ */
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
/****** Simple typedefs ***************************************************/ /****** Simple typedefs ***************************************************/
typedef u16 WORD;
typedef u32 DWORD; typedef u32 DWORD;
/****** Common pointer types ***********************************************/ /****** Common pointer types ***********************************************/
...@@ -45,8 +44,6 @@ typedef u32 DWORD_PTR; ...@@ -45,8 +44,6 @@ typedef u32 DWORD_PTR;
// boolean pointer // boolean pointer
typedef WORD * PWORD;
typedef DWORD * PDWORD; typedef DWORD * PDWORD;
#endif /* __TTYPE_H__ */ #endif /* __TTYPE_H__ */
...@@ -1147,7 +1147,7 @@ int bScheduleCommand(struct vnt_private *pDevice, ...@@ -1147,7 +1147,7 @@ int bScheduleCommand(struct vnt_private *pDevice,
break; break;
/* /*
case WLAN_CMD_DEAUTH: case WLAN_CMD_DEAUTH:
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((PWORD)pbyItem0); pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((u16 *)pbyItem0);
break; break;
*/ */
......
...@@ -77,7 +77,7 @@ typedef struct tagCMD_ITEM { ...@@ -77,7 +77,7 @@ typedef struct tagCMD_ITEM {
bool bNeedRadioOFF; bool bNeedRadioOFF;
bool bRadioCmd; bool bRadioCmd;
bool bForceSCAN; bool bForceSCAN;
WORD wDeAuthenReason; u16 wDeAuthenReason;
} CMD_ITEM, *PCMD_ITEM; } CMD_ITEM, *PCMD_ITEM;
// Command state // Command state
......
...@@ -543,9 +543,9 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, ...@@ -543,9 +543,9 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice,
WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo); WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime =
WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo); WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)uNodeIndex; pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)uNodeIndex;
wAssocStatus = WLAN_MGMT_STATUS_SUCCESS; wAssocStatus = WLAN_MGMT_STATUS_SUCCESS;
wAssocAID = (WORD)uNodeIndex; wAssocAID = (u16)uNodeIndex;
// check if ERP support // check if ERP support
if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true; pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
...@@ -691,9 +691,9 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, ...@@ -691,9 +691,9 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice,
WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo); WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime =
WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo); WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)uNodeIndex; pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)uNodeIndex;
wAssocStatus = WLAN_MGMT_STATUS_SUCCESS; wAssocStatus = WLAN_MGMT_STATUS_SUCCESS;
wAssocAID = (WORD)uNodeIndex; wAssocAID = (u16)uNodeIndex;
// if suppurt ERP // if suppurt ERP
if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
...@@ -2843,9 +2843,9 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) ...@@ -2843,9 +2843,9 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM)
if (byMap) { if (byMap) {
if (!bStartFound) { if (!bStartFound) {
bStartFound = true; bStartFound = true;
wStartIndex = (WORD)ii; wStartIndex = (u16)ii;
} }
wEndIndex = (WORD)ii; wEndIndex = (u16)ii;
} }
} }
...@@ -2917,7 +2917,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, ...@@ -2917,7 +2917,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice,
)); ));
if (pDevice->bEnablePSMode) { if (pDevice->bEnablePSMode) {
sFrame.pHdr->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_PWRMGT(1)); sFrame.pHdr->sA3.wFrameCtl |= cpu_to_le16((u16)WLAN_SET_FC_PWRMGT(1));
} }
memcpy( sFrame.pHdr->sA3.abyAddr1, abyBroadcastAddr, WLAN_ADDR_LEN); memcpy( sFrame.pHdr->sA3.abyAddr1, abyBroadcastAddr, WLAN_ADDR_LEN);
...@@ -2988,11 +2988,11 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, ...@@ -2988,11 +2988,11 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice,
// Pairwise Key Cipher Suite // Pairwise Key Cipher Suite
sFrame.pRSNWPA->wPKCount = 0; sFrame.pRSNWPA->wPKCount = 0;
// Auth Key Management Suite // Auth Key Management Suite
*((PWORD)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; *((u16 *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0;
sFrame.pRSNWPA->len +=2; sFrame.pRSNWPA->len +=2;
// RSN Capabilites // RSN Capabilites
*((PWORD)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0; *((u16 *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0;
sFrame.pRSNWPA->len +=2; sFrame.pRSNWPA->len +=2;
sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
} }
...@@ -3089,7 +3089,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, ...@@ -3089,7 +3089,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice,
*sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo); *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
if (byPHYType == BB_TYPE_11B) { if (byPHYType == BB_TYPE_11B) {
*sFrame.pwCapInfo &= cpu_to_le16((WORD)~(WLAN_SET_CAP_INFO_SHORTSLOTTIME(1))); *sFrame.pwCapInfo &= cpu_to_le16((u16)~(WLAN_SET_CAP_INFO_SHORTSLOTTIME(1)));
} }
// Copy SSID // Copy SSID
...@@ -3322,7 +3322,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, ...@@ -3322,7 +3322,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice,
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
(pMgmt->pCurrBSS != NULL)) { (pMgmt->pCurrBSS != NULL)) {
unsigned int ii; unsigned int ii;
PWORD pwPMKID; u16 * pwPMKID;
// WPA IE // WPA IE
sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
...@@ -3387,7 +3387,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, ...@@ -3387,7 +3387,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice,
if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
// RSN PMKID // RSN PMKID
pbyRSN = &sFrame.pRSN->abyRSN[18]; pbyRSN = &sFrame.pRSN->abyRSN[18];
pwPMKID = (PWORD)pbyRSN; // Point to PMKID count pwPMKID = (u16 *)pbyRSN; // Point to PMKID count
*pwPMKID = 0; // Initialize PMKID count *pwPMKID = 0; // Initialize PMKID count
pbyRSN += 2; // Point to PMKID list pbyRSN += 2; // Point to PMKID list
for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) {
...@@ -3578,7 +3578,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, ...@@ -3578,7 +3578,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice,
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
(pMgmt->pCurrBSS != NULL)) { (pMgmt->pCurrBSS != NULL)) {
unsigned int ii; unsigned int ii;
PWORD pwPMKID; u16 * pwPMKID;
/* WPA IE */ /* WPA IE */
sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
...@@ -3643,7 +3643,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, ...@@ -3643,7 +3643,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice,
if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
// RSN PMKID // RSN PMKID
pbyRSN = &sFrame.pRSN->abyRSN[18]; pbyRSN = &sFrame.pRSN->abyRSN[18];
pwPMKID = (PWORD)pbyRSN; // Point to PMKID count pwPMKID = (u16 *)pbyRSN; // Point to PMKID count
*pwPMKID = 0; // Initialize PMKID count *pwPMKID = 0; // Initialize PMKID count
pbyRSN += 2; // Point to PMKID list pbyRSN += 2; // Point to PMKID list
for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) {
...@@ -3719,7 +3719,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice, ...@@ -3719,7 +3719,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice,
*sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo); *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
*sFrame.pwStatus = cpu_to_le16(wAssocStatus); *sFrame.pwStatus = cpu_to_le16(wAssocStatus);
*sFrame.pwAid = cpu_to_le16((WORD)(wAssocAID | BIT14 | BIT15)); *sFrame.pwAid = cpu_to_le16((u16)(wAssocAID | BIT14 | BIT15));
// Copy the rate set // Copy the rate set
sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
...@@ -3788,7 +3788,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice, ...@@ -3788,7 +3788,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice,
*sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo); *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
*sFrame.pwStatus = cpu_to_le16(wAssocStatus); *sFrame.pwStatus = cpu_to_le16(wAssocStatus);
*sFrame.pwAid = cpu_to_le16((WORD)(wAssocAID | BIT14 | BIT15)); *sFrame.pwAid = cpu_to_le16((u16)(wAssocAID | BIT14 | BIT15));
// Copy the rate set // Copy the rate set
sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
......
...@@ -167,7 +167,7 @@ WPA_ParseRSN( ...@@ -167,7 +167,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 = (u16)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);
} }
...@@ -197,7 +197,7 @@ WPA_ParseRSN( ...@@ -197,7 +197,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 = (u16)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);
} }
...@@ -213,7 +213,7 @@ WPA_ParseRSN( ...@@ -213,7 +213,7 @@ WPA_ParseRSN(
pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG; pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG;
pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS); pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS);
pBSSList->sRSNCapObj.bRSNCapExist = true; pBSSList->sRSNCapObj.bRSNCapExist = true;
pBSSList->sRSNCapObj.wRSNCap = *(PWORD)pbyCaps; pBSSList->sRSNCapObj.wRSNCap = *(u16 *)pbyCaps;
//DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps)); //DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps));
//DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK)); //DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK));
//DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx)); //DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx));
......
...@@ -113,7 +113,7 @@ WPA2vParseRSN ( ...@@ -113,7 +113,7 @@ WPA2vParseRSN (
) )
{ {
int i, j; int i, j;
WORD m = 0, n = 0; u16 m = 0, n = 0;
u8 * pbyOUI; u8 * pbyOUI;
bool bUseGK = false; bool bUseGK = false;
...@@ -163,7 +163,7 @@ WPA2vParseRSN ( ...@@ -163,7 +163,7 @@ WPA2vParseRSN (
} }
if (pRSN->len >= 8) { // ver(2) + GK(4) + PK count(2) if (pRSN->len >= 8) { // ver(2) + GK(4) + PK count(2)
pBSSNode->wCSSPKCount = *((PWORD) &(pRSN->abyRSN[4])); pBSSNode->wCSSPKCount = *((u16 *) &(pRSN->abyRSN[4]));
j = 0; j = 0;
pbyOUI = &(pRSN->abyRSN[6]); pbyOUI = &(pRSN->abyRSN[6]);
...@@ -208,14 +208,14 @@ WPA2vParseRSN ( ...@@ -208,14 +208,14 @@ WPA2vParseRSN (
// invalid CSS, No valid PK. // invalid CSS, No valid PK.
return; return;
} }
pBSSNode->wCSSPKCount = (WORD)j; pBSSNode->wCSSPKCount = (u16)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);
} }
m = *((PWORD) &(pRSN->abyRSN[4])); m = *((u16 *) &(pRSN->abyRSN[4]));
if (pRSN->len >= 10+m*4) { // ver(2) + GK(4) + PK count(2) + PKS(4*m) + AKMSS count(2) if (pRSN->len >= 10+m*4) { // ver(2) + GK(4) + PK count(2) + PKS(4*m) + AKMSS count(2)
pBSSNode->wAKMSSAuthCount = *((PWORD) &(pRSN->abyRSN[6+4*m])); pBSSNode->wAKMSSAuthCount = *((u16 *) &(pRSN->abyRSN[6+4*m]));
j = 0; j = 0;
pbyOUI = &(pRSN->abyRSN[8+4*m]); pbyOUI = &(pRSN->abyRSN[8+4*m]);
for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(u8)); i++) { for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(u8)); i++) {
...@@ -231,13 +231,13 @@ WPA2vParseRSN ( ...@@ -231,13 +231,13 @@ WPA2vParseRSN (
} else } else
break; break;
} }
pBSSNode->wAKMSSAuthCount = (WORD)j; pBSSNode->wAKMSSAuthCount = (u16)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 = *((PWORD) &(pRSN->abyRSN[6+4*m])); n = *((u16 *) &(pRSN->abyRSN[6+4*m]));
if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2) if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2)
pBSSNode->sRSNCapObj.bRSNCapExist = true; pBSSNode->sRSNCapObj.bRSNCapExist = true;
pBSSNode->sRSNCapObj.wRSNCap = *((PWORD) &(pRSN->abyRSN[8+4*m+4*n])); pBSSNode->sRSNCapObj.wRSNCap = *((u16 *) &(pRSN->abyRSN[8+4*m+4*n]));
} }
} }
//ignore PMKID lists bcs only (Re)Assocrequest has this field //ignore PMKID lists bcs only (Re)Assocrequest has this field
...@@ -337,7 +337,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs) ...@@ -337,7 +337,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs)
(pMgmt->bRoaming == true) && (pMgmt->bRoaming == true) &&
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
/* RSN PMKID, pointer to PMKID count */ /* RSN PMKID, pointer to PMKID count */
pwPMKID = (PWORD)(&pRSNIEs->abyRSN[18]); pwPMKID = (u16 *)(&pRSNIEs->abyRSN[18]);
*pwPMKID = 0; /* Initialize PMKID count */ *pwPMKID = 0; /* Initialize PMKID count */
pbyBuffer = &pRSNIEs->abyRSN[20]; /* Point to PMKID list */ pbyBuffer = &pRSNIEs->abyRSN[20]; /* Point to PMKID list */
for (ii = 0; ii < pMgmt->gsPMKIDCache.BSSIDInfoCount; ii++) { for (ii = 0; ii < pMgmt->gsPMKIDCache.BSSIDInfoCount; ii++) {
......
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