Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205597
b: refs/heads/master
c: 9d828c4
h: refs/heads/master
i:
  205595: 216ed68
v: v3
  • Loading branch information
Charles Clément authored and Greg Kroah-Hartman committed Jun 18, 2010
1 parent 1cc7789 commit 7a2c578
Show file tree
Hide file tree
Showing 15 changed files with 83 additions and 85 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15df6c2b922de3088203ad90347a30d31ccca67e
refs/heads/master: 9d828c458f77043ddd9626ee0cfa688dda99c0eb
12 changes: 6 additions & 6 deletions trunk/drivers/staging/vt6655/aes_ccmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++);
Expand All @@ -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++);
}
Expand Down
36 changes: 18 additions & 18 deletions trunk/drivers/staging/vt6655/dpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -139,7 +139,7 @@ static BOOL s_bHostWepRxEncryption(
unsigned char *pbyNewRsr,
int * pbExtIV,
unsigned short *pwRxTSC15_0,
PDWORD pdwRxTSC47_16
unsigned long *pdwRxTSC47_16

);

Expand Down Expand Up @@ -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;
Expand All @@ -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]));
}
}

Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/vt6655/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/vt6655/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/staging/vt6655/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/staging/vt6655/mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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__
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/vt6655/michael.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/vt6655/michael.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ------------------------------*/

Expand Down
Loading

0 comments on commit 7a2c578

Please sign in to comment.