Checkpatch findings were not resolved. sed -i 's/\bDWORD\b/u32/g' drivers/staging/vt6656/*.[ch] sed -i 's/\bPDWORD\b/u32 */g' drivers/staging/vt6656/*.[ch] Signed-off-by: Andres More <more.andres@xxxxxxxxx> --- drivers/staging/vt6656/aes_ccmp.c | 12 +- drivers/staging/vt6656/bssdb.h | 6 +- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/dpc.c | 40 +++--- drivers/staging/vt6656/hostap.c | 2 +- drivers/staging/vt6656/key.c | 8 +- drivers/staging/vt6656/key.h | 6 +- drivers/staging/vt6656/mib.h | 230 ++++++++++++++++++------------------ drivers/staging/vt6656/michael.c | 32 +++--- drivers/staging/vt6656/michael.h | 4 +- drivers/staging/vt6656/rf.c | 8 +- drivers/staging/vt6656/rndis.h | 10 +- drivers/staging/vt6656/rxtx.c | 28 +++--- drivers/staging/vt6656/tcrc.c | 10 +- drivers/staging/vt6656/tcrc.h | 6 +- drivers/staging/vt6656/tether.c | 4 +- drivers/staging/vt6656/tkip.c | 2 +- drivers/staging/vt6656/tkip.h | 2 +- drivers/staging/vt6656/tmacro.h | 4 +- drivers/staging/vt6656/ttype.h | 4 - drivers/staging/vt6656/wpactl.c | 4 +- 21 files changed, 210 insertions(+), 214 deletions(-) diff --git a/drivers/staging/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c index 0186cee..0cf425e 100644 --- a/drivers/staging/vt6656/aes_ccmp.c +++ b/drivers/staging/vt6656/aes_ccmp.c @@ -108,9 +108,9 @@ u8 dot3_table[256] = { static void xor_128(u8 *a, u8 *b, u8 *out) { - PDWORD dwPtrA = (PDWORD) a; - PDWORD dwPtrB = (PDWORD) b; - PDWORD dwPtrOut = (PDWORD) out; + u32 * dwPtrA = (u32 *) a; + u32 * dwPtrB = (u32 *) b; + u32 * dwPtrOut = (u32 *) out; (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); @@ -121,9 +121,9 @@ static void xor_128(u8 *a, u8 *b, u8 *out) static void xor_32(u8 *a, u8 *b, u8 *out) { - PDWORD dwPtrA = (PDWORD) a; - PDWORD dwPtrB = (PDWORD) b; - PDWORD dwPtrOut = (PDWORD) out; + u32 * dwPtrA = (u32 *) a; + u32 * dwPtrB = (u32 *) b; + u32 * dwPtrOut = (u32 *) out; (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); } diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h index 6f72539..f003fbe 100644 --- a/drivers/staging/vt6656/bssdb.h +++ b/drivers/staging/vt6656/bssdb.h @@ -193,15 +193,15 @@ typedef struct tagKnownNodeDB { u8 byAuthSequence; unsigned long ulLastRxJiffer; u8 bySuppRate; - DWORD dwFlags; + u32 dwFlags; u16 wEnQueueCnt; bool bOnFly; unsigned long long KeyRSC; u8 byKeyIndex; - DWORD dwKeyIndex; + u32 dwKeyIndex; u8 byCipherSuite; - DWORD dwTSC47_16; + u32 dwTSC47_16; u16 wTSC15_0; unsigned int uWepKeyLength; u8 abyWepKey[WLAN_WEPMAX_KEYLEN]; diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index f16428d..c0522aa 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -309,7 +309,7 @@ typedef struct tagSPMKIDCandidateEvent { typedef struct tagSQuietControl { bool bEnable; - DWORD dwStartTime; + u32 dwStartTime; u8 byPeriod; u16 wDuration; } SQuietControl, *PSQuietControl; diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index d63a946..66ce195 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -750,28 +750,28 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // Soft MIC if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) { if (bIsWEP) { - PDWORD pdwMIC_L; - PDWORD pdwMIC_R; - DWORD dwMIC_Priority; - DWORD dwMICKey0 = 0, dwMICKey1 = 0; - DWORD dwLocalMIC_L = 0; - DWORD dwLocalMIC_R = 0; + u32 * pdwMIC_L; + u32 * pdwMIC_R; + u32 dwMIC_Priority; + u32 dwMICKey0 = 0, dwMICKey1 = 0; + u32 dwLocalMIC_L = 0; + u32 dwLocalMIC_R = 0; if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { - dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[24])); - dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[28])); + dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24])); + dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28])); } else { if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { - dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[16])); - dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[20])); + dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[16])); + dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[20])); } else if ((pKey->dwKeyIndex & BIT28) == 0) { - dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[16])); - dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[20])); + dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[16])); + dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[20])); } else { - dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[24])); - dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[28])); + dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24])); + dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28])); } } @@ -785,8 +785,8 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R); MIC_vUnInit(); - pdwMIC_L = (PDWORD)(skb->data + 8 + FrameSize); - pdwMIC_R = (PDWORD)(skb->data + 8 + FrameSize + 4); + pdwMIC_L = (u32 *)(skb->data + 8 + FrameSize); + pdwMIC_R = (u32 *)(skb->data + 8 + FrameSize + 4); if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) || @@ -838,12 +838,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, (pKey->byCipherSuite == KEY_CTL_CCMP))) { if (bIsWEP) { u16 wLocalTSC15_0 = 0; - DWORD dwLocalTSC47_16 = 0; + u32 dwLocalTSC47_16 = 0; unsigned long long RSC = 0; // endian issues RSC = *((unsigned long long *) &(pKey->KeyRSC)); wLocalTSC15_0 = (u16) RSC; - dwLocalTSC47_16 = (DWORD) (RSC>>16); + dwLocalTSC47_16 = (u32) (RSC>>16); RSC = dwRxTSC47_16; RSC <<= 16; @@ -1136,7 +1136,7 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, // TKIP/AES PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc - *pdwRxTSC47_16 = cpu_to_le32(*(PDWORD)(pbyIV + 4)); + *pdwRxTSC47_16 = cpu_to_le32(*(u32 *)(pbyIV + 4)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %x\n", *pdwRxTSC47_16); if (byDecMode == KEY_CTL_TKIP) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); @@ -1235,7 +1235,7 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, // TKIP/AES PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc - *pdwRxTSC47_16 = cpu_to_le32(*(PDWORD)(pbyIV + 4)); + *pdwRxTSC47_16 = cpu_to_le32(*(u32 *)(pbyIV + 4)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %x\n", *pdwRxTSC47_16); if (byDecMode == KEY_CTL_TKIP) { diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index 0319f92..94cee3d 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -489,7 +489,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, param->u.crypt.key_len ); - dwKeyIndex = (DWORD)(param->u.crypt.idx); + dwKeyIndex = (u32)(param->u.crypt.idx); if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) { pDevice->byKeyIndex = (u8)dwKeyIndex; pDevice->bTransmitKey = true; diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index 5e36967..1830519 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -272,7 +272,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, if (uKeyLength == WLAN_WEP104_KEYLEN) pKey->abyKey[15] |= 0x80; } - MACvSetKeyEntry(pDevice, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pbyBSSID, (PDWORD)pKey->abyKey); + MACvSetKeyEntry(pDevice, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pbyBSSID, (u32 *)pKey->abyKey); if ((dwKeyIndex & USE_KEYRSC) == 0) pKey->KeyRSC = 0; /* RSC set by NIC */ @@ -340,7 +340,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, if (uKeyLength == WLAN_WEP104_KEYLEN) pKey->abyKey[15] |= 0x80; } - MACvSetKeyEntry(pDevice, pTable->KeyTable[j].wKeyCtl, j, uKeyIdx, pbyBSSID, (PDWORD)pKey->abyKey); + MACvSetKeyEntry(pDevice, pTable->KeyTable[j].wKeyCtl, j, uKeyIdx, pbyBSSID, (u32 *)pKey->abyKey); if ((dwKeyIndex & USE_KEYRSC) == 0) pKey->KeyRSC = 0; /* RSC set by NIC */ @@ -707,7 +707,7 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, pKey->abyKey[15] |= 0x80; } - MACvSetKeyEntry(pDevice, pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl, MAX_KEY_TABLE-1, uKeyIdx, pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID, (PDWORD) pKey->abyKey); + MACvSetKeyEntry(pDevice, pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl, MAX_KEY_TABLE-1, uKeyIdx, pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID, (u32 *) pKey->abyKey); if ((dwKeyIndex & USE_KEYRSC) == 0) pKey->KeyRSC = 0; /* RSC set by NIC */ @@ -805,7 +805,7 @@ int KeybSetAllGroupKey(struct vnt_private *pDevice, PSKeyManagement pTable, pKey->abyKey[15] |= 0x80; } - MACvSetKeyEntry(pDevice, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pTable->KeyTable[i].abyBSSID, (PDWORD) pKey->abyKey); + MACvSetKeyEntry(pDevice, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pTable->KeyTable[i].abyBSSID, (u32 *) pKey->abyKey); if ((dwKeyIndex & USE_KEYRSC) == 0) pKey->KeyRSC = 0; /* RSC set by NIC */ diff --git a/drivers/staging/vt6656/key.h b/drivers/staging/vt6656/key.h index 217decd..56799cf 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -61,11 +61,11 @@ typedef struct tagSKeyItem u32 uKeyLength; u8 abyKey[MAX_KEY_LEN]; u64 KeyRSC; - DWORD dwTSC47_16; + u32 dwTSC47_16; u16 wTSC15_0; u8 byCipherSuite; u8 byReserved0; - DWORD dwKeyIndex; + u32 dwKeyIndex; void *pvKeyTable; } SKeyItem, *PSKeyItem; //64 @@ -75,7 +75,7 @@ typedef struct tagSKeyTable u8 byReserved0[2]; //8 SKeyItem PairwiseKey; SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328 - DWORD dwGTKeyIndex; // GroupTransmitKey Index + u32 dwGTKeyIndex; // GroupTransmitKey Index bool bInUse; u16 wKeyCtl; bool bSoftWEP; diff --git a/drivers/staging/vt6656/mib.h b/drivers/staging/vt6656/mib.h index 7ec4f02..ced7d56 100644 --- a/drivers/staging/vt6656/mib.h +++ b/drivers/staging/vt6656/mib.h @@ -40,7 +40,7 @@ // USB counter // typedef struct tagSUSBCounter { - DWORD dwCrc; + u32 dwCrc; } SUSBCounter, *PSUSBCounter; @@ -91,24 +91,24 @@ typedef struct tagSMib2Counter { // e.g. "interface 1" signed long ifType; signed long ifMtu; - DWORD ifSpeed; + u32 ifSpeed; u8 ifPhysAddress[ETH_ALEN]; signed long ifAdminStatus; signed long ifOperStatus; - DWORD ifLastChange; - DWORD ifInOctets; - DWORD ifInUcastPkts; - DWORD ifInNUcastPkts; - DWORD ifInDiscards; - DWORD ifInErrors; - DWORD ifInUnknownProtos; - DWORD ifOutOctets; - DWORD ifOutUcastPkts; - DWORD ifOutNUcastPkts; - DWORD ifOutDiscards; - DWORD ifOutErrors; - DWORD ifOutQLen; - DWORD ifSpecific; + u32 ifLastChange; + u32 ifInOctets; + u32 ifInUcastPkts; + u32 ifInNUcastPkts; + u32 ifInDiscards; + u32 ifInErrors; + u32 ifInUnknownProtos; + u32 ifOutOctets; + u32 ifOutUcastPkts; + u32 ifOutNUcastPkts; + u32 ifOutDiscards; + u32 ifOutErrors; + u32 ifOutQLen; + u32 ifSpecific; } SMib2Counter, *PSMib2Counter; // Value in the ifType entry @@ -125,26 +125,26 @@ typedef struct tagSMib2Counter { // typedef struct tagSRmonCounter { signed long etherStatsIndex; - DWORD etherStatsDataSource; - DWORD etherStatsDropEvents; - DWORD etherStatsOctets; - DWORD etherStatsPkts; - DWORD etherStatsBroadcastPkts; - DWORD etherStatsMulticastPkts; - DWORD etherStatsCRCAlignErrors; - DWORD etherStatsUndersizePkts; - DWORD etherStatsOversizePkts; - DWORD etherStatsFragments; - DWORD etherStatsJabbers; - DWORD etherStatsCollisions; - DWORD etherStatsPkt64Octets; - DWORD etherStatsPkt65to127Octets; - DWORD etherStatsPkt128to255Octets; - DWORD etherStatsPkt256to511Octets; - DWORD etherStatsPkt512to1023Octets; - DWORD etherStatsPkt1024to1518Octets; - DWORD etherStatsOwners; - DWORD etherStatsStatus; + u32 etherStatsDataSource; + u32 etherStatsDropEvents; + u32 etherStatsOctets; + u32 etherStatsPkts; + u32 etherStatsBroadcastPkts; + u32 etherStatsMulticastPkts; + u32 etherStatsCRCAlignErrors; + u32 etherStatsUndersizePkts; + u32 etherStatsOversizePkts; + u32 etherStatsFragments; + u32 etherStatsJabbers; + u32 etherStatsCollisions; + u32 etherStatsPkt64Octets; + u32 etherStatsPkt65to127Octets; + u32 etherStatsPkt128to255Octets; + u32 etherStatsPkt256to511Octets; + u32 etherStatsPkt512to1023Octets; + u32 etherStatsPkt1024to1518Octets; + u32 etherStatsOwners; + u32 etherStatsStatus; } SRmonCounter, *PSRmonCounter; // @@ -192,27 +192,27 @@ typedef struct tagSCustomCounters { typedef struct tagSISRCounters { unsigned long Length; - DWORD dwIsrTx0OK; - DWORD dwIsrAC0TxOK; - DWORD dwIsrBeaconTxOK; - DWORD dwIsrRx0OK; - DWORD dwIsrTBTTInt; - DWORD dwIsrSTIMERInt; - DWORD dwIsrWatchDog; - DWORD dwIsrUnrecoverableError; - DWORD dwIsrSoftInterrupt; - DWORD dwIsrMIBNearfull; - DWORD dwIsrRxNoBuf; - - DWORD dwIsrUnknown; // unknown interrupt count - - DWORD dwIsrRx1OK; - DWORD dwIsrATIMTxOK; - DWORD dwIsrSYNCTxOK; - DWORD dwIsrCFPEnd; - DWORD dwIsrATIMEnd; - DWORD dwIsrSYNCFlushOK; - DWORD dwIsrSTIMER1Int; + u32 dwIsrTx0OK; + u32 dwIsrAC0TxOK; + u32 dwIsrBeaconTxOK; + u32 dwIsrRx0OK; + u32 dwIsrTBTTInt; + u32 dwIsrSTIMERInt; + u32 dwIsrWatchDog; + u32 dwIsrUnrecoverableError; + u32 dwIsrSoftInterrupt; + u32 dwIsrMIBNearfull; + u32 dwIsrRxNoBuf; + + u32 dwIsrUnknown; // unknown interrupt count + + u32 dwIsrRx1OK; + u32 dwIsrATIMTxOK; + u32 dwIsrSYNCTxOK; + u32 dwIsrCFPEnd; + u32 dwIsrATIMEnd; + u32 dwIsrSYNCFlushOK; + u32 dwIsrSTIMER1Int; ///////////////////////////////////// } SISRCounters, *PSISRCounters; @@ -248,34 +248,34 @@ typedef struct tagSStatCounter { // RSR status count // - DWORD dwRsrFrmAlgnErr; - DWORD dwRsrErr; - DWORD dwRsrCRCErr; - DWORD dwRsrCRCOk; - DWORD dwRsrBSSIDOk; - DWORD dwRsrADDROk; - DWORD dwRsrBCNSSIDOk; - DWORD dwRsrLENErr; - DWORD dwRsrTYPErr; - - DWORD dwNewRsrDECRYPTOK; - DWORD dwNewRsrCFP; - DWORD dwNewRsrUTSF; - DWORD dwNewRsrHITAID; - DWORD dwNewRsrHITAID0; - - DWORD dwRsrLong; - DWORD dwRsrRunt; - - DWORD dwRsrRxControl; - DWORD dwRsrRxData; - DWORD dwRsrRxManage; - - DWORD dwRsrRxPacket; - DWORD dwRsrRxOctet; - DWORD dwRsrBroadcast; - DWORD dwRsrMulticast; - DWORD dwRsrDirected; + u32 dwRsrFrmAlgnErr; + u32 dwRsrErr; + u32 dwRsrCRCErr; + u32 dwRsrCRCOk; + u32 dwRsrBSSIDOk; + u32 dwRsrADDROk; + u32 dwRsrBCNSSIDOk; + u32 dwRsrLENErr; + u32 dwRsrTYPErr; + + u32 dwNewRsrDECRYPTOK; + u32 dwNewRsrCFP; + u32 dwNewRsrUTSF; + u32 dwNewRsrHITAID; + u32 dwNewRsrHITAID0; + + u32 dwRsrLong; + u32 dwRsrRunt; + + u32 dwRsrRxControl; + u32 dwRsrRxData; + u32 dwRsrRxManage; + + u32 dwRsrRxPacket; + u32 dwRsrRxOctet; + u32 dwRsrBroadcast; + u32 dwRsrMulticast; + u32 dwRsrDirected; // 64-bit OID unsigned long long ullRsrOK; @@ -287,36 +287,36 @@ typedef struct tagSStatCounter { unsigned long long ullRxMulticastFrames; unsigned long long ullRxDirectedFrames; - DWORD dwRsrRxFragment; - DWORD dwRsrRxFrmLen64; - DWORD dwRsrRxFrmLen65_127; - DWORD dwRsrRxFrmLen128_255; - DWORD dwRsrRxFrmLen256_511; - DWORD dwRsrRxFrmLen512_1023; - DWORD dwRsrRxFrmLen1024_1518; + u32 dwRsrRxFragment; + u32 dwRsrRxFrmLen64; + u32 dwRsrRxFrmLen65_127; + u32 dwRsrRxFrmLen128_255; + u32 dwRsrRxFrmLen256_511; + u32 dwRsrRxFrmLen512_1023; + u32 dwRsrRxFrmLen1024_1518; // TSR status count // - DWORD dwTsrTotalRetry; // total collision retry count - DWORD dwTsrOnceRetry; // this packet only occur one collision - DWORD dwTsrMoreThanOnceRetry; // this packet occur more than one collision - DWORD dwTsrRetry; // this packet has ever occur collision, + u32 dwTsrTotalRetry; // total collision retry count + u32 dwTsrOnceRetry; // this packet only occur one collision + u32 dwTsrMoreThanOnceRetry; // this packet occur more than one collision + u32 dwTsrRetry; // this packet has ever occur collision, // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0) - DWORD dwTsrACKData; - DWORD dwTsrErr; - DWORD dwAllTsrOK; - DWORD dwTsrRetryTimeout; - DWORD dwTsrTransmitTimeout; - - DWORD dwTsrTxPacket; - DWORD dwTsrTxOctet; - DWORD dwTsrBroadcast; - DWORD dwTsrMulticast; - DWORD dwTsrDirected; + u32 dwTsrACKData; + u32 dwTsrErr; + u32 dwAllTsrOK; + u32 dwTsrRetryTimeout; + u32 dwTsrTransmitTimeout; + + u32 dwTsrTxPacket; + u32 dwTsrTxOctet; + u32 dwTsrBroadcast; + u32 dwTsrMulticast; + u32 dwTsrDirected; // RD/TD count - DWORD dwCntRxFrmLength; - DWORD dwCntTxBufLength; + u32 dwCntRxFrmLength; + u32 dwCntTxBufLength; u8 abyCntRxPattern[16]; u8 abyCntTxPattern[16]; @@ -324,9 +324,9 @@ typedef struct tagSStatCounter { // Software check.... - DWORD dwCntRxDataErr; // rx buffer data software compare CRC err count - DWORD dwCntDecryptErr; // rx buffer data software compare CRC err count - DWORD dwCntRxICVErr; // rx buffer data software compare CRC err count + u32 dwCntRxDataErr; // rx buffer data software compare CRC err count + u32 dwCntDecryptErr; // rx buffer data software compare CRC err count + u32 dwCntRxICVErr; // rx buffer data software compare CRC err count // 64-bit OID @@ -341,9 +341,9 @@ typedef struct tagSStatCounter { unsigned long long ullTxDirectedBytes; // for autorate - DWORD dwTxOk[MAX_RATE+1]; - DWORD dwTxFail[MAX_RATE+1]; - DWORD dwTxRetryCount[8]; + u32 dwTxOk[MAX_RATE+1]; + u32 dwTxFail[MAX_RATE+1]; + u32 dwTxRetryCount[8]; STxPktInfo abyTxPktInfo[16]; diff --git a/drivers/staging/vt6656/michael.c b/drivers/staging/vt6656/michael.c index 1fb88e6..1a8ae92 100644 --- a/drivers/staging/vt6656/michael.c +++ b/drivers/staging/vt6656/michael.c @@ -26,8 +26,8 @@ * Date: Sep 4, 2002 * * Functions: - * s_dwGetUINT32 - Convert from u8[] to DWORD in a portable way - * s_vPutUINT32 - Convert from DWORD to u8[] in a portable way + * s_dwGetUINT32 - Convert from u8[] to u32 in a portable way + * s_vPutUINT32 - Convert from u32 to u8[] in a portable way * s_vClear - Reset the state to the empty message. * s_vSetKey - Set the key. * MIC_vInit - Set the key. @@ -48,39 +48,39 @@ /*--------------------- Static Functions --------------------------*/ /* - * static DWORD s_dwGetUINT32(u8 * p); Get DWORD from + * static u32 s_dwGetUINT32(u8 * p); Get u32 from * 4 bytes LSByte first - * static void s_vPutUINT32(u8* p, DWORD val); Put DWORD into + * static void s_vPutUINT32(u8* p, u32 val); Put u32 into * 4 bytes LSByte first */ static void s_vClear(void); /* Clear the internal message, * resets the object to the * state just after construction. */ -static void s_vSetKey(DWORD dwK0, DWORD dwK1); +static void s_vSetKey(u32 dwK0, u32 dwK1); static void s_vAppendByte(u8 b); /* Add a single byte to the internal * message */ /*--------------------- Export Variables --------------------------*/ -static DWORD L, R; /* Current state */ -static DWORD K0, K1; /* Key */ -static DWORD M; /* Message accumulator (single word) */ +static u32 L, R; /* Current state */ +static u32 K0, K1; /* Key */ +static u32 M; /* Message accumulator (single word) */ static unsigned int nBytesInM; /* # bytes in M */ /*--------------------- Export Functions --------------------------*/ /* -static DWORD s_dwGetUINT32 (u8 * p) -// Convert from u8[] to DWORD in a portable way +static u32 s_dwGetUINT32 (u8 * p) +// Convert from u8[] to u32 in a portable way { - DWORD res = 0; + u32 res = 0; unsigned int i; for (i = 0; i < 4; i++) res |= (*p++) << (8*i); return res; } -static void s_vPutUINT32(u8 *p, DWORD val) -// Convert from DWORD to u8[] in a portable way +static void s_vPutUINT32(u8 *p, u32 val) +// Convert from u32 to u8[] in a portable way { unsigned int i; for (i = 0; i < 4; i++) { @@ -99,7 +99,7 @@ static void s_vClear(void) M = 0; } -static void s_vSetKey(DWORD dwK0, DWORD dwK1) +static void s_vSetKey(u32 dwK0, u32 dwK1) { /* Set the key */ K0 = dwK0; @@ -130,7 +130,7 @@ static void s_vAppendByte(u8 b) } } -void MIC_vInit(DWORD dwK0, DWORD dwK1) +void MIC_vInit(u32 dwK0, u32 dwK1) { /* Set the key */ s_vSetKey(dwK0, dwK1); @@ -157,7 +157,7 @@ void MIC_vAppend(u8 * src, unsigned int nBytes) } } -void MIC_vGetMIC(PDWORD pdwL, PDWORD pdwR) +void MIC_vGetMIC(u32 * pdwL, u32 * pdwR) { /* Append the minimum padding */ s_vAppendByte(0x5a); diff --git a/drivers/staging/vt6656/michael.h b/drivers/staging/vt6656/michael.h index 0740232..2cdb07e 100644 --- a/drivers/staging/vt6656/michael.h +++ b/drivers/staging/vt6656/michael.h @@ -35,7 +35,7 @@ /*--------------------- Export Types ------------------------------*/ -void MIC_vInit(DWORD dwK0, DWORD dwK1); +void MIC_vInit(u32 dwK0, u32 dwK1); void MIC_vUnInit(void); @@ -44,7 +44,7 @@ void MIC_vAppend(u8 * src, unsigned int nBytes); // Get the MIC result. Destination should accept 8 bytes of result. // This also resets the message to empty. -void MIC_vGetMIC(PDWORD pdwL, PDWORD pdwR); +void MIC_vGetMIC(u32 * pdwL, u32 * pdwR); /*--------------------- Export Macros ------------------------------*/ diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index a415705..114217a 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -842,7 +842,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) case RF_AIROHA7230: { - DWORD dwMax7230Pwr; + u32 dwMax7230Pwr; if (uRATE <= RATE_11M) { //RobertYu:20060426, for better 11b mask bResult &= IFRFbWriteEmbedded(pDevice, 0x111BB900+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW); @@ -864,7 +864,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) case RF_VT3226: //RobertYu:20051111, VT3226C0 and before { - DWORD dwVT3226Pwr; + u32 dwVT3226Pwr; if (pDevice->byCurPwr >= VT3226_PWR_IDX_LEN) return false; @@ -876,7 +876,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) case RF_VT3226D0: //RobertYu:20051228 { - DWORD dwVT3226Pwr; + u32 dwVT3226Pwr; if (pDevice->byCurPwr >= VT3226_PWR_IDX_LEN) return false; @@ -921,7 +921,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) //{{RobertYu:20060609 case RF_VT3342A0: { - DWORD dwVT3342Pwr; + u32 dwVT3342Pwr; if (pDevice->byCurPwr >= VT3342_PWR_IDX_LEN) return false; diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index 8dd611c..2c67583 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h @@ -115,7 +115,7 @@ typedef struct _CMD_CLRKEY_ENTRY typedef struct _CMD_WRITE_MISCFF { - DWORD adwMiscFFData[22][4]; //a key entry has only 22 dwords + u32 adwMiscFFData[22][4]; //a key entry has only 22 dwords } CMD_WRITE_MISCFF, *PCMD_WRITE_MISCFF; typedef struct _CMD_SET_TSFTBTT @@ -143,10 +143,10 @@ typedef struct _CMD_CHANGE_BBTYPE u8 byBBCR10; u8 byBB_BBType; //CR88 u8 byMAC_BBType; - DWORD dwRSPINF_b_1; - DWORD dwRSPINF_b_2; - DWORD dwRSPINF_b_55; - DWORD dwRSPINF_b_11; + u32 dwRSPINF_b_1; + u32 dwRSPINF_b_2; + u32 dwRSPINF_b_55; + u32 dwRSPINF_b_11; u16 wRSPINF_a[9]; } CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE; diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index b542ec3..024b29c 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -324,7 +324,7 @@ static void s_vSWencryption(struct vnt_private *pDevice, //======================================================================= // Append ICV after payload dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload) - pdwICV = (PDWORD)(pbyPayloadHead + wPayloadSize); + pdwICV = (u32 *)(pbyPayloadHead + wPayloadSize); // finally, we must invert dwCRC to get the correct answer *pdwICV = cpu_to_le32(~dwICV); // RC4 encryption @@ -335,7 +335,7 @@ static void s_vSWencryption(struct vnt_private *pDevice, //======================================================================= //Append ICV after payload dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload) - pdwICV = (PDWORD)(pbyPayloadHead + wPayloadSize); + pdwICV = (u32 *)(pbyPayloadHead + wPayloadSize); // finally, we must invert dwCRC to get the correct answer *pdwICV = cpu_to_le32(~dwICV); // RC4 encryption @@ -1516,12 +1516,12 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[20]); } else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) { - dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]); - dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]); + dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[16]); + dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[20]); } else { - dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[24]); - dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[28]); + dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[24]); + dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[28]); } // DO Software Michael MIC_vInit(dwMICKey0, dwMICKey1); @@ -1541,8 +1541,8 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, MIC_vAppend(pbyPayloadHead, cbFrameBodySize); - pdwMIC_L = (PDWORD)(pbyPayloadHead + cbFrameBodySize); - pdwMIC_R = (PDWORD)(pbyPayloadHead + cbFrameBodySize + 4); + pdwMIC_L = (u32 *)(pbyPayloadHead + cbFrameBodySize); + pdwMIC_R = (u32 *)(pbyPayloadHead + cbFrameBodySize + 4); MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vUnInit(); @@ -1570,13 +1570,13 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, if (pDevice->bSoftwareGenCrcErr == true) { unsigned int cbLen; - PDWORD pdwCRC; + u32 * pdwCRC; dwCRC = 0xFFFFFFFFL; cbLen = cbFrameSize - cbFCSlen; // calculate CRC, and wrtie CRC value to end of TD dwCRC = CRCdwGetCrc32Ex(pbyMacHdr, cbLen, dwCRC); - pdwCRC = (PDWORD)(pbyMacHdr + cbLen); + pdwCRC = (u32 *)(pbyMacHdr + cbLen); // finally, we must invert dwCRC to get the correct answer *pdwCRC = ~dwCRC; // Force Error @@ -2359,8 +2359,8 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) if ((pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { - dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]); - dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]); + dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[16]); + dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[20]); // DO Software Michael MIC_vInit(dwMICKey0, dwMICKey1); @@ -2374,8 +2374,8 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) MIC_vAppend((pbyTxBufferAddr + uLength), cbFrameBodySize); - pdwMIC_L = (PDWORD)(pbyTxBufferAddr + uLength + cbFrameBodySize); - pdwMIC_R = (PDWORD)(pbyTxBufferAddr + uLength + cbFrameBodySize + 4); + pdwMIC_L = (u32 *)(pbyTxBufferAddr + uLength + cbFrameBodySize); + pdwMIC_R = (u32 *)(pbyTxBufferAddr + uLength + cbFrameBodySize + 4); MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vUnInit(); diff --git a/drivers/staging/vt6656/tcrc.c b/drivers/staging/vt6656/tcrc.c index d4db713..1fe043c 100644 --- a/drivers/staging/vt6656/tcrc.c +++ b/drivers/staging/vt6656/tcrc.c @@ -42,7 +42,7 @@ /*--------------------- Static Variables --------------------------*/ /* 32-bit CRC table */ -static const DWORD s_adwCrc32Table[256] = { +static const u32 s_adwCrc32Table[256] = { 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL, 0x076DC419L, 0x706AF48FL, 0xE963A535L, 0x9E6495A3L, 0x0EDB8832L, 0x79DCB8A4L, 0xE0D5E91EL, 0x97D2D988L, @@ -132,9 +132,9 @@ static const DWORD s_adwCrc32Table[256] = { * Return Value: CRC-32 * -*/ -DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed) +u32 CRCdwCrc32(u8 * pbyData, unsigned int cbByte, u32 dwCrcSeed) { - DWORD dwCrc; + u32 dwCrc; dwCrc = dwCrcSeed; while (cbByte--) { @@ -165,7 +165,7 @@ DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed) * Return Value: CRC-32 * -*/ -DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte) +u32 CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte) { return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL); } @@ -191,7 +191,7 @@ DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte) * Return Value: CRC-32 * -*/ -DWORD CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, DWORD dwPreCRC) +u32 CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, u32 dwPreCRC) { return CRCdwCrc32(pbyData, cbByte, dwPreCRC); } diff --git a/drivers/staging/vt6656/tcrc.h b/drivers/staging/vt6656/tcrc.h index 342061d..4eb923b 100644 --- a/drivers/staging/vt6656/tcrc.h +++ b/drivers/staging/vt6656/tcrc.h @@ -43,8 +43,8 @@ /*--------------------- Export Functions --------------------------*/ -DWORD CRCdwCrc32(u8 * pbyData, unsigned int cbByte, DWORD dwCrcSeed); -DWORD CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte); -DWORD CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, DWORD dwPreCRC); +u32 CRCdwCrc32(u8 * pbyData, unsigned int cbByte, u32 dwCrcSeed); +u32 CRCdwGetCrc32(u8 * pbyData, unsigned int cbByte); +u32 CRCdwGetCrc32Ex(u8 * pbyData, unsigned int cbByte, u32 dwPreCRC); #endif /* __TCRC_H__ */ diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c index c92efda..ed99289 100644 --- a/drivers/staging/vt6656/tether.c +++ b/drivers/staging/vt6656/tether.c @@ -98,10 +98,10 @@ u8 ETHbyGetHashIndexByCrc32(u8 * pbyMultiAddr) */ bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength) { - DWORD dwCRC; + u32 dwCRC; dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4); - if (cpu_to_le32(*((PDWORD)(pbyBuffer + cbFrameLength - 4))) != dwCRC) + if (cpu_to_le32(*((u32 *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) return false; return true; } diff --git a/drivers/staging/vt6656/tkip.c b/drivers/staging/vt6656/tkip.c index f5aeb5e..0389e88 100644 --- a/drivers/staging/vt6656/tkip.c +++ b/drivers/staging/vt6656/tkip.c @@ -185,7 +185,7 @@ void TKIPvMixKey( u8 * pbyTKey, u8 * pbyTA, u16 wTSC15_0, - DWORD dwTSC47_16, + u32 dwTSC47_16, u8 * pbyRC4Key ) { diff --git a/drivers/staging/vt6656/tkip.h b/drivers/staging/vt6656/tkip.h index 7662423..a5a09be6 100644 --- a/drivers/staging/vt6656/tkip.h +++ b/drivers/staging/vt6656/tkip.h @@ -50,7 +50,7 @@ void TKIPvMixKey( u8 * pbyTKey, u8 * pbyTA, u16 wTSC15_0, - DWORD dwTSC47_16, + u32 dwTSC47_16, u8 * pbyRC4Key ); diff --git a/drivers/staging/vt6656/tmacro.h b/drivers/staging/vt6656/tmacro.h index b4e6cb2..3a5ee06 100644 --- a/drivers/staging/vt6656/tmacro.h +++ b/drivers/staging/vt6656/tmacro.h @@ -44,7 +44,7 @@ #define LOWORD(d) ((u16)(d)) #endif #if !defined(HIWORD) -#define HIWORD(d) ((u16)((((DWORD)(d)) >> 16) & 0xFFFF)) +#define HIWORD(d) ((u16)((((u32)(d)) >> 16) & 0xFFFF)) #endif #define LODWORD(q) ((q).u.dwLowDword) @@ -54,7 +54,7 @@ #define MAKEWORD(lb, hb) ((u16)(((u8)(lb)) | (((u16)((u8)(hb))) << 8))) #endif #if !defined(MAKEDWORD) -#define MAKEDWORD(lw, hw) ((DWORD)(((u16)(lw)) | (((DWORD)((u16)(hw))) << 16))) +#define MAKEDWORD(lw, hw) ((u32)(((u16)(lw)) | (((u32)((u16)(hw))) << 16))) #endif #endif /* __TMACRO_H__ */ diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index ee1201d..b22cf91 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -35,8 +35,6 @@ /****** Simple typedefs ***************************************************/ -typedef u32 DWORD; - /****** Common pointer types ***********************************************/ typedef u32 ULONG_PTR; @@ -44,6 +42,4 @@ typedef u32 DWORD_PTR; // boolean pointer -typedef DWORD * PDWORD; - #endif /* __TTYPE_H__ */ diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index c0886c1..669fb16 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -71,7 +71,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) { struct viawget_wpa_param *param = ctx; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - DWORD dwKeyIndex = 0; + u32 dwKeyIndex = 0; u8 abyKey[MAX_KEY_LEN]; u8 abySeq[MAX_KEY_LEN]; u64 KeyRSC; @@ -101,7 +101,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len); - dwKeyIndex = (DWORD)(param->u.wpa_key.key_index); + dwKeyIndex = (u32)(param->u.wpa_key.key_index); if (param->u.wpa_key.alg_name == WPA_ALG_WEP) { if (dwKeyIndex > 3) { -- 1.7.2.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel