diff options
Diffstat (limited to 'drivers/staging/vt6655/wmgr.c')
-rw-r--r-- | drivers/staging/vt6655/wmgr.c | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index ab845666b0c0..0c5bfa2e226d 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -78,7 +78,6 @@ #include "rxtx.h" #include "wpa.h" #include "rf.h" -#include "umem.h" #include "iowpa.h" #define PLICE_DEBUG @@ -2498,7 +2497,7 @@ vMgrCreateOwnIBSS( } if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) { - MEMvCopy(pMgmt->abyIBSSDFSOwner, pDevice->abyCurrentNetAddr, 6); + memcpy(pMgmt->abyIBSSDFSOwner, pDevice->abyCurrentNetAddr, 6); pMgmt->byIBSSDFSRecovery = 10; pMgmt->eCurrMode = WMAC_MODE_IBSS_STA; } @@ -3020,14 +3019,14 @@ s_vMgrSynchBSS ( } if (ePhyType == PHY_TYPE_11A) { - MEMvCopy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesA[0], sizeof(abyCurrSuppRatesA)); + memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesA[0], sizeof(abyCurrSuppRatesA)); pMgmt->abyCurrExtSuppRates[1] = 0; } else if (ePhyType == PHY_TYPE_11B) { - MEMvCopy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesB[0], sizeof(abyCurrSuppRatesB)); + memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesB[0], sizeof(abyCurrSuppRatesB)); pMgmt->abyCurrExtSuppRates[1] = 0; } else { - MEMvCopy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesG[0], sizeof(abyCurrSuppRatesG)); - MEMvCopy(pMgmt->abyCurrExtSuppRates, &abyCurrExtSuppRatesG[0], sizeof(abyCurrExtSuppRatesG)); + memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesG[0], sizeof(abyCurrSuppRatesG)); + memcpy(pMgmt->abyCurrExtSuppRates, &abyCurrExtSuppRatesG[0], sizeof(abyCurrExtSuppRatesG)); } @@ -3377,7 +3376,7 @@ s_MgrMakeBeacon( pIBSSDFS = (PWLAN_IE_IBSS_DFS) pbyBuffer; pIBSSDFS->byElementID = WLAN_EID_IBSS_DFS; pIBSSDFS->len = 7; - MEMvCopy( pIBSSDFS->abyDFSOwner, + memcpy( pIBSSDFS->abyDFSOwner, pMgmt->abyIBSSDFSOwner, 6); pIBSSDFS->byDFSRecovery = pMgmt->byIBSSDFSRecovery; @@ -3410,7 +3409,7 @@ s_MgrMakeBeacon( if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) { sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN; - MEMvCopy(sFrame.pExtSuppRates, + memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN ); @@ -3581,7 +3580,7 @@ s_MgrMakeProbeResponse( pIBSSDFS = (PWLAN_IE_IBSS_DFS) pbyBuffer; pIBSSDFS->byElementID = WLAN_EID_IBSS_DFS; pIBSSDFS->len = 7; - MEMvCopy( pIBSSDFS->abyDFSOwner, + memcpy( pIBSSDFS->abyDFSOwner, pMgmt->abyIBSSDFSOwner, 6); pIBSSDFS->byDFSRecovery = pMgmt->byIBSSDFSRecovery; @@ -3602,7 +3601,7 @@ s_MgrMakeProbeResponse( if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) { sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN; - MEMvCopy(sFrame.pExtSuppRates, + memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN ); @@ -3688,7 +3687,7 @@ s_MgrMakeAssocRequest( pMgmt->sAssocInfo.AssocInfo.RequestIELength = pCurrSSID->len + WLAN_IEHDR_LEN; pMgmt->sAssocInfo.AssocInfo.OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); pbyIEs = pMgmt->sAssocInfo.abyIEs; - MEMvCopy(pbyIEs, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN); pbyIEs += pCurrSSID->len + WLAN_IEHDR_LEN; // Copy the rate set @@ -3707,7 +3706,7 @@ s_MgrMakeAssocRequest( } pMgmt->sAssocInfo.AssocInfo.RequestIELength += pCurrRates->len + WLAN_IEHDR_LEN; - MEMvCopy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN); pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN; // for 802.11h @@ -3795,7 +3794,7 @@ s_MgrMakeAssocRequest( sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; - MEMvCopy(pbyIEs, sFrame.pRSNWPA, sFrame.pRSNWPA->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, sFrame.pRSNWPA, sFrame.pRSNWPA->len + WLAN_IEHDR_LEN); pbyIEs += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || @@ -3857,7 +3856,7 @@ s_MgrMakeAssocRequest( // RSN Capabilites if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { - MEMvCopy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); + memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); } else { sFrame.pRSN->abyRSN[16] = 0; sFrame.pRSN->abyRSN[17] = 0; @@ -3871,9 +3870,9 @@ s_MgrMakeAssocRequest( *pwPMKID = 0; // Initialize PMKID count pbyRSN += 2; // Point to PMKID list for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { - if (MEMEqualMemory(&pDevice->gsPMKID.BSSIDInfo[ii].BSSID[0], pMgmt->abyCurrBSSID, U_ETHER_ADDR_LEN)) { + if ( !memcmp(&pDevice->gsPMKID.BSSIDInfo[ii].BSSID[0], pMgmt->abyCurrBSSID, U_ETHER_ADDR_LEN)) { (*pwPMKID) ++; - MEMvCopy(pbyRSN, pDevice->gsPMKID.BSSIDInfo[ii].PMKID, 16); + memcpy(pbyRSN, pDevice->gsPMKID.BSSIDInfo[ii].PMKID, 16); pbyRSN += 16; } } @@ -3885,7 +3884,7 @@ s_MgrMakeAssocRequest( sFrame.len += sFrame.pRSN->len + WLAN_IEHDR_LEN; // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSN->len + WLAN_IEHDR_LEN; - MEMvCopy(pbyIEs, sFrame.pRSN, sFrame.pRSN->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, sFrame.pRSN, sFrame.pRSN->len + WLAN_IEHDR_LEN); pbyIEs += sFrame.pRSN->len + WLAN_IEHDR_LEN; } @@ -3967,7 +3966,7 @@ s_MgrMakeReAssocRequest( pMgmt->sAssocInfo.AssocInfo.RequestIELength = pCurrSSID->len + WLAN_IEHDR_LEN; pMgmt->sAssocInfo.AssocInfo.OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); pbyIEs = pMgmt->sAssocInfo.abyIEs; - MEMvCopy(pbyIEs, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN); pbyIEs += pCurrSSID->len + WLAN_IEHDR_LEN; /* Copy the rate set */ @@ -3984,7 +3983,7 @@ s_MgrMakeReAssocRequest( } pMgmt->sAssocInfo.AssocInfo.RequestIELength += pCurrRates->len + WLAN_IEHDR_LEN; - MEMvCopy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN); pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN; if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA) || @@ -4051,7 +4050,7 @@ s_MgrMakeReAssocRequest( sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; - MEMvCopy(pbyIEs, sFrame.pRSNWPA, sFrame.pRSNWPA->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, sFrame.pRSNWPA, sFrame.pRSNWPA->len + WLAN_IEHDR_LEN); pbyIEs += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN; } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || @@ -4113,7 +4112,7 @@ s_MgrMakeReAssocRequest( // RSN Capabilites if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { - MEMvCopy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); + memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); } else { sFrame.pRSN->abyRSN[16] = 0; sFrame.pRSN->abyRSN[17] = 0; @@ -4127,9 +4126,9 @@ s_MgrMakeReAssocRequest( *pwPMKID = 0; // Initialize PMKID count pbyRSN += 2; // Point to PMKID list for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) { - if (MEMEqualMemory(&pDevice->gsPMKID.BSSIDInfo[ii].BSSID[0], pMgmt->abyCurrBSSID, U_ETHER_ADDR_LEN)) { + if ( !memcmp(&pDevice->gsPMKID.BSSIDInfo[ii].BSSID[0], pMgmt->abyCurrBSSID, U_ETHER_ADDR_LEN)) { (*pwPMKID) ++; - MEMvCopy(pbyRSN, pDevice->gsPMKID.BSSIDInfo[ii].PMKID, 16); + memcpy(pbyRSN, pDevice->gsPMKID.BSSIDInfo[ii].PMKID, 16); pbyRSN += 16; } } @@ -4141,7 +4140,7 @@ s_MgrMakeReAssocRequest( sFrame.len += sFrame.pRSN->len + WLAN_IEHDR_LEN; // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSN->len + WLAN_IEHDR_LEN; - MEMvCopy(pbyIEs, sFrame.pRSN, sFrame.pRSN->len + WLAN_IEHDR_LEN); + memcpy(pbyIEs, sFrame.pRSN, sFrame.pRSN->len + WLAN_IEHDR_LEN); pbyIEs += sFrame.pRSN->len + WLAN_IEHDR_LEN; } @@ -4215,7 +4214,7 @@ s_MgrMakeAssocResponse( if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) { sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN; - MEMvCopy(sFrame.pExtSuppRates, + memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN ); @@ -4289,7 +4288,7 @@ s_MgrMakeReAssocResponse( if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) { sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len); sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN; - MEMvCopy(sFrame.pExtSuppRates, + memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN ); @@ -4833,7 +4832,7 @@ bAdd_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 ((psRSNCapObj->bRSNCapExist == TRUE) && (psRSNCapObj->wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; } else { @@ -4850,7 +4849,7 @@ bAdd_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; @@ -4880,7 +4879,7 @@ vFlush_PMKID_Candidate ( if (pDevice == NULL) return; - ZERO_MEMORY(&pDevice->gsPMKIDCandidate, sizeof(SPMKIDCandidateEvent)); + memset(&pDevice->gsPMKIDCandidate, 0, sizeof(SPMKIDCandidateEvent)); } static BOOL |