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)
{
PDWORD dwPtrA = (PDWORD) a;
PDWORD dwPtrB = (PDWORD) b;
PDWORD dwPtrOut =(PDWORD) out;
unsigned long *dwPtrA = (unsigned long *) a;
unsigned long *dwPtrB = (unsigned long *) b;
unsigned long *dwPtrOut =(unsigned long *) out;
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
@ -125,9 +125,9 @@ PDWORD dwPtrOut =(PDWORD) out;
void xor_32(BYTE *a, BYTE *b, BYTE *out)
{
PDWORD dwPtrA = (PDWORD) a;
PDWORD dwPtrB = (PDWORD) b;
PDWORD dwPtrOut =(PDWORD) out;
unsigned long *dwPtrA = (unsigned long *) a;
unsigned long *dwPtrB = (unsigned long *) b;
unsigned long *dwPtrOut =(unsigned long *) out;
(*dwPtrOut++) = (*dwPtrA++) ^ (*dwPtrB++);
}

View File

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

View File

@ -732,7 +732,7 @@ vConfigWEPKey (
pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength;
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) {
for(ii=0; ii<MAX_GROUP_KEY; ii++) {

View File

@ -252,7 +252,7 @@ BOOL KeybSetKey (
if (uKeyLength == WLAN_WEP104_KEYLEN)
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) {
// RSC set by NIC
@ -317,7 +317,7 @@ BOOL KeybSetKey (
if (uKeyLength == WLAN_WEP104_KEYLEN)
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) {
// RSC set by NIC
@ -693,7 +693,7 @@ BOOL KeybSetDefaultKey (
if (uKeyLength == WLAN_WEP104_KEYLEN)
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) {
// RSC set by NIC
@ -792,7 +792,7 @@ BOOL KeybSetAllGroupKey (
if (uKeyLength == WLAN_WEP104_KEYLEN)
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) {
// 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
VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0, *(PDWORD)(pbyCxtBuf + MAC_REG_TXDMAPTR0));
VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, *(PDWORD)(pbyCxtBuf + MAC_REG_AC0DMAPTR));
VNSvOutPortD(dwIoBase + MAC_REG_BCNDMAPTR, *(PDWORD)(pbyCxtBuf + MAC_REG_BCNDMAPTR));
VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0, *(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0));
VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, *(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR));
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
VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_TXDMAPTR0)) {
if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0)) {
return FALSE;
}
VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_AC0DMAPTR)) {
if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR)) {
return FALSE;
}
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_RXDMAPTR0)) {
if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR0)) {
return FALSE;
}
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, &dwData);
if (dwData != *(PDWORD)(pbyCxtBuf + MAC_REG_RXDMAPTR1)) {
if (dwData != *(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR1)) {
return FALSE;
}
@ -1456,7 +1456,7 @@ BOOL MACbPSWakeup (DWORD_PTR dwIoBase)
*/
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;
DWORD dwData;
@ -1551,7 +1551,7 @@ WORD wOffset;
*/
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;
DWORD dwData;
@ -1667,7 +1667,7 @@ DWORD dwData;
*
*/
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;
DWORD dwData;

View File

@ -714,37 +714,37 @@
#define MACvGetCurrRx0DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR0, \
(PDWORD)pdwCurrDescAddr); \
(unsigned long *)pdwCurrDescAddr); \
}
#define MACvGetCurrRx1DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \
VNSvInPortD(dwIoBase + MAC_REG_RXDMAPTR1, \
(PDWORD)pdwCurrDescAddr); \
(unsigned long *)pdwCurrDescAddr); \
}
#define MACvGetCurrTx0DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \
VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, \
(PDWORD)pdwCurrDescAddr); \
(unsigned long *)pdwCurrDescAddr); \
}
#define MACvGetCurrAC0DescAddr(dwIoBase, pdwCurrDescAddr) \
{ \
VNSvInPortD(dwIoBase + MAC_REG_AC0DMAPTR, \
(PDWORD)pdwCurrDescAddr); \
(unsigned long *)pdwCurrDescAddr); \
}
#define MACvGetCurrSyncDescAddr(dwIoBase, pdwCurrDescAddr) \
{ \
VNSvInPortD(dwIoBase + MAC_REG_SYNCDMAPTR, \
(PDWORD)pdwCurrDescAddr); \
(unsigned long *)pdwCurrDescAddr); \
}
#define MACvGetCurrATIMDescAddr(dwIoBase, pdwCurrDescAddr) \
{ \
VNSvInPortD(dwIoBase + MAC_REG_ATIMDMAPTR, \
(PDWORD)pdwCurrDescAddr); \
(unsigned long *)pdwCurrDescAddr); \
} \
// set the chip with current BCN tx descriptor address
@ -1140,14 +1140,14 @@ BOOL MACbFlushSYNCFifo(DWORD_PTR dwIoBase);
BOOL MACbPSWakeup(DWORD_PTR dwIoBase);
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 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 MACvDisableDefaultKey(DWORD_PTR dwIoBase);
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);
#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
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.
// 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 ------------------------------*/

View File

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

View File

@ -364,7 +364,7 @@ void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress)
* Return Value: none
*
*/
void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, PDWORD pdwSubSysVenId)
void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, unsigned long *pdwSubSysVenId)
{
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 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);

View File

@ -101,7 +101,7 @@ BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength)
DWORD dwCRC;
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 TRUE;

View File

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

View File

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