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