From cc856e61ee4ffb150ff352e3d6940978a2f819e8 Mon Sep 17 00:00:00 2001 From: Andres More Date: Mon, 17 May 2010 21:34:01 -0300 Subject: [PATCH] Staging: vt6656: removed custom UCHAR/USHORT/UINT/ULONG/ULONGLONG typedefs Cleared all checkpatch warnings but 'do not add new typedefs' ones. Signed-off-by: Andres More Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6656/80211mgr.h | 48 +++--- drivers/staging/vt6656/baseband.c | 52 +++---- drivers/staging/vt6656/baseband.h | 6 +- drivers/staging/vt6656/bssdb.c | 107 +++++++------- drivers/staging/vt6656/bssdb.h | 46 +++--- drivers/staging/vt6656/card.c | 14 +- drivers/staging/vt6656/card.h | 3 +- drivers/staging/vt6656/channel.c | 6 +- drivers/staging/vt6656/channel.h | 6 +- drivers/staging/vt6656/datarate.c | 14 +- drivers/staging/vt6656/datarate.h | 2 +- drivers/staging/vt6656/device.h | 153 +++++++++---------- drivers/staging/vt6656/dpc.c | 49 ++++--- drivers/staging/vt6656/dpc.h | 2 +- drivers/staging/vt6656/hostap.c | 14 +- drivers/staging/vt6656/ioctl.c | 6 +- drivers/staging/vt6656/ioctl.h | 2 +- drivers/staging/vt6656/iwctl.c | 8 +- drivers/staging/vt6656/key.c | 22 +-- drivers/staging/vt6656/key.h | 8 +- drivers/staging/vt6656/mac.c | 14 +- drivers/staging/vt6656/mac.h | 7 +- drivers/staging/vt6656/main_usb.c | 50 ++++--- drivers/staging/vt6656/mib.c | 43 +++--- drivers/staging/vt6656/mib.h | 161 ++++++++++---------- drivers/staging/vt6656/michael.c | 8 +- drivers/staging/vt6656/michael.h | 2 +- drivers/staging/vt6656/rc4.c | 22 +-- drivers/staging/vt6656/rc4.h | 11 +- drivers/staging/vt6656/rf.c | 6 +- drivers/staging/vt6656/rf.h | 6 +- drivers/staging/vt6656/rxtx.c | 234 +++++++++++++++--------------- drivers/staging/vt6656/rxtx.h | 17 ++- drivers/staging/vt6656/tcrc.c | 6 +- drivers/staging/vt6656/tcrc.h | 6 +- drivers/staging/vt6656/tether.c | 2 +- drivers/staging/vt6656/tether.h | 2 +- drivers/staging/vt6656/ttype.h | 6 - drivers/staging/vt6656/upc.h | 2 +- drivers/staging/vt6656/usbpipe.c | 15 +- drivers/staging/vt6656/wcmd.c | 18 +-- drivers/staging/vt6656/wctl.c | 17 ++- drivers/staging/vt6656/wctl.h | 8 +- drivers/staging/vt6656/wmgr.c | 69 ++++----- drivers/staging/vt6656/wmgr.h | 62 ++++---- drivers/staging/vt6656/wpa2.c | 4 +- drivers/staging/vt6656/wpa2.h | 4 +- drivers/staging/vt6656/wpactl.h | 4 +- 48 files changed, 691 insertions(+), 683 deletions(-) diff --git a/drivers/staging/vt6656/80211mgr.h b/drivers/staging/vt6656/80211mgr.h index 50982e9f8cdf..c140a957d9df 100644 --- a/drivers/staging/vt6656/80211mgr.h +++ b/drivers/staging/vt6656/80211mgr.h @@ -524,8 +524,8 @@ typedef struct _WLAN_IE_IBSS_DFS { // prototype structure, all mgmt frame types will start with these members typedef struct tagWLAN_FR_MGMT { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; @@ -534,8 +534,8 @@ typedef struct tagWLAN_FR_MGMT { // Beacon frame typedef struct tagWLAN_FR_BEACON { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; // fixed fields @@ -566,8 +566,8 @@ typedef struct tagWLAN_FR_BEACON { // IBSS ATIM frame typedef struct tagWLAN_FR_IBSSATIM { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; @@ -580,8 +580,8 @@ typedef struct tagWLAN_FR_IBSSATIM { // Disassociation typedef struct tagWLAN_FR_DISASSOC { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -593,8 +593,8 @@ typedef struct tagWLAN_FR_DISASSOC { // Association Request typedef struct tagWLAN_FR_ASSOCREQ { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -617,8 +617,8 @@ typedef struct tagWLAN_FR_ASSOCREQ { // Association Response typedef struct tagWLAN_FR_ASSOCRESP { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -634,8 +634,8 @@ typedef struct tagWLAN_FR_ASSOCRESP { // Reassociation Request typedef struct tagWLAN_FR_REASSOCREQ { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; @@ -659,8 +659,8 @@ typedef struct tagWLAN_FR_REASSOCREQ { // Reassociation Response typedef struct tagWLAN_FR_REASSOCRESP { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -676,8 +676,8 @@ typedef struct tagWLAN_FR_REASSOCRESP { // Probe Request typedef struct tagWLAN_FR_PROBEREQ { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -691,8 +691,8 @@ typedef struct tagWLAN_FR_PROBEREQ { // Probe Response typedef struct tagWLAN_FR_PROBERESP { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -720,8 +720,8 @@ typedef struct tagWLAN_FR_PROBERESP { // Authentication typedef struct tagWLAN_FR_AUTHEN { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ @@ -736,8 +736,8 @@ typedef struct tagWLAN_FR_AUTHEN { // Deauthenication typedef struct tagWLAN_FR_DEAUTHEN { - UINT uType; - UINT len; + unsigned int uType; + unsigned int len; PBYTE pBuf; PUWLAN_80211HDR pHdr; /*-- fixed fields -----------*/ diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 01680e6b0f5b..d3de94f36c6e 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -662,11 +662,11 @@ const WORD awcFrameTime[MAX_RATE] = /* static -ULONG +unsigned long s_ulGetLowSQ3(PSDevice pDevice); static -ULONG +unsigned long s_ulGetRatio(PSDevice pDevice); static @@ -689,19 +689,19 @@ s_vClearSQ3Value(PSDevice pDevice); * Return Value: FrameTime * */ -UINT +unsigned int BBuGetFrameTime ( BYTE byPreambleType, BYTE byPktType, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wRate ) { - UINT uFrameTime; - UINT uPreamble; - UINT uTmp; - UINT uRateIdx = (UINT)wRate; - UINT uRate = 0; + unsigned int uFrameTime; + unsigned int uPreamble; + unsigned int uTmp; + unsigned int uRateIdx = (unsigned int)wRate; + unsigned int uRate = 0; if (uRateIdx > RATE_54M) { @@ -709,7 +709,7 @@ BBuGetFrameTime ( return 0; } - uRate = (UINT)awcFrameTime[uRateIdx]; + uRate = (unsigned int)awcFrameTime[uRateIdx]; if (uRateIdx <= 3) { //CCK mode @@ -759,7 +759,7 @@ BBuGetFrameTime ( void BBvCaculateParameter ( PSDevice pDevice, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wRate, BYTE byPacketType, PWORD pwPhyLen, @@ -767,9 +767,9 @@ BBvCaculateParameter ( PBYTE pbyPhySgn ) { - UINT cbBitCount; - UINT cbUsCount = 0; - UINT cbTmp; + unsigned int cbBitCount; + unsigned int cbUsCount = 0; + unsigned int cbTmp; BOOL bExtBit; BYTE byPreambleType = pDevice->byPreambleType; BOOL bCCK = pDevice->bCCK; @@ -1360,13 +1360,11 @@ BBvExitDeepSleep (PSDevice pDevice) } -static -ULONG -s_ulGetLowSQ3(PSDevice pDevice) +static unsigned long s_ulGetLowSQ3(PSDevice pDevice) { -int ii; -ULONG ulSQ3 = 0; -ULONG ulMaxPacket; + int ii; + unsigned long ulSQ3 = 0; + unsigned long ulMaxPacket; ulMaxPacket = pDevice->aulPktNum[RATE_54M]; if ( pDevice->aulPktNum[RATE_54M] != 0 ) { @@ -1382,16 +1380,12 @@ ULONG ulMaxPacket; return ulSQ3; } - - -static -ULONG -s_ulGetRatio (PSDevice pDevice) +static unsigned long s_ulGetRatio(PSDevice pDevice) { -int ii,jj; -ULONG ulRatio = 0; -ULONG ulMaxPacket; -ULONG ulPacketNum; + int ii, jj; + unsigned long ulRatio = 0; + unsigned long ulMaxPacket; + unsigned long ulPacketNum; //This is a thousand-ratio ulMaxPacket = pDevice->aulPktNum[RATE_54M]; diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h index d59992c17ec8..bc4633d5fead 100644 --- a/drivers/staging/vt6656/baseband.h +++ b/drivers/staging/vt6656/baseband.h @@ -96,18 +96,18 @@ /*--------------------- Export Functions --------------------------*/ -UINT +unsigned int BBuGetFrameTime( BYTE byPreambleType, BYTE byFreqType, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wRate ); void BBvCaculateParameter ( PSDevice pDevice, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wRate, BYTE byPacketType, PWORD pwPhyLen, diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c index a10c46339add..36ed61b595ca 100644 --- a/drivers/staging/vt6656/bssdb.c +++ b/drivers/staging/vt6656/bssdb.c @@ -129,8 +129,8 @@ PKnownBSS BSSpSearchBSSList(void *hDeviceContext, PKnownBSS pCurrBSS = NULL; PKnownBSS pSelect = NULL; BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; - UINT ii = 0; - UINT jj = 0; //DavidWang + unsigned int ii = 0; + unsigned int jj = 0; if (pbyDesireBSSID != NULL) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList BSSID[%02X %02X %02X-%02X %02X %02X]\n", *pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2), @@ -291,7 +291,7 @@ void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID) { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT ii; + unsigned int ii; for (ii = 0; ii < MAX_BSS_NUM; ii++) { if (bKeepCurrBSSID) { @@ -336,7 +336,7 @@ PKnownBSS BSSpAddrIsInBSSList(void *hDeviceContext, PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PKnownBSS pBSSList = NULL; - UINT ii; + unsigned int ii; for (ii = 0; ii < MAX_BSS_NUM; ii++) { pBSSList = &(pMgmt->sBSSList[ii]); @@ -381,7 +381,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, PWLAN_IE_RSN_EXT pRSNWPA, PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_QUIET pIE_Quiet, - UINT uIELength, + unsigned int uIELength, PBYTE pbyIEs, void *pRxPacketContext) { @@ -390,7 +390,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext; PKnownBSS pBSSList = NULL; - UINT ii; + unsigned int ii; BOOL bParsingQuiet = FALSE; @@ -465,24 +465,27 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, WPA_ClearRSN(pBSSList); if (pRSNWPA != NULL) { - UINT uLen = pRSNWPA->len + 2; + unsigned int uLen = pRSNWPA->len + 2; - if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSNWPA - pbyIEs))) { - pBSSList->wWPALen = uLen; - memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); - WPA_ParseRSN(pBSSList, pRSNWPA); - } + if (uLen <= (uIELength - + (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) { + pBSSList->wWPALen = uLen; + memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); + WPA_ParseRSN(pBSSList, pRSNWPA); + } } WPA2_ClearRSN(pBSSList); if (pRSN != NULL) { - UINT uLen = pRSN->len + 2; - if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSN - pbyIEs))) { - pBSSList->wRSNLen = uLen; - memcpy(pBSSList->byRSNIE, pRSN, uLen); - WPA2vParseRSN(pBSSList, pRSN); - } + unsigned int uLen = pRSN->len + 2; + + if (uLen <= (uIELength - + (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) { + pBSSList->wRSNLen = uLen; + memcpy(pBSSList->byRSNIE, pRSN, uLen); + WPA2vParseRSN(pBSSList, pRSN); + } } if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) { @@ -600,7 +603,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_QUIET pIE_Quiet, PKnownBSS pBSSList, - UINT uIELength, + unsigned int uIELength, PBYTE pbyIEs, void *pRxPacketContext) { @@ -667,24 +670,26 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, WPA_ClearRSN(pBSSList); //mike update - if (pRSNWPA != NULL) { - UINT uLen = pRSNWPA->len + 2; - if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSNWPA - pbyIEs))) { - pBSSList->wWPALen = uLen; - memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); - WPA_ParseRSN(pBSSList, pRSNWPA); - } - } + if (pRSNWPA != NULL) { + unsigned int uLen = pRSNWPA->len + 2; + if (uLen <= (uIELength - + (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) { + pBSSList->wWPALen = uLen; + memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); + WPA_ParseRSN(pBSSList, pRSNWPA); + } + } WPA2_ClearRSN(pBSSList); //mike update if (pRSN != NULL) { - UINT uLen = pRSN->len + 2; - if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSN - pbyIEs))) { - pBSSList->wRSNLen = uLen; - memcpy(pBSSList->byRSNIE, pRSN, uLen); - WPA2vParseRSN(pBSSList, pRSN); - } + unsigned int uLen = pRSN->len + 2; + if (uLen <= (uIELength - + (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) { + pBSSList->wRSNLen = uLen; + memcpy(pBSSList->byRSNIE, pRSN, uLen); + WPA2vParseRSN(pBSSList, pRSN); + } } if (pRxPacket->uRSSI != 0) { @@ -754,7 +759,7 @@ BOOL BSSbIsSTAInNodeDB(void *hDeviceContext, { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT ii; + unsigned int ii; // Index = 0 reserved for AP Node for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) { @@ -786,9 +791,9 @@ void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex) PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT ii; - UINT BigestCount = 0; - UINT SelectIndex; + unsigned int ii; + unsigned int BigestCount = 0; + unsigned int SelectIndex; struct sk_buff *skb; // Index = 0 reserved for AP Node (In STA mode) // Index = 0 reserved for Broadcast/MultiCast (In AP mode) @@ -843,7 +848,7 @@ void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex) * -*/ -void BSSvRemoveOneNode(void *hDeviceContext, UINT uNodeIndex) +void BSSvRemoveOneNode(void *hDeviceContext, unsigned int uNodeIndex) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -879,7 +884,7 @@ void BSSvUpdateAPNode(void *hDeviceContext, { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uRateLen = WLAN_RATES_MAXLEN; + unsigned int uRateLen = WLAN_RATES_MAXLEN; memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); @@ -967,11 +972,11 @@ void BSSvSecondCallBack(void *hDeviceContext) { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT ii; + unsigned int ii; PWLAN_IE_SSID pItemSSID, pCurrSSID; - UINT uSleepySTACnt = 0; - UINT uNonShortSlotSTACnt = 0; - UINT uLongPreambleSTACnt = 0; + unsigned int uSleepySTACnt = 0; + unsigned int uNonShortSlotSTACnt = 0; + unsigned int uLongPreambleSTACnt = 0; viawget_wpa_header *wpahdr; //DavidWang spin_lock_irq(&pDevice->lock); @@ -1360,12 +1365,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex = 0; + unsigned int uNodeIndex = 0; BYTE byTxRetry; WORD wRate; WORD wFallBackRate = RATE_1M; BYTE byFallBack; - UINT ii; + unsigned int ii; PBYTE pbyDestAddr; BYTE byPktNum; WORD wFIFOCtl; @@ -1516,12 +1521,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, -*/ void BSSvClearNodeDBTable(void *hDeviceContext, - UINT uStartIndex) + unsigned int uStartIndex) { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); struct sk_buff *skb; - UINT ii; + unsigned int ii; for (ii = uStartIndex; ii < (MAX_NODE_NUM + 1); ii++) { if (pMgmt->sNodeDBTable[ii].bActive) { @@ -1586,9 +1591,9 @@ void s_vCheckSensitivity(void *hDeviceContext) void s_uCalculateLinkQual(void *hDeviceContext) { PSDevice pDevice = (PSDevice)hDeviceContext; - ULONG TxOkRatio, TxCnt; - ULONG RxOkRatio,RxCnt; - ULONG RssiRatio; + unsigned long TxOkRatio, TxCnt; + unsigned long RxOkRatio, RxCnt; + unsigned long RssiRatio; long ldBm; TxCnt = pDevice->scStatistic.TxNoRetryOkCount + @@ -1633,7 +1638,7 @@ void BSSvClearAnyBSSJoinRecord(void *hDeviceContext) { PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT ii; + unsigned int ii; for (ii = 0; ii < MAX_BSS_NUM; ii++) { pMgmt->sBSSList[ii].bSelected = FALSE; diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h index 0158b0bdf1a0..9686d8600d63 100644 --- a/drivers/staging/vt6656/bssdb.h +++ b/drivers/staging/vt6656/bssdb.h @@ -97,10 +97,10 @@ typedef struct tagKnownBSS { // BSS info BOOL bActive; BYTE abyBSSID[WLAN_BSSID_LEN]; - UINT uChannel; + unsigned int uChannel; BYTE abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; - UINT uRSSI; + unsigned int uRSSI; BYTE bySQ; WORD wBeaconInterval; WORD wCapInfo; @@ -141,9 +141,9 @@ typedef struct tagKnownBSS { WORD wRSNLen; // Clear count - UINT uClearCount; + unsigned int uClearCount; // BYTE abyIEs[WLAN_BEACON_FR_MAXLEN]; - UINT uIELength; + unsigned int uIELength; QWORD qwBSSTimestamp; QWORD qwLocalTSF; // local TSF timer @@ -178,7 +178,7 @@ typedef struct tagKnownNodeDB { BOOL bShortPreamble; BOOL bERPExist; BOOL bShortSlotTime; - UINT uInActiveCount; + 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; @@ -194,35 +194,35 @@ typedef struct tagKnownNodeDB { BOOL bPSEnable; BOOL bRxPSPoll; BYTE byAuthSequence; - ULONG ulLastRxJiffer; + unsigned long ulLastRxJiffer; BYTE bySuppRate; DWORD dwFlags; WORD wEnQueueCnt; BOOL bOnFly; - ULONGLONG KeyRSC; + unsigned long long KeyRSC; BYTE byKeyIndex; DWORD dwKeyIndex; BYTE byCipherSuite; DWORD dwTSC47_16; WORD wTSC15_0; - UINT uWepKeyLength; + unsigned int uWepKeyLength; BYTE abyWepKey[WLAN_WEPMAX_KEYLEN]; // // Auto rate fallback vars BOOL bIsInFallback; - UINT uAverageRSSI; - UINT uRateRecoveryTimeout; - UINT uRatePollTimeout; - UINT uTxFailures; - UINT uTxAttempts; + unsigned int uAverageRSSI; + unsigned int uRateRecoveryTimeout; + unsigned int uRatePollTimeout; + unsigned int uTxFailures; + unsigned int uTxAttempts; - UINT uTxRetry; - UINT uFailureRatio; - UINT uRetryRatio; - UINT uTxOk[MAX_RATE+1]; - UINT uTxFail[MAX_RATE+1]; - UINT uTimeCount; + unsigned int uTxRetry; + unsigned int uFailureRatio; + unsigned int uRetryRatio; + unsigned int uTxOk[MAX_RATE+1]; + unsigned int uTxFail[MAX_RATE+1]; + unsigned int uTimeCount; } KnownNodeDB, *PKnownNodeDB; @@ -253,7 +253,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, PWLAN_IE_RSN_EXT pRSNWPA, PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_QUIET pIE_Quiet, - UINT uIELength, + unsigned int uIELength, PBYTE pbyIEs, void *pRxPacketContext); @@ -272,7 +272,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_QUIET pIE_Quiet, PKnownBSS pBSSList, - UINT uIELength, + unsigned int uIELength, PBYTE pbyIEs, void *pRxPacketContext); @@ -295,12 +295,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, BYTE byPktNO); void BSSvRemoveOneNode(void *hDeviceContext, - UINT uNodeIndex); + unsigned int uNodeIndex); void BSSvAddMulticastNode(void *hDeviceContext); void BSSvClearNodeDBTable(void *hDeviceContext, - UINT uStartIndex); + unsigned int uStartIndex); void BSSvClearAnyBSSJoinRecord(void *hDeviceContext); diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 6baf8696254b..fe4ec913ffea 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -95,7 +95,7 @@ const WORD cwRXBCNTSFOff[MAX_RATE] = * Return Value: TRUE if succeeded; FALSE if failed. * */ -BOOL CARDbSetMediaChannel(void *pDeviceHandler, UINT uConnectionChannel) +BOOL CARDbSetMediaChannel(void *pDeviceHandler, unsigned int uConnectionChannel) { PSDevice pDevice = (PSDevice) pDeviceHandler; BOOL bResult = TRUE; @@ -159,7 +159,7 @@ BOOL bResult = TRUE; static WORD swGetCCKControlRate(void *pDeviceHandler, WORD wRateIdx) { PSDevice pDevice = (PSDevice) pDeviceHandler; - UINT ui = (UINT)wRateIdx; + unsigned int ui = (unsigned int)wRateIdx; while (ui > RATE_1M) { if (pDevice->wBasicRate & ((WORD)1 << ui)) { return (WORD)ui; @@ -185,7 +185,7 @@ static WORD swGetCCKControlRate(void *pDeviceHandler, WORD wRateIdx) static WORD swGetOFDMControlRate(void *pDeviceHandler, WORD wRateIdx) { PSDevice pDevice = (PSDevice) pDeviceHandler; - UINT ui = (UINT)wRateIdx; + unsigned int ui = (unsigned int)wRateIdx; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BASIC RATE: %X\n", pDevice->wBasicRate); @@ -508,7 +508,7 @@ void vUpdateIFS(void *pDeviceHandler) else {// PK_TYPE_11GA & PK_TYPE_11GB BYTE byRate = 0; BOOL bOFDMRate = FALSE; - UINT ii = 0; + unsigned int ii = 0; PWLAN_IE_SUPP_RATES pItemRates = NULL; pDevice->uSIFS = C_SIFS_BG; @@ -806,9 +806,9 @@ BOOL CARDbClearCurrentTSF(void *pDeviceHandler) QWORD CARDqGetNextTBTT (QWORD qwTSF, WORD wBeaconInterval) { - UINT uLowNextTBTT; - UINT uHighRemain, uLowRemain; - UINT uBeaconInterval; + unsigned int uLowNextTBTT; + unsigned int uHighRemain, uLowRemain; + unsigned int uBeaconInterval; uBeaconInterval = wBeaconInterval * 1024; // Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h index 963c8ad3d2ee..6c91343d0d14 100644 --- a/drivers/staging/vt6656/card.h +++ b/drivers/staging/vt6656/card.h @@ -60,7 +60,8 @@ typedef enum _CARD_OP_MODE { /*--------------------- Export Functions --------------------------*/ -BOOL CARDbSetMediaChannel(void *pDeviceHandler, UINT uConnectionChannel); +BOOL CARDbSetMediaChannel(void *pDeviceHandler, + unsigned int uConnectionChannel); void CARDvSetRSPINF(void *pDeviceHandler, BYTE byBBType); void vUpdateIFS(void *pDeviceHandler); void CARDvUpdateBasicTopRate(void *pDeviceHandler); diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c index c9b8b19a1f7b..f49b6e133394 100644 --- a/drivers/staging/vt6656/channel.c +++ b/drivers/staging/vt6656/channel.c @@ -389,7 +389,7 @@ static struct // 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56) ************************************************************************/ BOOL -ChannelValid(UINT CountryCode, UINT ChannelIndex) +ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex) { BOOL bValid; @@ -425,7 +425,7 @@ exit: ************************************************************************/ BOOL CHvChannelGetList ( - UINT uCountryCodeIdx, + unsigned int uCountryCodeIdx, PBYTE pbyChannelTable ) { @@ -441,7 +441,7 @@ void CHvInitChannelTable(void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; BOOL bMultiBand = FALSE; - UINT ii; + unsigned int ii; for(ii=1;ii<=CB_MAX_CHANNEL;ii++) { sChannelTbl[ii].bValid = FALSE; diff --git a/drivers/staging/vt6656/channel.h b/drivers/staging/vt6656/channel.h index 26d12a0c6db8..91c2ffc6f1f0 100644 --- a/drivers/staging/vt6656/channel.h +++ b/drivers/staging/vt6656/channel.h @@ -37,20 +37,20 @@ /*--------------------- Export Classes ----------------------------*/ typedef struct tagSChannelTblElement { BYTE byChannelNumber; - UINT uFrequency; + unsigned int uFrequency; BOOL bValid; }SChannelTblElement, *PSChannelTblElement; /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -BOOL ChannelValid(UINT CountryCode, UINT ChannelNum); +BOOL ChannelValid(unsigned int CountryCode, unsigned int ChannelNum); void CHvInitChannelTable(void *pDeviceHandler); BYTE CHbyGetChannelMapping(BYTE byChannelNumber); BOOL CHvChannelGetList ( - UINT uCountryCodeIdx, + unsigned int uCountryCodeIdx, PBYTE pbyChannelTable ); diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c index 4d2880b8d839..2e183ddbfd0e 100644 --- a/drivers/staging/vt6656/datarate.c +++ b/drivers/staging/vt6656/datarate.c @@ -201,11 +201,11 @@ void RATEvParseMaxRate( ) { PSDevice pDevice = (PSDevice) pDeviceHandler; -UINT ii; +unsigned int ii; BYTE byHighSuppRate = 0; BYTE byRate = 0; WORD wOldBasicRate = pDevice->wBasicRate; -UINT uRateLen; +unsigned int uRateLen; if (pItemRates == NULL) @@ -241,7 +241,7 @@ UINT uRateLen; if ((pItemExtRates != NULL) && (pItemExtRates->byElementID == WLAN_EID_EXTSUPP_RATES) && (pDevice->byBBType != BB_TYPE_11B)) { - UINT uExtRateLen = pItemExtRates->len; + unsigned int uExtRateLen = pItemExtRates->len; if (uExtRateLen > WLAN_RATES_MAXLEN) uExtRateLen = WLAN_RATES_MAXLEN; @@ -311,7 +311,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); #if 1 //mike fixed old: use packet lose ratio algorithm to control rate WORD wIdxDownRate = 0; -UINT ii; +unsigned int ii; BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; DWORD dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; DWORD dwThroughput = 0; @@ -392,7 +392,7 @@ DWORD dwTxDiff = 0; #else //mike fixed new: use differ-signal strength to control rate WORD wIdxUpRate = 0; BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; -UINT ii; +unsigned int ii; long ldBm; if (pMgmt->eScanState != WMAC_NO_SCANNING) { @@ -468,10 +468,10 @@ BYTE RATEuSetIE ( PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pDstRates, - UINT uRateLen + unsigned int uRateLen ) { - UINT ii, uu, uRateCnt = 0; + unsigned int ii, uu, uRateCnt = 0; if ((pSrcRates == NULL) || (pDstRates == NULL)) return 0; diff --git a/drivers/staging/vt6656/datarate.h b/drivers/staging/vt6656/datarate.h index 7d73a3a53bea..c6f5163ff9b8 100644 --- a/drivers/staging/vt6656/datarate.h +++ b/drivers/staging/vt6656/datarate.h @@ -92,7 +92,7 @@ BYTE RATEuSetIE( PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pDstRates, - UINT uRateLen + unsigned int uRateLen ); WORD diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index eb45ee597644..ef9fd97d3ca7 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -225,12 +225,12 @@ typedef struct _USB_SEND_CONTEXT { void *pDevice; struct sk_buff *pPacket; struct urb *pUrb; - UINT uBufLen; + unsigned int uBufLen; CONTEXT_TYPE Type; SEthernetHeader sEthHeader; void *Next; BOOL bBoolInUse; - UCHAR Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS]; + unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS]; } USB_SEND_CONTEXT, *PUSB_SEND_CONTEXT; @@ -248,7 +248,7 @@ typedef struct _DEFAULT_CONFIG { // Structure to keep track of usb interrupt packets // typedef struct { - UINT uDataLen; + unsigned int uDataLen; PBYTE pDataBuf; // struct urb *pUrb; BOOL bInUse; @@ -295,7 +295,7 @@ typedef enum __DEVICE_NDIS_STATUS { #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01 // PMKID Structures -typedef UCHAR NDIS_802_11_PMKID_VALUE[16]; +typedef unsigned char NDIS_802_11_PMKID_VALUE[16]; typedef enum _NDIS_802_11_WEP_STATUS @@ -327,7 +327,7 @@ typedef enum _NDIS_802_11_STATUS_TYPE //Added new types for PMKID Candidate lists. typedef struct _PMKID_CANDIDATE { NDIS_802_11_MAC_ADDRESS BSSID; - ULONG Flags; + unsigned long Flags; } PMKID_CANDIDATE, *PPMKID_CANDIDATE; @@ -338,15 +338,15 @@ typedef struct _BSSID_INFO } BSSID_INFO, *PBSSID_INFO; typedef struct tagSPMKID { - ULONG Length; - ULONG BSSIDInfoCount; + unsigned long Length; + unsigned long BSSIDInfoCount; BSSID_INFO BSSIDInfo[MAX_BSSIDINFO_4_PMKID]; } SPMKID, *PSPMKID; typedef struct tagSPMKIDCandidateEvent { NDIS_802_11_STATUS_TYPE StatusType; - ULONG Version; // Version of the structure - ULONG NumCandidates; // No. of pmkid candidates + unsigned long Version; /* Version of the structure */ + unsigned long NumCandidates; /* No. of pmkid candidates */ PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST]; } SPMKIDCandidateEvent, *PSPMKIDCandidateEvent; @@ -376,7 +376,7 @@ typedef struct tagSCache{ /* The receive cache is updated circularly. The next entry to be written is * indexed by the "InPtr". */ - UINT uInPtr; // Place to use next + unsigned int uInPtr; /* Place to use next */ SCacheEntry asCacheEntry[DUPLICATE_RX_CACHE_LENGTH]; } SCache, *PSCache; @@ -387,10 +387,10 @@ typedef struct tagSDeFragControlBlock WORD wSequence; WORD wFragNum; BYTE abyAddr2[ETH_ALEN]; - UINT uLifetime; + unsigned int uLifetime; struct sk_buff* skb; PBYTE pbyRxBuffer; - UINT cbFrameLength; + unsigned int cbFrameLength; BOOL bInUse; } SDeFragControlBlock, *PSDeFragControlBlock; @@ -463,14 +463,14 @@ typedef struct __device_info { BYTE byRevId; u32 flags; - ULONG Flags; + unsigned long Flags; SCache sDupRxCache; SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG]; - UINT cbDFCB; - UINT cbFreeDFCB; - UINT uCurrentDFCBIdx; + unsigned int cbDFCB; + unsigned int cbFreeDFCB; + unsigned int uCurrentDFCBIdx; // +++USB @@ -478,29 +478,29 @@ typedef struct __device_info { struct urb *pInterruptURB; struct usb_ctrlrequest sUsbCtlRequest; - UINT int_interval; + unsigned int int_interval; // // Variables to track resources for the BULK In Pipe // PRCB pRCBMem; PRCB apRCB[CB_MAX_RX_DESC]; - UINT cbRD; + unsigned int cbRD; PRCB FirstRecvFreeList; PRCB LastRecvFreeList; - UINT NumRecvFreeList; + unsigned int NumRecvFreeList; PRCB FirstRecvMngList; PRCB LastRecvMngList; - UINT NumRecvMngList; + unsigned int NumRecvMngList; BOOL bIsRxWorkItemQueued; BOOL bIsRxMngWorkItemQueued; - ULONG ulRcvRefCount; // number of packets that have not been returned back + unsigned long ulRcvRefCount; /* packets that have not returned back */ // // Variables to track resources for the BULK Out Pipe // PUSB_SEND_CONTEXT apTD[CB_MAX_TX_DESC]; - UINT cbTD; + unsigned int cbTD; // // Variables to track resources for the Interript In Pipe @@ -517,20 +517,20 @@ typedef struct __device_info { // // Statistic for USB // protect with spinlock - ULONG ulBulkInPosted; - ULONG ulBulkInError; - ULONG ulBulkInContCRCError; - ULONG ulBulkInBytesRead; + unsigned long ulBulkInPosted; + unsigned long ulBulkInError; + unsigned long ulBulkInContCRCError; + unsigned long ulBulkInBytesRead; - ULONG ulBulkOutPosted; - ULONG ulBulkOutError; - ULONG ulBulkOutContCRCError; - ULONG ulBulkOutBytesWrite; + unsigned long ulBulkOutPosted; + unsigned long ulBulkOutError; + unsigned long ulBulkOutContCRCError; + unsigned long ulBulkOutBytesWrite; - ULONG ulIntInPosted; - ULONG ulIntInError; - ULONG ulIntInContCRCError; - ULONG ulIntInBytesRead; + unsigned long ulIntInPosted; + unsigned long ulIntInError; + unsigned long ulIntInContCRCError; + unsigned long ulIntInBytesRead; // Version control @@ -560,24 +560,24 @@ typedef struct __device_info { // // Maintain statistical debug info. // - ULONG packetsReceived; - ULONG packetsReceivedDropped; - ULONG packetsReceivedOverflow; - ULONG packetsSent; - ULONG packetsSentDropped; - ULONG SendContextsInUse; - ULONG RcvBuffersInUse; + unsigned long packetsReceived; + unsigned long packetsReceivedDropped; + unsigned long packetsReceivedOverflow; + unsigned long packetsSent; + unsigned long packetsSentDropped; + unsigned long SendContextsInUse; + unsigned long RcvBuffersInUse; // 802.11 management SMgmtObject sMgmtObj; QWORD qwCurrTSF; - UINT cbBulkInMax; + unsigned int cbBulkInMax; BOOL bPSRxBeacon; // 802.11 MAC specific - UINT uCurrRSSI; + unsigned int uCurrRSSI; BYTE byCurrSQ; @@ -598,30 +598,31 @@ typedef struct __device_info { BOOL bDiversityRegCtlON; BOOL bDiversityEnable; - ULONG ulDiversityNValue; - ULONG ulDiversityMValue; + unsigned long ulDiversityNValue; + unsigned long ulDiversityMValue; BYTE byTMax; BYTE byTMax2; BYTE byTMax3; - ULONG ulSQ3TH; + unsigned long ulSQ3TH; - ULONG uDiversityCnt; + unsigned long uDiversityCnt; BYTE byAntennaState; - ULONG ulRatio_State0; - ULONG ulRatio_State1; - ULONG ulSQ3_State0; - ULONG ulSQ3_State1; + unsigned long ulRatio_State0; + unsigned long ulRatio_State1; + unsigned long ulSQ3_State0; + unsigned long ulSQ3_State1; - ULONG aulSQ3Val[MAX_RATE]; - ULONG aulPktNum[MAX_RATE]; + unsigned long aulSQ3Val[MAX_RATE]; + unsigned long aulPktNum[MAX_RATE]; + + /* IFS & Cw */ + unsigned int uSIFS; /* Current SIFS */ + unsigned int uDIFS; /* Current DIFS */ + unsigned int uEIFS; /* Current EIFS */ + unsigned int uSlot; /* Current SlotTime */ + unsigned int uCwMin; /* Current CwMin */ + unsigned int uCwMax; /* CwMax is fixed on 1023 */ - // IFS & Cw - UINT uSIFS; //Current SIFS - UINT uDIFS; //Current DIFS - UINT uEIFS; //Current EIFS - UINT uSlot; //Current SlotTime - UINT uCwMin; //Current CwMin - UINT uCwMax; //CwMax is fixed on 1023. // PHY parameter BYTE bySIFS; BYTE byDIFS; @@ -646,7 +647,7 @@ typedef struct __device_info { BYTE byMinChannel; BYTE byMaxChannel; - UINT uConnectionRate; + unsigned int uConnectionRate; BYTE byPreambleType; BYTE byShortPreamble; @@ -700,7 +701,7 @@ typedef struct __device_info { WORD wListenInterval; BOOL bPWBitOn; WMAC_POWER_MODE ePSMode; - ULONG ulPSModeWaitTx; + unsigned long ulPSModeWaitTx; BOOL bPSModeTxBurst; // Beacon releated @@ -709,7 +710,7 @@ typedef struct __device_info { BOOL bBeaconSent; BOOL bFixRate; BYTE byCurrentCh; - UINT uScanTime; + unsigned int uScanTime; CMD_STATE eCommandState; @@ -720,15 +721,15 @@ typedef struct __device_info { BOOL bStopBeacon; BOOL bStopDataPkt; BOOL bStopTx0Pkt; - UINT uAutoReConnectTime; - UINT uIsroamingTime; + unsigned int uAutoReConnectTime; + unsigned int uIsroamingTime; // 802.11 counter CMD_ITEM eCmdQueue[CMD_Q_SIZE]; - UINT uCmdDequeueIdx; - UINT uCmdEnqueueIdx; - UINT cbFreeCmdQueue; + unsigned int uCmdDequeueIdx; + unsigned int uCmdEnqueueIdx; + unsigned int cbFreeCmdQueue; BOOL bCmdRunning; BOOL bCmdClear; BOOL bNeedRadioOFF; @@ -740,7 +741,7 @@ typedef struct __device_info { BYTE bSameBSSCurNum; //DavidWang BOOL bRoaming; BOOL b11hEable; - ULONG ulTxPower; + unsigned long ulTxPower; // Encryption NDIS_802_11_WEP_STATUS eEncryptionStatus; @@ -761,11 +762,11 @@ typedef struct __device_info { BOOL bAES; BYTE byCntMeasure; - UINT uKeyLength; + unsigned int uKeyLength; BYTE abyKey[WLAN_WEP232_KEYLEN]; // for AP mode - UINT uAssocCount; + unsigned int uAssocCount; BOOL bMoreData; // QoS @@ -780,7 +781,7 @@ typedef struct __device_info { // For Update BaseBand VGA Gain Offset BOOL bUpdateBBVGA; - UINT uBBVGADiffCount; + unsigned int uBBVGADiffCount; BYTE byBBVGANew; BYTE byBBVGACurrent; BYTE abyBBVGA[BB_VGA_LEVEL]; @@ -812,7 +813,7 @@ typedef struct __device_info { //2007-0115-01by MikeLiu #ifdef TxInSleep struct timer_list sTimerTxData; - ULONG nTxDataTimeCout; + unsigned long nTxDataTimeCout; BOOL fTxDataInSleep; BOOL IsTxDataTrigger; #endif @@ -863,7 +864,7 @@ typedef struct __device_info { struct net_device *apdev; int (*tx_80211)(struct sk_buff *skb, struct net_device *dev); #endif - UINT uChannel; + unsigned int uChannel; struct iw_statistics wstats; // wireless stats BOOL bCommit; @@ -928,7 +929,9 @@ typedef struct __device_info { /*--------------------- Export Functions --------------------------*/ -//BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex); +/* BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, + * unsigned int uNodeIndex); + */ BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF); #endif diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index d9a02ba40d84..9afe76cacef5 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -89,7 +89,7 @@ void s_vProcessRxMACHeader ( PSDevice pDevice, PBYTE pbyRxBufferAddr, - UINT cbPacketSize, + unsigned int cbPacketSize, BOOL bIsWEP, BOOL bExtIV, PUINT pcbHeadSize @@ -106,8 +106,8 @@ static BOOL s_bAPModeRxCtl( static BOOL s_bAPModeRxData ( PSDevice pDevice, struct sk_buff *skb, - UINT FrameSize, - UINT cbHeaderOffset, + unsigned int FrameSize, + unsigned int cbHeaderOffset, signed int iSANodeIndex, signed int iDANodeIndex ); @@ -116,7 +116,7 @@ static BOOL s_bAPModeRxData ( static BOOL s_bHandleRxEncryption( PSDevice pDevice, PBYTE pbyFrame, - UINT FrameSize, + unsigned int FrameSize, PBYTE pbyRsr, PBYTE pbyNewRsr, PSKeyItem * pKeyOut, @@ -129,7 +129,7 @@ static BOOL s_bHostWepRxEncryption( PSDevice pDevice, PBYTE pbyFrame, - UINT FrameSize, + unsigned int FrameSize, PBYTE pbyRsr, BOOL bOnFly, PSKeyItem pKey, @@ -164,14 +164,14 @@ void s_vProcessRxMACHeader ( PSDevice pDevice, PBYTE pbyRxBufferAddr, - UINT cbPacketSize, + unsigned int cbPacketSize, BOOL bIsWEP, BOOL bExtIV, PUINT pcbHeadSize ) { PBYTE pbyRxBuffer; - UINT cbHeaderSize = 0; + unsigned int cbHeaderSize = 0; PWORD pwType; PS802_11Header pMACHeader; int ii; @@ -266,7 +266,7 @@ s_vGetDASA ( PSEthernetHeader psEthHeader ) { - UINT cbHeaderSize = 0; + unsigned int cbHeaderSize = 0; PS802_11Header pMACHeader; int ii; @@ -318,7 +318,7 @@ BOOL RXbBulkInProcessData ( PSDevice pDevice, PRCB pRCB, - ULONG BytesToIndicate + unsigned long BytesToIndicate ) { @@ -333,20 +333,20 @@ RXbBulkInProcessData ( PQWORD pqwTSFTime; PBYTE pbyFrame; BOOL bDeFragRx = FALSE; - UINT cbHeaderOffset; - UINT FrameSize; + unsigned int cbHeaderOffset; + unsigned int FrameSize; WORD wEtherType = 0; signed int iSANodeIndex = -1; signed int iDANodeIndex = -1; - UINT ii; - UINT cbIVOffset; + unsigned int ii; + unsigned int cbIVOffset; PBYTE pbyRxSts; PBYTE pbyRxRate; PBYTE pbySQ; #ifdef Calcu_LinkQual PBYTE pby3SQ; #endif - UINT cbHeaderSize; + unsigned int cbHeaderSize; PSKeyItem pKey = NULL; WORD wRxTSC15_0 = 0; DWORD dwRxTSC47_16 = 0; @@ -372,7 +372,7 @@ RXbBulkInProcessData ( //[31:16]RcvByteCount ( not include 4-byte Status ) dwWbkStatus = *( (PDWORD)(skb->data) ); - FrameSize = (UINT)(dwWbkStatus >> 16); + FrameSize = (unsigned int)(dwWbkStatus >> 16); FrameSize += 4; if (BytesToIndicate != FrameSize) { @@ -934,9 +934,9 @@ RXbBulkInProcessData ( if (bIsWEP) { WORD wLocalTSC15_0 = 0; DWORD dwLocalTSC47_16 = 0; - ULONGLONG RSC = 0; + unsigned long long RSC = 0; // endian issues - RSC = *((ULONGLONG *) &(pKey->KeyRSC)); + RSC = *((unsigned long long *) &(pKey->KeyRSC)); wLocalTSC15_0 = (WORD) RSC; dwLocalTSC47_16 = (DWORD) (RSC>>16); @@ -1151,7 +1151,7 @@ static BOOL s_bAPModeRxCtl ( static BOOL s_bHandleRxEncryption ( PSDevice pDevice, PBYTE pbyFrame, - UINT FrameSize, + unsigned int FrameSize, PBYTE pbyRsr, PBYTE pbyNewRsr, PSKeyItem * pKeyOut, @@ -1160,7 +1160,7 @@ static BOOL s_bHandleRxEncryption ( PDWORD pdwRxTSC47_16 ) { - UINT PayloadLen = FrameSize; + unsigned int PayloadLen = FrameSize; PBYTE pbyIV; BYTE byKeyIdx; PSKeyItem pKey = NULL; @@ -1297,7 +1297,7 @@ static BOOL s_bHandleRxEncryption ( static BOOL s_bHostWepRxEncryption ( PSDevice pDevice, PBYTE pbyFrame, - UINT FrameSize, + unsigned int FrameSize, PBYTE pbyRsr, BOOL bOnFly, PSKeyItem pKey, @@ -1308,7 +1308,7 @@ static BOOL s_bHostWepRxEncryption ( ) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT PayloadLen = FrameSize; + unsigned int PayloadLen = FrameSize; PBYTE pbyIV; BYTE byKeyIdx; BYTE byDecMode = KEY_CTL_WEP; @@ -1429,8 +1429,8 @@ static BOOL s_bHostWepRxEncryption ( static BOOL s_bAPModeRxData ( PSDevice pDevice, struct sk_buff *skb, - UINT FrameSize, - UINT cbHeaderOffset, + unsigned int FrameSize, + unsigned int cbHeaderOffset, signed int iSANodeIndex, signed int iDANodeIndex ) @@ -1503,7 +1503,8 @@ static BOOL s_bAPModeRxData ( iDANodeIndex = 0; if ((pDevice->uAssocCount > 1) && (iDANodeIndex >= 0)) { - bRelayPacketSend(pDevice, (PBYTE)(skb->data + cbHeaderOffset), FrameSize, (UINT)iDANodeIndex); + bRelayPacketSend(pDevice, (PBYTE) (skb->data + cbHeaderOffset), + FrameSize, (unsigned int) iDANodeIndex); } if (bRelayOnly) diff --git a/drivers/staging/vt6656/dpc.h b/drivers/staging/vt6656/dpc.h index 7ea3ad973417..d4fca43af4fe 100644 --- a/drivers/staging/vt6656/dpc.h +++ b/drivers/staging/vt6656/dpc.h @@ -55,7 +55,7 @@ BOOL RXbBulkInProcessData( PSDevice pDevice, PRCB pRCB, - ULONG BytesToIndicate + unsigned long BytesToIndicate ); #endif /* __RXTX_H__ */ diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index 93e52a3ebd85..f70e922a615b 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -210,7 +210,7 @@ int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) static int hostap_remove_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { @@ -239,7 +239,7 @@ static int hostap_add_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (!BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { @@ -299,7 +299,7 @@ static int hostap_get_info_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { param->u.get_info_sta.inactive_sec = @@ -333,7 +333,7 @@ static int hostap_reset_txexc_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts = 0; @@ -363,13 +363,13 @@ static int hostap_set_flags_sta(PSDevice pDevice, struct viawget_hostapd_param *param) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT uNodeIndex; + unsigned int uNodeIndex; if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or; pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n", - (UINT)pMgmt->sNodeDBTable[uNodeIndex].dwFlags); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x\n", + (unsigned int) pMgmt->sNodeDBTable[uNodeIndex].dwFlags); } else { return -ENOENT; diff --git a/drivers/staging/vt6656/ioctl.c b/drivers/staging/vt6656/ioctl.c index 368e49f782fc..19a84b66b097 100644 --- a/drivers/staging/vt6656/ioctl.c +++ b/drivers/staging/vt6656/ioctl.c @@ -72,10 +72,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { SNodeList sNodeList; PSBSSIDList pList; PSNodeList pNodeList; - UINT cbListCount; + unsigned int cbListCount; PKnownBSS pBSS; PKnownNodeDB pNode; - UINT ii, jj; + unsigned int ii, jj; SCmdLinkStatus sLinkStatus; BYTE abySuppRates[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16}; BYTE abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; @@ -337,7 +337,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { pList->sBSSIDList[ii].wBeaconInterval = pBSS->wBeaconInterval; pList->sBSSIDList[ii].wCapInfo = pBSS->wCapInfo; RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm); - pList->sBSSIDList[ii].uRSSI = (UINT)ldBm; + pList->sBSSIDList[ii].uRSSI = (unsigned int) ldBm; // pList->sBSSIDList[ii].uRSSI = pBSS->uRSSI; memcpy(pList->sBSSIDList[ii].abyBSSID, pBSS->abyBSSID, WLAN_BSSID_LEN); pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID; diff --git a/drivers/staging/vt6656/ioctl.h b/drivers/staging/vt6656/ioctl.h index b307980999e9..caa4ac963d93 100644 --- a/drivers/staging/vt6656/ioctl.h +++ b/drivers/staging/vt6656/ioctl.h @@ -47,7 +47,7 @@ void vConfigWEPKey ( PSDevice pDevice, DWORD dwKeyIndex, PBYTE pbyKey, - ULONG uKeyLength + unsigned long uKeyLength ); */ diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 4d0db21b1b98..fa40522d4a9a 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -769,7 +769,7 @@ int iwctl_siwap(struct net_device *dev, //mike add: if desired AP is hidden ssid(there are two same BSSID in list), // then ignore,because you don't known which one to be connect with?? { - UINT ii , uSameBssidNum=0; + unsigned int ii, uSameBssidNum = 0; for (ii = 0; ii < MAX_BSS_NUM; ii++) { if (pMgmt->sBSSList[ii].bActive && IS_ETH_ADDRESS_EQUAL(pMgmt->sBSSList[ii].abyBSSID,pMgmt->abyDesireBSSID)) { @@ -933,7 +933,7 @@ int iwctl_siwessid(struct net_device *dev, { PKnownBSS pCurr = NULL; BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; - UINT ii , uSameBssidNum=0; + unsigned int ii, uSameBssidNum = 0; memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID)); pCurr = BSSpSearchBSSList(pDevice, @@ -1440,7 +1440,7 @@ int iwctl_giwencode(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; char abyKey[WLAN_WEP232_KEYLEN]; - UINT index = (UINT)(wrq->flags & IW_ENCODE_INDEX); + unsigned int index = (unsigned int)(wrq->flags & IW_ENCODE_INDEX); PSKeyItem pKey = NULL; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); @@ -1486,7 +1486,7 @@ int iwctl_giwencode(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); char abyKey[WLAN_WEP232_KEYLEN]; - UINT index = (UINT)(wrq->flags & IW_ENCODE_INDEX); + unsigned int index = (unsigned int)(wrq->flags & IW_ENCODE_INDEX); PSKeyItem pKey = NULL; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index 7ff420d07c18..b0890c181e7d 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -223,7 +223,7 @@ BOOL KeybSetKey( PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - ULONG uKeyLength, + unsigned long uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode @@ -231,9 +231,9 @@ BOOL KeybSetKey( { PSDevice pDevice = (PSDevice) pDeviceHandler; int i,j; - UINT ii; + unsigned int ii; PSKeyItem pKey; - UINT uKeyIdx; + unsigned int uKeyIdx; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetKey: %lX\n", dwKeyIndex); @@ -670,19 +670,19 @@ BOOL KeybSetDefaultKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - ULONG uKeyLength, + unsigned long uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode ) { PSDevice pDevice = (PSDevice) pDeviceHandler; - UINT ii; + unsigned int ii; PSKeyItem pKey; - UINT uKeyIdx; - - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetDefaultKey: %1x, %d \n", (int)dwKeyIndex, (int)uKeyLength); + unsigned int uKeyIdx; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enter KeybSetDefaultKey: %1x, %d\n", + (int) dwKeyIndex, (int) uKeyLength); if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key return (FALSE); @@ -778,7 +778,7 @@ BOOL KeybSetAllGroupKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - ULONG uKeyLength, + unsigned long uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode @@ -786,9 +786,9 @@ BOOL KeybSetAllGroupKey( { PSDevice pDevice = (PSDevice) pDeviceHandler; int i; - UINT ii; + unsigned int ii; PSKeyItem pKey; - UINT uKeyIdx; + unsigned int uKeyIdx; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex); diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index 11fc41edd094..f749c7a027d3 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -58,7 +58,7 @@ typedef struct tagSKeyItem { BOOL bKeyValid; - ULONG uKeyLength; + unsigned long uKeyLength; BYTE abyKey[MAX_KEY_LEN]; QWORD KeyRSC; DWORD dwTSC47_16; @@ -107,7 +107,7 @@ BOOL KeybSetKey( PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - ULONG uKeyLength, + unsigned long uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode @@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - ULONG uKeyLength, + unsigned long uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode @@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey( void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - ULONG uKeyLength, + unsigned long uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index 71f09663e65d..0ab3db025f33 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -70,7 +70,7 @@ static int msglevel =MSG_LEVEL_INFO; */ void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx) { - UINT uByteIdx; + unsigned int uByteIdx; BYTE byBitMask; BYTE pbyData[2]; @@ -110,7 +110,7 @@ void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx) * Return Value: none * */ -void MACvWriteMultiAddr(PSDevice pDevice, UINT uByteIdx, BYTE byData) +void MACvWriteMultiAddr(PSDevice pDevice, unsigned int uByteIdx, BYTE byData) { BYTE byData1; @@ -199,7 +199,7 @@ BYTE pbyData[4]; * Return Value: none * */ -void MACvDisableKeyEntry (PSDevice pDevice, UINT uEntryIdx) +void MACvDisableKeyEntry(PSDevice pDevice, unsigned int uEntryIdx) { WORD wOffset; BYTE byData; @@ -239,7 +239,9 @@ BYTE byData; * Return Value: none * */ -void MACvSetKeyEntry (PSDevice pDevice, WORD wKeyCtl, UINT uEntryIdx, UINT uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey) +void MACvSetKeyEntry(PSDevice pDevice, WORD wKeyCtl, + unsigned int uEntryIdx, unsigned int uKeyIdx, + PBYTE pbyAddr, PDWORD pdwKey) { PBYTE pbyKey; WORD wOffset; @@ -247,10 +249,6 @@ DWORD dwData1,dwData2; int ii; BYTE pbyData[24]; - - - - if ( pDevice->byLocalID <= MAC_REVISION_A1 ) { if ( pDevice->sMgmtObj.byCSSPK == KEY_CTL_CCMP ) return; diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h index 4e3d11b4a8be..775c70928ec7 100644 --- a/drivers/staging/vt6656/mac.h +++ b/drivers/staging/vt6656/mac.h @@ -421,12 +421,13 @@ /*--------------------- Export Functions --------------------------*/ void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx); -void MACvWriteMultiAddr(PSDevice pDevice, UINT uByteIdx, BYTE byData); +void MACvWriteMultiAddr(PSDevice pDevice, unsigned int uByteIdx, BYTE byData); BOOL MACbShutdown(PSDevice pDevice);; void MACvSetBBType(PSDevice pDevice,BYTE byType); void MACvSetMISCFifo (PSDevice pDevice, WORD wOffset, DWORD dwData); -void MACvDisableKeyEntry(PSDevice pDevice, UINT uEntryIdx); -void MACvSetKeyEntry(PSDevice pDevice, WORD wKeyCtl, UINT uEntryIdx, UINT uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey); +void MACvDisableKeyEntry(PSDevice pDevice, unsigned int uEntryIdx); +void MACvSetKeyEntry(PSDevice pDevice, WORD wKeyCtl, unsigned int uEntryIdx, + unsigned int uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey); void MACvRegBitsOff(PSDevice pDevice, BYTE byRegOfs, BYTE byBits); void MACvRegBitsOn(PSDevice pDevice, BYTE byRegOfs, BYTE byBits); diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index e4dc27dd21e7..4e465c465280 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -277,8 +277,10 @@ static void device_free_frag_bufs(PSDevice pDevice); static BOOL device_alloc_bufs(PSDevice pDevice); static int Read_config_file(PSDevice pDevice); -static UCHAR *Config_FileOperation(PSDevice pDevice); -static int Config_FileGetParameter(UCHAR *string, UCHAR *dest,UCHAR *source); +static unsigned char *Config_FileOperation(PSDevice pDevice); +static int Config_FileGetParameter(unsigned char *string, + unsigned char *dest, + unsigned char *source); //2008-0714by Mike Liu static BOOL device_release_WPADEV(PSDevice pDevice); @@ -334,17 +336,17 @@ device_set_options(PSDevice pDevice) { static void device_init_diversity_timer(PSDevice pDevice) { init_timer(&pDevice->TimerSQ3Tmax1); - pDevice->TimerSQ3Tmax1.data = (ULONG)pDevice; + pDevice->TimerSQ3Tmax1.data = (unsigned long)pDevice; pDevice->TimerSQ3Tmax1.function = (TimerFunction)TimerSQ3CallBack; pDevice->TimerSQ3Tmax1.expires = RUN_AT(HZ); init_timer(&pDevice->TimerSQ3Tmax2); - pDevice->TimerSQ3Tmax2.data = (ULONG)pDevice; + pDevice->TimerSQ3Tmax2.data = (unsigned long)pDevice; pDevice->TimerSQ3Tmax2.function = (TimerFunction)TimerSQ3CallBack; pDevice->TimerSQ3Tmax2.expires = RUN_AT(HZ); init_timer(&pDevice->TimerSQ3Tmax3); - pDevice->TimerSQ3Tmax3.data = (ULONG)pDevice; + pDevice->TimerSQ3Tmax3.data = (unsigned long)pDevice; pDevice->TimerSQ3Tmax3.function = (TimerFunction)TimerSQ3Tmax3CallBack; pDevice->TimerSQ3Tmax3.expires = RUN_AT(HZ); @@ -362,7 +364,7 @@ static BOOL device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType) u8 abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8}; BYTE byAntenna; - UINT ii; + unsigned int ii; CMD_CARD_INIT sInitCmd; NTSTATUS ntStatus = STATUS_SUCCESS; RSP_CARD_INIT sInitRsp; @@ -1336,7 +1338,7 @@ device_release_WPADEV(pDevice); static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { PSDevice pDevice=netdev_priv(dev); PBYTE pbMPDU; - UINT cbMPDULen = 0; + unsigned int cbMPDULen = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n"); @@ -1411,24 +1413,27 @@ static inline u32 ether_crc(int length, unsigned char *data) } //find out the start position of str2 from str1 -static UCHAR *kstrstr(const UCHAR *str1,const UCHAR *str2) { - int str1_len=strlen(str1); - int str2_len=strlen(str2); +static unsigned char *kstrstr(const unsigned char *str1, + const unsigned char *str2) { + int str1_len = strlen(str1); + int str2_len = strlen(str2); while (str1_len >= str2_len) { str1_len--; if(memcmp(str1,str2,str2_len)==0) - return (UCHAR *)str1; + return (unsigned char *) str1; str1++; } return NULL; } -static int Config_FileGetParameter(UCHAR *string, UCHAR *dest,UCHAR *source) +static int Config_FileGetParameter(unsigned char *string, + unsigned char *dest, + unsigned char *source) { - UCHAR buf1[100]; - UCHAR buf2[100]; - UCHAR *start_p=NULL,*end_p=NULL,*tmp_p=NULL; + unsigned char buf1[100]; + unsigned char buf2[100]; + unsigned char *start_p = NULL, *end_p = NULL, *tmp_p = NULL; int ii; memset(buf1,0,100); @@ -1480,13 +1485,14 @@ for(ii=1;;ii++) { } //if read fail,return NULL,or return data pointer; -static UCHAR *Config_FileOperation(PSDevice pDevice) { - UCHAR *config_path=CONFIG_PATH; - UCHAR *buffer=NULL; +static unsigned char *Config_FileOperation(PSDevice pDevice) +{ + unsigned char *config_path = CONFIG_PATH; + unsigned char *buffer = NULL; struct file *filp=NULL; mm_segment_t old_fs = get_fs(); //int oldfsuid=0,oldfsgid=0; - int result=0; + int result = 0; set_fs (KERNEL_DS); /* Can't do this anymore, so we rely on correct filesystem permissions: @@ -1545,9 +1551,9 @@ if(result!=0) { //return --->-1:fail; >=0:successful static int Read_config_file(PSDevice pDevice) { - int result=0; - UCHAR tmpbuffer[100]; - UCHAR *buffer=NULL; + int result = 0; + unsigned char tmpbuffer[100]; + unsigned char *buffer = NULL; //init config setting pDevice->config_file.ZoneType = -1; diff --git a/drivers/staging/vt6656/mib.c b/drivers/staging/vt6656/mib.c index efcd81c042f2..b694fc86d740 100644 --- a/drivers/staging/vt6656/mib.c +++ b/drivers/staging/vt6656/mib.c @@ -152,9 +152,10 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr * Return Value: none * */ -void STAvUpdateRDStatCounter (PSStatCounter pStatistic, - BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, BYTE byRxRate, - PBYTE pbyBuffer, UINT cbFrameLength) +void STAvUpdateRDStatCounter(PSStatCounter pStatistic, + BYTE byRSR, BYTE byNewRSR, + BYTE byRxSts, BYTE byRxRate, + PBYTE pbyBuffer, unsigned int cbFrameLength) { /* need change */ PS802_11Header pHeader = (PS802_11Header)pbyBuffer; @@ -169,15 +170,18 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, /* update counters in case of successful transmission */ if (byRSR & RSR_ADDRBROAD) { pStatistic->ullRxBroadcastFrames++; - pStatistic->ullRxBroadcastBytes += (ULONGLONG)cbFrameLength; + pStatistic->ullRxBroadcastBytes += + (unsigned long long) cbFrameLength; } else if (byRSR & RSR_ADDRMULTI) { pStatistic->ullRxMulticastFrames++; - pStatistic->ullRxMulticastBytes += (ULONGLONG)cbFrameLength; + pStatistic->ullRxMulticastBytes += + (unsigned long long) cbFrameLength; } else { pStatistic->ullRxDirectedFrames++; - pStatistic->ullRxDirectedBytes += (ULONGLONG)cbFrameLength; + pStatistic->ullRxDirectedBytes += + (unsigned long long) cbFrameLength; } } } @@ -396,7 +400,7 @@ STAvUpdateRDStatCounterEx ( BYTE byRxSts, BYTE byRxRate, PBYTE pbyBuffer, - UINT cbFrameLength + unsigned int cbFrameLength ) { STAvUpdateRDStatCounter( @@ -536,19 +540,22 @@ STAvUpdate802_11Counter( ) { //p802_11Counter->TransmittedFragmentCount - p802_11Counter->MulticastTransmittedFrameCount = (ULONGLONG) (pStatistic->dwTsrBroadcast + - pStatistic->dwTsrMulticast); - p802_11Counter->FailedCount = (ULONGLONG) (pStatistic->dwTsrErr); - p802_11Counter->RetryCount = (ULONGLONG) (pStatistic->dwTsrRetry); - p802_11Counter->MultipleRetryCount = (ULONGLONG) (pStatistic->dwTsrMoreThanOnceRetry); + p802_11Counter->MulticastTransmittedFrameCount = + (unsigned long long) (pStatistic->dwTsrBroadcast + + pStatistic->dwTsrMulticast); + p802_11Counter->FailedCount = (unsigned long long) (pStatistic->dwTsrErr); + p802_11Counter->RetryCount = (unsigned long long) (pStatistic->dwTsrRetry); + p802_11Counter->MultipleRetryCount = + (unsigned long long) (pStatistic->dwTsrMoreThanOnceRetry); //p802_11Counter->FrameDuplicateCount - p802_11Counter->RTSSuccessCount += (ULONGLONG) byRTSSuccess; - p802_11Counter->RTSFailureCount += (ULONGLONG) byRTSFail; - p802_11Counter->ACKFailureCount += (ULONGLONG) byACKFail; - p802_11Counter->FCSErrorCount += (ULONGLONG) byFCSErr; + p802_11Counter->RTSSuccessCount += (unsigned long long) byRTSSuccess; + p802_11Counter->RTSFailureCount += (unsigned long long) byRTSFail; + p802_11Counter->ACKFailureCount += (unsigned long long) byACKFail; + p802_11Counter->FCSErrorCount += (unsigned long long) byFCSErr; //p802_11Counter->ReceivedFragmentCount - p802_11Counter->MulticastReceivedFrameCount = (ULONGLONG) (pStatistic->dwRsrBroadcast + - pStatistic->dwRsrMulticast); + p802_11Counter->MulticastReceivedFrameCount = + (unsigned long long) (pStatistic->dwRsrBroadcast + + pStatistic->dwRsrMulticast); } /* diff --git a/drivers/staging/vt6656/mib.h b/drivers/staging/vt6656/mib.h index 8cc5b3f0d70e..0455ec9d327d 100644 --- a/drivers/staging/vt6656/mib.h +++ b/drivers/staging/vt6656/mib.h @@ -52,32 +52,34 @@ typedef struct tagSUSBCounter { typedef struct tagSDot11Counters { -// ULONG Length; // Length of structure - ULONGLONG TransmittedFragmentCount; - ULONGLONG MulticastTransmittedFrameCount; - ULONGLONG FailedCount; - ULONGLONG RetryCount; - ULONGLONG MultipleRetryCount; - ULONGLONG RTSSuccessCount; - ULONGLONG RTSFailureCount; - ULONGLONG ACKFailureCount; - ULONGLONG FrameDuplicateCount; - ULONGLONG ReceivedFragmentCount; - ULONGLONG MulticastReceivedFrameCount; - ULONGLONG FCSErrorCount; - ULONGLONG TKIPLocalMICFailures; - ULONGLONG TKIPRemoteMICFailures; - ULONGLONG TKIPICVErrors; - ULONGLONG TKIPCounterMeasuresInvoked; - ULONGLONG TKIPReplays; - ULONGLONG CCMPFormatErrors; - ULONGLONG CCMPReplays; - ULONGLONG CCMPDecryptErrors; - ULONGLONG FourWayHandshakeFailures; -// ULONGLONG WEPUndecryptableCount; -// ULONGLONG WEPICVErrorCount; -// ULONGLONG DecryptSuccessCount; -// ULONGLONG DecryptFailureCount; + /* unsigned long Length; // Length of structure */ + unsigned long long TransmittedFragmentCount; + unsigned long long MulticastTransmittedFrameCount; + unsigned long long FailedCount; + unsigned long long RetryCount; + unsigned long long MultipleRetryCount; + unsigned long long RTSSuccessCount; + unsigned long long RTSFailureCount; + unsigned long long ACKFailureCount; + unsigned long long FrameDuplicateCount; + unsigned long long ReceivedFragmentCount; + unsigned long long MulticastReceivedFrameCount; + unsigned long long FCSErrorCount; + unsigned long long TKIPLocalMICFailures; + unsigned long long TKIPRemoteMICFailures; + unsigned long long TKIPICVErrors; + unsigned long long TKIPCounterMeasuresInvoked; + unsigned long long TKIPReplays; + unsigned long long CCMPFormatErrors; + unsigned long long CCMPReplays; + unsigned long long CCMPDecryptErrors; + unsigned long long FourWayHandshakeFailures; + /* + * unsigned long long WEPUndecryptableCount; + * unsigned long long WEPICVErrorCount; + * unsigned long long DecryptSuccessCount; + * unsigned long long DecryptFailureCount; + */ } SDot11Counters, *PSDot11Counters; @@ -151,37 +153,37 @@ typedef struct tagSRmonCounter { // Custom counter // typedef struct tagSCustomCounters { - ULONG Length; + unsigned long Length; - ULONGLONG ullTsrAllOK; + unsigned long long ullTsrAllOK; - ULONGLONG ullRsr11M; - ULONGLONG ullRsr5M; - ULONGLONG ullRsr2M; - ULONGLONG ullRsr1M; + unsigned long long ullRsr11M; + unsigned long long ullRsr5M; + unsigned long long ullRsr2M; + unsigned long long ullRsr1M; - ULONGLONG ullRsr11MCRCOk; - ULONGLONG ullRsr5MCRCOk; - ULONGLONG ullRsr2MCRCOk; - ULONGLONG ullRsr1MCRCOk; + unsigned long long ullRsr11MCRCOk; + unsigned long long ullRsr5MCRCOk; + unsigned long long ullRsr2MCRCOk; + unsigned long long ullRsr1MCRCOk; - ULONGLONG ullRsr54M; - ULONGLONG ullRsr48M; - ULONGLONG ullRsr36M; - ULONGLONG ullRsr24M; - ULONGLONG ullRsr18M; - ULONGLONG ullRsr12M; - ULONGLONG ullRsr9M; - ULONGLONG ullRsr6M; + unsigned long long ullRsr54M; + unsigned long long ullRsr48M; + unsigned long long ullRsr36M; + unsigned long long ullRsr24M; + unsigned long long ullRsr18M; + unsigned long long ullRsr12M; + unsigned long long ullRsr9M; + unsigned long long ullRsr6M; - ULONGLONG ullRsr54MCRCOk; - ULONGLONG ullRsr48MCRCOk; - ULONGLONG ullRsr36MCRCOk; - ULONGLONG ullRsr24MCRCOk; - ULONGLONG ullRsr18MCRCOk; - ULONGLONG ullRsr12MCRCOk; - ULONGLONG ullRsr9MCRCOk; - ULONGLONG ullRsr6MCRCOk; + unsigned long long ullRsr54MCRCOk; + unsigned long long ullRsr48MCRCOk; + unsigned long long ullRsr36MCRCOk; + unsigned long long ullRsr24MCRCOk; + unsigned long long ullRsr18MCRCOk; + unsigned long long ullRsr12MCRCOk; + unsigned long long ullRsr9MCRCOk; + unsigned long long ullRsr6MCRCOk; } SCustomCounters, *PSCustomCounters; @@ -190,7 +192,7 @@ typedef struct tagSCustomCounters { // Custom counter // typedef struct tagSISRCounters { - ULONG Length; + unsigned long Length; DWORD dwIsrTx0OK; DWORD dwIsrAC0TxOK; @@ -277,15 +279,15 @@ typedef struct tagSStatCounter { DWORD dwRsrMulticast; DWORD dwRsrDirected; // 64-bit OID - ULONGLONG ullRsrOK; + unsigned long long ullRsrOK; // for some optional OIDs (64 bits) and DMI support - ULONGLONG ullRxBroadcastBytes; - ULONGLONG ullRxMulticastBytes; - ULONGLONG ullRxDirectedBytes; - ULONGLONG ullRxBroadcastFrames; - ULONGLONG ullRxMulticastFrames; - ULONGLONG ullRxDirectedFrames; + unsigned long long ullRxBroadcastBytes; + unsigned long long ullRxMulticastBytes; + unsigned long long ullRxDirectedBytes; + unsigned long long ullRxBroadcastFrames; + unsigned long long ullRxMulticastFrames; + unsigned long long ullRxDirectedFrames; DWORD dwRsrRxFragment; DWORD dwRsrRxFrmLen64; @@ -330,15 +332,15 @@ typedef struct tagSStatCounter { // 64-bit OID - ULONGLONG ullTsrOK; + unsigned long long ullTsrOK; // for some optional OIDs (64 bits) and DMI support - ULONGLONG ullTxBroadcastFrames; - ULONGLONG ullTxMulticastFrames; - ULONGLONG ullTxDirectedFrames; - ULONGLONG ullTxBroadcastBytes; - ULONGLONG ullTxMulticastBytes; - ULONGLONG ullTxDirectedBytes; + unsigned long long ullTxBroadcastFrames; + unsigned long long ullTxMulticastFrames; + unsigned long long ullTxDirectedFrames; + unsigned long long ullTxBroadcastBytes; + unsigned long long ullTxMulticastBytes; + unsigned long long ullTxDirectedBytes; // for autorate DWORD dwTxOk[MAX_RATE+1]; @@ -356,15 +358,15 @@ typedef struct tagSStatCounter { #ifdef Calcu_LinkQual //Tx count: - ULONG TxNoRetryOkCount; //success tx no retry ! - ULONG TxRetryOkCount; //success tx but retry ! - ULONG TxFailCount; //fail tx ? + unsigned long TxNoRetryOkCount; /* success tx no retry ! */ + unsigned long TxRetryOkCount; /* success tx but retry ! */ + unsigned long TxFailCount; /* fail tx ? */ //Rx count: - ULONG RxOkCnt; //success rx ! - ULONG RxFcsErrCnt; //fail rx ? + unsigned long RxOkCnt; /* success rx ! */ + unsigned long RxFcsErrCnt; /* fail rx ? */ //statistic - ULONG SignalStren; - ULONG LinkQuality; + unsigned long SignalStren; + unsigned long LinkQuality; #endif } SStatCounter, *PSStatCounter; @@ -382,13 +384,14 @@ void STAvClearAllCounter(PSStatCounter pStatistic); void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr1); void STAvUpdateRDStatCounter(PSStatCounter pStatistic, - BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, BYTE byRxRate, - PBYTE pbyBuffer, UINT cbFrameLength); + BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, + BYTE byRxRate, PBYTE pbyBuffer, + unsigned int cbFrameLength); void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic, - BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, BYTE byRxRate, - PBYTE pbyBuffer, UINT cbFrameLength); - + BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, + BYTE byRxRate, PBYTE pbyBuffer, + unsigned int cbFrameLength); void STAvUpdateTDStatCounter ( diff --git a/drivers/staging/vt6656/michael.c b/drivers/staging/vt6656/michael.c index d45333fc2420..671a8cf33e23 100644 --- a/drivers/staging/vt6656/michael.c +++ b/drivers/staging/vt6656/michael.c @@ -64,7 +64,7 @@ static void s_vAppendByte(BYTE b); /* Add a single byte to the internal static DWORD L, R; /* Current state */ static DWORD K0, K1; /* Key */ static DWORD M; /* Message accumulator (single word) */ -static UINT nBytesInM; /* # bytes in M */ +static unsigned int nBytesInM; /* # bytes in M */ /*--------------------- Export Functions --------------------------*/ @@ -73,7 +73,7 @@ static DWORD s_dwGetUINT32 (BYTE * p) // Convert from BYTE[] to DWORD in a portable way { DWORD res = 0; - UINT i; + unsigned int i; for(i=0; i<4; i++ ) res |= (*p++) << (8*i); return res; @@ -82,7 +82,7 @@ static DWORD s_dwGetUINT32 (BYTE * p) static void s_vPutUINT32(BYTE *p, DWORD val) // Convert from DWORD to BYTE[] in a portable way { - UINT i; + unsigned int i; for(i=0; i<4; i++ ) { *p++ = (BYTE) (val & 0xff); val >>= 8; @@ -148,7 +148,7 @@ void MIC_vUnInit(void) s_vClear(); } -void MIC_vAppend(PBYTE src, UINT nBytes) +void MIC_vAppend(PBYTE src, unsigned int nBytes) { /* This is simple */ while (nBytes > 0) { diff --git a/drivers/staging/vt6656/michael.h b/drivers/staging/vt6656/michael.h index 52270d314a8b..3ab60928ef35 100644 --- a/drivers/staging/vt6656/michael.h +++ b/drivers/staging/vt6656/michael.h @@ -40,7 +40,7 @@ void MIC_vInit(DWORD dwK0, DWORD dwK1); void MIC_vUnInit(void); // Append bytes to the message to be MICed -void MIC_vAppend(PBYTE src, UINT nBytes); +void MIC_vAppend(PBYTE src, unsigned int nBytes); // Get the MIC result. Destination should accept 8 bytes of result. // This also resets the message to empty. diff --git a/drivers/staging/vt6656/rc4.c b/drivers/staging/vt6656/rc4.c index 487f1dcfd8c4..5c3c2d0552b4 100644 --- a/drivers/staging/vt6656/rc4.c +++ b/drivers/staging/vt6656/rc4.c @@ -32,13 +32,13 @@ #include "rc4.h" -void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len) +void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len) { - UINT ust1, ust2; - UINT keyindex; - UINT stateindex; + unsigned int ust1, ust2; + unsigned int keyindex; + unsigned int stateindex; PBYTE pbyst; - UINT idx; + unsigned int idx; pbyst = pRC4->abystate; pRC4->ux = 0; @@ -58,11 +58,11 @@ void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len) } } -UINT rc4_byte(PRC4Ext pRC4) +unsigned int rc4_byte(PRC4Ext pRC4) { - UINT ux; - UINT uy; - UINT ustx, usty; + unsigned int ux; + unsigned int uy; + unsigned int ustx, usty; PBYTE pbyst; pbyst = pRC4->abystate; @@ -79,9 +79,9 @@ UINT rc4_byte(PRC4Ext pRC4) } void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, - PBYTE pbySrc, UINT cbData_len) + PBYTE pbySrc, unsigned int cbData_len) { - UINT ii; + unsigned int ii; for (ii = 0; ii < cbData_len; ii++) pbyDest[ii] = (BYTE)(pbySrc[ii] ^ rc4_byte(pRC4)); } diff --git a/drivers/staging/vt6656/rc4.h b/drivers/staging/vt6656/rc4.h index 9cd1db9276bc..d447879c8f99 100644 --- a/drivers/staging/vt6656/rc4.h +++ b/drivers/staging/vt6656/rc4.h @@ -35,13 +35,14 @@ /*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Types ------------------------------*/ typedef struct { - UINT ux; - UINT uy; + unsigned int ux; + unsigned int uy; BYTE abystate[256]; } RC4Ext, *PRC4Ext; -void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len); -UINT rc4_byte(PRC4Ext pRC4); -void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc, UINT cbData_len); +void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len); +unsigned int rc4_byte(PRC4Ext pRC4); +void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc, + unsigned int cbData_len); #endif /* __RC4_H__ */ diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 4c4f5f6dc366..3fd0478a9a54 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -758,8 +758,8 @@ BOOL IFRFbWriteEmbeded (PSDevice pDevice, DWORD dwData) */ BOOL RFbSetPower ( PSDevice pDevice, - UINT uRATE, - UINT uCH + unsigned int uRATE, + unsigned int uCH ) { BOOL bResult = TRUE; @@ -813,7 +813,7 @@ BYTE byPwr = pDevice->byCCKPwr; BOOL RFbRawSetPower ( PSDevice pDevice, BYTE byPwr, - UINT uRATE + unsigned int uRATE ) { BOOL bResult = TRUE; diff --git a/drivers/staging/vt6656/rf.h b/drivers/staging/vt6656/rf.h index 7423d4daba01..d4f8b94132b9 100644 --- a/drivers/staging/vt6656/rf.h +++ b/drivers/staging/vt6656/rf.h @@ -66,14 +66,14 @@ extern const BYTE RFaby11aChannelIndex[200]; BOOL IFRFbWriteEmbeded(PSDevice pDevice, DWORD dwData); BOOL RFbSetPower ( PSDevice pDevice, - UINT uRATE, - UINT uCH + unsigned int uRATE, + unsigned int uCH ); BOOL RFbRawSetPower( PSDevice pDevice, BYTE byPwr, - UINT uRATE + unsigned int uRATE ); void diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index bfc786059ad1..6a4b87f09545 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -139,26 +139,24 @@ s_vGenerateTxParameter( void *pvRrvTime, void *pvRTS, void *pvCTS, - UINT cbFrameSize, + unsigned int cbFrameSize, BOOL bNeedACK, - UINT uDMAIdx, + unsigned int uDMAIdx, PSEthernetHeader psEthHeader ); -static -UINT -s_uFillDataHead ( +static unsigned int s_uFillDataHead( PSDevice pDevice, BYTE byPktType, WORD wCurrentRate, void *pTxDataHead, - UINT cbFrameLength, - UINT uDMAIdx, + unsigned int cbFrameLength, + unsigned int uDMAIdx, BOOL bNeedAck, - UINT uFragIdx, - UINT cbLastFragmentSize, - UINT uMACfragNum, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, BYTE byFBOption ); @@ -174,8 +172,8 @@ s_vGenerateMACHeader ( PSEthernetHeader psEthHeader, BOOL bNeedEncrypt, WORD wFragType, - UINT uDMAIdx, - UINT uFragIdx + unsigned int uDMAIdx, + unsigned int uFragIdx ); static @@ -199,24 +197,20 @@ s_vSWencryption ( WORD wPayloadSize ); -static -UINT -s_uGetTxRsvTime ( +static unsigned int s_uGetTxRsvTime( PSDevice pDevice, BYTE byPktType, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wRate, BOOL bNeedAck ); -static -UINT -s_uGetRTSCTSRsvTime ( +static unsigned int s_uGetRTSCTSRsvTime( PSDevice pDevice, BYTE byRTSRsvType, BYTE byPktType, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wCurrentRate ); @@ -224,10 +218,10 @@ static void s_vFillCTSHead ( PSDevice pDevice, - UINT uDMAIdx, + unsigned int uDMAIdx, BYTE byPktType, void *pvCTS, - UINT cbFrameLength, + unsigned int cbFrameLength, BOOL bNeedAck, BOOL bDisCRC, WORD wCurrentRate, @@ -240,7 +234,7 @@ s_vFillRTSHead( PSDevice pDevice, BYTE byPktType, void *pvRTS, - UINT cbFrameLength, + unsigned int cbFrameLength, BOOL bNeedAck, BOOL bDisCRC, PSEthernetHeader psEthHeader, @@ -248,28 +242,26 @@ s_vFillRTSHead( BYTE byFBOption ); -static -UINT -s_uGetDataDuration ( +static unsigned int s_uGetDataDuration( PSDevice pDevice, BYTE byDurType, - UINT cbFrameLength, + unsigned int cbFrameLength, BYTE byPktType, WORD wRate, BOOL bNeedAck, - UINT uFragIdx, - UINT cbLastFragmentSize, - UINT uMACfragNum, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, BYTE byFBOption ); static -UINT +unsigned int s_uGetRTSCTSDuration ( PSDevice pDevice, BYTE byDurType, - UINT cbFrameLength, + unsigned int cbFrameLength, BYTE byPktType, WORD wRate, BOOL bNeedAck, @@ -287,7 +279,7 @@ s_vGetFreeContext( { PUSB_SEND_CONTEXT pContext = NULL; PUSB_SEND_CONTEXT pReturnContext = NULL; - UINT ii; + unsigned int ii; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n"); @@ -456,7 +448,7 @@ s_vSWencryption ( WORD wPayloadSize ) { - UINT cbICVlen = 4; + unsigned int cbICVlen = 4; DWORD dwICV = 0xFFFFFFFFL; PDWORD pdwICV; @@ -497,16 +489,16 @@ s_vSWencryption ( PK_TYPE_11GA 3 */ static -UINT +unsigned int s_uGetTxRsvTime ( PSDevice pDevice, BYTE byPktType, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wRate, BOOL bNeedAck ) { - UINT uDataTime, uAckTime; + unsigned int uDataTime, uAckTime; uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wRate); if (byPktType == PK_TYPE_11B) {//llb,CCK mode @@ -525,16 +517,16 @@ s_uGetTxRsvTime ( //byFreqType: 0=>5GHZ 1=>2.4GHZ static -UINT +unsigned int s_uGetRTSCTSRsvTime ( PSDevice pDevice, BYTE byRTSRsvType, BYTE byPktType, - UINT cbFrameLength, + unsigned int cbFrameLength, WORD wCurrentRate ) { - UINT uRrvTime , uRTSTime, uCTSTime, uAckTime, uDataTime; + unsigned int uRrvTime , uRTSTime, uCTSTime, uAckTime, uDataTime; uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0; @@ -567,23 +559,22 @@ s_uGetRTSCTSRsvTime ( //byFreqType 0: 5GHz, 1:2.4Ghz static -UINT +unsigned int s_uGetDataDuration ( PSDevice pDevice, BYTE byDurType, - UINT cbFrameLength, + unsigned int cbFrameLength, BYTE byPktType, WORD wRate, BOOL bNeedAck, - UINT uFragIdx, - UINT cbLastFragmentSize, - UINT uMACfragNum, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, BYTE byFBOption ) { BOOL bLastFrag = 0; - UINT uAckTime =0, uNextPktTime = 0; - + unsigned int uAckTime = 0, uNextPktTime = 0; if (uFragIdx == (uMACfragNum-1)) { bLastFrag = 1; @@ -737,18 +728,18 @@ s_uGetDataDuration ( //byFreqType: 0=>5GHZ 1=>2.4GHZ static -UINT +unsigned int s_uGetRTSCTSDuration ( PSDevice pDevice, BYTE byDurType, - UINT cbFrameLength, + unsigned int cbFrameLength, BYTE byPktType, WORD wRate, BOOL bNeedAck, BYTE byFBOption ) { - UINT uCTSTime = 0, uDurTime = 0; + unsigned int uCTSTime = 0, uDurTime = 0; switch (byDurType) { @@ -836,18 +827,18 @@ s_uGetRTSCTSDuration ( static -UINT +unsigned int s_uFillDataHead ( PSDevice pDevice, BYTE byPktType, WORD wCurrentRate, void *pTxDataHead, - UINT cbFrameLength, - UINT uDMAIdx, + unsigned int cbFrameLength, + unsigned int uDMAIdx, BOOL bNeedAck, - UINT uFragIdx, - UINT cbLastFragmentSize, - UINT uMACfragNum, + unsigned int uFragIdx, + unsigned int cbLastFragmentSize, + unsigned int uMACfragNum, BYTE byFBOption ) { @@ -986,7 +977,7 @@ s_vFillRTSHead ( PSDevice pDevice, BYTE byPktType, void *pvRTS, - UINT cbFrameLength, + unsigned int cbFrameLength, BOOL bNeedAck, BOOL bDisCRC, PSEthernetHeader psEthHeader, @@ -994,7 +985,7 @@ s_vFillRTSHead ( BYTE byFBOption ) { - UINT uRTSFrameLen = 20; + unsigned int uRTSFrameLen = 20; WORD wLen = 0x0000; if (pvRTS == NULL) @@ -1212,17 +1203,17 @@ static void s_vFillCTSHead ( PSDevice pDevice, - UINT uDMAIdx, + unsigned int uDMAIdx, BYTE byPktType, void *pvCTS, - UINT cbFrameLength, + unsigned int cbFrameLength, BOOL bNeedAck, BOOL bDisCRC, WORD wCurrentRate, BYTE byFBOption ) { - UINT uCTSFrameLen = 14; + unsigned int uCTSFrameLen = 14; WORD wLen = 0x0000; if (pvCTS == NULL) { @@ -1307,7 +1298,7 @@ s_vFillCTSHead ( * Return Value: none * -*/ -// UINT cbFrameSize,//Hdr+Payload+FCS + static void s_vGenerateTxParameter ( @@ -1318,13 +1309,13 @@ s_vGenerateTxParameter ( void *pvRrvTime, void *pvRTS, void *pvCTS, - UINT cbFrameSize, + unsigned int cbFrameSize, BOOL bNeedACK, - UINT uDMAIdx, + unsigned int uDMAIdx, PSEthernetHeader psEthHeader ) { - UINT cbMACHdLen = WLAN_HDR_ADDR3_LEN; //24 + unsigned int cbMACHdLen = WLAN_HDR_ADDR3_LEN; /* 24 */ WORD wFifoCtl; BOOL bDisCRC = FALSE; BYTE byFBOption = AUTO_FB_NONE; @@ -1422,7 +1413,7 @@ s_vGenerateTxParameter ( /* PBYTE pbyBuffer,//point to pTxBufHead WORD wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last - UINT cbFragmentSize,//Hdr+payoad+FCS + unsigned int cbFragmentSize,//Hdr+payoad+FCS */ @@ -1432,29 +1423,30 @@ s_bPacketToWirelessUsb( BYTE byPktType, PBYTE usbPacketBuf, BOOL bNeedEncryption, - UINT uSkbPacketLen, - UINT uDMAIdx, + unsigned int uSkbPacketLen, + unsigned int uDMAIdx, PSEthernetHeader psEthHeader, PBYTE pPacket, PSKeyItem pTransmitKey, - UINT uNodeIndex, + unsigned int uNodeIndex, WORD wCurrentRate, - UINT *pcbHeaderLen, - UINT *pcbTotalLen + unsigned int *pcbHeaderLen, + unsigned int *pcbTotalLen ) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT cbFrameSize,cbFrameBodySize; + unsigned int cbFrameSize, cbFrameBodySize; PTX_BUFFER pTxBufHead; - UINT cb802_1_H_len; - UINT cbIVlen=0,cbICVlen=0,cbMIClen=0,cbMACHdLen=0,cbFCSlen=4; - UINT cbMICHDR = 0; + unsigned int cb802_1_H_len; + unsigned int cbIVlen = 0, cbICVlen = 0, cbMIClen = 0, + cbMACHdLen = 0, cbFCSlen = 4; + unsigned int cbMICHDR = 0; BOOL bNeedACK,bRTS; PBYTE pbyType,pbyMacHdr,pbyIVHead,pbyPayloadHead,pbyTxBufferAddr; - BYTE abySNAP_RFC1042[6] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; - BYTE abySNAP_Bridgetunnel[6] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8}; - UINT uDuration; - UINT cbHeaderLength= 0,uPadding = 0; + BYTE abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; + BYTE abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8}; + unsigned int uDuration; + unsigned int cbHeaderLength = 0, uPadding = 0; void *pvRrvTime; PSMICHDRHead pMICHDR; void *pvRTS; @@ -1809,7 +1801,7 @@ s_bPacketToWirelessUsb( } if (pDevice->bSoftwareGenCrcErr == TRUE) { - UINT cbLen; + unsigned int cbLen; PDWORD pdwCRC; dwCRC = 0xFFFFFFFFL; @@ -1865,8 +1857,8 @@ s_vGenerateMACHeader ( PSEthernetHeader psEthHeader, BOOL bNeedEncrypt, WORD wFragType, - UINT uDMAIdx, - UINT uFragIdx + unsigned int uDMAIdx, + unsigned int uFragIdx ) { PS802_11Header pMACHeader = (PS802_11Header)pbyBufferAddr; @@ -1968,22 +1960,22 @@ CMD_STATUS csMgmt_xmit( void *pvRTS; PSCTS pCTS; void *pvTxDataHd; - UINT uDuration; - UINT cbReqCount; + unsigned int uDuration; + unsigned int cbReqCount; PS802_11Header pMACHeader; - UINT cbHeaderSize; - UINT cbFrameBodySize; + unsigned int cbHeaderSize; + unsigned int cbFrameBodySize; BOOL bNeedACK; BOOL bIsPSPOLL = FALSE; PSTxBufHead pTxBufHead; - UINT cbFrameSize; - UINT cbIVlen = 0; - UINT cbICVlen = 0; - UINT cbMIClen = 0; - UINT cbFCSlen = 4; - UINT uPadding = 0; + unsigned int cbFrameSize; + unsigned int cbIVlen = 0; + unsigned int cbICVlen = 0; + unsigned int cbMIClen = 0; + unsigned int cbFCSlen = 4; + unsigned int uPadding = 0; WORD wTxBufSize; - UINT cbMacHdLen; + unsigned int cbMacHdLen; SEthernetHeader sEthHeader; void *pvRrvTime; void *pMICHDR; @@ -2258,15 +2250,15 @@ csBeacon_xmit( ) { - UINT cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN; - UINT cbHeaderSize = 0; + unsigned int cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN; + unsigned int cbHeaderSize = 0; WORD wTxBufSize = sizeof(STxShortBufHead); PSTxShortBufHead pTxBufHead; PS802_11Header pMACHeader; PSTxDataHead_ab pTxDataHead; WORD wCurrentRate; - UINT cbFrameBodySize; - UINT cbReqCount; + unsigned int cbFrameBodySize; + unsigned int cbReqCount; PBEACON_BUFFER pTX_Buffer; PBYTE pbyTxBufferAddr; PUSB_SEND_CONTEXT pContext; @@ -2353,41 +2345,41 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) { void *pvRTS; void *pvCTS; void *pvTxDataHd; - UINT uDuration; - UINT cbReqCount; + unsigned int uDuration; + unsigned int cbReqCount; PS802_11Header pMACHeader; - UINT cbHeaderSize; - UINT cbFrameBodySize; + unsigned int cbHeaderSize; + unsigned int cbFrameBodySize; BOOL bNeedACK; BOOL bIsPSPOLL = FALSE; PSTxBufHead pTxBufHead; - UINT cbFrameSize; - UINT cbIVlen = 0; - UINT cbICVlen = 0; - UINT cbMIClen = 0; - UINT cbFCSlen = 4; - UINT uPadding = 0; - UINT cbMICHDR = 0; - UINT uLength = 0; + unsigned int cbFrameSize; + unsigned int cbIVlen = 0; + unsigned int cbICVlen = 0; + unsigned int cbMIClen = 0; + unsigned int cbFCSlen = 4; + unsigned int uPadding = 0; + unsigned int cbMICHDR = 0; + unsigned int uLength = 0; DWORD dwMICKey0, dwMICKey1; DWORD dwMIC_Priority; PDWORD pdwMIC_L; PDWORD pdwMIC_R; WORD wTxBufSize; - UINT cbMacHdLen; + unsigned int cbMacHdLen; SEthernetHeader sEthHeader; void *pvRrvTime; void *pMICHDR; WORD wCurrentRate = RATE_1M; PUWLAN_80211HDR p80211Header; - UINT uNodeIndex = 0; + unsigned int uNodeIndex = 0; BOOL bNodeExist = FALSE; SKeyItem STempKey; PSKeyItem pTransmitKey = NULL; PBYTE pbyIVHead; PBYTE pbyPayloadHead; PBYTE pbyMacHdr; - UINT cbExtSuppRate = 0; + unsigned int cbExtSuppRate = 0; PTX_BUFFER pTX_Buffer; PUSB_SEND_CONTEXT pContext; // PWLAN_IE pItem; @@ -2754,20 +2746,20 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) { NTSTATUS nsDMA_tx_packet( PSDevice pDevice, - UINT uDMAIdx, + unsigned int uDMAIdx, struct sk_buff *skb ) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT BytesToWrite =0,uHeaderLen = 0; - UINT uNodeIndex = 0; + unsigned int BytesToWrite = 0, uHeaderLen = 0; + unsigned int uNodeIndex = 0; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; WORD wAID; BYTE byPktType; BOOL bNeedEncryption = FALSE; PSKeyItem pTransmitKey = NULL; SKeyItem STempKey; - UINT ii; + unsigned int ii; BOOL bTKIP_UseGTK = FALSE; BOOL bNeedDeAuth = FALSE; PBYTE pbyBSSID; @@ -2775,7 +2767,7 @@ nsDMA_tx_packet( PUSB_SEND_CONTEXT pContext; BOOL fConvertedPacket; PTX_BUFFER pTX_Buffer; - UINT status; + unsigned int status; WORD wKeepRate = pDevice->wCurrentRate; struct net_device_stats* pStats = &pDevice->stats; //#ifdef WPA_SM_Transtatus @@ -3177,12 +3169,12 @@ BOOL bRelayPacketSend ( PSDevice pDevice, PBYTE pbySkbData, - UINT uDataLen, - UINT uNodeIndex + unsigned int uDataLen, + unsigned int uNodeIndex ) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT BytesToWrite =0,uHeaderLen = 0; + unsigned int BytesToWrite = 0, uHeaderLen = 0; BYTE byPktType = PK_TYPE_11B; BOOL bNeedEncryption = FALSE; SKeyItem STempKey; @@ -3192,7 +3184,7 @@ bRelayPacketSend ( BYTE byPktTyp; BOOL fConvertedPacket; PTX_BUFFER pTX_Buffer; - UINT status; + unsigned int status; WORD wKeepRate = pDevice->wCurrentRate; diff --git a/drivers/staging/vt6656/rxtx.h b/drivers/staging/vt6656/rxtx.h index 64df4a3550d6..f90de42d7abe 100644 --- a/drivers/staging/vt6656/rxtx.h +++ b/drivers/staging/vt6656/rxtx.h @@ -671,21 +671,24 @@ bPacketToWirelessUsb( BYTE byPktType, PBYTE usbPacketBuf, BOOL bNeedEncrypt, - UINT cbPayloadSize, - UINT uDMAIdx, + unsigned int cbPayloadSize, + unsigned int uDMAIdx, PSEthernetHeader psEthHeader, PBYTE pPacket, PSKeyItem pTransmitKey, - UINT uNodeIndex, + unsigned int uNodeIndex, WORD wCurrentRate, - UINT *pcbHeaderLen, - UINT *pcbTotalLen + unsigned int *pcbHeaderLen, + unsigned int *pcbTotalLen ); void vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb); -NTSTATUS nsDMA_tx_packet(PSDevice pDevice, UINT uDMAIdx, struct sk_buff *skb); +NTSTATUS nsDMA_tx_packet(PSDevice pDevice, + unsigned int uDMAIdx, + struct sk_buff *skb); CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket); CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket); -BOOL bRelayPacketSend(PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeIndex); +BOOL bRelayPacketSend(PSDevice pDevice, PBYTE pbySkbData, + unsigned int uDataLen, unsigned int uNodeIndex); #endif /* __RXTX_H__ */ diff --git a/drivers/staging/vt6656/tcrc.c b/drivers/staging/vt6656/tcrc.c index 3464801ede57..e25021e850a0 100644 --- a/drivers/staging/vt6656/tcrc.c +++ b/drivers/staging/vt6656/tcrc.c @@ -132,7 +132,7 @@ static const DWORD s_adwCrc32Table[256] = { * Return Value: CRC-32 * -*/ -DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed) +DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed) { DWORD dwCrc; @@ -165,7 +165,7 @@ DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed) * Return Value: CRC-32 * -*/ -DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte) +DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte) { return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL); } @@ -191,7 +191,7 @@ DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte) * Return Value: CRC-32 * -*/ -DWORD CRCdwGetCrc32Ex(PBYTE pbyData, UINT cbByte, DWORD dwPreCRC) +DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC) { return CRCdwCrc32(pbyData, cbByte, dwPreCRC); } diff --git a/drivers/staging/vt6656/tcrc.h b/drivers/staging/vt6656/tcrc.h index a41fc9b56105..4dfd01e477a4 100644 --- a/drivers/staging/vt6656/tcrc.h +++ b/drivers/staging/vt6656/tcrc.h @@ -43,8 +43,8 @@ /*--------------------- Export Functions --------------------------*/ -DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed); -DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte); -DWORD CRCdwGetCrc32Ex(PBYTE pbyData, UINT cbByte, DWORD dwPreCRC); +DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed); +DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte); +DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC); #endif /* __TCRC_H__ */ diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c index a7c716f174da..4f368f174b21 100644 --- a/drivers/staging/vt6656/tether.c +++ b/drivers/staging/vt6656/tether.c @@ -96,7 +96,7 @@ BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr) * Return Value: TRUE if ok; FALSE if error. * */ -BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, UINT cbFrameLength) +BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength) { DWORD dwCRC; diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h index 9b26033c585b..f5819a7aee27 100644 --- a/drivers/staging/vt6656/tether.h +++ b/drivers/staging/vt6656/tether.h @@ -228,6 +228,6 @@ S802_11Header, *PS802_11Header; BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr); //BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr); -BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, UINT cbFrameLength); +BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength); #endif /* __TETHER_H__ */ diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index 3a297754233a..c27f9858e2e9 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -72,12 +72,6 @@ typedef int BOOL; /****** Simple typedefs ***************************************************/ -typedef unsigned char UCHAR; -typedef unsigned short USHORT; -typedef unsigned int UINT; -typedef unsigned long ULONG; -typedef unsigned long long ULONGLONG; //64 bit - typedef unsigned char BYTE; // 8-bit typedef unsigned short WORD; // 16-bit typedef unsigned long DWORD; // 32-bit diff --git a/drivers/staging/vt6656/upc.h b/drivers/staging/vt6656/upc.h index be386edb3e94..b33aba4b12c9 100644 --- a/drivers/staging/vt6656/upc.h +++ b/drivers/staging/vt6656/upc.h @@ -141,7 +141,7 @@ #define PCAvDelayByIO(uDelayUnit) { \ BYTE byData; \ - ULONG ii; \ + unsigned long ii; \ \ if (uDelayUnit <= 50) { \ udelay(uDelayUnit); \ diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index ce71f18afd81..fd2355e34fb0 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -484,12 +484,11 @@ s_nsInterruptUsbIoCompleteRead( pDevice->fKillEventPollingThread = TRUE; // } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"IntUSBIoCompleteControl STATUS = %d\n", ntStatus ); - } - else { - pDevice->ulIntInBytesRead += (ULONG)urb->actual_length; - pDevice->ulIntInContCRCError = 0; - pDevice->bEventAvailable = TRUE; - INTnsProcessData(pDevice); + } else { + pDevice->ulIntInBytesRead += (unsigned long) urb->actual_length; + pDevice->ulIntInContCRCError = 0; + pDevice->bEventAvailable = TRUE; + INTnsProcessData(pDevice); } STAvUpdateUSBCounter(&pDevice->scStatistic.USB_InterruptStat, ntStatus); @@ -614,7 +613,7 @@ s_nsBulkInUsbIoCompleteRead( { PRCB pRCB = (PRCB)urb->context; PSDevice pDevice = (PSDevice)pRCB->pDevice; - ULONG bytesRead; + unsigned long bytesRead; BOOL bIndicateReceive = FALSE; BOOL bReAllocSkb = FALSE; NTSTATUS status; @@ -774,7 +773,7 @@ s_nsBulkOutIoCompleteWrite( PSDevice pDevice; NTSTATUS status; CONTEXT_TYPE ContextType; - ULONG ulBufLen; + unsigned long ulBufLen; PUSB_SEND_CONTEXT pContext; diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index 6fec9094ccd0..72e21b6f0e88 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -219,7 +219,7 @@ s_vProbeChannel( PBYTE pbyRate; PSTxMgmtPacket pTxPacket; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - UINT ii; + unsigned int ii; if (pDevice->byBBType == BB_TYPE_11A) { @@ -316,15 +316,15 @@ s_MgrMakeProbeRequest( return pTxPacket; } -void vCommandTimerWait(void *hDeviceContext, UINT MSecond) +void vCommandTimerWait(void *hDeviceContext, unsigned int MSecond) { PSDevice pDevice = (PSDevice)hDeviceContext; init_timer(&pDevice->sTimerCommand); - pDevice->sTimerCommand.data = (ULONG)pDevice; + pDevice->sTimerCommand.data = (unsigned long)pDevice; pDevice->sTimerCommand.function = (TimerFunction)vRunCommand; // RUN_AT :1 msec ~= (HZ/1024) - pDevice->sTimerCommand.expires = (UINT)RUN_AT((MSecond * HZ) >> 10); + pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >> 10); add_timer(&pDevice->sTimerCommand); return; } @@ -336,7 +336,7 @@ void vRunCommand(void *hDeviceContext) PWLAN_IE_SSID pItemSSID; PWLAN_IE_SSID pItemSSIDCurr; CMD_STATUS Status; - UINT ii; + unsigned int ii; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; struct sk_buff *skb; BYTE byData; @@ -760,7 +760,7 @@ void vRunCommand(void *hDeviceContext) // printk("Re-initial TxDataTimer****\n"); del_timer(&pDevice->sTimerTxData); init_timer(&pDevice->sTimerTxData); - pDevice->sTimerTxData.data = (ULONG)pDevice; + pDevice->sTimerTxData.data = (unsigned long) pDevice; pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData; pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback pDevice->fTxDataInSleep = FALSE; @@ -1264,8 +1264,8 @@ BOOL bScheduleCommand(void *hDeviceContext, static BOOL s_bClearBSSID_SCAN(void *hDeviceContext) { PSDevice pDevice = (PSDevice)hDeviceContext; - UINT uCmdDequeueIdx = pDevice->uCmdDequeueIdx; - UINT ii; + unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx; + unsigned int ii; if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) { for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii ++) { @@ -1289,7 +1289,7 @@ void vResetCommandTimer(void *hDeviceContext) del_timer(&pDevice->sTimerCommand); //init timer init_timer(&pDevice->sTimerCommand); - pDevice->sTimerCommand.data = (ULONG)pDevice; + pDevice->sTimerCommand.data = (unsigned long)pDevice; pDevice->sTimerCommand.function = (TimerFunction)vRunCommand; pDevice->sTimerCommand.expires = RUN_AT(HZ); pDevice->cbFreeCmdQueue = CMD_Q_SIZE; diff --git a/drivers/staging/vt6656/wctl.c b/drivers/staging/vt6656/wctl.c index 956add694227..857ce0bc00a4 100644 --- a/drivers/staging/vt6656/wctl.c +++ b/drivers/staging/vt6656/wctl.c @@ -69,8 +69,8 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) { - UINT uIndex; - UINT ii; + unsigned int uIndex; + unsigned int ii; PSCacheEntry pCacheEntry; if (IS_FC_RETRY(pMACHeader)) { @@ -111,9 +111,9 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) * Return Value: index number in Defragment Database * */ -UINT WCTLuSearchDFCB (PSDevice pDevice, PS802_11Header pMACHeader) +unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader) { -UINT ii; + unsigned int ii; for(ii=0;iicbDFCB;ii++) { if ((pDevice->sRxDFCB[ii].bInUse == TRUE) && @@ -141,9 +141,9 @@ UINT ii; * Return Value: index number in Defragment Database * */ -UINT WCTLuInsertDFCB (PSDevice pDevice, PS802_11Header pMACHeader) +unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader) { -UINT ii; + unsigned int ii; if (pDevice->cbFreeDFCB == 0) return(pDevice->cbDFCB); @@ -180,9 +180,10 @@ UINT ii; * Return Value: TRUE if it is valid fragment packet and we have resource to defragment; otherwise FALSE * */ -BOOL WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, UINT cbFrameLength, BOOL bWEP, BOOL bExtIV) +BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, + unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV) { -UINT uHeaderSize; +unsigned int uHeaderSize; if (bWEP == TRUE) { diff --git a/drivers/staging/vt6656/wctl.h b/drivers/staging/vt6656/wctl.h index c81dff700e0f..7270af68c89d 100644 --- a/drivers/staging/vt6656/wctl.h +++ b/drivers/staging/vt6656/wctl.h @@ -90,7 +90,6 @@ (uVar)++; \ } - /*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Variables --------------------------*/ @@ -98,8 +97,9 @@ /*--------------------- Export Functions --------------------------*/ BOOL WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader); -BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, UINT cbFrameLength, BOOL bWEP, BOOL bExtIV); -UINT WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader); -UINT WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader); +BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, + unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV); +unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader); +unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader); #endif /* __WCTL_H__ */ diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index aaba5221170d..93c15f0580fe 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c @@ -118,7 +118,7 @@ s_vMgrRxAssocRequest( PSDevice pDevice, PSMgmtObject pMgmt, PSRxMgmtPacket pRxPacket, - UINT uNodeIndex + unsigned int uNodeIndex ); static @@ -242,7 +242,7 @@ s_MgrMakeBeacon( PSMgmtObject pMgmt, WORD wCurrCapInfo, WORD wCurrBeaconPeriod, - UINT uCurrChannel, + unsigned int uCurrChannel, WORD wCurrATIMWinodw, PWLAN_IE_SSID pCurrSSID, PBYTE pCurrBSSID, @@ -287,7 +287,7 @@ s_MgrMakeProbeResponse( PSMgmtObject pMgmt, WORD wCurrCapInfo, WORD wCurrBeaconPeriod, - UINT uCurrChannel, + unsigned int uCurrChannel, WORD wCurrATIMWinodw, PBYTE pDstAddr, PWLAN_IE_SSID pCurrSSID, @@ -310,7 +310,7 @@ static void s_vMgrSynchBSS ( PSDevice pDevice, - UINT uBSSMode, + unsigned int uBSSMode, PKnownBSS pCurr, PCMD_STATUS pStatus ); @@ -364,19 +364,19 @@ void vMgrObjectInit(void *hDeviceContext) BSSvClearBSSList((void *) pDevice, FALSE); init_timer(&pMgmt->sTimerSecondCallback); - pMgmt->sTimerSecondCallback.data = (ULONG)pDevice; + pMgmt->sTimerSecondCallback.data = (unsigned long)pDevice; pMgmt->sTimerSecondCallback.function = (TimerFunction)BSSvSecondCallBack; pMgmt->sTimerSecondCallback.expires = RUN_AT(HZ); init_timer(&pDevice->sTimerCommand); - pDevice->sTimerCommand.data = (ULONG)pDevice; + pDevice->sTimerCommand.data = (unsigned long)pDevice; pDevice->sTimerCommand.function = (TimerFunction)vRunCommand; pDevice->sTimerCommand.expires = RUN_AT(HZ); //2007-0115-10by MikeLiu #ifdef TxInSleep init_timer(&pDevice->sTimerTxData); - pDevice->sTimerTxData.data = (ULONG)pDevice; + pDevice->sTimerTxData.data = (unsigned long)pDevice; pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData; pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback pDevice->fTxDataInSleep = FALSE; @@ -619,7 +619,7 @@ s_vMgrRxAssocRequest( PSDevice pDevice, PSMgmtObject pMgmt, PSRxMgmtPacket pRxPacket, - UINT uNodeIndex + unsigned int uNodeIndex ) { WLAN_FR_ASSOCREQ sFrame; @@ -627,7 +627,7 @@ s_vMgrRxAssocRequest( PSTxMgmtPacket pTxPacket; WORD wAssocStatus = 0; WORD wAssocAID = 0; - UINT uRateLen = WLAN_RATES_MAXLEN; + unsigned int uRateLen = WLAN_RATES_MAXLEN; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; @@ -775,7 +775,7 @@ s_vMgrRxReAssocRequest( PSDevice pDevice, PSMgmtObject pMgmt, PSRxMgmtPacket pRxPacket, - UINT uNodeIndex + unsigned int uNodeIndex ) { WLAN_FR_REASSOCREQ sFrame; @@ -783,7 +783,7 @@ s_vMgrRxReAssocRequest( PSTxMgmtPacket pTxPacket; WORD wAssocStatus = 0; WORD wAssocAID = 0; - UINT uRateLen = WLAN_RATES_MAXLEN; + unsigned int uRateLen = WLAN_RATES_MAXLEN; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; @@ -1257,7 +1257,7 @@ s_vMgrRxAuthenSequence_1( ) { PSTxMgmtPacket pTxPacket = NULL; - UINT uNodeIndex; + unsigned int uNodeIndex; WLAN_FR_AUTHEN sFrame; PSKeyItem pTransmitKey; @@ -1464,8 +1464,8 @@ s_vMgrRxAuthenSequence_3( ) { PSTxMgmtPacket pTxPacket = NULL; - UINT uStatusCode = 0 ; - UINT uNodeIndex = 0; + unsigned int uStatusCode = 0 ; + unsigned int uNodeIndex = 0; WLAN_FR_AUTHEN sFrame; if (!WLAN_GET_FC_ISWEP(pFrame->pHdr->sA3.wFrameCtl)) { @@ -1590,7 +1590,7 @@ s_vMgrRxDisassociation( ) { WLAN_FR_DISASSOC sFrame; - UINT uNodeIndex = 0; + unsigned int uNodeIndex = 0; CMD_STATUS CmdStatus; viawget_wpa_header *wpahdr; @@ -1680,7 +1680,7 @@ s_vMgrRxDeauthentication( ) { WLAN_FR_DEAUTHEN sFrame; - UINT uNodeIndex = 0; + unsigned int uNodeIndex = 0; viawget_wpa_header *wpahdr; @@ -1817,17 +1817,17 @@ s_vMgrRxBeacon( BOOL bUpdateTSF = FALSE; BOOL bIsAPBeacon = FALSE; BOOL bIsChannelEqual = FALSE; - UINT uLocateByteIndex; + unsigned int uLocateByteIndex; BYTE byTIMBitOn = 0; WORD wAIDNumber = 0; - UINT uNodeIndex; + unsigned int uNodeIndex; QWORD qwTimestamp, qwLocalTSF; QWORD qwCurrTSF; WORD wStartIndex = 0; WORD wAIDIndex = 0; BYTE byCurrChannel = pRxPacket->byRxChannel; ERPObject sERP; - UINT uRateLen = WLAN_RATES_MAXLEN; + unsigned int uRateLen = WLAN_RATES_MAXLEN; BOOL bChannelHit = FALSE; BYTE byOldPreambleType; @@ -2336,7 +2336,7 @@ void vMgrCreateOwnIBSS(void *hDeviceContext, BYTE byTopCCKBasicRate; BYTE byTopOFDMBasicRate; QWORD qwCurrTSF; - UINT ii; + unsigned int ii; BYTE abyRATE[] = {0x82, 0x84, 0x8B, 0x96, 0x24, 0x30, 0x48, 0x6C, 0x0C, 0x12, 0x18, 0x60}; BYTE abyCCK_RATE[] = {0x82, 0x84, 0x8B, 0x96}; BYTE abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; @@ -2601,11 +2601,11 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) PSDevice pDevice = (PSDevice)hDeviceContext; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PKnownBSS pCurr = NULL; - UINT ii, uu; + unsigned int ii, uu; PWLAN_IE_SUPP_RATES pItemRates = NULL; PWLAN_IE_SUPP_RATES pItemExtRates = NULL; PWLAN_IE_SSID pItemSSID; - UINT uRateLen = WLAN_RATES_MAXLEN; + unsigned int uRateLen = WLAN_RATES_MAXLEN; WORD wMaxBasicRate = RATE_1M; WORD wMaxSuppRate = RATE_1M; WORD wSuppRate; @@ -2705,9 +2705,10 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) uRateLen); // Stuffing Rate IE if ((pItemExtRates->len > 0) && (pItemRates->len < 8)) { - for (ii = 0; ii < (UINT)(8 - pItemRates->len); ) { - pItemRates->abyRates[pItemRates->len + ii] = pItemExtRates->abyRates[ii]; - ii ++; + for (ii = 0; ii < (unsigned int) (8 - pItemRates->len); ) { + pItemRates->abyRates[pItemRates->len + ii] = + pItemExtRates->abyRates[ii]; + ii++; if (pItemExtRates->len <= ii) break; } @@ -2931,7 +2932,7 @@ static void s_vMgrSynchBSS ( PSDevice pDevice, - UINT uBSSMode, + unsigned int uBSSMode, PKnownBSS pCurr, PCMD_STATUS pStatus ) @@ -3096,7 +3097,7 @@ s_vMgrSynchBSS ( ) { PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - // UINT ii , uSameBssidNum=0; + /* unsigned int ii, uSameBssidNum=0; */ // for (ii = 0; ii < MAX_BSS_NUM; ii++) { // if (pMgmt->sBSSList[ii].bActive && @@ -3155,7 +3156,7 @@ s_vMgrFormatTIM( { BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMap; - UINT ii, jj; + unsigned int ii, jj; BOOL bStartFound = FALSE; BOOL bMulticast = FALSE; WORD wStartIndex = 0; @@ -3228,7 +3229,7 @@ s_MgrMakeBeacon( PSMgmtObject pMgmt, WORD wCurrCapInfo, WORD wCurrBeaconPeriod, - UINT uCurrChannel, + unsigned int uCurrChannel, WORD wCurrATIMWinodw, PWLAN_IE_SSID pCurrSSID, PBYTE pCurrBSSID, @@ -3402,7 +3403,7 @@ s_MgrMakeProbeResponse( PSMgmtObject pMgmt, WORD wCurrCapInfo, WORD wCurrBeaconPeriod, - UINT uCurrChannel, + unsigned int uCurrChannel, WORD wCurrATIMWinodw, PBYTE pDstAddr, PWLAN_IE_SSID pCurrSSID, @@ -3672,7 +3673,7 @@ s_MgrMakeAssocRequest( } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { - UINT ii; + unsigned int ii; PWORD pwPMKID; // WPA IE @@ -3932,7 +3933,7 @@ s_MgrMakeReAssocRequest( } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->pCurrBSS != NULL)) { - UINT ii; + unsigned int ii; PWORD pwPMKID; /* WPA IE */ @@ -4422,7 +4423,7 @@ void vMgrRxManagePacket(void *hDeviceContext, { PSDevice pDevice = (PSDevice)hDeviceContext; BOOL bInScan = FALSE; - UINT uNodeIndex = 0; + unsigned int uNodeIndex = 0; NODE_STATE eNodeState = 0; CMD_STATUS Status; @@ -4689,7 +4690,7 @@ BOOL bAdd_PMKID_Candidate(void *hDeviceContext, { PSDevice pDevice = (PSDevice)hDeviceContext; PPMKID_CANDIDATE pCandidateList; - UINT ii = 0; + unsigned int ii = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); diff --git a/drivers/staging/vt6656/wmgr.h b/drivers/staging/vt6656/wmgr.h index ec2ee7805f4e..1e5b916aea1d 100644 --- a/drivers/staging/vt6656/wmgr.h +++ b/drivers/staging/vt6656/wmgr.h @@ -84,37 +84,37 @@ //mike define: make timer to expire after desired times #define timer_expire(timer,next_tick) mod_timer(&timer, RUN_AT(next_tick)) -typedef void (*TimerFunction)(ULONG); +typedef void (*TimerFunction)(unsigned long); //+++ NDIS related -typedef UCHAR NDIS_802_11_MAC_ADDRESS[6]; +typedef unsigned char NDIS_802_11_MAC_ADDRESS[ETH_ALEN]; typedef struct _NDIS_802_11_AI_REQFI { - USHORT Capabilities; - USHORT ListenInterval; + unsigned short Capabilities; + unsigned short ListenInterval; NDIS_802_11_MAC_ADDRESS CurrentAPAddress; } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; typedef struct _NDIS_802_11_AI_RESFI { - USHORT Capabilities; - USHORT StatusCode; - USHORT AssociationId; + unsigned short Capabilities; + unsigned short StatusCode; + unsigned short AssociationId; } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { - ULONG Length; - USHORT AvailableRequestFixedIEs; + unsigned long Length; + unsigned short AvailableRequestFixedIEs; NDIS_802_11_AI_REQFI RequestFixedIEs; - ULONG RequestIELength; - ULONG OffsetRequestIEs; - USHORT AvailableResponseFixedIEs; + unsigned long RequestIELength; + unsigned long OffsetRequestIEs; + unsigned short AvailableResponseFixedIEs; NDIS_802_11_AI_RESFI ResponseFixedIEs; - ULONG ResponseIELength; - ULONG OffsetResponseIEs; + unsigned long ResponseIELength; + unsigned long OffsetResponseIEs; } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; @@ -123,7 +123,7 @@ typedef struct tagSAssocInfo { NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo; BYTE abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN]; // store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION - ULONG RequestIELength; + unsigned long RequestIELength; BYTE abyReqIEs[WLAN_BEACON_FR_MAXLEN]; } SAssocInfo, *PSAssocInfo; //--- @@ -222,8 +222,8 @@ typedef enum tagWMAC_POWER_MODE { typedef struct tagSTxMgmtPacket { PUWLAN_80211HDR p80211Header; - UINT cbMPDULen; - UINT cbPayloadLen; + unsigned int cbMPDULen; + unsigned int cbPayloadLen; } STxMgmtPacket, *PSTxMgmtPacket; @@ -233,9 +233,9 @@ typedef struct tagSRxMgmtPacket { PUWLAN_80211HDR p80211Header; QWORD qwLocalTSF; - UINT cbMPDULen; - UINT cbPayloadLen; - UINT uRSSI; + unsigned int cbMPDULen; + unsigned int cbPayloadLen; + unsigned int uRSSI; BYTE bySQ; BYTE byRxRate; BYTE byRxChannel; @@ -272,21 +272,21 @@ typedef struct tagSMgmtObject BOOL bCurrBSSIDFilterOn; // Current state vars - UINT uCurrChannel; + unsigned int uCurrChannel; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyCurrBSSID[WLAN_BSSID_LEN]; WORD wCurrCapInfo; WORD wCurrAID; - UINT uRSSITrigger; + unsigned int uRSSITrigger; WORD wCurrATIMWindow; WORD wCurrBeaconPeriod; BOOL bIsDS; BYTE byERPContext; CMD_STATE eCommandState; - UINT uScanChannel; + unsigned int uScanChannel; // Desire joinning BSS vars BYTE abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; @@ -301,22 +301,22 @@ typedef struct tagSMgmtObject // Adhoc or AP configuration vars WORD wIBSSBeaconPeriod; WORD wIBSSATIMWindow; - UINT uIBSSChannel; + unsigned int uIBSSChannel; BYTE abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE byAPBBType; BYTE abyWPAIE[MAX_WPA_IE_LEN]; WORD wWPAIELen; - UINT uAssocCount; + unsigned int uAssocCount; BOOL bMoreData; // Scan state vars WMAC_SCAN_STATE eScanState; WMAC_SCAN_TYPE eScanType; - UINT uScanStartCh; - UINT uScanEndCh; + unsigned int uScanStartCh; + unsigned int uScanEndCh; WORD wScanSteps; - UINT uScanBSSType; + unsigned int uScanBSSType; // Desire scannig vars BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyScanBSSID[WLAN_BSSID_LEN]; @@ -344,8 +344,8 @@ typedef struct tagSMgmtObject BYTE abyPSTxMap[MAX_NODE_NUM + 1]; // managment command related - UINT uCmdBusy; - UINT uCmdHostAPBusy; + unsigned int uCmdBusy; + unsigned int uCmdHostAPBusy; // managment packet pool PBYTE pbyMgmtPacketPool; @@ -389,7 +389,7 @@ typedef struct tagSMgmtObject BOOL bSwitchChannel; BYTE byNewChannel; PWLAN_IE_MEASURE_REP pCurrMeasureEIDRep; - UINT uLengthOfRepEIDs; + unsigned int uLengthOfRepEIDs; BYTE abyCurrentMSRReq[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; BYTE abyCurrentMSRRep[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; BYTE abyIECountry[WLAN_A3FR_MAXLEN]; diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.c index 9bd6bf5bf37c..6d13190885d1 100644 --- a/drivers/staging/vt6656/wpa2.c +++ b/drivers/staging/vt6656/wpa2.c @@ -260,14 +260,14 @@ WPA2vParseRSN ( * Return Value: length of IEs. * -*/ -UINT +unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs ) { PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle; PBYTE pbyBuffer = NULL; - UINT ii = 0; + unsigned int ii = 0; PWORD pwPMKID = NULL; if (pRSNIEs == NULL) { diff --git a/drivers/staging/vt6656/wpa2.h b/drivers/staging/vt6656/wpa2.h index 79305a79b9da..429a910a5c50 100644 --- a/drivers/staging/vt6656/wpa2.h +++ b/drivers/staging/vt6656/wpa2.h @@ -45,7 +45,7 @@ typedef struct tagsPMKIDInfo { } PMKIDInfo, *PPMKIDInfo; typedef struct tagSPMKIDCache { - ULONG BSSIDInfoCount; + unsigned long BSSIDInfoCount; PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE]; } SPMKIDCache, *PSPMKIDCache; @@ -69,7 +69,7 @@ WPA2vParseRSN ( PWLAN_IE_RSN pRSN ); -UINT +unsigned int WPA2uSetIEs( void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs diff --git a/drivers/staging/vt6656/wpactl.h b/drivers/staging/vt6656/wpactl.h index 3a2f15f3f249..00c8451ab50b 100644 --- a/drivers/staging/vt6656/wpactl.h +++ b/drivers/staging/vt6656/wpactl.h @@ -52,9 +52,7 @@ typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, #define GENERIC_INFO_ELEM 0xdd #define RSN_INFO_ELEM 0x30 - - -typedef ULONGLONG NDIS_802_11_KEY_RSC; +typedef unsigned long long NDIS_802_11_KEY_RSC; /*--------------------- Export Classes ----------------------------*/