diff options
author | Jim Lieb <lieb@canonical.com> | 2009-08-12 14:54:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:08 -0700 |
commit | 51b6d9c299f10780b3093d3748257ecc4ae7340d (patch) | |
tree | 9dee0d32ff56c2bd89ae63a9e187b9e0fb0a1fc5 /drivers/staging/vt6655 | |
parent | a7ad322a46663755718a214a9a34e5cfe64d07f7 (diff) |
Staging: vt665x: Remove umem.h Part 1
Remove references to umem.h macros and refer directly to memcpy
functions. Delete the include file.
Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/IEEE11h.c | 15 | ||||
-rw-r--r-- | drivers/staging/vt6655/aes_ccmp.c | 23 | ||||
-rw-r--r-- | drivers/staging/vt6655/baseband.c | 1 | ||||
-rw-r--r-- | drivers/staging/vt6655/bssdb.c | 13 | ||||
-rw-r--r-- | drivers/staging/vt6655/card.c | 11 | ||||
-rw-r--r-- | drivers/staging/vt6655/dpc.c | 11 | ||||
-rw-r--r-- | drivers/staging/vt6655/ioctl.c | 5 | ||||
-rw-r--r-- | drivers/staging/vt6655/iwctl.c | 1 | ||||
-rw-r--r-- | drivers/staging/vt6655/key.c | 27 | ||||
-rw-r--r-- | drivers/staging/vt6655/mib.c | 9 | ||||
-rw-r--r-- | drivers/staging/vt6655/michael.h | 2 | ||||
-rw-r--r-- | drivers/staging/vt6655/power.c | 1 | ||||
-rw-r--r-- | drivers/staging/vt6655/rxtx.c | 159 | ||||
-rw-r--r-- | drivers/staging/vt6655/tkip.c | 1 | ||||
-rw-r--r-- | drivers/staging/vt6655/umem.h | 71 | ||||
-rw-r--r-- | drivers/staging/vt6655/vntwifi.c | 11 | ||||
-rw-r--r-- | drivers/staging/vt6655/wcmd.c | 11 | ||||
-rw-r--r-- | drivers/staging/vt6655/wmgr.c | 57 | ||||
-rw-r--r-- | drivers/staging/vt6655/wpa.c | 27 | ||||
-rw-r--r-- | drivers/staging/vt6655/wpa2.c | 31 |
20 files changed, 198 insertions, 289 deletions
diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c index ea546e5406ea..2567143d3b1c 100644 --- a/drivers/staging/vt6655/IEEE11h.c +++ b/drivers/staging/vt6655/IEEE11h.c @@ -32,7 +32,6 @@ */ #include "ttype.h" -#include "umem.h" #include "tmacro.h" #include "tether.h" #include "IEEE11h.h" @@ -104,7 +103,7 @@ static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq, UINT uLe BOOL bResult = TRUE; if (uLength <= WLAN_A3FR_MAXLEN) { - MEMvCopy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength); + memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength); } uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ, sMSRReqEIDs))/ (sizeof(WLAN_IE_MEASURE_REQ))); pMgmt->pCurrMeasureEIDRep = &(((PWLAN_FRAME_MSRREP) (pMgmt->abyCurrentMSRRep))->sMSRRepEIDs[0]); @@ -133,9 +132,9 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, BYTE byR WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION) ); - MEMvCopy( pFrame->Header.abyAddr1, pTPCReq->Header.abyAddr2, WLAN_ADDR_LEN); - MEMvCopy( pFrame->Header.abyAddr2, CARDpGetCurrentAddress(pMgmt->pAdapter), WLAN_ADDR_LEN); - MEMvCopy( pFrame->Header.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); + memcpy( pFrame->Header.abyAddr1, pTPCReq->Header.abyAddr2, WLAN_ADDR_LEN); + memcpy( pFrame->Header.abyAddr2, CARDpGetCurrentAddress(pMgmt->pAdapter), WLAN_ADDR_LEN); + memcpy( pFrame->Header.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); pFrame->byCategory = 0; pFrame->byAction = 3; @@ -283,9 +282,9 @@ BOOL IEEE11hbMSRRepTx ( WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION) ); - MEMvCopy( pMSRRep->Header.abyAddr1, ((PWLAN_FRAME_MSRREQ) (pMgmt->abyCurrentMSRReq))->Header.abyAddr2, WLAN_ADDR_LEN); - MEMvCopy( pMSRRep->Header.abyAddr2, CARDpGetCurrentAddress(pMgmt->pAdapter), WLAN_ADDR_LEN); - MEMvCopy( pMSRRep->Header.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); + memcpy( pMSRRep->Header.abyAddr1, ((PWLAN_FRAME_MSRREQ) (pMgmt->abyCurrentMSRReq))->Header.abyAddr2, WLAN_ADDR_LEN); + memcpy( pMSRRep->Header.abyAddr2, CARDpGetCurrentAddress(pMgmt->pAdapter), WLAN_ADDR_LEN); + memcpy( pMSRRep->Header.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); pMSRRep->byCategory = 0; pMSRRep->byAction = 1; diff --git a/drivers/staging/vt6655/aes_ccmp.c b/drivers/staging/vt6655/aes_ccmp.c index e79a0d164282..2614ed380a43 100644 --- a/drivers/staging/vt6655/aes_ccmp.c +++ b/drivers/staging/vt6655/aes_ccmp.c @@ -33,7 +33,6 @@ * */ -#include "umem.h" #include "device.h" #include "80211hdr.h" @@ -278,7 +277,7 @@ int ii,jj,kk; pbyPayload = pbyIV + 8; //IV-length abyNonce[0] = 0x00; //now is 0, if Qos here will be priority - MEMvCopy(&(abyNonce[1]), pMACHeader->abyAddr2, U_ETHER_ADDR_LEN); + memcpy(&(abyNonce[1]), pMACHeader->abyAddr2, U_ETHER_ADDR_LEN); abyNonce[7] = pbyIV[7]; abyNonce[8] = pbyIV[6]; abyNonce[9] = pbyIV[5]; @@ -288,7 +287,7 @@ int ii,jj,kk; //MIC_IV MIC_IV[0] = 0x59; - MEMvCopy(&(MIC_IV[1]), &(abyNonce[0]), 13); + memcpy(&(MIC_IV[1]), &(abyNonce[0]), 13); MIC_IV[14] = (BYTE)(wPayloadSize >> 8); MIC_IV[15] = (BYTE)(wPayloadSize & 0xff); @@ -300,16 +299,16 @@ int ii,jj,kk; byTmp = (BYTE)(pMACHeader->wFrameCtl >> 8); byTmp &= 0x87; MIC_HDR1[3] = byTmp | 0x40; - MEMvCopy(&(MIC_HDR1[4]), pMACHeader->abyAddr1, U_ETHER_ADDR_LEN); - MEMvCopy(&(MIC_HDR1[10]), pMACHeader->abyAddr2, U_ETHER_ADDR_LEN); + memcpy(&(MIC_HDR1[4]), pMACHeader->abyAddr1, U_ETHER_ADDR_LEN); + memcpy(&(MIC_HDR1[10]), pMACHeader->abyAddr2, U_ETHER_ADDR_LEN); //MIC_HDR2 - MEMvCopy(&(MIC_HDR2[0]), pMACHeader->abyAddr3, U_ETHER_ADDR_LEN); + memcpy(&(MIC_HDR2[0]), pMACHeader->abyAddr3, U_ETHER_ADDR_LEN); byTmp = (BYTE)(pMACHeader->wSeqCtl & 0xff); MIC_HDR2[6] = byTmp & 0x0f; MIC_HDR2[7] = 0; if ( bA4 ) { - MEMvCopy(&(MIC_HDR2[8]), pMACHeader->abyAddr4, U_ETHER_ADDR_LEN); + memcpy(&(MIC_HDR2[8]), pMACHeader->abyAddr4, U_ETHER_ADDR_LEN); } else { MIC_HDR2[8] = 0x00; MIC_HDR2[9] = 0x00; @@ -334,7 +333,7 @@ int ii,jj,kk; wCnt = 1; abyCTRPLD[0] = 0x01; - MEMvCopy(&(abyCTRPLD[1]), &(abyNonce[0]), 13); + memcpy(&(abyCTRPLD[1]), &(abyNonce[0]), 13); for(jj=wPayloadSize; jj>16; jj=jj-16) { @@ -351,13 +350,13 @@ int ii,jj,kk; } AESv128(pbyRxKey,abyTmp,abyMIC); - MEMvCopy(pbyPayload, abyPlainText, 16); + memcpy(pbyPayload, abyPlainText, 16); wCnt++; pbyPayload += 16; } //for wPayloadSize //last payload - MEMvCopy(&(abyLastCipher[0]), pbyPayload, jj); + memcpy(&(abyLastCipher[0]), pbyPayload, jj); for ( ii=jj; ii<16; ii++ ) { abyLastCipher[ii] = 0x00; } @@ -369,7 +368,7 @@ int ii,jj,kk; for ( kk=0; kk<16; kk++ ) { abyPlainText[kk] = abyTmp[kk] ^ abyLastCipher[kk]; } - MEMvCopy(pbyPayload, abyPlainText, jj); + memcpy(pbyPayload, abyPlainText, jj); pbyPayload += jj; //for MIC calculation @@ -394,7 +393,7 @@ int ii,jj,kk; //=>above is the dec-MIC from packet //-------------------------------------------- - if ( MEMEqualMemory(abyMIC,abyTmp,8) ) { + if ( !memcmp(abyMIC,abyTmp,8) ) { return TRUE; } else { return FALSE; diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 4b8f8db0097d..685e9e8c82e4 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -55,7 +55,6 @@ #include "mac.h" #include "baseband.h" #include "srom.h" -#include "umem.h" #include "rf.h" /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 28c00578d209..f5ef1b571300 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -56,7 +56,6 @@ #include "card.h" #include "mac.h" #include "wpa2.h" -#include "umem.h" #include "iowpa.h" //#define PLICE_DEBUG @@ -167,7 +166,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; if (IS_ETH_ADDRESS_EQUAL(pCurrBSS->abyBSSID, pbyBSSID)) { if (pSSID != NULL) { // compare ssid - if (MEMEqualMemory(pSSID->abySSID, + if ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pCurrBSS->abySSID)->abySSID, pSSID->len)) { if ((pMgmt->eConfigMode == WMAC_CONFIG_AUTO) || @@ -200,7 +199,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; if (pSSID != NULL) { // matched SSID - if (!MEMEqualMemory(pSSID->abySSID, + if (! !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pCurrBSS->abySSID)->abySSID, pSSID->len) || (pSSID->len != ((PWLAN_IE_SSID)pCurrBSS->abySSID)->len)) { @@ -259,8 +258,8 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; /* if (pDevice->bRoaming == FALSE) { // Einsn Add @20070907 - ZERO_MEMORY(pbyDesireSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); - MEMvCopy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1) ; + memset(pbyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); + memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1) ; }*/ return(pSelect); @@ -502,7 +501,7 @@ BSSbInsertToBSSList ( } } if ((bIs802_1x == TRUE) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) && - (MEMEqualMemory(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) { + ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) { bAdd_PMKID_Candidate((HANDLE)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj); @@ -568,7 +567,7 @@ BSSbInsertToBSSList ( pBSSList->uIELength = uIELength; if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN) pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; - MEMvCopy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); + memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); return TRUE; } diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 03051e899184..06d5be19906e 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -57,7 +57,6 @@ #include "key.h" #include "rc4.h" #include "country.h" -#include "umem.h" /*--------------------- Static Definitions -------------------------*/ @@ -1304,7 +1303,7 @@ BOOL CARDbSetBSSID(PVOID pDeviceHandler, PBYTE pbyBSSID, CARD_OP_MODE eOPMode) PSDevice pDevice = (PSDevice) pDeviceHandler; MACvWriteBSSIDAddress(pDevice->PortOffset, pbyBSSID); - MEMvCopy(pDevice->abyBSSID, pbyBSSID, WLAN_BSSID_LEN); + memcpy(pDevice->abyBSSID, pbyBSSID, WLAN_BSSID_LEN); if (eOPMode == OP_MODE_ADHOC) { MACvRegBitsOn(pDevice->PortOffset, MAC_REG_HOSTCR, HOSTCR_ADHOC); } else { @@ -1566,7 +1565,7 @@ CARDbAdd_PMKID_Candidate ( if (pDevice->gsPMKIDCandidate.NumCandidates >= MAX_PMKIDLIST) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 3\n"); - ZERO_MEMORY(&pDevice->gsPMKIDCandidate, sizeof(SPMKIDCandidateEvent)); + memset(&pDevice->gsPMKIDCandidate, 0, sizeof(SPMKIDCandidateEvent)); } for (ii = 0; ii < 6; ii++) { @@ -1578,7 +1577,7 @@ CARDbAdd_PMKID_Candidate ( // Update Old Candidate for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; - if (MEMEqualMemory(pCandidateList->BSSID, pbyBSSID, U_ETHER_ADDR_LEN)) { + if ( !memcmp(pCandidateList->BSSID, pbyBSSID, U_ETHER_ADDR_LEN)) { if ((bRSNCapExist == TRUE) && (wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; } else { @@ -1595,7 +1594,7 @@ CARDbAdd_PMKID_Candidate ( } else { pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); } - MEMvCopy(pCandidateList->BSSID, pbyBSSID, U_ETHER_ADDR_LEN); + memcpy(pCandidateList->BSSID, pbyBSSID, U_ETHER_ADDR_LEN); pDevice->gsPMKIDCandidate.NumCandidates++; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); return TRUE; @@ -2276,7 +2275,7 @@ CARDbChannelGetList ( if (uCountryCodeIdx >= CCODE_MAX) { return (FALSE); } - MEMvCopy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); + memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); return (TRUE); } diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index aaae1e691d01..fa32229ef1dd 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -45,7 +45,6 @@ #include "bssdb.h" #include "mac.h" #include "baseband.h" -#include "umem.h" #include "michael.h" #include "tkip.h" #include "tcrc.h" @@ -930,7 +929,7 @@ device_receive_frame ( RSC = dwRxTSC47_16; RSC <<= 16; RSC += wRxTSC15_0; - MEMvCopy(&(pKey->KeyRSC), &RSC, sizeof(QWORD)); + memcpy(&(pKey->KeyRSC), &RSC, sizeof(QWORD)); if ( (pDevice->sMgmtObj.eCurrMode == WMAC_MODE_ESS_STA) && (pDevice->sMgmtObj.eCurrState == WMAC_STATE_ASSOC)) { @@ -1263,8 +1262,8 @@ static BOOL s_bHandleRxEncryption ( // 2. WEP 256 PayloadLen -= (WLAN_HDR_ADDR3_LEN + 4 + 4); // 24 is 802.11 header,4 is IV, 4 is crc - MEMvCopy(pDevice->abyPRNG, pbyIV, 3); - MEMvCopy(pDevice->abyPRNG + 3, pKey->abyKey, pKey->uKeyLength); + memcpy(pDevice->abyPRNG, pbyIV, 3); + memcpy(pDevice->abyPRNG + 3, pKey->abyKey, pKey->uKeyLength); rc4_init(&pDevice->SBox, pDevice->abyPRNG, pKey->uKeyLength + 3); rc4_encrypt(&pDevice->SBox, pbyIV+4, pbyIV+4, PayloadLen); @@ -1373,8 +1372,8 @@ static BOOL s_bHostWepRxEncryption ( // 3. NotOnFly PayloadLen -= (WLAN_HDR_ADDR3_LEN + 4 + 4); // 24 is 802.11 header,4 is IV, 4 is crc - MEMvCopy(pDevice->abyPRNG, pbyIV, 3); - MEMvCopy(pDevice->abyPRNG + 3, pKey->abyKey, pKey->uKeyLength); + memcpy(pDevice->abyPRNG, pbyIV, 3); + memcpy(pDevice->abyPRNG + 3, pKey->abyKey, pKey->uKeyLength); rc4_init(&pDevice->SBox, pDevice->abyPRNG, pKey->uKeyLength + 3); rc4_encrypt(&pDevice->SBox, pbyIV+4, pbyIV+4, PayloadLen); diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 47a5ff81df25..fc9cbe0acd64 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -35,7 +35,6 @@ #include "mac.h" #include "card.h" #include "hostap.h" -#include "umem.h" #include "wpactl.h" #include "rf.h" @@ -726,8 +725,8 @@ vConfigWEPKey ( int ii; - ZERO_MEMORY(&pDevice->abyWepKey[dwKeyIndex][0], WLAN_WEPMAX_KEYLEN); - MEMvCopy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength); + memset(&pDevice->abyWepKey[dwKeyIndex][0], 0, WLAN_WEPMAX_KEYLEN); + memcpy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength); pDevice->bWepKeyAvailable[dwKeyIndex] = TRUE; pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength; diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 4b1ce8691764..108830ff3b32 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -36,7 +36,6 @@ #include "mac.h" #include "card.h" #include "hostap.h" -#include "umem.h" #include "power.h" #include "rf.h" diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index e63126f0c60a..781a371e79a9 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -39,7 +39,6 @@ #include "tmacro.h" #include "tbit.h" #include "key.h" -#include "umem.h" #include "mac.h" /*--------------------- Static Definitions -------------------------*/ @@ -247,7 +246,7 @@ BOOL KeybSetKey ( pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; - MEMvCopy(pKey->abyKey, pbyKey, uKeyLength); + memcpy(pKey->abyKey, pbyKey, uKeyLength); if (byKeyDecMode == KEY_CTL_WEP) { if (uKeyLength == WLAN_WEP40_KEYLEN) pKey->abyKey[15] &= 0x7F; @@ -258,10 +257,10 @@ BOOL KeybSetKey ( if ((dwKeyIndex & USE_KEYRSC) == 0) { // RSC set by NIC - ZERO_MEMORY(&(pKey->KeyRSC), sizeof(QWORD)); + memset(&(pKey->KeyRSC), 0, sizeof(QWORD)); } else { - MEMvCopy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); + memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); } pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; @@ -283,7 +282,7 @@ BOOL KeybSetKey ( } } if (j < (MAX_KEY_TABLE-1)) { - MEMvCopy(pTable->KeyTable[j].abyBSSID,pbyBSSID,U_ETHER_ADDR_LEN); + memcpy(pTable->KeyTable[j].abyBSSID,pbyBSSID,U_ETHER_ADDR_LEN); pTable->KeyTable[j].bInUse = TRUE; if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key @@ -312,7 +311,7 @@ BOOL KeybSetKey ( pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; - MEMvCopy(pKey->abyKey, pbyKey, uKeyLength); + memcpy(pKey->abyKey, pbyKey, uKeyLength); if (byKeyDecMode == KEY_CTL_WEP) { if (uKeyLength == WLAN_WEP40_KEYLEN) pKey->abyKey[15] &= 0x7F; @@ -323,10 +322,10 @@ BOOL KeybSetKey ( if ((dwKeyIndex & USE_KEYRSC) == 0) { // RSC set by NIC - ZERO_MEMORY(&(pKey->KeyRSC), sizeof(QWORD)); + memset(&(pKey->KeyRSC), 0, sizeof(QWORD)); } else { - MEMvCopy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); + memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); } pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; @@ -688,7 +687,7 @@ BOOL KeybSetDefaultKey ( pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; - MEMvCopy(pKey->abyKey, pbyKey, uKeyLength); + memcpy(pKey->abyKey, pbyKey, uKeyLength); if (byKeyDecMode == KEY_CTL_WEP) { if (uKeyLength == WLAN_WEP40_KEYLEN) pKey->abyKey[15] &= 0x7F; @@ -699,9 +698,9 @@ BOOL KeybSetDefaultKey ( if ((dwKeyIndex & USE_KEYRSC) == 0) { // RSC set by NIC - ZERO_MEMORY(&(pKey->KeyRSC), sizeof(QWORD)); + memset(&(pKey->KeyRSC), 0, sizeof(QWORD)); } else { - MEMvCopy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); + memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); } pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; @@ -787,7 +786,7 @@ BOOL KeybSetAllGroupKey ( pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; - MEMvCopy(pKey->abyKey, pbyKey, uKeyLength); + memcpy(pKey->abyKey, pbyKey, uKeyLength); if (byKeyDecMode == KEY_CTL_WEP) { if (uKeyLength == WLAN_WEP40_KEYLEN) pKey->abyKey[15] &= 0x7F; @@ -798,10 +797,10 @@ BOOL KeybSetAllGroupKey ( if ((dwKeyIndex & USE_KEYRSC) == 0) { // RSC set by NIC - ZERO_MEMORY(&(pKey->KeyRSC), sizeof(QWORD)); + memset(&(pKey->KeyRSC), 0, sizeof(QWORD)); } else { - MEMvCopy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); + memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD)); } pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index f411aced3281..48484bbe7f24 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -43,7 +43,6 @@ #include "tether.h" #include "mib.h" #include "wctl.h" -#include "umem.h" #include "baseband.h" /*--------------------- Static Definitions -------------------------*/ @@ -75,7 +74,7 @@ static int msglevel =MSG_LEVEL_INFO; void STAvClearAllCounter (PSStatCounter pStatistic) { // set memory to zero - ZERO_MEMORY(pStatistic, sizeof(SStatCounter)); + memset(pStatistic, 0, sizeof(SStatCounter)); } @@ -410,7 +409,7 @@ STAvUpdateRDStatCounterEx ( // rx length pStatistic->dwCntRxFrmLength = cbFrameLength; // rx pattern, we just see 10 bytes for sample - MEMvCopy(pStatistic->abyCntRxPattern, (PBYTE)pbyBuffer, 10); + memcpy(pStatistic->abyCntRxPattern, (PBYTE)pbyBuffer, 10); } @@ -535,7 +534,7 @@ STAvUpdateTDStatCounterEx ( // tx length pStatistic->dwCntTxBufLength = uPktLength; // tx pattern, we just see 16 bytes for sample - MEMvCopy(pStatistic->abyCntTxPattern, pbyBuffer, 16); + memcpy(pStatistic->abyCntTxPattern, pbyBuffer, 16); } @@ -595,5 +594,5 @@ void STAvClear802_11Counter(PSDot11Counters p802_11Counter) { // set memory to zero - ZERO_MEMORY(p802_11Counter, sizeof(SDot11Counters)); + memset(p802_11Counter, 0, sizeof(SDot11Counters)); } diff --git a/drivers/staging/vt6655/michael.h b/drivers/staging/vt6655/michael.h index dcce12e5b6cc..3f79b52832d1 100644 --- a/drivers/staging/vt6655/michael.h +++ b/drivers/staging/vt6655/michael.h @@ -31,8 +31,6 @@ #ifndef __MICHAEL_H__ #define __MICHAEL_H__ -#include "umem.h" - /*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Types ------------------------------*/ diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index a0ca66ec1d08..255cfc51c169 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -45,7 +45,6 @@ #include "power.h" #include "wcmd.h" #include "tbit.h" -#include "umem.h" #include "rxtx.h" #include "card.h" diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index eb73fdb801aa..0c5ff19db353 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -55,7 +55,6 @@ #include "bssdb.h" #include "mac.h" #include "baseband.h" -#include "umem.h" #include "michael.h" #include "tkip.h" #include "tcrc.h" @@ -242,16 +241,16 @@ s_vFillTxKey ( if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN ){ - MEMvCopy(pDevice->abyPRNG, (PBYTE)&(dwRevIVCounter), 3); - MEMvCopy(pDevice->abyPRNG+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength); + memcpy(pDevice->abyPRNG, (PBYTE)&(dwRevIVCounter), 3); + memcpy(pDevice->abyPRNG+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength); } else { - MEMvCopy(pbyBuf, (PBYTE)&(dwRevIVCounter), 3); - MEMvCopy(pbyBuf+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength); + memcpy(pbyBuf, (PBYTE)&(dwRevIVCounter), 3); + memcpy(pbyBuf+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength); if(pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) { - MEMvCopy(pbyBuf+8, (PBYTE)&(dwRevIVCounter), 3); - MEMvCopy(pbyBuf+11, pTransmitKey->abyKey, pTransmitKey->uKeyLength); + memcpy(pbyBuf+8, (PBYTE)&(dwRevIVCounter), 3); + memcpy(pbyBuf+11, pTransmitKey->abyKey, pTransmitKey->uKeyLength); } - MEMvCopy(pDevice->abyPRNG, pbyBuf, 16); + memcpy(pDevice->abyPRNG, pbyBuf, 16); } // Append IV after Mac Header *pdwIV &= WEP_IV_MASK;//00000000 11111111 11111111 11111111 @@ -268,9 +267,9 @@ s_vFillTxKey ( } TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr, pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG); - MEMvCopy(pbyBuf, pDevice->abyPRNG, 16); + memcpy(pbyBuf, pDevice->abyPRNG, 16); // Make IV - MEMvCopy(pdwIV, pDevice->abyPRNG, 3); + memcpy(pdwIV, pDevice->abyPRNG, 3); *(pbyIVHead+3) = (BYTE)(((byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV // Append IV&ExtIV after Mac Header @@ -282,7 +281,7 @@ s_vFillTxKey ( if (pTransmitKey->wTSC15_0 == 0) { pTransmitKey->dwTSC47_16++; } - MEMvCopy(pbyBuf, pTransmitKey->abyKey, 16); + memcpy(pbyBuf, pTransmitKey->abyKey, 16); // Make IV *pdwIV = 0; @@ -294,7 +293,7 @@ s_vFillTxKey ( //Fill MICHDR0 *pMICHDR = 0x59; *((PBYTE)(pMICHDR+1)) = 0; // TxPriority - MEMvCopy(pMICHDR+2, &(pMACHeader->abyAddr2[0]), 6); + memcpy(pMICHDR+2, &(pMACHeader->abyAddr2[0]), 6); *((PBYTE)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16)); *((PBYTE)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16)); *((PBYTE)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16)); @@ -312,18 +311,18 @@ s_vFillTxKey ( *((PBYTE)(pMICHDR+17)) = 22; // HLEN[7:0] } wValue = cpu_to_le16(pMACHeader->wFrameCtl & 0xC78F); - MEMvCopy(pMICHDR+18, (PBYTE)&wValue, 2); // MSKFRACTL - MEMvCopy(pMICHDR+20, &(pMACHeader->abyAddr1[0]), 6); - MEMvCopy(pMICHDR+26, &(pMACHeader->abyAddr2[0]), 6); + memcpy(pMICHDR+18, (PBYTE)&wValue, 2); // MSKFRACTL + memcpy(pMICHDR+20, &(pMACHeader->abyAddr1[0]), 6); + memcpy(pMICHDR+26, &(pMACHeader->abyAddr2[0]), 6); //Fill MICHDR2 - MEMvCopy(pMICHDR+32, &(pMACHeader->abyAddr3[0]), 6); + memcpy(pMICHDR+32, &(pMACHeader->abyAddr3[0]), 6); wValue = pMACHeader->wSeqCtl; wValue &= 0x000F; wValue = cpu_to_le16(wValue); - MEMvCopy(pMICHDR+38, (PBYTE)&wValue, 2); // MSKSEQCTL + memcpy(pMICHDR+38, (PBYTE)&wValue, 2); // MSKSEQCTL if (pDevice->bLongHeader) { - MEMvCopy(pMICHDR+40, &(pMACHeader->abyAddr4[0]), 6); + memcpy(pMICHDR+40, &(pMACHeader->abyAddr4[0]), 6); } } } @@ -902,16 +901,16 @@ s_vFillRTSHead ( pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } if (pDevice->eOPMode == OP_MODE_AP) { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); } } else { @@ -940,17 +939,17 @@ s_vFillRTSHead ( if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } if (pDevice->eOPMode == OP_MODE_AP) { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); } } // if (byFBOption == AUTO_FB_NONE) @@ -971,17 +970,17 @@ s_vFillRTSHead ( if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } if (pDevice->eOPMode == OP_MODE_AP) { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); } } @@ -1002,16 +1001,16 @@ s_vFillRTSHead ( if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } if (pDevice->eOPMode == OP_MODE_AP) { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); } } } @@ -1031,17 +1030,17 @@ s_vFillRTSHead ( if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } if (pDevice->eOPMode == OP_MODE_AP) { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyTA[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); } } } @@ -1100,7 +1099,7 @@ s_vFillCTSHead ( pBuf->Data.wDurationID = pBuf->wDuration_ba; pBuf->Data.wFrameControl = TYPE_CTL_CTS;//0x00C4 pBuf->Data.wReserved = 0x0000; - MEMvCopy(&(pBuf->Data.abyRA[0]), &(pDevice->abyCurrentNetAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyCurrentNetAddr[0]), U_ETHER_ADDR_LEN); } else { //if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA & |