Staging: vt6655: remove PDWORD typedef

Use unsigned long * instead.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Charles Clément 2010-06-05 15:13:49 -07:00 committed by Greg Kroah-Hartman
parent 15df6c2b92
commit 9d828c458f
14 changed files with 82 additions and 84 deletions

View File

@ -112,9 +112,9 @@ BYTE dot3_table[256] = {
void xor_128(BYTE *a, BYTE *b, BYTE *out) void xor_128(BYTE *a, BYTE *b, BYTE *out)
{ {
PDWORD dwPtrA = (PDWORD) a; unsigned long *dwPtrA = (unsigned long *) a;
PDWORD dwPtrB = (PDWORD) b; unsigned long *dwPtrB = (unsigned long *) b;
PDWORD dwPtrOut =(PDWORD) out; unsigned long *dwPtrOut =(unsigned long *) out;
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
@ -125,9 +125,9 @@ PDWORD dwPtrOut =(PDWORD) out;
void xor_32(BYTE *a, BYTE *b, BYTE *out) void xor_32(BYTE *a, BYTE *b, BYTE *out)
{ {
PDWORD dwPtrA = (PDWORD) a; unsigned long *dwPtrA = (unsigned long *) a;
PDWORD dwPtrB = (PDWORD) b; unsigned long *dwPtrB = (unsigned long *) b;
PDWORD dwPtrOut =(PDWORD) out; unsigned long *dwPtrOut =(unsigned long *) out;
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++); (*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
} }

View File

@ -125,7 +125,7 @@ static BOOL s_bHandleRxEncryption(
PSKeyItem *pKeyOut, PSKeyItem *pKeyOut,
int * pbExtIV, int * pbExtIV,
unsigned short *pwRxTSC15_0, unsigned short *pwRxTSC15_0,
PDWORD pdwRxTSC47_16 unsigned long *pdwRxTSC47_16
); );
static BOOL s_bHostWepRxEncryption( static BOOL s_bHostWepRxEncryption(
@ -139,7 +139,7 @@ static BOOL s_bHostWepRxEncryption(
unsigned char *pbyNewRsr, unsigned char *pbyNewRsr,
int * pbExtIV, int * pbExtIV,
unsigned short *pwRxTSC15_0, unsigned short *pwRxTSC15_0,
PDWORD pdwRxTSC47_16 unsigned long *pdwRxTSC47_16
); );
@ -800,8 +800,8 @@ device_receive_frame (
// Soft MIC // Soft MIC
if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) { if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) {
if (bIsWEP) { if (bIsWEP) {
PDWORD pdwMIC_L; unsigned long *pdwMIC_L;
PDWORD pdwMIC_R; unsigned long *pdwMIC_R;
DWORD dwMIC_Priority; DWORD dwMIC_Priority;
DWORD dwMICKey0 = 0, dwMICKey1 = 0; DWORD dwMICKey0 = 0, dwMICKey1 = 0;
DWORD dwLocalMIC_L = 0; DWORD dwLocalMIC_L = 0;
@ -810,19 +810,19 @@ device_receive_frame (
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[24])); dwMICKey0 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[24]));
dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[28])); dwMICKey1 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[28]));
} }
else { else {
if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[16])); dwMICKey0 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[16]));
dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[20])); dwMICKey1 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[20]));
} else if ((pKey->dwKeyIndex & BIT28) == 0) { } else if ((pKey->dwKeyIndex & BIT28) == 0) {
dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[16])); dwMICKey0 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[16]));
dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[20])); dwMICKey1 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[20]));
} else { } else {
dwMICKey0 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[24])); dwMICKey0 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[24]));
dwMICKey1 = cpu_to_le32(*(PDWORD)(&pKey->abyKey[28])); dwMICKey1 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[28]));
} }
} }
@ -836,8 +836,8 @@ device_receive_frame (
MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R); MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R);
MIC_vUnInit(); MIC_vUnInit();
pdwMIC_L = (PDWORD)(skb->data + 4 + FrameSize); pdwMIC_L = (unsigned long *)(skb->data + 4 + FrameSize);
pdwMIC_R = (PDWORD)(skb->data + 4 + FrameSize + 4); pdwMIC_R = (unsigned long *)(skb->data + 4 + FrameSize + 4);
//DBG_PRN_GRP12(("RxL: %lx, RxR: %lx\n", *pdwMIC_L, *pdwMIC_R)); //DBG_PRN_GRP12(("RxL: %lx, RxR: %lx\n", *pdwMIC_L, *pdwMIC_R));
//DBG_PRN_GRP12(("LocalL: %lx, LocalR: %lx\n", dwLocalMIC_L, dwLocalMIC_R)); //DBG_PRN_GRP12(("LocalL: %lx, LocalR: %lx\n", dwLocalMIC_L, dwLocalMIC_R));
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwMICKey0= %lx,dwMICKey1= %lx \n", dwMICKey0, dwMICKey1); //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwMICKey0= %lx,dwMICKey1= %lx \n", dwMICKey0, dwMICKey1);
@ -1171,7 +1171,7 @@ static BOOL s_bHandleRxEncryption (
PSKeyItem *pKeyOut, PSKeyItem *pKeyOut,
int * pbExtIV, int * pbExtIV,
unsigned short *pwRxTSC15_0, unsigned short *pwRxTSC15_0,
PDWORD pdwRxTSC47_16 unsigned long *pdwRxTSC47_16
) )
{ {
unsigned int PayloadLen = FrameSize; unsigned int PayloadLen = FrameSize;
@ -1275,7 +1275,7 @@ static BOOL s_bHandleRxEncryption (
// TKIP/AES // TKIP/AES
PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc 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(*(unsigned long *)(pbyIV + 4));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %lx\n",*pdwRxTSC47_16); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %lx\n",*pdwRxTSC47_16);
if (byDecMode == KEY_CTL_TKIP) { if (byDecMode == KEY_CTL_TKIP) {
*pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
@ -1318,7 +1318,7 @@ static BOOL s_bHostWepRxEncryption (
unsigned char *pbyNewRsr, unsigned char *pbyNewRsr,
int * pbExtIV, int * pbExtIV,
unsigned short *pwRxTSC15_0, unsigned short *pwRxTSC15_0,
PDWORD pdwRxTSC47_16 unsigned long *pdwRxTSC47_16
) )
{ {
unsigned int PayloadLen = FrameSize; unsigned int PayloadLen = FrameSize;
@ -1385,7 +1385,7 @@ static BOOL s_bHostWepRxEncryption (
// TKIP/AES // TKIP/AES
PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc 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(*(unsigned long *)(pbyIV + 4));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %lx\n",*pdwRxTSC47_16); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %lx\n",*pdwRxTSC47_16);
if (byDecMode == KEY_CTL_TKIP) { if (byDecMode == KEY_CTL_TKIP) {

View File

@ -732,7 +732,7 @@ vConfigWEPKey (
pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength; pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength;
MACvSetDefaultKeyEntry(pDevice->PortOffset, uKeyLength, dwKeyIndex, MACvSetDefaultKeyEntry(pDevice->PortOffset, uKeyLength, dwKeyIndex,
(PDWORD) &(pDevice->abyWepKey[dwKeyIndex][0]), pDevice->byLocalID); (unsigned long *) &(pDevice->abyWepKey[dwKeyIndex][0]), pDevice->byLocalID);
if (pDevice->eEncryptionStatus < Ndis802_11EncryptionNotSupported) { if (pDevice->eEncryptionStatus < Ndis802_11EncryptionNotSupported) {
for(ii=0; ii<MAX_GROUP_KEY; ii++) { for(ii=0; ii<MAX_GROUP_KEY; ii++) {

View File

@ -252,7 +252,7 @@ BOOL KeybSetKey (
if (uKeyLength == WLAN_WEP104_KEYLEN) if (uKeyLength == WLAN_WEP104_KEYLEN)
pKey->abyKey[15] |= 0x80; pKey->abyKey[15] |= 0x80;
} }
MACvSetKeyEntry(dwIoBase, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pbyBSSID, (PDWORD)pKey->abyKey, byLocalID); MACvSetKeyEntry(dwIoBase, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pbyBSSID, (unsigned long *)pKey->abyKey, byLocalID);
if ((dwKeyIndex & USE_KEYRSC) == 0) { if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC // RSC set by NIC
@ -317,7 +317,7 @@ BOOL KeybSetKey (
if (uKeyLength == WLAN_WEP104_KEYLEN) if (uKeyLength == WLAN_WEP104_KEYLEN)
pKey->abyKey[15] |= 0x80; pKey->abyKey[15] |= 0x80;
} }
MACvSetKeyEntry(dwIoBase, pTable->KeyTable[j].wKeyCtl, j, uKeyIdx, pbyBSSID, (PDWORD)pKey->abyKey, byLocalID); MACvSetKeyEntry(dwIoBase, pTable->KeyTable[j].wKeyCtl, j, uKeyIdx, pbyBSSID, (unsigned long *)pKey->abyKey, byLocalID);
if ((dwKeyIndex & USE_KEYRSC) == 0) { if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC // RSC set by NIC
@ -693,7 +693,7 @@ BOOL KeybSetDefaultKey (
if (uKeyLength == WLAN_WEP104_KEYLEN) if (uKeyLength == WLAN_WEP104_KEYLEN)
pKey->abyKey[15] |= 0x80; pKey->abyKey[15] |= 0x80;
} }
MACvSetKeyEntry(dwIoBase, pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl, MAX_KEY_TABLE-1, uKeyIdx, pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID, (PDWORD)pKey->abyKey, byLocalID); MACvSetKeyEntry(dwIoBase, pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl, MAX_KEY_TABLE-1, uKeyIdx, pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID, (unsigned long *)pKey->abyKey, byLocalID);
if ((dwKeyIndex & USE_KEYRSC) == 0) { if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC // RSC set by NIC
@ -792,7 +792,7 @@ BOOL KeybSetAllGroupKey (
if (uKeyLength == WLAN_WEP104_KEYLEN) if (uKeyLength == WLAN_WEP104_KEYLEN)
pKey->abyKey[15] |= 0x80; pKey->abyKey[15] |= 0x80;
} }
MACvSetKeyEntry(dwIoBase, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pTable->KeyTable[i].abyBSSID, (PDWORD)pKey->abyKey, byLocalID); MACvSetKeyEntry(dwIoBase, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx, pTable->KeyTable[i].abyBSSID, (unsigned long *)pKey->abyKey, byLocalID);
if ((dwKeyIndex & USE_KEYRSC) == 0) { if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC // RSC set by NIC

View File

@ -703,14 +703,14 @@ void MACvRestoreContext (DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf)
} }
// restore CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR // restore CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR
VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0, *(PDWORD)(pbyCxtBuf + MAC_REG_TXDMAPTR0)); VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0, *(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0));
VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, *(PDWORD)(pbyCxtBuf + MAC_REG_AC0DMAPTR)); VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, *(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR));
VNSvOutPortD(dwIoBase + MAC_REG_BCNDMAPTR, *(PDWORD)(pbyCxtBuf + MAC_REG_BCNDMAPTR)); VNSvOutPortD(dwIoBase + MAC_REG_BCNDMAPTR, *(unsigned long *)(pbyCxtBuf + MAC_REG_BCNDMAPTR));
VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR0, *(PDWORD)(pbyCxtBuf + MAC_REG_RXDMAPTR0)); VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR0, *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR0));
VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR1, *(PDWORD)(pbyCxtBuf + MAC_REG_RXDMAPTR1)); VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR1, *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR1));
} }
@ -737,22 +737,22 @@ BOOL MACbCompareContext (DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf)
// compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR // compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR
VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData); VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_TXDMAPTR0)) { if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0)) {
return FALSE; return FALSE;
} }
VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, &dwData); VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_AC0DMAPTR)) { if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR)) {
return FALSE; return FALSE;
} }
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, &dwData); VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_RXDMAPTR0)) { if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR0)) {
return FALSE; return FALSE;
} }
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, &dwData); VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_RXDMAPTR1)) { if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR1)) {
return FALSE; return FALSE;
} }
@ -1456,7 +1456,7 @@ BOOL MACbPSWakeup (DWORD_PTR dwIoBase)
*/ */
void MACvSetKeyEntry (DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, void MACvSetKeyEntry (DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, unsigned char *pbyAddr, PDWORD pdwKey, BYTE byLocalID) unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, BYTE byLocalID)
{ {
WORD wOffset; WORD wOffset;
DWORD dwData; DWORD dwData;
@ -1551,7 +1551,7 @@ WORD wOffset;
*/ */
void MACvSetDefaultKeyEntry (DWORD_PTR dwIoBase, unsigned int uKeyLen, void MACvSetDefaultKeyEntry (DWORD_PTR dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, PDWORD pdwKey, BYTE byLocalID) unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID)
{ {
WORD wOffset; WORD wOffset;
DWORD dwData; DWORD dwData;
@ -1667,7 +1667,7 @@ DWORD dwData;
* *
*/ */
void MACvSetDefaultTKIPKeyEntry (DWORD_PTR dwIoBase, unsigned int uKeyLen, void MACvSetDefaultTKIPKeyEntry (DWORD_PTR dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, PDWORD pdwKey, BYTE byLocalID) unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID)
{ {
WORD wOffset; WORD wOffset;
DWORD dwData; DWORD dwData;

View File

@ -714,37 +714,37 @@
#define MACvGetCurrRx0DescAddr(dwIoBase, pdwCurrDescAddr) \ #define MACvGetCurrRx0DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \ { \
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, \ VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, \
(PDWORD)pdwCurrDescAddr); \ (unsigned long *)pdwCurrDescAddr); \
} }
#define MACvGetCurrRx1DescAddr(dwIoBase, pdwCurrDescAddr) \ #define MACvGetCurrRx1DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \ { \
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, \ VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, \
(PDWORD)pdwCurrDescAddr); \ (unsigned long *)pdwCurrDescAddr); \
} }
#define MACvGetCurrTx0DescAddr(dwIoBase, pdwCurrDescAddr) \ #define MACvGetCurrTx0DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \ { \
VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, \ VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, \
(PDWORD)pdwCurrDescAddr); \ (unsigned long *)pdwCurrDescAddr); \
} }
#define MACvGetCurrAC0DescAddr(dwIoBase, pdwCurrDescAddr) \ #define MACvGetCurrAC0DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \ { \
VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, \ VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, \
(PDWORD)pdwCurrDescAddr); \ (unsigned long *)pdwCurrDescAddr); \
} }
#define MACvGetCurrSyncDescAddr(dwIoBase, pdwCurrDescAddr) \ #define MACvGetCurrSyncDescAddr(dwIoBase, pdwCurrDescAddr) \
{ \ { \
VNSvInPortD(dwIoBase + MAC_REG_SYNCDMAPTR, \ VNSvInPortD(dwIoBase + MAC_REG_SYNCDMAPTR, \
(PDWORD)pdwCurrDescAddr); \ (unsigned long *)pdwCurrDescAddr); \
} }
#define MACvGetCurrATIMDescAddr(dwIoBase, pdwCurrDescAddr) \ #define MACvGetCurrATIMDescAddr(dwIoBase, pdwCurrDescAddr) \
{ \ { \
VNSvInPortD(dwIoBase + MAC_REG_ATIMDMAPTR, \ VNSvInPortD(dwIoBase + MAC_REG_ATIMDMAPTR, \
(PDWORD)pdwCurrDescAddr); \ (unsigned long *)pdwCurrDescAddr); \
} \ } \
// set the chip with current BCN tx descriptor address // set the chip with current BCN tx descriptor address
@ -1140,14 +1140,14 @@ BOOL MACbFlushSYNCFifo(DWORD_PTR dwIoBase);
BOOL MACbPSWakeup(DWORD_PTR dwIoBase); BOOL MACbPSWakeup(DWORD_PTR dwIoBase);
void MACvSetKeyEntry(DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, void MACvSetKeyEntry(DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, unsigned char *pbyAddr, PDWORD pdwKey, BYTE byLocalID); unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, BYTE byLocalID);
void MACvDisableKeyEntry(DWORD_PTR dwIoBase, unsigned int uEntryIdx); void MACvDisableKeyEntry(DWORD_PTR dwIoBase, unsigned int uEntryIdx);
void MACvSetDefaultKeyEntry(DWORD_PTR dwIoBase, unsigned int uKeyLen, void MACvSetDefaultKeyEntry(DWORD_PTR dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, PDWORD pdwKey, BYTE byLocalID); unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID);
//void MACvEnableDefaultKey(DWORD_PTR dwIoBase, BYTE byLocalID); //void MACvEnableDefaultKey(DWORD_PTR dwIoBase, BYTE byLocalID);
void MACvDisableDefaultKey(DWORD_PTR dwIoBase); void MACvDisableDefaultKey(DWORD_PTR dwIoBase);
void MACvSetDefaultTKIPKeyEntry(DWORD_PTR dwIoBase, unsigned int uKeyLen, void MACvSetDefaultTKIPKeyEntry(DWORD_PTR dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, PDWORD pdwKey, BYTE byLocalID); unsigned int uKeyIdx, unsigned long *pdwKey, BYTE byLocalID);
void MACvSetDefaultKeyCtl(DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID); void MACvSetDefaultKeyCtl(DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx, BYTE byLocalID);
#endif // __MAC_H__ #endif // __MAC_H__

View File

@ -159,7 +159,7 @@ void MIC_vAppend (unsigned char *src, unsigned int nBytes)
} }
} }
void MIC_vGetMIC (PDWORD pdwL, PDWORD pdwR) void MIC_vGetMIC (unsigned long *pdwL, unsigned long *pdwR)
{ {
// Append the minimum padding // Append the minimum padding
s_vAppendByte(0x5a); s_vAppendByte(0x5a);

View File

@ -44,7 +44,7 @@ void MIC_vAppend(unsigned char *src, unsigned int nBytes);
// Get the MIC result. Destination should accept 8 bytes of result. // Get the MIC result. Destination should accept 8 bytes of result.
// This also resets the message to empty. // This also resets the message to empty.
void MIC_vGetMIC(PDWORD pdwL, PDWORD pdwR); void MIC_vGetMIC(unsigned long *pdwL, unsigned long *pdwR);
/*--------------------- Export Macros ------------------------------*/ /*--------------------- Export Macros ------------------------------*/

View File

@ -221,8 +221,8 @@ s_vFillTxKey (
unsigned char *pMICHDR unsigned char *pMICHDR
) )
{ {
PDWORD pdwIV = (PDWORD) pbyIVHead; unsigned long *pdwIV = (unsigned long *) pbyIVHead;
PDWORD pdwExtIV = (PDWORD) ((unsigned char *)pbyIVHead+4); unsigned long *pdwExtIV = (unsigned long *) ((unsigned char *)pbyIVHead+4);
WORD wValue; WORD wValue;
PS802_11Header pMACHeader = (PS802_11Header)pbyHdrBuf; PS802_11Header pMACHeader = (PS802_11Header)pbyHdrBuf;
DWORD dwRevIVCounter; DWORD dwRevIVCounter;
@ -338,7 +338,7 @@ s_vSWencryption (
{ {
unsigned int cbICVlen = 4; unsigned int cbICVlen = 4;
DWORD dwICV = 0xFFFFFFFFL; DWORD dwICV = 0xFFFFFFFFL;
PDWORD pdwICV; unsigned long *pdwICV;
if (pTransmitKey == NULL) if (pTransmitKey == NULL)
return; return;
@ -347,7 +347,7 @@ s_vSWencryption (
//======================================================================= //=======================================================================
// Append ICV after payload // Append ICV after payload
dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload) dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload)
pdwICV = (PDWORD)(pbyPayloadHead + wPayloadSize); pdwICV = (unsigned long *)(pbyPayloadHead + wPayloadSize);
// finally, we must invert dwCRC to get the correct answer // finally, we must invert dwCRC to get the correct answer
*pdwICV = cpu_to_le32(~dwICV); *pdwICV = cpu_to_le32(~dwICV);
// RC4 encryption // RC4 encryption
@ -358,7 +358,7 @@ s_vSWencryption (
//======================================================================= //=======================================================================
//Append ICV after payload //Append ICV after payload
dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload) dwICV = CRCdwGetCrc32Ex(pbyPayloadHead, wPayloadSize, dwICV);//ICV(Payload)
pdwICV = (PDWORD)(pbyPayloadHead + wPayloadSize); pdwICV = (unsigned long *)(pbyPayloadHead + wPayloadSize);
// finally, we must invert dwCRC to get the correct answer // finally, we must invert dwCRC to get the correct answer
*pdwICV = cpu_to_le32(~dwICV); *pdwICV = cpu_to_le32(~dwICV);
// RC4 encryption // RC4 encryption
@ -1359,8 +1359,8 @@ s_cbFillTxBufHead (
unsigned int cbMICHDR = 0; unsigned int cbMICHDR = 0;
DWORD dwMICKey0, dwMICKey1; DWORD dwMICKey0, dwMICKey1;
DWORD dwMIC_Priority; DWORD dwMIC_Priority;
PDWORD pdwMIC_L; unsigned long *pdwMIC_L;
PDWORD pdwMIC_R; unsigned long *pdwMIC_R;
DWORD dwSafeMIC_L, dwSafeMIC_R; //Fix "Last Frag Size" < "MIC length". DWORD dwSafeMIC_L, dwSafeMIC_R; //Fix "Last Frag Size" < "MIC length".
BOOL bMIC2Frag = FALSE; BOOL bMIC2Frag = FALSE;
unsigned int uMICFragLen = 0; unsigned int uMICFragLen = 0;
@ -1549,16 +1549,16 @@ s_cbFillTxBufHead (
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]); dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]); dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
} }
else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) { else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) {
dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]); dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]); dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
} }
else { else {
dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[24]); dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[24]);
dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[28]); dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[28]);
} }
// DO Software Michael // DO Software Michael
MIC_vInit(dwMICKey0, dwMICKey1); MIC_vInit(dwMICKey0, dwMICKey1);
@ -1760,8 +1760,8 @@ s_cbFillTxBufHead (
if (bMIC2Frag == FALSE) { if (bMIC2Frag == FALSE) {
if (uTmpLen != 0) if (uTmpLen != 0)
MIC_vAppend((pbyBuffer + uLength), uTmpLen); MIC_vAppend((pbyBuffer + uLength), uTmpLen);
pdwMIC_L = (PDWORD)(pbyBuffer + uLength + uTmpLen); pdwMIC_L = (unsigned long *)(pbyBuffer + uLength + uTmpLen);
pdwMIC_R = (PDWORD)(pbyBuffer + uLength + uTmpLen + 4); pdwMIC_R = (unsigned long *)(pbyBuffer + uLength + uTmpLen + 4);
MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Last MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Last MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R);
} else { } else {
@ -1895,8 +1895,8 @@ s_cbFillTxBufHead (
uMICFragLen = cbFragPayloadSize - uTmpLen; uMICFragLen = cbFragPayloadSize - uTmpLen;
ASSERT(uMICFragLen < cbMIClen); ASSERT(uMICFragLen < cbMIClen);
pdwMIC_L = (PDWORD)(pbyBuffer + uLength + uTmpLen); pdwMIC_L = (unsigned long *)(pbyBuffer + uLength + uTmpLen);
pdwMIC_R = (PDWORD)(pbyBuffer + uLength + uTmpLen + 4); pdwMIC_R = (unsigned long *)(pbyBuffer + uLength + uTmpLen + 4);
MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
dwSafeMIC_L = *pdwMIC_L; dwSafeMIC_L = *pdwMIC_L;
dwSafeMIC_R = *pdwMIC_R; dwSafeMIC_R = *pdwMIC_R;
@ -2035,8 +2035,8 @@ s_cbFillTxBufHead (
MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFrameBodySize); MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFrameBodySize);
pdwMIC_L = (PDWORD)(pbyBuffer + uLength - cb802_1_H_len + cbFrameBodySize); pdwMIC_L = (unsigned long *)(pbyBuffer + uLength - cb802_1_H_len + cbFrameBodySize);
pdwMIC_R = (PDWORD)(pbyBuffer + uLength - cb802_1_H_len + cbFrameBodySize + 4); pdwMIC_R = (unsigned long *)(pbyBuffer + uLength - cb802_1_H_len + cbFrameBodySize + 4);
MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
MIC_vUnInit(); MIC_vUnInit();
@ -2852,8 +2852,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
unsigned int uLength = 0; unsigned int uLength = 0;
DWORD dwMICKey0, dwMICKey1; DWORD dwMICKey0, dwMICKey1;
DWORD dwMIC_Priority; DWORD dwMIC_Priority;
PDWORD pdwMIC_L; unsigned long *pdwMIC_L;
PDWORD pdwMIC_R; unsigned long *pdwMIC_R;
WORD wTxBufSize; WORD wTxBufSize;
unsigned int cbMacHdLen; unsigned int cbMacHdLen;
SEthernetHeader sEthHeader; SEthernetHeader sEthHeader;
@ -3127,8 +3127,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
if ((pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { if ((pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
dwMICKey0 = *(PDWORD)(&pTransmitKey->abyKey[16]); dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
dwMICKey1 = *(PDWORD)(&pTransmitKey->abyKey[20]); dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
// DO Software Michael // DO Software Michael
MIC_vInit(dwMICKey0, dwMICKey1); MIC_vInit(dwMICKey0, dwMICKey1);
@ -3141,8 +3141,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
MIC_vAppend((pbyTxBufferAddr + uLength), cbFrameBodySize); MIC_vAppend((pbyTxBufferAddr + uLength), cbFrameBodySize);
pdwMIC_L = (PDWORD)(pbyTxBufferAddr + uLength + cbFrameBodySize); pdwMIC_L = (unsigned long *)(pbyTxBufferAddr + uLength + cbFrameBodySize);
pdwMIC_R = (PDWORD)(pbyTxBufferAddr + uLength + cbFrameBodySize + 4); pdwMIC_R = (unsigned long *)(pbyTxBufferAddr + uLength + cbFrameBodySize + 4);
MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
MIC_vUnInit(); MIC_vUnInit();

View File

@ -364,7 +364,7 @@ void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress)
* Return Value: none * Return Value: none
* *
*/ */
void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, PDWORD pdwSubSysVenId) void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, unsigned long *pdwSubSysVenId)
{ {
unsigned char *pbyData; unsigned char *pbyData;

View File

@ -150,7 +150,7 @@ void SROMvWriteAllContents(DWORD_PTR dwIoBase, unsigned char *pbyEepromRegs);
void SROMvReadEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress); void SROMvReadEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress);
void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress); void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress);
void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, PDWORD pdwSubSysVenId); void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, unsigned long *pdwSubSysVenId);
BOOL SROMbAutoLoad (DWORD_PTR dwIoBase); BOOL SROMbAutoLoad (DWORD_PTR dwIoBase);

View File

@ -101,7 +101,7 @@ BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength)
DWORD dwCRC; DWORD dwCRC;
dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4); dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4);
if (cpu_to_le32(*((PDWORD)(pbyBuffer + cbFrameLength - 4))) != dwCRC) { if (cpu_to_le32(*((unsigned long *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) {
return FALSE; return FALSE;
} }
return TRUE; return TRUE;

View File

@ -92,8 +92,6 @@ typedef unsigned long DWORD_PTR; // 32-bit
// boolean pointer // boolean pointer
typedef unsigned int * PUINT; typedef unsigned int * PUINT;
typedef DWORD * PDWORD;
typedef QWORD * PQWORD; typedef QWORD * PQWORD;
#endif // __TTYPE_H__ #endif // __TTYPE_H__

View File

@ -87,7 +87,7 @@
} }
#define VNSvInPortD(dwIOAddress, pdwData) { \ #define VNSvInPortD(dwIOAddress, pdwData) { \
volatile DWORD* pdwAddr = ((PDWORD)(dwIOAddress)); \ volatile DWORD* pdwAddr = ((unsigned long *)(dwIOAddress)); \
*(pdwData) = readl(pdwAddr); \ *(pdwData) = readl(pdwAddr); \
} }
@ -104,7 +104,7 @@
} }
#define VNSvOutPortD(dwIOAddress, dwData) { \ #define VNSvOutPortD(dwIOAddress, dwData) { \
volatile DWORD* pdwAddr = ((PDWORD)(dwIOAddress)); \ volatile DWORD* pdwAddr = ((unsigned long *)(dwIOAddress)); \
writel((DWORD)dwData, pdwAddr); \ writel((DWORD)dwData, pdwAddr); \
} }