From 658ce9d653056a537df70e3a796654446fc9ff64 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 23 Jul 2009 08:33:56 +0200 Subject: Staging: fix typos "man[ae]g?ment" -> "management" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch was generated by running git grep -E -l 'man[ae]g?ment' drivers/staging | xargs -r perl -p -i -e 's/\bman[ae]g?ment\b/management/g' Signed-off-by: Uwe Kleine-König Cc: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/vt6655/power.c') diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index edd8336712a2..8e2f6c762fb4 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -18,7 +18,7 @@ * * File: power.c * - * Purpose: Handles 802.11 power managment functions + * Purpose: Handles 802.11 power management functions * * Author: Lyndon Chen * -- cgit v1.2.3-59-g8ed1b From 7e809a9b10ab5ee985e23dea537e0236f026d1ca Mon Sep 17 00:00:00 2001 From: Jim Lieb Date: Thu, 30 Jul 2009 10:27:21 -0700 Subject: Staging: vt6655 textual cleanup in prep for driver merge The vt6655 and vt6656 drivers are from a common origin but have drifted apart with minor textual differences. There are two changes: s/DEVICE_PRT/DBG_PRT/g and s/byPktTyp/byPktType/g This significantly reduces the differences between the two file sets in preparation to merging the common code. A few whitespace and text bits were also adjusted. Signed-off-by: Jim Lieb Cc: Forest Bond Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/80211mgr.c | 12 +- drivers/staging/vt6655/IEEE11h.c | 4 +- drivers/staging/vt6655/baseband.c | 26 +-- drivers/staging/vt6655/bssdb.c | 40 ++-- drivers/staging/vt6655/card.c | 32 ++-- drivers/staging/vt6655/datarate.c | 8 +- drivers/staging/vt6655/device.h | 8 +- drivers/staging/vt6655/device_main.c | 224 +++++++++++----------- drivers/staging/vt6655/dpc.c | 106 +++++------ drivers/staging/vt6655/hostap.c | 74 +++---- drivers/staging/vt6655/ioctl.c | 68 +++---- drivers/staging/vt6655/iwctl.c | 128 ++++++------- drivers/staging/vt6655/key.c | 112 +++++------ drivers/staging/vt6655/mac.c | 56 +++--- drivers/staging/vt6655/mib.c | 26 +-- drivers/staging/vt6655/power.c | 12 +- drivers/staging/vt6655/rxtx.c | 360 +++++++++++++++++------------------ drivers/staging/vt6655/wcmd.c | 74 +++---- drivers/staging/vt6655/wctl.c | 6 +- drivers/staging/vt6655/wmgr.c | 204 ++++++++++---------- drivers/staging/vt6655/wpa.c | 22 +-- drivers/staging/vt6655/wpa2.c | 14 +- drivers/staging/vt6655/wpactl.c | 60 +++--- drivers/staging/vt6655/wroute.c | 14 +- 24 files changed, 846 insertions(+), 844 deletions(-) (limited to 'drivers/staging/vt6655/power.c') diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index 5d6cd6824551..54fc81ea96f6 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -236,7 +236,7 @@ vMgrDecodeBeacon( break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in beacon decode.\n", pItem->byElementID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in beacon decode.\n", pItem->byElementID); break; } @@ -431,7 +431,7 @@ vMgrDecodeAssocRequest( break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in assocreq decode.\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in assocreq decode.\n", pItem->byElementID); break; } @@ -509,7 +509,7 @@ vMgrDecodeAssocResponse( if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) { pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem); } else { pFrame->pExtSuppRates = NULL; @@ -610,7 +610,7 @@ vMgrDecodeReassocRequest( pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem; break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in reassocreq decode.\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in reassocreq decode.\n", pItem->byElementID); break; } @@ -685,7 +685,7 @@ vMgrDecodeProbeRequest( break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in probereq\n", pItem->byElementID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in probereq\n", pItem->byElementID); break; } @@ -841,7 +841,7 @@ vMgrDecodeProbeResponse( break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in proberesp\n", pItem->byElementID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in proberesp\n", pItem->byElementID); break; } diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c index b0f4eb5af891..e1addc6d700a 100644 --- a/drivers/staging/vt6655/IEEE11h.c +++ b/drivers/staging/vt6655/IEEE11h.c @@ -271,11 +271,11 @@ IEEE11hbMgrRxAction ( } break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown Action = %d\n", pAction->byAction); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown Action = %d\n", pAction->byAction); break; } } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown Category = %d\n", pAction->byCategory); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown Category = %d\n", pAction->byCategory); pAction->byCategory |= 0x80; //return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, uLength)); diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index bc6db8699539..30c707d127fc 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -2050,7 +2050,7 @@ BOOL BBbReadEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, PBYTE pbyData) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x30); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n"); return FALSE; } return TRUE; @@ -2092,7 +2092,7 @@ BOOL BBbWriteEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byData) if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x31); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n"); return FALSE; } return TRUE; @@ -2807,24 +2807,24 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3) return; } pDevice->uDiversityCnt++; - // DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->uDiversityCnt = %d\n", (int)pDevice->uDiversityCnt); + // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->uDiversityCnt = %d\n", (int)pDevice->uDiversityCnt); pDevice->uNumSQ3[byRxRate]++; if (pDevice->byAntennaState == 0) { if (pDevice->uDiversityCnt > pDevice->ulDiversityNValue) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ulDiversityNValue=[%d],54M-[%d]\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ulDiversityNValue=[%d],54M-[%d]\n", (int)pDevice->ulDiversityNValue, (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate]); if (pDevice->uNumSQ3[pDevice->wAntDiversityMaxRate] < pDevice->uDiversityCnt/2) { pDevice->ulRatio_State0 = s_ulGetRatio(pDevice); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SQ3_State0, rate = [%08x]\n", (int)pDevice->ulRatio_State0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SQ3_State0, rate = [%08x]\n", (int)pDevice->ulRatio_State0); if ( pDevice->byTMax == 0 ) return; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1.[%08x], uNumSQ3[%d]=%d, %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1.[%08x], uNumSQ3[%d]=%d, %d\n", (int)pDevice->ulRatio_State0, (int)pDevice->wAntDiversityMaxRate, (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate], (int)pDevice->uDiversityCnt); #ifdef PLICE_DEBUG @@ -2852,11 +2852,11 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3) del_timer(&pDevice->TimerSQ3Tmax1); pDevice->ulRatio_State1 = s_ulGetRatio(pDevice); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RX:SQ3_State1, rate0 = %08x,rate1 = %08x\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RX:SQ3_State1, rate0 = %08x,rate1 = %08x\n", (int)pDevice->ulRatio_State0,(int)pDevice->ulRatio_State1); if (pDevice->ulRatio_State1 < pDevice->ulRatio_State0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2.[%08x][%08x], uNumSQ3[%d]=%d, %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2.[%08x][%08x], uNumSQ3[%d]=%d, %d\n", (int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->wAntDiversityMaxRate, (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate], (int)pDevice->uDiversityCnt); @@ -2896,12 +2896,12 @@ TimerSQ3CallBack ( { PSDevice pDevice = (PSDevice)hDeviceContext; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack..."); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack..."); spin_lock_irq(&pDevice->lock); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"3.[%08x][%08x], %d\n",(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->uDiversityCnt); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"3.[%08x][%08x], %d\n",(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->uDiversityCnt); #ifdef PLICE_DEBUG //printk("TimerSQ3CallBack1:call s_vChangeAntenna\n"); #endif @@ -2946,7 +2946,7 @@ TimerState1CallBack ( { PSDevice pDevice = (PSDevice)hDeviceContext; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerState1CallBack..."); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerState1CallBack..."); spin_lock_irq(&pDevice->lock); if (pDevice->uDiversityCnt < pDevice->ulDiversityMValue/100) { @@ -2961,11 +2961,11 @@ TimerState1CallBack ( add_timer(&pDevice->TimerSQ3Tmax2); } else { pDevice->ulRatio_State1 = s_ulGetRatio(pDevice); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SQ3_State1, rate0 = %08x,rate1 = %08x\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SQ3_State1, rate0 = %08x,rate1 = %08x\n", (int)pDevice->ulRatio_State0,(int)pDevice->ulRatio_State1); if ( pDevice->ulRatio_State1 < pDevice->ulRatio_State0 ) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2.[%08x][%08x], uNumSQ3[%d]=%d, %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2.[%08x][%08x], uNumSQ3[%d]=%d, %d\n", (int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->wAntDiversityMaxRate, (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate], (int)pDevice->uDiversityCnt); diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 6eb0798d58d8..3833ea634150 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -183,7 +183,7 @@ BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; UINT ii = 0; // UINT jj = 0; //DavidWang if (pbyDesireBSSID != NULL) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList BSSID[%02X %02X %02X-%02X %02X %02X]\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList BSSID[%02X %02X %02X-%02X %02X %02X]\n", *pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2), *(pbyDesireBSSID+3),*(pbyDesireBSSID+4),*(pbyDesireBSSID+5)); if ((!IS_BROADCAST_ADDRESS(pbyDesireBSSID)) && @@ -252,7 +252,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ) { // Type not match skip this BSS - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo); continue; } @@ -260,7 +260,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; if (((ePhyType == PHY_TYPE_11A) && (PHY_TYPE_11A != pCurrBSS->eNetworkTypeInUse)) || ((ePhyType != PHY_TYPE_11A) && (PHY_TYPE_11A == pCurrBSS->eNetworkTypeInUse))) { // PhyType not match skip this BSS - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Physical type mismatch.... ePhyType[%d] BSS[%d]\n", ePhyType, pCurrBSS->eNetworkTypeInUse); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Physical type mismatch.... ePhyType[%d] BSS[%d]\n", ePhyType, pCurrBSS->eNetworkTypeInUse); continue; } } @@ -450,7 +450,7 @@ BSSbInsertToBSSList ( } if (ii == MAX_BSS_NUM){ - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Get free KnowBSS node failed.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Get free KnowBSS node failed.\n"); return FALSE; } // save the BSS info @@ -476,7 +476,7 @@ BSSbInsertToBSSList ( if (pExtSuppRates->len > WLAN_RATES_MAXLEN) pExtSuppRates->len = WLAN_RATES_MAXLEN; memcpy(pBSSList->abyExtSuppRates, pExtSuppRates, pExtSuppRates->len + WLAN_IEHDR_LEN); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSbInsertToBSSList: pExtSuppRates->len = %d\n", pExtSuppRates->len); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSbInsertToBSSList: pExtSuppRates->len = %d\n", pExtSuppRates->len); } else { memset(pBSSList->abyExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1); @@ -669,7 +669,7 @@ BSSbUpdateToBSSList ( pBSSList->wCapInfo = cpu_to_le16(wCapInfo); pBSSList->uClearCount = 0; pBSSList->uChannel = byCurrChannel; -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSbUpdateToBSSList: pBSSList->uChannel: %d\n", pBSSList->uChannel); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSbUpdateToBSSList: pBSSList->uChannel: %d\n", pBSSList->uChannel); if (pSSID->len > WLAN_SSID_MAXLEN) pSSID->len = WLAN_SSID_MAXLEN; @@ -872,7 +872,7 @@ BSSvCreateOneNode( // if not found replace uInActiveCount is largest one. if ( ii == (MAX_NODE_NUM + 1)) { *puNodeIndex = SelectIndex; - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Replace inactive node = %d\n", SelectIndex); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Replace inactive node = %d\n", SelectIndex); // clear ps buffer if (pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue.next != NULL) { while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue)) != NULL) @@ -890,7 +890,7 @@ BSSvCreateOneNode( skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue); pMgmt->sNodeDBTable[*puNodeIndex].byAuthSequence = 0; pMgmt->sNodeDBTable[*puNodeIndex].wEnQueueCnt = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii); return; }; @@ -982,7 +982,7 @@ BSSvUpdateAPNode( #endif // Auto rate fallback function initiation. // RATEbInit(pDevice); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pMgmt->sNodeDBTable[0].wTxDataRate = %d \n", pMgmt->sNodeDBTable[0].wTxDataRate); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pMgmt->sNodeDBTable[0].wTxDataRate = %d \n", pMgmt->sNodeDBTable[0].wTxDataRate); }; @@ -1168,7 +1168,7 @@ start: if (ii > 0) { if (pMgmt->sNodeDBTable[ii].uInActiveCount > MAX_INACTIVE_COUNT) { BSSvRemoveOneNode(pDevice, ii); - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Inactive timeout [%d] sec, STA index = [%d] remove\n", MAX_INACTIVE_COUNT, ii); continue; } @@ -1227,11 +1227,11 @@ start: // check if pending PS queue if (pMgmt->sNodeDBTable[ii].wEnQueueCnt != 0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index= %d, Queue = %d pending \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index= %d, Queue = %d pending \n", ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt); if ((ii >0) && (pMgmt->sNodeDBTable[ii].wEnQueueCnt > 15)) { BSSvRemoveOneNode(pDevice, ii); - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Pending many queues PS STA Index = %d remove \n", ii); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Pending many queues PS STA Index = %d remove \n", ii); continue; } } @@ -1305,7 +1305,7 @@ start: (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) { if (pMgmt->sNodeDBTable[0].bActive) { // Assoc with BSS - // DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Callback inactive Count = [%d]\n", pMgmt->sNodeDBTable[0].uInActiveCount); + // DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Callback inactive Count = [%d]\n", pMgmt->sNodeDBTable[0].uInActiveCount); //if (pDevice->bUpdateBBVGA) { // s_vCheckSensitivity((HANDLE) pDevice); //} @@ -1327,7 +1327,7 @@ start: netif_stop_queue(pDevice->dev); pDevice->bLinkPass = FALSE; pDevice->bRoaming = TRUE; - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount); if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr->type = VIAWGET_DISASSOC_MSG; @@ -1368,7 +1368,7 @@ start: //mike use old encryption status for wpa reauthen if(pDevice->bWPADEVUp) pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n"); BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); @@ -1385,7 +1385,7 @@ start: pDevice->uAutoReConnectTime++; } else { - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scaning ...\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scaning ...\n"); pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); @@ -1398,7 +1398,7 @@ start: s_vCheckPreEDThreshold((HANDLE)pDevice); } if (pMgmt->sNodeDBTable[0].uInActiveCount >=ADHOC_LOST_BEACON_COUNT) { - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost other STA beacon [%d] sec, started !\n", pMgmt->sNodeDBTable[0].uInActiveCount); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost other STA beacon [%d] sec, started !\n", pMgmt->sNodeDBTable[0].uInActiveCount); pMgmt->sNodeDBTable[0].uInActiveCount = 0; pMgmt->eCurrState = WMAC_STATE_STARTED; netif_stop_queue(pDevice->dev); @@ -1474,7 +1474,7 @@ BSSvUpdateNodeTxCounter( ////#endif // Only Unicast using support rates if (pTxBufHead->wFIFOCtl & FIFOCTL_NEEDACK) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wRate %04X, byTsr0 %02X, byTsr1 %02X\n", wRate, byTsr0, byTsr1); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wRate %04X, byTsr0 %02X, byTsr1 %02X\n", wRate, byTsr0, byTsr1); if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) { pMgmt->sNodeDBTable[0].uTxAttempts += 1; if ((byTsr1 & TSR1_TERR) == 0) { @@ -1641,7 +1641,7 @@ BSSvClearNodeDBTable( // check if sTxPSQueue has been initial if (pMgmt->sNodeDBTable[ii].sTxPSQueue.next != NULL) { while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) != NULL){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS skb != NULL %d\n", ii); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS skb != NULL %d\n", ii); dev_kfree_skb(skb); } } @@ -1683,7 +1683,7 @@ VOID s_vCheckSensitivity( if (uNumofdBm > 0) { LocalldBmAverage = LocalldBmAverage/uNumofdBm; for (ii=0;iildBmThreshold[ii], pDevice->abyBBVGA[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LocalldBmAverage:%ld, %ld %02x\n", LocalldBmAverage, pDevice->ldBmThreshold[ii], pDevice->abyBBVGA[ii]); if (LocalldBmAverage < pDevice->ldBmThreshold[ii]) { pDevice->byBBVGANew = pDevice->abyBBVGA[ii]; break; diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 723f44e0bbae..632c3c2c082f 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -837,7 +837,7 @@ BOOL CARDbSetChannel (PVOID pDeviceHandler, UINT uConnectionChannel) RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel); - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDbSetMediaChannel: %d\n", (BYTE)uConnectionChannel); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDbSetMediaChannel: %d\n", (BYTE)uConnectionChannel); BBvSoftwareReset(pDevice->PortOffset); if (pDevice->byLocalID > REV_ID_VT3253_B1) { @@ -1347,14 +1347,14 @@ BOOL CARDbSetBSSID(PVOID pDeviceHandler, PBYTE pbyBSSID, CARD_OP_MODE eOPMode) MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID); pDevice->bBSSIDFilter = FALSE; pDevice->byRxMode &= ~RCR_BSSID; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode ); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode ); } else { if (IS_NULL_ADDRESS(pDevice->abyBSSID) == FALSE) { MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID); pDevice->bBSSIDFilter = TRUE; pDevice->byRxMode |= RCR_BSSID; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: rx_mode = %x\n", pDevice->byRxMode ); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: rx_mode = %x\n", pDevice->byRxMode ); } // Adopt BSS state in Adapter Device Object pDevice->eOPMode = eOPMode; @@ -1444,7 +1444,7 @@ CARDbPowerDown( } MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Go to Doze ZZZZZZZZZZZZZZZ\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Go to Doze ZZZZZZZZZZZZZZZ\n"); return TRUE; } @@ -1590,17 +1590,17 @@ CARDbAdd_PMKID_Candidate ( PPMKID_CANDIDATE pCandidateList; UINT ii = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); if (pDevice->gsPMKIDCandidate.NumCandidates >= MAX_PMKIDLIST) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 3\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 3\n"); ZERO_MEMORY(&pDevice->gsPMKIDCandidate, sizeof(SPMKIDCandidateEvent)); } for (ii = 0; ii < 6; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02X ", *(pbyBSSID + ii)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02X ", *(pbyBSSID + ii)); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); // Update Old Candidate @@ -1625,7 +1625,7 @@ CARDbAdd_PMKID_Candidate ( } MEMvCopy(pCandidateList->BSSID, pbyBSSID, U_ETHER_ADDR_LEN); pDevice->gsPMKIDCandidate.NumCandidates++; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); return TRUE; } @@ -1709,7 +1709,7 @@ VOID CARDvInitChannelTable (PVOID pDeviceHandler) } } } - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO"Zone=[%d][%c][%c]!!\n",pDevice->byZoneType,ChannelRuleTab[pDevice->byZoneType].chCountryCode[0],ChannelRuleTab[pDevice->byZoneType].chCountryCode[1]); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO"Zone=[%d][%c][%c]!!\n",pDevice->byZoneType,ChannelRuleTab[pDevice->byZoneType].chCountryCode[0],ChannelRuleTab[pDevice->byZoneType].chCountryCode[1]); for(ii=0;iiabyRegPwr[ii+1] == 0) { pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1]; @@ -2599,22 +2599,22 @@ WORD CARDwGetOFDMControlRate (PVOID pDeviceHandler, WORD wRateIdx) PSDevice pDevice = (PSDevice) pDeviceHandler; UINT ui = (UINT)wRateIdx; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BASIC RATE: %X\n", pDevice->wBasicRate); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BASIC RATE: %X\n", pDevice->wBasicRate); if (!CARDbIsOFDMinBasicRate((PVOID)pDevice)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDwGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDwGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx); if (wRateIdx > RATE_24M) wRateIdx = RATE_24M; return wRateIdx; } while (ui > RATE_11M) { if (pDevice->wBasicRate & ((WORD)1 << ui)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDwGetOFDMControlRate : %d\n", ui); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDwGetOFDMControlRate : %d\n", ui); return (WORD)ui; } ui --; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDwGetOFDMControlRate: 6M\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CARDwGetOFDMControlRate: 6M\n"); return (WORD)RATE_24M; } @@ -3085,7 +3085,7 @@ void CARDvSetFirstNextTBTT (DWORD_PTR dwIoBase, WORD wBeaconInterval) VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT, LODWORD(qwNextTBTT)); VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT)); MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Card:First Next TBTT[%8xh:%8xh] \n", HIDWORD(qwNextTBTT), LODWORD(qwNextTBTT)); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Card:First Next TBTT[%8xh:%8xh] \n", HIDWORD(qwNextTBTT), LODWORD(qwNextTBTT)); return; } @@ -3113,7 +3113,7 @@ void CARDvUpdateNextTBTT (DWORD_PTR dwIoBase, QWORD qwTSF, WORD wBeaconInterval) VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT, LODWORD(qwTSF)); VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT + 4, HIDWORD(qwTSF)); MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Card:Update Next TBTT[%8xh:%8xh] \n",(UINT)HIDWORD(qwTSF), (UINT)LODWORD(qwTSF)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Card:Update Next TBTT[%8xh:%8xh] \n",(UINT)HIDWORD(qwTSF), (UINT)LODWORD(qwTSF)); return; } diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c index f58f9636be2d..92995a8f72cf 100644 --- a/drivers/staging/vt6655/datarate.c +++ b/drivers/staging/vt6655/datarate.c @@ -239,7 +239,7 @@ UINT uRateLen; *pwSuppRate = 0; uRateLen = pItemRates->len; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate Len: %d\n", uRateLen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate Len: %d\n", uRateLen); if (pDevice->eCurrentPHYType != PHY_TYPE_11B) { if (uRateLen > WLAN_RATES_MAXLEN) uRateLen = WLAN_RATES_MAXLEN; @@ -254,7 +254,7 @@ UINT uRateLen; (bUpdateBasicRate == TRUE)) { // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate CARDbAddBasicRate((PVOID)pDevice, wGetRateIdx(byRate)); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); } byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F); if (byHighSuppRate == 0) @@ -277,7 +277,7 @@ UINT uRateLen; if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) { // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate CARDbAddBasicRate((PVOID)pDevice, wGetRateIdx(byRate)); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); } byRate = (BYTE)(pItemExtRates->abyRates[ii]&0x7F); if (byHighSuppRate == 0) @@ -303,7 +303,7 @@ UINT uRateLen; if (wOldBasicRate != pDevice->wBasicRate) CARDvSetRSPINF((PVOID)pDevice, pDevice->eCurrentPHYType); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Exit ParseMaxRate\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Exit ParseMaxRate\n"); } diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 38cc942deca6..33d5a4452d9d 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -200,9 +200,6 @@ // BUILD OBJ mode -#define DEVICE_PRT(l, p, args...) {if (l<=msglevel) printk( p ,##args);} - - #define AVAIL_TD(p,q) ((p)->sOpts.nTxDescs[(q)]-((p)->iTDUsed[(q)])) //PLICE_DEBUG -> @@ -211,9 +208,14 @@ +#define PRIVATE_Message 0 + /*--------------------- Export Types ------------------------------*/ +#define DBG_PRT(l, p, args...) {if (l<=msglevel) printk( p ,##args);} +#define PRINT_K(p, args...) {if (PRIVATE_Message) printk( p ,##args);} + //0:11A 1:11B 2:11G typedef enum _VIA_BB_TYPE { diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index fe9cc783dc78..c41c02689fe4 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -421,11 +421,11 @@ device_set_int_opt(int *opt, int val, int min, int max, int def,char* name,char* if (val==-1) *opt=def; else if (valmax) { - DEVICE_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (%d-%d)\n" , + DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (%d-%d)\n" , devname,name, min,max); *opt=def; } else { - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: set value of parameter %s to %d\n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: set value of parameter %s to %d\n", devname, name, val); *opt=val; } @@ -437,11 +437,11 @@ device_set_bool_opt(PU32 opt, int val,BOOL def,U32 flag, char* name,char* devnam if (val==-1) *opt|=(def ? flag : 0); else if (val<0 || val>1) { - DEVICE_PRT(MSG_LEVEL_INFO, KERN_NOTICE + DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: the value of parameter %s is invalid, the valid range is (0-1)\n",devname,name); *opt|=(def ? flag : 0); } else { - DEVICE_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: set parameter %s to %s\n", + DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: set parameter %s to %s\n", devname,name , val ? "TRUE" : "FALSE"); *opt|=(val ? flag : 0); } @@ -512,18 +512,18 @@ pDevice->bUpdateBBVGA = TRUE; pDevice->byPreambleType = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" uChannel= %d\n",(INT)pDevice->uChannel); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byOpMode= %d\n",(INT)pDevice->byOpMode); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" ePSMode= %d\n",(INT)pDevice->ePSMode); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" wRTSThreshold= %d\n",(INT)pDevice->wRTSThreshold); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byShortRetryLimit= %d\n",(INT)pDevice->byShortRetryLimit); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byLongRetryLimit= %d\n",(INT)pDevice->byLongRetryLimit); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byPreambleType= %d\n",(INT)pDevice->byPreambleType); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byShortPreamble= %d\n",(INT)pDevice->byShortPreamble); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" uConnectionRate= %d\n",(INT)pDevice->uConnectionRate); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byBBType= %d\n",(INT)pDevice->byBBType); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pDevice->b11hEnable= %d\n",(INT)pDevice->b11hEnable); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pDevice->bDiversityRegCtlON= %d\n",(INT)pDevice->bDiversityRegCtlON); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" uChannel= %d\n",(INT)pDevice->uChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byOpMode= %d\n",(INT)pDevice->byOpMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" ePSMode= %d\n",(INT)pDevice->ePSMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" wRTSThreshold= %d\n",(INT)pDevice->wRTSThreshold); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byShortRetryLimit= %d\n",(INT)pDevice->byShortRetryLimit); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byLongRetryLimit= %d\n",(INT)pDevice->byLongRetryLimit); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byPreambleType= %d\n",(INT)pDevice->byPreambleType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byShortPreamble= %d\n",(INT)pDevice->byShortPreamble); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" uConnectionRate= %d\n",(INT)pDevice->uConnectionRate); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" byBBType= %d\n",(INT)pDevice->byBBType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pDevice->b11hEnable= %d\n",(INT)pDevice->b11hEnable); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pDevice->bDiversityRegCtlON= %d\n",(INT)pDevice->bDiversityRegCtlON); } static VOID s_vCompleteCurrentMeasure (IN PSDevice pDevice, IN BYTE byResult) @@ -679,7 +679,7 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); #ifdef PLICE_DEBUG //printk("init registers: TxAntennaMode is %d\n",pDevice->byTxAntennaMode); #endif - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bDiversityEnable=[%d],NValue=[%d],MValue=[%d],TMax=[%d],TMax2=[%d]\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bDiversityEnable=[%d],NValue=[%d],MValue=[%d],TMax=[%d],TMax2=[%d]\n", pDevice->bDiversityEnable,(int)pDevice->ulDiversityNValue,(int)pDevice->ulDiversityMValue,pDevice->byTMax,pDevice->byTMax2); //#ifdef ZoneType_DefaultSetting @@ -691,7 +691,7 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] !=0x00)){ //for USA pDevice->abyEEPROM[EEP_OFS_ZONETYPE] = 0; pDevice->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0B; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Init Zone Type :USA\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Init Zone Type :USA\n"); } else if((zonetype == 1)&& (pDevice->abyEEPROM[EEP_OFS_ZONETYPE]!=0x01)){ //for Japan @@ -702,7 +702,7 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); (pDevice->abyEEPROM[EEP_OFS_ZONETYPE]!=0x02)){ //for Europe pDevice->abyEEPROM[EEP_OFS_ZONETYPE] = 0x02; pDevice->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Init Zone Type :Europe\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Init Zone Type :Europe\n"); } else @@ -725,12 +725,12 @@ else } pDevice->byRFType &= RF_MASK; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRFType = %x\n", pDevice->byRFType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRFType = %x\n", pDevice->byRFType); if (pDevice->bZoneRegExist == FALSE) { pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE]; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byZoneType = %x\n", pDevice->byZoneType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byZoneType = %x\n", pDevice->byZoneType); //Init RF module RFbInit(pDevice); @@ -860,7 +860,7 @@ else CARDbRadioPowerOn(pDevice); pMgmt->eScanType = WMAC_SCAN_PASSIVE; // get Permanent network address SROMvReadEtherAddress(pDevice->PortOffset, pDevice->abyCurrentNetAddr); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Network address = %02x-%02x-%02x=%02x-%02x-%02x\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Network address = %02x-%02x-%02x=%02x-%02x-%02x\n", pDevice->abyCurrentNetAddr[0], pDevice->abyCurrentNetAddr[1], pDevice->abyCurrentNetAddr[2], @@ -1153,17 +1153,17 @@ static void device_print_info(PSDevice pDevice) { struct net_device* dev=pDevice->dev; - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: %s\n",dev->name, get_chip_name(pDevice->chip_id)); - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: %s\n",dev->name, get_chip_name(pDevice->chip_id)); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X", dev->name, dev->dev_addr[0],dev->dev_addr[1],dev->dev_addr[2], dev->dev_addr[3],dev->dev_addr[4],dev->dev_addr[5]); #ifdef IO_MAP - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO" IO=0x%lx ",(ULONG) pDevice->ioaddr); - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO" IRQ=%d \n", pDevice->dev->irq); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IO=0x%lx ",(ULONG) pDevice->ioaddr); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IRQ=%d \n", pDevice->dev->irq); #else - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO" IO=0x%lx Mem=0x%lx ",(ULONG) pDevice->ioaddr,(ULONG) pDevice->PortOffset); - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO" IRQ=%d \n", pDevice->dev->irq); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IO=0x%lx Mem=0x%lx ",(ULONG) pDevice->ioaddr,(ULONG) pDevice->PortOffset); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IRQ=%d \n", pDevice->dev->irq); #endif } @@ -1288,7 +1288,7 @@ device_release_WPADEV(pDevice); ptr->prev->next=ptr->next; } else { - DEVICE_PRT(MSG_LEVEL_ERR, KERN_ERR "info struct not found\n"); + DBG_PRT(MSG_LEVEL_ERR, KERN_ERR "info struct not found\n"); return; } #ifdef HOSTAP @@ -1324,7 +1324,7 @@ static BOOL device_init_rings(PSDevice pDevice) { &pDevice->pool_dma); if (vir_pool == NULL) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : allocate desc dma memory failed\n", pDevice->dev->name); + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : allocate desc dma memory failed\n", pDevice->dev->name); return FALSE; } @@ -1352,7 +1352,7 @@ static BOOL device_init_rings(PSDevice pDevice) { &pDevice->tx_bufs_dma0); if (pDevice->tx0_bufs == NULL) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: allocate buf dma memory failed\n", pDevice->dev->name); + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: allocate buf dma memory failed\n", pDevice->dev->name); pci_free_consistent(pDevice->pcid, pDevice->sOpts.nRxDescs0 * sizeof(SRxDesc) + pDevice->sOpts.nRxDescs1 * sizeof(SRxDesc) + @@ -1441,7 +1441,7 @@ static void device_init_rd0_ring(PSDevice pDevice) { pDesc->pRDInfo = alloc_rd_info(); ASSERT(pDesc->pRDInfo); if (!device_alloc_rx_buf(pDevice, pDesc)) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc rx bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc rx bufs\n", pDevice->dev->name); } pDesc->next = &(pDevice->aRD0Ring[(i+1) % pDevice->sOpts.nRxDescs0]); @@ -1465,7 +1465,7 @@ static void device_init_rd1_ring(PSDevice pDevice) { pDesc->pRDInfo = alloc_rd_info(); ASSERT(pDesc->pRDInfo); if (!device_alloc_rx_buf(pDevice, pDesc)) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc rx bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc rx bufs\n", pDevice->dev->name); } pDesc->next = &(pDevice->aRD1Ring[(i+1) % pDevice->sOpts.nRxDescs1]); @@ -1486,7 +1486,7 @@ static void device_init_defrag_cb(PSDevice pDevice) { for (i = 0; i < CB_MAX_RX_FRAG; i++) { pDeF = &(pDevice->sRxDFCB[i]); if (!device_alloc_frag_buf(pDevice, pDeF)) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n", pDevice->dev->name); }; } @@ -1645,12 +1645,12 @@ static int device_rx_srv(PSDevice pDevice, UINT uIdx) { for (pRD = pDevice->pCurrRD[uIdx]; pRD->m_rd0RD0.f1Owner == OWNED_BY_HOST; pRD = pRD->next) { -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->pCurrRD = %x, works = %d\n", pRD, works); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->pCurrRD = %x, works = %d\n", pRD, works); if (works++>15) break; if (device_receive_frame(pDevice, pRD)) { if (!device_alloc_rx_buf(pDevice,pRD)) { - DEVICE_PRT(MSG_LEVEL_ERR, KERN_ERR + DBG_PRT(MSG_LEVEL_ERR, KERN_ERR "%s: can not allocate rx buf\n", pDevice->dev->name); break; } @@ -1753,7 +1753,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { if (BITbIsBitOff(byTsr1, TSR1_TERR)) { if (byTsr0 != 0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X].\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X].\n", (INT)uIdx, byTsr1, byTsr0); } if ((pTxBufHead->wFragCtl & FRAGCTL_ENDFRAG) != FRAGCTL_NONFRAG) { @@ -1763,7 +1763,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { pStats->tx_bytes += pTD->pTDInfo->skb->len; } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] dropped & tsr1[%02X] tsr0[%02X].\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] dropped & tsr1[%02X] tsr0[%02X].\n", (INT)uIdx, byTsr1, byTsr0); pStats->tx_errors++; pStats->tx_dropped++; @@ -1772,7 +1772,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { if ((pTD->pTDInfo->byFlags & TD_FLAGS_PRIV_SKB) != 0) { if (pDevice->bEnableHostapd) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "tx call back netif.. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "tx call back netif.. \n"); skb = pTD->pTDInfo->skb; skb->dev = pDevice->apdev; skb_reset_mac_header(skb); @@ -1785,11 +1785,11 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { if (BITbIsBitOn(byTsr1, TSR1_TERR)) { if ((pTD->pTDInfo->byFlags & TD_FLAGS_PRIV_SKB) != 0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] fail has error. tsr1[%02X] tsr0[%02X].\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] fail has error. tsr1[%02X] tsr0[%02X].\n", (INT)uIdx, byTsr1, byTsr0); } -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] fail has error. tsr1[%02X] tsr0[%02X].\n", +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] fail has error. tsr1[%02X] tsr0[%02X].\n", // (INT)uIdx, byTsr1, byTsr0); if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && @@ -1806,7 +1806,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { wAID = pMgmt->sNodeDBTable[uNodeIndex].wAID; pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7]; pTD->pTDInfo->byFlags &= ~(TD_FLAGS_NETIF_SKB); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "tx_srv:tx fail re-queue sta index= %d, QueCnt= %d\n" + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "tx_srv:tx fail re-queue sta index= %d, QueCnt= %d\n" ,(INT)uNodeIndex, pMgmt->sNodeDBTable[uNodeIndex].wEnQueueCnt); pStats->tx_errors--; pStats->tx_dropped--; @@ -1825,7 +1825,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { if (AVAIL_TD(pDevice, uIdx) < RESERV_AC0DMA) { bFull = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]); } if (netif_queue_stopped(pDevice->dev) && (bFull==FALSE)){ netif_wake_queue(pDevice->dev); @@ -1842,7 +1842,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { static void device_error(PSDevice pDevice, WORD status) { if (status & ISR_FETALERR) { - DEVICE_PRT(MSG_LEVEL_ERR, KERN_ERR + DBG_PRT(MSG_LEVEL_ERR, KERN_ERR "%s: Hardware fatal error.\n", pDevice->dev->name); netif_stop_queue(pDevice->dev); @@ -1961,7 +1961,7 @@ static int device_open(struct net_device *dev) { wpa_Result.authenticated = FALSE; pDevice->fWPA_Authened = FALSE; #endif -DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device init rd0 ring\n"); +DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device init rd0 ring\n"); device_init_rd0_ring(pDevice); device_init_rd1_ring(pDevice); device_init_defrag_cb(pDevice); @@ -2012,7 +2012,7 @@ device_init_rd0_ring(pDevice); // if (( SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RADIOCTL)&0x06)==0x04) // return -ENOMEM; -DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n"); +DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n"); device_init_registers(pDevice, DEVICE_INIT_COLD); MACvReadEtherAddress(pDevice->PortOffset, pDevice->abyCurrentNetAddr); memcpy(pDevice->pMgmt->abyMACAddr, pDevice->abyCurrentNetAddr, U_ETHER_ADDR_LEN); @@ -2051,7 +2051,7 @@ DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n"); //printk("DEBUG2\n"); -DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call MACvIntEnable\n"); +DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call MACvIntEnable\n"); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); if (pDevice->pMgmt->eConfigMode == WMAC_CONFIG_AP) { @@ -2063,7 +2063,7 @@ DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call MACvIntEnable\n"); } pDevice->flags |=DEVICE_FLAGS_OPENED; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_open success.. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_open success.. \n"); return 0; } @@ -2118,7 +2118,7 @@ device_release_WPADEV(pDevice); //PLICE_DEBUG-> //tasklet_kill(&pDevice->RxMngWorkItem); //PLICE_DEBUG<- - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close.. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close.. \n"); return 0; } @@ -2130,11 +2130,11 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { UINT cbMPDULen = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n"); spin_lock_irq(&pDevice->lock); if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211, td0 <=0\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211, td0 <=0\n"); dev_kfree_skb_irq(skb); spin_unlock_irq(&pDevice->lock); return 0; @@ -2164,7 +2164,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { PSTxDesc pHeadTD, pLastTD; UINT cbFrameBodySize; UINT uMACfragNum; - BYTE byPktTyp; + BYTE byPktType; BOOL bNeedEncryption = FALSE; PSKeyItem pTransmitKey = NULL; UINT cbHeaderSize; @@ -2180,14 +2180,14 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 0) { dev_kfree_skb_irq(skb); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_xmit, td0 <=0\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_xmit, td0 <=0\n"); return FALSE; } if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (pDevice->uAssocCount == 0) { dev_kfree_skb_irq(skb); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_xmit, assocCount = 0\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_xmit, assocCount = 0\n"); return FALSE; } } @@ -2209,7 +2209,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { dev_kfree_skb_irq(skb); return FALSE; } - byPktTyp = (BYTE)pDevice->byPacketType; + byPktType = (BYTE)pDevice->byPacketType; if (pDevice->bFixRate) { @@ -2238,18 +2238,18 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { pDevice->byPreambleType = PREAMBLE_LONG; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dma0: pDevice->wCurrentRate = %d \n", pDevice->wCurrentRate); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dma0: pDevice->wCurrentRate = %d \n", pDevice->wCurrentRate); if (pDevice->wCurrentRate <= RATE_11M) { - byPktTyp = PK_TYPE_11B; + byPktType = PK_TYPE_11B; } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { - byPktTyp = PK_TYPE_11A; + byPktType = PK_TYPE_11A; } else { if (pDevice->bProtectMode == TRUE) { - byPktTyp = PK_TYPE_11GB; + byPktType = PK_TYPE_11GB; } else { - byPktTyp = PK_TYPE_11GA; + byPktType = PK_TYPE_11GA; } } @@ -2268,7 +2268,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex) { pTransmitKey->uKeyLength ); } - vGenerateFIFOHeader(pDevice, byPktTyp, pDevice->pbyTmpBuff, bNeedEncryption, + vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption, cbFrameBodySize, TYPE_TXDMA0, pHeadTD, &pDevice->sTxEthHeader, (PBYTE)skb->data, pTransmitKey, uNodeIndex, &uMACfragNum, @@ -2318,7 +2318,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { WORD wAID; UINT uMACfragNum = 1; UINT cbFrameBodySize; - BYTE byPktTyp; + BYTE byPktType; UINT cbHeaderSize; BOOL bNeedEncryption = FALSE; PSKeyItem pTransmitKey = NULL; @@ -2370,7 +2370,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { // set tx map wAID = pMgmt->sNodeDBTable[uNodeIndex].wAID; pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7]; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set:pMgmt->abyPSTxMap[%d]= %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set:pMgmt->abyPSTxMap[%d]= %d\n", (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]); spin_unlock_irq(&pDevice->lock); return 0; @@ -2388,7 +2388,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { } if (bNodeExist == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Unknown STA not found in node DB \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Unknown STA not found in node DB \n"); dev_kfree_skb_irq(skb); spin_unlock_irq(&pDevice->lock); return 0; @@ -2420,20 +2420,20 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { // get group key if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) { bTKIP_UseGTK = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); break; } } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get PTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get PTK.\n"); break; } }else if (pDevice->pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { pbyBSSID = pDevice->sTxEthHeader.abyDstAddr; //TO_DS = 0 and FROM_DS = 0 --> 802.11 MAC Address1 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS Serach Key: \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS Serach Key: \n"); for (ii = 0; ii< 6; ii++) - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"%x \n", *(pbyBSSID+ii)); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"%x \n", *(pbyBSSID+ii)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n"); // get pairwise key if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) @@ -2444,19 +2444,19 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) { pTransmitKey = NULL; if (pDevice->pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); } else - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); } else { bTKIP_UseGTK = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); } } while(FALSE); } if (pDevice->bEnableHostWEP) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex); if (pDevice->bEncryptionEnable == TRUE) { pTransmitKey = &STempKey; pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; @@ -2474,7 +2474,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { uMACfragNum = cbGetFragCount(pDevice, pTransmitKey, cbFrameBodySize, &pDevice->sTxEthHeader); if (uMACfragNum > AVAIL_TD(pDevice, TYPE_AC0DMA)) { - DEVICE_PRT(MSG_LEVEL_ERR, KERN_DEBUG "uMACfragNum > AVAIL_TD(TYPE_AC0DMA) = %d\n", uMACfragNum); + DBG_PRT(MSG_LEVEL_ERR, KERN_DEBUG "uMACfragNum > AVAIL_TD(TYPE_AC0DMA) = %d\n", uMACfragNum); dev_kfree_skb_irq(skb); spin_unlock_irq(&pDevice->lock); return 0; @@ -2487,7 +2487,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { } } - byPktTyp = (BYTE)pDevice->byPacketType; + byPktType = (BYTE)pDevice->byPacketType; if (pDevice->bFixRate) { #ifdef PLICE_DEBUG @@ -2558,17 +2558,17 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); } } -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "acdma0: pDevice->wCurrentRate = %d \n", pDevice->wCurrentRate); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "acdma0: pDevice->wCurrentRate = %d \n", pDevice->wCurrentRate); if (pDevice->wCurrentRate <= RATE_11M) { - byPktTyp = PK_TYPE_11B; + byPktType = PK_TYPE_11B; } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { - byPktTyp = PK_TYPE_11A; + byPktType = PK_TYPE_11A; } else { if (pDevice->bProtectMode == TRUE) { - byPktTyp = PK_TYPE_11GB; + byPktType = PK_TYPE_11GB; } else { - byPktTyp = PK_TYPE_11GA; + byPktType = PK_TYPE_11GA; } } @@ -2577,20 +2577,20 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); //#endif if (bNeedEncryption == TRUE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) { bNeedEncryption = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pDevice->pMgmt->eCurrState == WMAC_STATE_ASSOC)) { if (pTransmitKey == NULL) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n"); } else { if (bTKIP_UseGTK == TRUE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); bNeedEncryption = TRUE; } } @@ -2604,14 +2604,14 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); if (pDevice->bEnableHostWEP) { if ((uNodeIndex != 0) && (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); bNeedEncryption = TRUE; } } } else { if (pTransmitKey == NULL) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"return no tx key\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"return no tx key\n"); dev_kfree_skb_irq(skb); spin_unlock_irq(&pDevice->lock); return 0; @@ -2626,7 +2626,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); // printk("ping:len is %d\n"); //} #endif - vGenerateFIFOHeader(pDevice, byPktTyp, pDevice->pbyTmpBuff, bNeedEncryption, + vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption, cbFrameBodySize, TYPE_AC0DMA, pHeadTD, &pDevice->sTxEthHeader, (PBYTE)skb->data, pTransmitKey, uNodeIndex, &uMACfragNum, @@ -2704,7 +2704,7 @@ BOOL bTxeapol_key = FALSE; } MACvTransmitAC0(pDevice->PortOffset); -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "acdma0:pDevice->apCurrTD= %p\n", pHeadTD); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "acdma0:pDevice->apCurrTD= %p\n", pHeadTD); dev->trans_start = jiffies; @@ -2733,7 +2733,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { return IRQ_RETVAL(handled); if (pDevice->dwIsr == 0xffffffff) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwIsr = 0xffff\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwIsr = 0xffff\n"); return IRQ_RETVAL(handled); } /* @@ -2772,7 +2772,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { MACvWriteISR(pDevice->PortOffset, pDevice->dwIsr); if (pDevice->dwIsr & ISR_FETALERR){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " ISR_FETALERR \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " ISR_FETALERR \n"); VNSvOutPortB(pDevice->PortOffset + MAC_REG_SOFTPWRCTL, 0); VNSvOutPortW(pDevice->PortOffset + MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPECTI); device_error(pDevice, pDevice->dwIsr); @@ -2888,11 +2888,11 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if (pDevice->uBBVGADiffCount == 1) { // first VGA diff gain BBvSetVGAGainOffset(pDevice, pDevice->byBBVGANew); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"First RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"First RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n", (int)ldBm, pDevice->byBBVGANew, pDevice->byBBVGACurrent, (int)pDevice->uBBVGADiffCount); } if (pDevice->uBBVGADiffCount >= BB_VGA_CHANGE_THRESHOLD) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n", (int)ldBm, pDevice->byBBVGANew, pDevice->byBBVGACurrent, (int)pDevice->uBBVGADiffCount); BBvSetVGAGainOffset(pDevice, pDevice->byBBVGANew); } @@ -3134,7 +3134,7 @@ static void device_set_multi(struct net_device *dev) { VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode)); if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ - DEVICE_PRT(MSG_LEVEL_ERR,KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name); + DBG_PRT(MSG_LEVEL_ERR,KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name); /* Unconditionally log net taps. */ pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST|RCR_UNICAST); } @@ -3168,7 +3168,7 @@ static void device_set_multi(struct net_device *dev) { } VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byRxMode); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRxMode = %x\n", pDevice->byRxMode ); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRxMode = %x\n", pDevice->byRxMode ); } @@ -3267,13 +3267,13 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { // Set desired station name case SIOCSIWNICKN: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWNICKN \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWNICKN \n"); rc = -EOPNOTSUPP; break; // Get current station name case SIOCGIWNICKN: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWNICKN \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWNICKN \n"); rc = -EOPNOTSUPP; break; @@ -3372,12 +3372,12 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { // Get the current Tx-Power case SIOCGIWTXPOW: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWTXPOW \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWTXPOW \n"); rc = -EOPNOTSUPP; break; case SIOCSIWTXPOW: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWTXPOW \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWTXPOW \n"); rc = -EOPNOTSUPP; break; @@ -3422,7 +3422,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { break; case SIOCSIWSENS: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSENS \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSENS \n"); rc = -EOPNOTSUPP; break; @@ -3448,21 +3448,21 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { // Set the spy list case SIOCSIWSPY: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSPY \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSPY \n"); rc = -EOPNOTSUPP; break; // Get the spy list case SIOCGIWSPY: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSPY \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSPY \n"); rc = -EOPNOTSUPP; break; #endif // WIRELESS_SPY case SIOCGIWPRIV: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPRIV \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPRIV \n"); rc = -EOPNOTSUPP; /* if(wrq->u.data.pointer) { @@ -3480,29 +3480,29 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { //2008-0409-07, by Einsn Liu #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT case SIOCSIWAUTH: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n"); rc = iwctl_siwauth(dev, NULL, &(wrq->u.param), NULL); break; case SIOCGIWAUTH: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAUTH \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAUTH \n"); rc = iwctl_giwauth(dev, NULL, &(wrq->u.param), NULL); break; case SIOCSIWGENIE: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWGENIE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWGENIE \n"); rc = iwctl_siwgenie(dev, NULL, &(wrq->u.data), wrq->u.data.pointer); break; case SIOCGIWGENIE: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWGENIE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWGENIE \n"); rc = iwctl_giwgenie(dev, NULL, &(wrq->u.data), wrq->u.data.pointer); break; case SIOCSIWENCODEEXT: { char extra[sizeof(struct iw_encode_ext)+MAX_KEY_LEN+1]; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODEEXT \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODEEXT \n"); if(wrq->u.encoding.pointer){ memset(extra, 0, sizeof(struct iw_encode_ext)+MAX_KEY_LEN+1); if(wrq->u.encoding.length > (sizeof(struct iw_encode_ext)+ MAX_KEY_LEN)){ @@ -3522,12 +3522,12 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { break; case SIOCGIWENCODEEXT: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODEEXT \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODEEXT \n"); rc = iwctl_giwencodeext(dev, NULL, &(wrq->u.encoding), NULL); break; case SIOCSIWMLME: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMLME \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMLME \n"); rc = iwctl_siwmlme(dev, NULL, &(wrq->u.data), wrq->u.data.pointer); break; @@ -3586,7 +3586,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { default: rc = -EOPNOTSUPP; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Ioctl command not support..%x\n", cmd); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Ioctl command not support..%x\n", cmd); } @@ -3599,7 +3599,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { spin_unlock_irq(&pDevice->lock); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n"); spin_lock_irq(&pDevice->lock); pDevice->bLinkPass = FALSE; memset(pMgmt->abyCurrBSSID, 0, 6); diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index a3abce98df0a..f7a5a662a3b5 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -418,7 +418,7 @@ device_receive_frame ( PS802_11Header pMACHeader; BOOL bRxeapol_key = FALSE; -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- device_receive_frame---\n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- device_receive_frame---\n"); skb = pRDInfo->skb; @@ -436,7 +436,7 @@ device_receive_frame ( // Min (ACK): 10HD +4CRC + 2Padding + 4Len + 8TSF + 4RSR if ((FrameSize > 2364)||(FrameSize <= 32)) { // Frame Size error drop this packet. - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- WRONG Length 1 \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- WRONG Length 1 \n"); return FALSE; } @@ -454,7 +454,7 @@ device_receive_frame ( if ((FrameSize > 2346)|(FrameSize < 14)) { // Max: 2312Payload + 30HD +4CRC // Min: 14 bytes ACK - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- WRONG Length 2 \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- WRONG Length 2 \n"); return FALSE; } //PLICE_DEBUG-> @@ -535,7 +535,7 @@ device_receive_frame ( if (IS_FC_WEP(pbyFrame)) { BOOL bRxDecryOK = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n"); bIsWEP = TRUE; if ((pDevice->bEnableHostWEP) && (iSANodeIndex >= 0)) { pKey = &STempKey; @@ -573,7 +573,7 @@ device_receive_frame ( if (bRxDecryOK) { if ((*pbyNewRsr & NEWRSR_DECRYPTOK) == 0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV Fail\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV Fail\n"); if ( (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPA) || (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) || @@ -591,7 +591,7 @@ device_receive_frame ( return FALSE; } } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WEP Func Fail\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WEP Func Fail\n"); return FALSE; } if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_CCMP)) @@ -699,7 +699,7 @@ device_receive_frame ( if (BITbIsBitOff(*pbyRsr, RSR_BSSIDOK)) { if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } } @@ -712,7 +712,7 @@ device_receive_frame ( BITbIsBitOff(*pbyRsr, RSR_BSSIDOK)) { if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } } @@ -798,7 +798,7 @@ device_receive_frame ( wEtherType = (skb->data[cbIVOffset + 4 + 24 + 6] << 8) | skb->data[cbIVOffset + 4 + 24 + 6 + 1]; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wEtherType = %04x \n", wEtherType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wEtherType = %04x \n", wEtherType); if (wEtherType == ETH_P_PAE) { skb->dev = pDevice->apdev; @@ -875,18 +875,18 @@ device_receive_frame ( pdwMIC_R = (PDWORD)(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)); - //DEVICE_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); if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) || (pDevice->bRxMICFail == TRUE)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n"); pDevice->bRxMICFail = FALSE; //pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++; pDevice->s802_11Counter.TKIPLocalMICFailures++; if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } } @@ -970,7 +970,7 @@ device_receive_frame ( if ( (wRxTSC15_0 < wLocalTSC15_0) && (dwRxTSC47_16 <= dwLocalTSC47_16) && !((dwRxTSC47_16 == 0) && (dwLocalTSC47_16 == 0xFFFFFFFF))) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC is illegal~~!\n "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC is illegal~~!\n "); if (pKey->byCipherSuite == KEY_CTL_TKIP) //pDevice->s802_11Counter.TKIPReplays.QuadPart++; pDevice->s802_11Counter.TKIPReplays++; @@ -980,7 +980,7 @@ device_receive_frame ( if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } } @@ -1016,7 +1016,7 @@ device_receive_frame ( if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } } @@ -1046,7 +1046,7 @@ device_receive_frame ( pStats->rx_dropped++; if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } } @@ -1062,7 +1062,7 @@ device_receive_frame ( if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { - DEVICE_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", + DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } return FALSE; @@ -1100,7 +1100,7 @@ static BOOL s_bAPModeRxCtl ( (WLAN_MGMT_REASON_CLASS2_NONAUTH), &Status ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n"); return TRUE; }; if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) { @@ -1112,7 +1112,7 @@ static BOOL s_bAPModeRxCtl ( (WLAN_MGMT_REASON_CLASS3_NONASSOC), &Status ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n"); return TRUE; }; @@ -1121,7 +1121,7 @@ static BOOL s_bAPModeRxCtl ( if (IS_CTL_PSPOLL(pbyFrame)) { pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n"); } else { // check Data PS state @@ -1130,7 +1130,7 @@ static BOOL s_bAPModeRxCtl ( pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n"); } } } @@ -1146,7 +1146,7 @@ static BOOL s_bAPModeRxCtl ( pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n"); } } @@ -1159,8 +1159,8 @@ static BOOL s_bAPModeRxCtl ( (WLAN_MGMT_REASON_CLASS2_NONAUTH), &Status ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 3\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BSSID:%02x-%02x-%02x=%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 3\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BSSID:%02x-%02x-%02x=%02x-%02x-%02x \n", p802_11Header->abyAddr3[0], p802_11Header->abyAddr3[1], p802_11Header->abyAddr3[2], @@ -1168,7 +1168,7 @@ static BOOL s_bAPModeRxCtl ( p802_11Header->abyAddr3[4], p802_11Header->abyAddr3[5] ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ADDR2:%02x-%02x-%02x=%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ADDR2:%02x-%02x-%02x=%02x-%02x-%02x \n", p802_11Header->abyAddr2[0], p802_11Header->abyAddr2[1], p802_11Header->abyAddr2[2], @@ -1176,7 +1176,7 @@ static BOOL s_bAPModeRxCtl ( p802_11Header->abyAddr2[4], p802_11Header->abyAddr2[5] ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ADDR1:%02x-%02x-%02x=%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ADDR1:%02x-%02x-%02x=%02x-%02x-%02x \n", p802_11Header->abyAddr1[0], p802_11Header->abyAddr1[1], p802_11Header->abyAddr1[2], @@ -1184,9 +1184,9 @@ static BOOL s_bAPModeRxCtl ( p802_11Header->abyAddr1[4], p802_11Header->abyAddr1[5] ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl ); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl ); VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode)); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc:pDevice->byRxMode = %x\n", pDevice->byRxMode ); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc:pDevice->byRxMode = %x\n", pDevice->byRxMode ); return TRUE; } } @@ -1226,7 +1226,7 @@ static BOOL s_bHandleRxEncryption ( } byKeyIdx = (*(pbyIV+3) & 0xc0); byKeyIdx >>= 6; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx); if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) || (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || @@ -1236,14 +1236,14 @@ static BOOL s_bHandleRxEncryption ( if (((*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) == 0) && (pDevice->pMgmt->byCSSPK != KEY_CTL_NONE)) { // unicast pkt use pairwise key - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n"); if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == TRUE) { if (pDevice->pMgmt->byCSSPK == KEY_CTL_TKIP) byDecMode = KEY_CTL_TKIP; else if (pDevice->pMgmt->byCSSPK == KEY_CTL_CCMP) byDecMode = KEY_CTL_CCMP; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt: %d, %p\n", byDecMode, pKey); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt: %d, %p\n", byDecMode, pKey); } else { // use group key KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, byKeyIdx, &pKey); @@ -1251,7 +1251,7 @@ static BOOL s_bHandleRxEncryption ( byDecMode = KEY_CTL_TKIP; else if (pDevice->pMgmt->byCSSGK == KEY_CTL_CCMP) byDecMode = KEY_CTL_CCMP; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"group pkt: %d, %d, %p\n", byKeyIdx, byDecMode, pKey); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"group pkt: %d, %d, %p\n", byKeyIdx, byDecMode, pKey); } } // our WEP only support Default Key @@ -1265,10 +1265,10 @@ static BOOL s_bHandleRxEncryption ( } *pKeyOut = pKey; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"AES:%d %d %d\n", pDevice->pMgmt->byCSSPK, pDevice->pMgmt->byCSSGK, byDecMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"AES:%d %d %d\n", pDevice->pMgmt->byCSSPK, pDevice->pMgmt->byCSSGK, byDecMode); if (pKey == NULL) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n"); if (byDecMode == KEY_CTL_WEP) { // pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; } else if (pDevice->bLinkPass == TRUE) { @@ -1309,13 +1309,13 @@ static BOOL s_bHandleRxEncryption ( 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)); - DEVICE_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) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); } else { *pwRxTSC15_0 = cpu_to_le16(*(PWORD)pbyIV); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); if ((byDecMode == KEY_CTL_TKIP) && (pDevice->byLocalID <= REV_ID_VT3253_A1)) { @@ -1327,10 +1327,10 @@ static BOOL s_bHandleRxEncryption ( rc4_encrypt(&pDevice->SBox, pbyIV+8, pbyIV+8, PayloadLen); if (ETHbIsBufferCrc32Ok(pbyIV+8, PayloadLen)) { *pbyNewRsr |= NEWRSR_DECRYPTOK; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV OK!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV OK!\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV FAIL!!!\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PayloadLen = %d\n", PayloadLen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV FAIL!!!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PayloadLen = %d\n", PayloadLen); } } }// end of TKIP/AES @@ -1373,7 +1373,7 @@ static BOOL s_bHostWepRxEncryption ( } byKeyIdx = (*(pbyIV+3) & 0xc0); byKeyIdx >>= 6; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx); if (pDevice->pMgmt->byCSSGK == KEY_CTL_TKIP) @@ -1381,7 +1381,7 @@ static BOOL s_bHostWepRxEncryption ( else if (pDevice->pMgmt->byCSSGK == KEY_CTL_CCMP) byDecMode = KEY_CTL_CCMP; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"AES:%d %d %d\n", pDevice->pMgmt->byCSSPK, pDevice->pMgmt->byCSSGK, byDecMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"AES:%d %d %d\n", pDevice->pMgmt->byCSSPK, pDevice->pMgmt->byCSSGK, byDecMode); if (byDecMode != pKey->byCipherSuite) { if (byDecMode == KEY_CTL_WEP) { @@ -1394,7 +1394,7 @@ static BOOL s_bHostWepRxEncryption ( if (byDecMode == KEY_CTL_WEP) { // handle WEP - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n"); if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE) || (bOnFly == FALSE)) { @@ -1419,31 +1419,31 @@ static BOOL s_bHostWepRxEncryption ( 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)); - DEVICE_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) { *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV)); } else { *pwRxTSC15_0 = cpu_to_le16(*(PWORD)pbyIV); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); if (byDecMode == KEY_CTL_TKIP) { if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (bOnFly == FALSE)) { // Software TKIP // 1. 3253 A // 2. NotOnFly - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"soft KEY_CTL_TKIP \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"soft KEY_CTL_TKIP \n"); pMACHeader = (PS802_11Header) (pbyFrame); TKIPvMixKey(pKey->abyKey, pMACHeader->abyAddr2, *pwRxTSC15_0, *pdwRxTSC47_16, pDevice->abyPRNG); rc4_init(&pDevice->SBox, pDevice->abyPRNG, TKIP_KEY_LEN); rc4_encrypt(&pDevice->SBox, pbyIV+8, pbyIV+8, PayloadLen); if (ETHbIsBufferCrc32Ok(pbyIV+8, PayloadLen)) { *pbyNewRsr |= NEWRSR_DECRYPTOK; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV OK!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV OK!\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV FAIL!!!\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PayloadLen = %d\n", PayloadLen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV FAIL!!!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PayloadLen = %d\n", PayloadLen); } } } @@ -1452,12 +1452,12 @@ static BOOL s_bHostWepRxEncryption ( if (bOnFly == FALSE) { // Software CCMP // NotOnFly - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"soft KEY_CTL_CCMP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"soft KEY_CTL_CCMP\n"); if (AESbGenCCMP(pKey->abyKey, pbyFrame, FrameSize)) { *pbyNewRsr |= NEWRSR_DECRYPTOK; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CCMP MIC compare OK!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CCMP MIC compare OK!\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CCMP MIC fail!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"CCMP MIC fail!\n"); } } } @@ -1500,7 +1500,7 @@ static BOOL s_bAPModeRxData ( skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz); // if any node in PS mode, buffer packet until DTIM. if (skbcpy == NULL) { - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n"); } else { skbcpy->dev = pDevice->dev; @@ -1530,7 +1530,7 @@ static BOOL s_bAPModeRxData ( pMgmt->sNodeDBTable[iDANodeIndex].wEnQueueCnt++; wAID = pMgmt->sNodeDBTable[iDANodeIndex].wAID; pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7]; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n", iDANodeIndex, (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]); return TRUE; } diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index bf15e266ffe9..dfe4e0aa3526 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -107,7 +107,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) .ndo_start_xmit = pDevice->tx_80211, }; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); if (pDevice->apdev == NULL) @@ -132,12 +132,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) else ret = register_netdev(pDevice->apdev); if (ret) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdevice(AP) failed!\n", dev->name); return -1; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdevice %s for AP management\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdevice %s for AP management\n", dev->name, pDevice->apdev->name); KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); @@ -162,14 +162,14 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: disabling hostapd mode\n", pDevice->dev->name); if (pDevice->apdev && pDevice->apdev->name && pDevice->apdev->name[0]) { if (rtnl_locked) unregister_netdevice(pDevice->apdev); else unregister_netdev(pDevice->apdev); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", pDevice->dev->name, pDevice->apdev->name); } kfree(pDevice->apdev); @@ -289,8 +289,8 @@ static int hostap_add_sta(PSDevice pDevice, pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)param->u.add_sta.aid; pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Add STA AID= %d \n", pMgmt->sNodeDBTable[uNodeIndex].wAID); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Add STA AID= %d \n", pMgmt->sNodeDBTable[uNodeIndex].wAID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", param->sta_addr[0], param->sta_addr[1], param->sta_addr[2], @@ -298,7 +298,7 @@ static int hostap_add_sta(PSDevice pDevice, param->sta_addr[4], param->sta_addr[5] ) ; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Max Support rate = %d \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Max Support rate = %d \n", pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate); return 0; @@ -390,7 +390,7 @@ static int hostap_set_flags_sta(PSDevice pDevice, if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) { pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or; pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n", (UINT)pMgmt->sNodeDBTable[uNodeIndex].dwFlags); } else { @@ -429,18 +429,18 @@ static int hostap_set_generic_element(PSDevice pDevice, pMgmt->wWPAIELen = param->u.generic_elem.len; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pMgmt->wWPAIELen = %d\n", pMgmt->wWPAIELen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pMgmt->wWPAIELen = %d\n", pMgmt->wWPAIELen); // disable wpa if (pMgmt->wWPAIELen == 0) { pMgmt->eAuthenMode = WMAC_AUTH_OPEN; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " No WPAIE, Disable WPA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " No WPAIE, Disable WPA \n"); } else { // enable wpa if ((pMgmt->abyWPAIE[0] == WLAN_EID_RSN_WPA) || (pMgmt->abyWPAIE[0] == WLAN_EID_RSN)) { pMgmt->eAuthenMode = WMAC_AUTH_WPANONE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set WPAIE enable WPA\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set WPAIE enable WPA\n"); } else return -EINVAL; } @@ -514,7 +514,7 @@ static int hostap_set_encryption(PSDevice pDevice, if ((param->u.crypt.idx > 3) || (param->u.crypt.key_len > MAX_KEY_LEN)) { param->u.crypt.err = HOSTAP_CRYPT_ERR_KEY_SET_FAILED; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_KEY_SET_FAILED\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_KEY_SET_FAILED\n"); return -EINVAL; } @@ -528,12 +528,12 @@ static int hostap_set_encryption(PSDevice pDevice, } else { if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &iNodeIndex) == FALSE) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); return -EINVAL; } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: sta_index %d \n", iNodeIndex); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: alg %d \n", param->u.crypt.alg); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: sta_index %d \n", iNodeIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " hostap_set_encryption: alg %d \n", param->u.crypt.alg); if (param->u.crypt.alg == WPA_ALG_NONE) { @@ -542,7 +542,7 @@ static int hostap_set_encryption(PSDevice pDevice, param->sta_addr, pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex, pDevice->PortOffset) == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybRemoveKey fail \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybRemoveKey fail \n"); } pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; } @@ -677,7 +677,7 @@ static int hostap_set_encryption(PSDevice pDevice, // Key Table Full pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; bKeyTableFull = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n"); } } @@ -691,10 +691,10 @@ static int hostap_set_encryption(PSDevice pDevice, MACvSetDefaultKeyCtl(pDevice->PortOffset, wKeyCtl, MAX_KEY_TABLE-1, pDevice->byLocalID); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set key sta_index= %d \n", iNodeIndex); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " tx_index=%d len=%d \n", param->u.crypt.idx, + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set key sta_index= %d \n", iNodeIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " tx_index=%d len=%d \n", param->u.crypt.idx, param->u.crypt.key_len ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx \n", pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[0], pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[1], pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[2], @@ -746,11 +746,11 @@ static int hostap_get_encryption(PSDevice pDevice, } else { if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &iNodeIndex) == FALSE) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); return -EINVAL; } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: %d\n", iNodeIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: %d\n", iNodeIndex); memset(param->u.crypt.seq, 0, 8); for (ii = 0 ; ii < 8 ; ii++) { param->u.crypt.seq[ii] = (BYTE)pMgmt->sNodeDBTable[iNodeIndex].KeyRSC >> (ii * 8); @@ -795,74 +795,74 @@ int hostap_ioctl(PSDevice pDevice, struct iw_point *p) switch (param->cmd) { case VIAWGET_HOSTAPD_SET_ENCRYPTION: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ENCRYPTION \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ENCRYPTION \n"); spin_lock_irq(&pDevice->lock); ret = hostap_set_encryption(pDevice, param, p->length); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_GET_ENCRYPTION: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_ENCRYPTION \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_ENCRYPTION \n"); spin_lock_irq(&pDevice->lock); ret = hostap_get_encryption(pDevice, param, p->length); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ASSOC_AP_ADDR \n"); return -EOPNOTSUPP; break; case VIAWGET_HOSTAPD_FLUSH: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_FLUSH \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_FLUSH \n"); spin_lock_irq(&pDevice->lock); hostap_flush_sta(pDevice); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_ADD_STA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_ADD_STA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_ADD_STA \n"); spin_lock_irq(&pDevice->lock); ret = hostap_add_sta(pDevice, param); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_REMOVE_STA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_REMOVE_STA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_REMOVE_STA \n"); spin_lock_irq(&pDevice->lock); ret = hostap_remove_sta(pDevice, param); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_HOSTAPD_GET_INFO_STA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_INFO_STA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_INFO_STA \n"); ret = hostap_get_info_sta(pDevice, param); ap_ioctl = 1; break; /* case VIAWGET_HOSTAPD_RESET_TXEXC_STA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_RESET_TXEXC_STA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_RESET_TXEXC_STA \n"); ret = hostap_reset_txexc_sta(pDevice, param); break; */ case VIAWGET_HOSTAPD_SET_FLAGS_STA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_FLAGS_STA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_FLAGS_STA \n"); ret = hostap_set_flags_sta(pDevice, param); break; case VIAWGET_HOSTAPD_MLME: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_MLME \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_MLME \n"); return -EOPNOTSUPP; case VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_GENERIC_ELEMENT \n"); ret = hostap_set_generic_element(pDevice, param); break; case VIAWGET_HOSTAPD_SCAN_REQ: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SCAN_REQ \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SCAN_REQ \n"); return -EOPNOTSUPP; case VIAWGET_HOSTAPD_STA_CLEAR_STATS: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_STA_CLEAR_STATS \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_STA_CLEAR_STATS \n"); return -EOPNOTSUPP; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_ioctl: unknown cmd=%d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_ioctl: unknown cmd=%d\n", (int)param->cmd); return -EOPNOTSUPP; break; diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 4869107a2bca..ddcf504cef5b 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -108,7 +108,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_BSS_SCAN: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin \n"); if (copy_from_user(&sScanCmd, pReq->data, sizeof(SCmdScan))) { result = -EFAULT; break; @@ -214,31 +214,31 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { memcpy(pMgmt->abyDesireSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN); if (sJoinCmd.wBSSType == ADHOC) { pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to adhoc mode\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to adhoc mode\n"); } else { pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n"); } if (sJoinCmd.bPSEnable == TRUE) { pDevice->ePSMode = WMAC_POWER_FAST; // pDevice->ePSMode = WMAC_POWER_MAX; pMgmt->wListenInterval = 2; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving On\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving On\n"); } else { pDevice->ePSMode = WMAC_POWER_CAM; pMgmt->wListenInterval = 1; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n"); } if (sJoinCmd.bShareKeyAuth == TRUE){ pMgmt->bShareKeyAlgorithm = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); } else { pMgmt->bShareKeyAlgorithm = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n"); } pDevice->uChannel = sJoinCmd.uChannel; netif_stop_queue(pDevice->dev); @@ -251,7 +251,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_SET_WEP: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WEP Key. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WEP Key. \n"); memset(&sWEPCmd, 0 ,sizeof(SCmdSetWEP)); if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) { result = -EFAULT; @@ -261,7 +261,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { pDevice->bEncryptionEnable = FALSE; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; MACvDisableDefaultKey(pDevice->PortOffset); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WEP function disable. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WEP function disable. \n"); break; } @@ -293,7 +293,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { break; case WLAN_CMD_GET_LINK: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_GET_LINK status. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_GET_LINK status. \n"); memset(sLinkStatus.abySSID, 0 , WLAN_SSID_MAXLEN + 1); @@ -314,7 +314,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len); memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); sLinkStatus.uLinkRate = pMgmt->sNodeDBTable[0].wTxDataRate; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Link Success ! \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Link Success ! \n"); } else { sLinkStatus.bLink = FALSE; @@ -409,7 +409,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { break; case WLAN_CMD_STOP_MAC: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_STOP_MAC\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_STOP_MAC\n"); netif_stop_queue(pDevice->dev); spin_lock_irq(&pDevice->lock); @@ -430,7 +430,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_START_MAC: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n"); if (pDevice->bMACSuspend == TRUE) { if (pDevice->bRadioOff == TRUE) @@ -444,7 +444,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_SET_HOSTAPD: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD\n"); if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { result = -EFAULT; @@ -452,7 +452,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { }; if (sValue.dwValue == 1) { if (hostap_set_hostapd(pDevice, 1, 1) == 0){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HOSTAP\n"); } else { result = -EFAULT; @@ -461,19 +461,19 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { } else { hostap_set_hostapd(pDevice, 0, 1); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HOSTAP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HOSTAP\n"); } break; case WLAN_CMD_SET_HOSTAPD_STA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD_STA\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOSTAPD_STA\n"); break; case WLAN_CMD_SET_802_1X: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_802_1X\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_802_1X\n"); if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { result = -EFAULT; break; @@ -481,11 +481,11 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { if (sValue.dwValue == 1) { pDevice->bEnable8021x = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n"); } else { pDevice->bEnable8021x = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable 802.1x\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable 802.1x\n"); } break; @@ -493,7 +493,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_SET_HOST_WEP: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOST_WEP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_HOST_WEP\n"); if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { result = -EFAULT; break; @@ -501,29 +501,29 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { if (sValue.dwValue == 1) { pDevice->bEnableHostWEP = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n"); } else { pDevice->bEnableHostWEP = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HostWEP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable HostWEP\n"); } break; case WLAN_CMD_SET_WPA: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WPA\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WPA\n"); if (copy_from_user(&sValue, pReq->data, sizeof(SCmdValue))) { result = -EFAULT; break; }; if (sValue.dwValue == 1) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, U_ETHER_ADDR_LEN); pDevice->bWPADEVUp = TRUE; } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n"); pDevice->bWPADEVUp = FALSE; } @@ -531,7 +531,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_AP_START: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n"); if (pDevice->bRadioOff == TRUE) { CARDbRadioPowerOn(pDevice); vMgrTimerInit(pDevice); @@ -545,10 +545,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { if (sStartAPCmd.wBSSType == AP) { pMgmt->eConfigMode = WMAC_CONFIG_AP; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to AP mode\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to AP mode\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct BSS type not set to AP mode\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct BSS type not set to AP mode\n"); result = -EFAULT; break; } @@ -578,11 +578,11 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { if (sStartAPCmd.bShareKeyAuth == TRUE){ pMgmt->bShareKeyAlgorithm = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); } else { pMgmt->bShareKeyAlgorithm = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Open System \n"); } memcpy(pMgmt->abyIBSSSuppRates, abySuppRates, 6); @@ -606,7 +606,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { pMgmt->abyIBSSSuppRates[3] |= BIT7; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Support Rate= %x %x %x %x\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Support Rate= %x %x %x %x\n", pMgmt->abyIBSSSuppRates[2], pMgmt->abyIBSSSuppRates[3], pMgmt->abyIBSSSuppRates[4], @@ -664,7 +664,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { pNodeList->sNodeList[jj].byKeyIndex = pNode->byKeyIndex; pNodeList->sNodeList[jj].wWepKeyLength = pNode->uWepKeyLength; memcpy(&(pNodeList->sNodeList[jj].abyWepKey[0]), &(pNode->abyWepKey[0]), WEP_KEYMAXLEN); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "key= %2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "key= %2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", pNodeList->sNodeList[jj].abyWepKey[0], pNodeList->sNodeList[jj].abyWepKey[1], pNodeList->sNodeList[jj].abyWepKey[2], @@ -730,7 +730,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Private command not support..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Private command not support..\n"); } return result; diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 2ff8f243e49f..e755ae711c29 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -156,7 +156,7 @@ static int iwctl_commit(struct net_device *dev, void *wrq, char *extra) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWCOMMIT \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWCOMMIT \n"); return 0; @@ -201,7 +201,7 @@ int iwctl_siwscan(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; PWLAN_IE_SSID pItemSSID=NULL; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n"); if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! @@ -276,7 +276,7 @@ int iwctl_giwscan(struct net_device *dev, char buf[MAX_WPA_IE_LEN * 2 + 30]; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN \n"); if (pMgmt->eScanState == WMAC_IS_SCANNING) { // In scanning.. @@ -423,7 +423,7 @@ int iwctl_siwfreq(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ \n"); // If setting by frequency, convert to a channel if((wrq->e == 1) && @@ -442,11 +442,11 @@ int iwctl_siwfreq(struct net_device *dev, else { int channel = wrq->m; if((channel < 1) || (channel > 14)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: New channel value of %d is invalid!\n", dev->name, wrq->m); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: New channel value of %d is invalid!\n", dev->name, wrq->m); rc = -EINVAL; } else { // Yes ! We can set it !!! - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set to channel = %d\n", channel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set to channel = %d\n", channel); pDevice->uChannel = channel; //2007-0207-04, by EinsnLiu //Make change effect at once @@ -469,7 +469,7 @@ int iwctl_giwfreq(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ \n"); #ifdef WEXT_USECHANNELS wrq->m = (int)pMgmt->uCurrChannel; @@ -500,10 +500,10 @@ int iwctl_siwmode(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE \n"); if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP && pDevice->bEnableHostapd) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Can't set operation mode, hostapd is running \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Can't set operation mode, hostapd is running \n"); return rc; } @@ -516,7 +516,7 @@ int iwctl_siwmode(struct net_device *dev, pDevice->bCommit = TRUE; } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n"); break; case IW_MODE_AUTO: case IW_MODE_INFRA: @@ -526,7 +526,7 @@ int iwctl_siwmode(struct net_device *dev, pDevice->bCommit = TRUE; } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n"); break; case IW_MODE_MASTER: @@ -540,7 +540,7 @@ int iwctl_siwmode(struct net_device *dev, pDevice->bCommit = TRUE; } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n"); break; case IW_MODE_REPEAT: @@ -567,7 +567,7 @@ int iwctl_giwmode(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE \n"); // If not managed, assume it's ad-hoc switch (pMgmt->eConfigMode) { case WMAC_CONFIG_ESS_STA: @@ -604,7 +604,7 @@ int iwctl_giwrange(struct net_device *dev, BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE \n"); if (wrq->pointer) { wrq->length = sizeof(struct iw_range); memset(range, 0, sizeof(struct iw_range)); @@ -714,7 +714,7 @@ int iwctl_siwap(struct net_device *dev, int rc = 0; BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAP \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAP \n"); if (pMgmt->eScanState == WMAC_IS_SCANNING) { // In scanning.. printk("SIOCSIWAP(??)-->In scanning...\n"); @@ -771,7 +771,7 @@ int iwctl_giwap(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP \n"); memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6); //2008-0410, by Einsn Liu @@ -805,7 +805,7 @@ int iwctl_giwaplist(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAPLIST \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAPLIST \n"); // Only super-user can see AP list if (!capable(CAP_NET_ADMIN)) { @@ -857,7 +857,7 @@ int iwctl_siwessid(struct net_device *dev, BYTE len; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID \n"); pDevice->fWPA_Authened = FALSE; if (pMgmt->eScanState == WMAC_IS_SCANNING) { // In scanning.. @@ -948,9 +948,9 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { } #endif - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s \n", pItemSSID->abySSID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s \n", pItemSSID->abySSID); /* - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO " SIOCSIWESSID2 \n"); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO " SIOCSIWESSID2 \n"); pItemSSID->len = wrq->length; */ } @@ -978,7 +978,7 @@ int iwctl_giwessid(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PWLAN_IE_SSID pItemSSID; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID \n"); // Note : if wrq->u.data.flags != 0, we should // get the relevant SSID from the SSID list... @@ -1013,7 +1013,7 @@ int iwctl_siwrate(struct net_device *dev, BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE \n"); if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) { rc = -EINVAL; return rc; @@ -1069,7 +1069,7 @@ int iwctl_siwrate(struct net_device *dev, } else { pDevice->uConnectionRate = brate; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate); } } @@ -1096,7 +1096,7 @@ int iwctl_giwrate(struct net_device *dev, //Mark the unnecessary sentences. // PSMgmtObject pMgmt = &(pDevice->sMgmtObj); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE \n"); { BYTE abySupportedRates[13]= {0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C, 0x90}; int brate = 0; @@ -1160,7 +1160,7 @@ int iwctl_siwrts(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS \n"); { int rthr = wrq->value; @@ -1187,7 +1187,7 @@ int iwctl_giwrts(struct net_device *dev, { PSDevice pDevice = (PSDevice)netdev_priv(dev); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS \n"); wrq->value = pDevice->wRTSThreshold; wrq->disabled = (wrq->value >= 2312); wrq->fixed = 1; @@ -1209,7 +1209,7 @@ int iwctl_siwfrag(struct net_device *dev, int fthr = wrq->value; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG \n"); if (wrq->disabled) @@ -1235,7 +1235,7 @@ int iwctl_giwfrag(struct net_device *dev, { PSDevice pDevice = (PSDevice)netdev_priv(dev); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG \n"); wrq->value = pDevice->wFragmentationThreshold; wrq->disabled = (wrq->value >= 2312); wrq->fixed = 1; @@ -1257,7 +1257,7 @@ int iwctl_siwretry(struct net_device *dev, int rc = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY \n"); if (wrq->disabled) { rc = -EINVAL; @@ -1292,7 +1292,7 @@ int iwctl_giwretry(struct net_device *dev, char *extra) { PSDevice pDevice = (PSDevice)netdev_priv(dev); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY \n"); wrq->disabled = 0; // Can't be disabled // Note : by default, display the min retry number @@ -1339,7 +1339,7 @@ int iwctl_siwencode(struct net_device *dev, PSKeyTable pkeytab; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); if((wrq->flags & IW_ENCODE_DISABLED)==0){ //Not disable encryption @@ -1366,13 +1366,13 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ if(wrq->length>0){//have key if (wrq->length == WLAN_WEP232_KEYLEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n"); } else if (wrq->length == WLAN_WEP104_KEYLEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n"); } else if (wrq->length == WLAN_WEP40_KEYLEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex); }else {//no support length rc = -EINVAL; return rc; @@ -1380,9 +1380,9 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ memset(pDevice->abyKey, 0, WLAN_WEP232_KEYLEN); memcpy(pDevice->abyKey, extra, wrq->length); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyKey: "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyKey: "); for (ii = 0; ii < wrq->length; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pDevice->abyKey[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pDevice->abyKey[ii]); } if (pDevice->flags & DEVICE_FLAGS_OPENED) { @@ -1412,10 +1412,10 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ rc = -EINVAL; return rc; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Just set Default key Index:\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Just set Default key Index:\n"); pkeytab=&(pDevice->sKey.KeyTable[MAX_KEY_TABLE-1]); if(pkeytab->GroupKey[(BYTE)dwKeyIndex].uKeyLength==0){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Default key len is 0\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Default key len is 0\n"); rc = -EINVAL; return rc; } @@ -1425,7 +1425,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ } }else {//disable the key - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n"); if(pDevice->bEncryptionEnable==FALSE) return 0; pMgmt->bShareKeyAlgorithm = FALSE; @@ -1441,7 +1441,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ //End Modify,Einsn /* - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); // Check the size of the key if (wrq->length > WLAN_WEP232_KEYLEN) { @@ -1461,20 +1461,20 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ if (wrq->length > 0) { if (wrq->length == WLAN_WEP232_KEYLEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n"); } else if (wrq->length == WLAN_WEP104_KEYLEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n"); } else if (wrq->length == WLAN_WEP40_KEYLEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex); } memset(pDevice->abyKey, 0, WLAN_WEP232_KEYLEN); memcpy(pDevice->abyKey, extra, wrq->length); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyKey: "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyKey: "); for (ii = 0; ii < wrq->length; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pDevice->abyKey[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pDevice->abyKey[ii]); } if (pDevice->flags & DEVICE_FLAGS_OPENED) { @@ -1508,7 +1508,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ // Read the flags if(wrq->flags & IW_ENCODE_DISABLED){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n"); pMgmt->bShareKeyAlgorithm = FALSE; pDevice->bEncryptionEnable = FALSE; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; @@ -1522,11 +1522,11 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ */ if(wrq->flags & IW_ENCODE_RESTRICTED) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n"); pMgmt->bShareKeyAlgorithm = TRUE; } if(wrq->flags & IW_ENCODE_OPEN) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n"); pMgmt->bShareKeyAlgorithm = FALSE; } return rc; @@ -1548,7 +1548,7 @@ int iwctl_giwencode(struct net_device *dev, UINT index = (UINT)(wrq->flags & IW_ENCODE_INDEX); PSKeyItem pKey = NULL; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); //2007-0207-06, by EinsnLiu //the key index in iwconfig is 1-4 when our driver is 0-3 //so it can't be used directly. @@ -1617,7 +1617,7 @@ int iwctl_giwencode(struct net_device *dev, UINT index = (UINT)(wrq->flags & IW_ENCODE_INDEX); PSKeyItem pKey = NULL; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); if (index > WLAN_WEP_NKEYS) { return -EINVAL; @@ -1675,7 +1675,7 @@ int iwctl_siwpower(struct net_device *dev, PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER \n"); if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) { rc = -EINVAL; @@ -1697,14 +1697,14 @@ int iwctl_siwpower(struct net_device *dev, } switch (wrq->flags & IW_POWER_MODE) { case IW_POWER_UNICAST_R: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R \n"); rc = -EINVAL; break; case IW_POWER_ALL_R: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ALL_R \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ALL_R \n"); rc = -EINVAL; case IW_POWER_ON: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ON \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ON \n"); break; default: rc = -EINVAL; @@ -1726,7 +1726,7 @@ int iwctl_giwpower(struct net_device *dev, int mode = pDevice->ePSMode; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER \n"); if ((wrq->disabled = (mode == WMAC_POWER_CAM))) @@ -1756,7 +1756,7 @@ int iwctl_giwsens(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); long ldBm; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); if (pDevice->bLinkPass == TRUE) { RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); wrq->value = ldBm; @@ -1785,7 +1785,7 @@ int iwctl_siwauth(struct net_device *dev, static int wpa_version=0; //must be static to save the last value,einsn liu static int pairwise=0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH \n"); switch (wrq->flags & IW_AUTH_INDEX) { case IW_AUTH_WPA_VERSION: wpa_version = wrq->value; @@ -1877,13 +1877,13 @@ int iwctl_siwauth(struct net_device *dev, break; } /* - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_version = %d\n",wpa_version); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise = %d\n",pairwise); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->eEncryptionStatus = %d\n",pDevice->eEncryptionStatus); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->eAuthenMode = %d\n",pMgmt->eAuthenMode); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"TRUE":"FALSE"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"TRUE":"FALSE"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"TRUE":"FALSE"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_version = %d\n",wpa_version); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise = %d\n",pairwise); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->eEncryptionStatus = %d\n",pDevice->eEncryptionStatus); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->eAuthenMode = %d\n",pMgmt->eAuthenMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"TRUE":"FALSE"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"TRUE":"FALSE"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"TRUE":"FALSE"); */ return ret; } diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index 168ebd3be944..28fea2352516 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -153,7 +153,7 @@ BOOL KeybGetKey ( { int i; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetKey() \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetKey() \n"); *pKey = NULL; for (i=0;iKeyTable[i].dwGTKeyIndex = dwKeyIndex; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[i].dwGTKeyIndex, i); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[i].dwGTKeyIndex, i); } pTable->KeyTable[i].wKeyCtl &= 0xFF0F; // clear group key control filed pTable->KeyTable[i].wKeyCtl |= (byKeyDecMode << 4); @@ -277,18 +277,18 @@ BOOL KeybSetKey ( pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid); - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", pKey->uKeyLength); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", pKey->uKeyLength); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: "); for (ii = 0; ii < pKey->uKeyLength; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); return (TRUE); } @@ -310,7 +310,7 @@ BOOL KeybSetKey ( if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key pTable->KeyTable[j].dwGTKeyIndex = dwKeyIndex; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(N)[%lX]: %d\n", pTable->KeyTable[j].dwGTKeyIndex, j); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(N)[%lX]: %d\n", pTable->KeyTable[j].dwGTKeyIndex, j); } pTable->KeyTable[j].wKeyCtl &= 0xFF0F; // clear group key control filed pTable->KeyTable[j].wKeyCtl |= (byKeyDecMode << 4); @@ -342,18 +342,18 @@ BOOL KeybSetKey ( pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(N): \n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(N): \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: "); for (ii = 0; ii < pKey->uKeyLength; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); return (TRUE); } @@ -549,51 +549,51 @@ BOOL KeybGetTransmitKey ( if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) { *pKey = &(pTable->KeyTable[i].PairwiseKey); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PAIRWISE_KEY: KeyTable.abyBSSID: "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PAIRWISE_KEY: KeyTable.abyBSSID: "); for (ii = 0; ii < 6; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); return (TRUE); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n"); return (FALSE); } } // End of Type == PAIRWISE else { if (pTable->KeyTable[i].dwGTKeyIndex == 0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n"); return FALSE; } if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == TRUE) { *pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GROUP_KEY: KeyTable.abyBSSID\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GROUP_KEY: KeyTable.abyBSSID\n"); for (ii = 0; ii < 6; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex); return (TRUE); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n"); return (FALSE); } } // End of Type = GROUP } // BSSID match } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: NO Match BSSID !!! "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: NO Match BSSID !!! "); for (ii = 0; ii < 6; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(pbyBSSID+ii)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(pbyBSSID+ii)); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); return (FALSE); } @@ -659,7 +659,7 @@ BOOL KeybSetDefaultKey ( PSKeyItem pKey; UINT uKeyIdx; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetDefaultKey: %1x, %d \n", (int)dwKeyIndex, (int)uKeyLength); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetDefaultKey: %1x, %d \n", (int)dwKeyIndex, (int)uKeyLength); if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key @@ -677,7 +677,7 @@ BOOL KeybSetDefaultKey ( if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex = dwKeyIndex; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex, MAX_KEY_TABLE-1); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex, MAX_KEY_TABLE-1); } pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl &= 0x7F00; // clear all key control filed @@ -718,18 +718,18 @@ BOOL KeybSetDefaultKey ( pKey->wTSC15_0 = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n", pKey->bKeyValid); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n", (int)pKey->uKeyLength); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n", pKey->bKeyValid); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n", (int)pKey->uKeyLength); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: \n"); for (ii = 0; ii < pKey->uKeyLength; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x", pKey->abyKey[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x", pKey->abyKey[ii]); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n", pKey->dwTSC47_16); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n", pKey->dwTSC47_16); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex); return (TRUE); } @@ -767,7 +767,7 @@ BOOL KeybSetAllGroupKey ( PSKeyItem pKey; UINT uKeyIdx; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex); if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key @@ -784,7 +784,7 @@ BOOL KeybSetAllGroupKey ( if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key pTable->KeyTable[i].dwGTKeyIndex = dwKeyIndex; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[i].dwGTKeyIndex, i); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[i].dwGTKeyIndex, i); } pTable->KeyTable[i].wKeyCtl &= 0xFF0F; // clear group key control filed @@ -817,14 +817,14 @@ BOOL KeybSetAllGroupKey ( pKey->dwTSC47_16 = 0; pKey->wTSC15_0 = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: "); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: "); for (ii = 0; ii < pKey->uKeyLength; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", pKey->abyKey[ii]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", pKey->abyKey[ii]); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); //DBG_PRN_GRP12(("pKey->dwTSC47_16: %lX\n ", pKey->dwTSC47_16)); //DBG_PRN_GRP12(("pKey->wTSC15_0: %X\n ", pKey->wTSC15_0)); diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 0283ed3bedd4..da997541b212 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -862,7 +862,7 @@ BOOL MACbSafeRxOff (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x10); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x10)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x10)\n"); return(FALSE); } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { @@ -872,7 +872,7 @@ BOOL MACbSafeRxOff (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x11); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x11)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x11)\n"); return(FALSE); } @@ -886,7 +886,7 @@ BOOL MACbSafeRxOff (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x12); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x12)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x12)\n"); return(FALSE); } return TRUE; @@ -925,7 +925,7 @@ BOOL MACbSafeTxOff (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x20); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x20)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x20)\n"); return(FALSE); } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { @@ -935,7 +935,7 @@ BOOL MACbSafeTxOff (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x21); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x21)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x21)\n"); return(FALSE); } @@ -950,7 +950,7 @@ BOOL MACbSafeTxOff (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x24); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x24)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x24)\n"); return(FALSE); } return TRUE; @@ -975,13 +975,13 @@ BOOL MACbSafeStop (DWORD_PTR dwIoBase) if (MACbSafeRxOff(dwIoBase) == FALSE) { DBG_PORT80(0xA1); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" MACbSafeRxOff == FALSE)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" MACbSafeRxOff == FALSE)\n"); MACbSafeSoftwareReset(dwIoBase); return FALSE; } if (MACbSafeTxOff(dwIoBase) == FALSE) { DBG_PORT80(0xA2); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" MACbSafeTxOff == FALSE)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" MACbSafeTxOff == FALSE)\n"); MACbSafeSoftwareReset(dwIoBase); return FALSE; } @@ -1216,7 +1216,7 @@ BYTE byOrgDMACtl; } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x26); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x26)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x26)\n"); } VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, dwCurrDescAddr); if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { @@ -1346,7 +1346,7 @@ UINT ww = 0; } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x29); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x29)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x29)\n"); return FALSE; } return TRUE; @@ -1370,7 +1370,7 @@ void MACvClearBusSusInd (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x33); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); } } @@ -1392,7 +1392,7 @@ void MACvEnableBusSusEn (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x34); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x34)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x34)\n"); } } @@ -1415,7 +1415,7 @@ BOOL MACbFlushSYNCFifo (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x35); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); } return TRUE; } @@ -1439,7 +1439,7 @@ BOOL MACbPSWakeup (DWORD_PTR dwIoBase) } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x36); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); return FALSE; } return TRUE; @@ -1470,7 +1470,7 @@ int ii; return; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetKeyEntry\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetKeyEntry\n"); wOffset = MISCFIFO_KEYETRY0; wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE); @@ -1478,7 +1478,7 @@ int ii; dwData |= wKeyCtl; dwData <<= 16; dwData |= MAKEWORD(*(pbyAddr+4), *(pbyAddr+5)); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, KeyCtl:%X\n", wOffset, dwData, wKeyCtl); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, KeyCtl:%X\n", wOffset, dwData, wKeyCtl); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData); @@ -1493,7 +1493,7 @@ int ii; dwData |= *(pbyAddr+1); dwData <<= 8; dwData |= *(pbyAddr+0); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2. wOffset: %d, Data: %lX\n", wOffset, dwData); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2. wOffset: %d, Data: %lX\n", wOffset, dwData); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData); @@ -1503,7 +1503,7 @@ int ii; wOffset += (uKeyIdx * 4); for (ii=0;ii<4;ii++) { // alway push 128 bits - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"3.(%d) wOffset: %d, Data: %lX\n", ii, wOffset+ii, *pdwKey); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"3.(%d) wOffset: %d, Data: %lX\n", ii, wOffset+ii, *pdwKey); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset+ii); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, *pdwKey++); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); @@ -1563,7 +1563,7 @@ int ii; if (byLocalID <= 1) return; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetDefaultKeyEntry\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetDefaultKeyEntry\n"); wOffset = MISCFIFO_KEYETRY0; wOffset += (10 * MISCFIFO_KEYENTRYSIZE); @@ -1572,7 +1572,7 @@ int ii; wOffset += (uKeyIdx * 4); // alway push 128 bits for (ii=0; ii<3; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"(%d) wOffset: %d, Data: %lX\n", ii, wOffset+ii, *pdwKey); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"(%d) wOffset: %d, Data: %lX\n", ii, wOffset+ii, *pdwKey); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset+ii); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, *pdwKey++); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); @@ -1584,7 +1584,7 @@ int ii; VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset+3); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"End. wOffset: %d, Data: %lX\n", wOffset+3, dwData); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"End. wOffset: %d, Data: %lX\n", wOffset+3, dwData); } @@ -1620,7 +1620,7 @@ DWORD dwData; VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvEnableDefaultKey: wOffset: %d, Data: %lX\n", wOffset, dwData); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvEnableDefaultKey: wOffset: %d, Data: %lX\n", wOffset, dwData); } */ @@ -1652,7 +1652,7 @@ DWORD dwData; VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvDisableDefaultKey: wOffset: %d, Data: %lX\n", wOffset, dwData); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvDisableDefaultKey: wOffset: %d, Data: %lX\n", wOffset, dwData); } /* @@ -1679,7 +1679,7 @@ int ii; return; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetDefaultTKIPKeyEntry\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetDefaultTKIPKeyEntry\n"); wOffset = MISCFIFO_KEYETRY0; // Kyle test : change offset from 10 -> 0 wOffset += (10 * MISCFIFO_KEYENTRYSIZE); @@ -1697,10 +1697,10 @@ int ii; wOffset++; wOffset += (uKeyIdx * 4); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, idx:%d\n", wOffset, *pdwKey, uKeyIdx); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, idx:%d\n", wOffset, *pdwKey, uKeyIdx); // alway push 128 bits for (ii=0; ii<4; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2.(%d) wOffset: %d, Data: %lX\n", ii, wOffset+ii, *pdwKey); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2.(%d) wOffset: %d, Data: %lX\n", ii, wOffset+ii, *pdwKey); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset+ii); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, *pdwKey++); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFCTL, MISCFFCTL_WRITE); @@ -1734,7 +1734,7 @@ DWORD dwData; return; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetKeyEntry\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MACvSetKeyEntry\n"); wOffset = MISCFIFO_KEYETRY0; wOffset += (uEntryIdx * MISCFIFO_KEYENTRYSIZE); @@ -1742,7 +1742,7 @@ DWORD dwData; dwData |= wKeyCtl; dwData <<= 16; dwData |= 0xffff; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, KeyCtl:%X\n", wOffset, dwData, wKeyCtl); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, KeyCtl:%X\n", wOffset, dwData, wKeyCtl); VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData); diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 3f06de141a84..2fc54e9dea38 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -231,87 +231,87 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr11MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"11M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr11M, (INT)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"11M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr11M, (INT)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR); } else if(byRxRate==11) { pStatistic->CustomStat.ullRsr5M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr5MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 5M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr5M, (INT)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 5M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr5M, (INT)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR); } else if(byRxRate==4) { pStatistic->CustomStat.ullRsr2M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr2MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 2M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr2M, (INT)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 2M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr2M, (INT)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR); } else if(byRxRate==2){ pStatistic->CustomStat.ullRsr1M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr1MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 1M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr1M, (INT)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 1M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr1M, (INT)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR); } else if(byRxRate==12){ pStatistic->CustomStat.ullRsr6M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr6MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 6M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr6M, (INT)pStatistic->CustomStat.ullRsr6MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 6M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr6M, (INT)pStatistic->CustomStat.ullRsr6MCRCOk); } else if(byRxRate==18){ pStatistic->CustomStat.ullRsr9M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr9MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 9M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr9M, (INT)pStatistic->CustomStat.ullRsr9MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 9M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr9M, (INT)pStatistic->CustomStat.ullRsr9MCRCOk); } else if(byRxRate==24){ pStatistic->CustomStat.ullRsr12M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr12MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"12M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr12M, (INT)pStatistic->CustomStat.ullRsr12MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"12M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr12M, (INT)pStatistic->CustomStat.ullRsr12MCRCOk); } else if(byRxRate==36){ pStatistic->CustomStat.ullRsr18M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr18MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"18M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr18M, (INT)pStatistic->CustomStat.ullRsr18MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"18M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr18M, (INT)pStatistic->CustomStat.ullRsr18MCRCOk); } else if(byRxRate==48){ pStatistic->CustomStat.ullRsr24M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr24MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"24M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr24M, (INT)pStatistic->CustomStat.ullRsr24MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"24M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr24M, (INT)pStatistic->CustomStat.ullRsr24MCRCOk); } else if(byRxRate==72){ pStatistic->CustomStat.ullRsr36M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr36MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"36M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr36M, (INT)pStatistic->CustomStat.ullRsr36MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"36M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr36M, (INT)pStatistic->CustomStat.ullRsr36MCRCOk); } else if(byRxRate==96){ pStatistic->CustomStat.ullRsr48M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr48MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"48M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr48M, (INT)pStatistic->CustomStat.ullRsr48MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"48M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr48M, (INT)pStatistic->CustomStat.ullRsr48MCRCOk); } else if(byRxRate==108){ pStatistic->CustomStat.ullRsr54M++; if(BITbIsBitOn(byRSR, RSR_CRCOK)) { pStatistic->CustomStat.ullRsr54MCRCOk++; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"54M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr54M, (INT)pStatistic->CustomStat.ullRsr54MCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"54M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr54M, (INT)pStatistic->CustomStat.ullRsr54MCRCOk); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown: Total[%d], CRCOK[%d]\n", (INT)pStatistic->dwRsrRxPacket+1, (INT)pStatistic->dwRsrCRCOk); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown: Total[%d], CRCOK[%d]\n", (INT)pStatistic->dwRsrRxPacket+1, (INT)pStatistic->dwRsrCRCOk); } if (BITbIsBitOn(byRSR, RSR_BSSIDOK)) diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index 8e2f6c762fb4..3661f8d21642 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -154,7 +154,7 @@ PSvEnablePowerSaving( PSbSendNullPacket(pDevice); } pDevice->bPWBitOn = TRUE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n"); return; } @@ -261,7 +261,7 @@ PSbConsiderPowerDown( // no Tx, no Rx isr, now go to Doze MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n"); return TRUE; } @@ -305,10 +305,10 @@ PSvSendPSPOLL( pTxPacket->cbPayloadLen = 0; // send the frame if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet failed..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet failed..\n"); } else { -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet success..\n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet success..\n"); }; return; @@ -389,12 +389,12 @@ PSbSendNullPacket( pTxPacket->cbPayloadLen = 0; // send the frame if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n"); return FALSE; } else { -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet success....\n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet success....\n"); } diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index c8a4a5533c7e..d7947217674f 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -167,7 +167,7 @@ static VOID s_vFillRTSHead( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pvRTS, IN UINT cbFrameLength, IN BOOL bNeedAck, @@ -181,7 +181,7 @@ static VOID s_vGenerateTxParameter( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pTxBufHead, IN PVOID pvRrvTime, IN PVOID pvRTS, @@ -209,7 +209,7 @@ static UINT s_cbFillTxBufHead ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PBYTE pbyTxBufferAddr, IN UINT cbFrameBodySize, IN UINT uDMAIdx, @@ -227,7 +227,7 @@ static UINT s_uFillDataHead ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pTxDataHead, IN UINT cbFrameLength, IN UINT uDMAIdx, @@ -308,7 +308,7 @@ s_vFillTxKey ( *(pbyIVHead+3) = (BYTE)(((byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV // Append IV&ExtIV after Mac Header *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFillTxKey()---- pdwExtIV: %lx\n", *pdwExtIV); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFillTxKey()---- pdwExtIV: %lx\n", *pdwExtIV); } else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) { pTransmitKey->wTSC15_0++; @@ -406,7 +406,7 @@ s_vSWencryption ( -/*byPktTyp : PK_TYPE_11A 0 +/*byPktType : PK_TYPE_11A 0 PK_TYPE_11B 1 PK_TYPE_11GB 2 PK_TYPE_11GA 3 @@ -415,7 +415,7 @@ static UINT s_uGetTxRsvTime ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN UINT cbFrameLength, IN WORD wRate, IN BOOL bNeedAck @@ -423,14 +423,14 @@ s_uGetTxRsvTime ( { UINT uDataTime, uAckTime; - uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, cbFrameLength, wRate); + uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wRate); #ifdef PLICE_DEBUG //printk("s_uGetTxRsvTime is %d\n",uDataTime); #endif - if (byPktTyp == PK_TYPE_11B) {//llb,CCK mode - uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, (WORD)pDevice->byTopCCKBasicRate); + if (byPktType == PK_TYPE_11B) {//llb,CCK mode + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (WORD)pDevice->byTopCCKBasicRate); } else {//11g 2.4G OFDM mode & 11a 5G OFDM mode - uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, (WORD)pDevice->byTopOFDMBasicRate); + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (WORD)pDevice->byTopOFDMBasicRate); } if (bNeedAck) { @@ -447,7 +447,7 @@ UINT s_uGetRTSCTSRsvTime ( IN PSDevice pDevice, IN BYTE byRTSRsvType, - IN BYTE byPktTyp, + IN BYTE byPktType, IN UINT cbFrameLength, IN WORD wCurrentRate ) @@ -457,23 +457,23 @@ s_uGetRTSCTSRsvTime ( uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0; - uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, cbFrameLength, wCurrentRate); + uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate); if (byRTSRsvType == 0) { //RTSTxRrvTime_bb - uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 20, pDevice->byTopCCKBasicRate); - uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, pDevice->byTopCCKBasicRate); + uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate); + uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); } else if (byRTSRsvType == 1){ //RTSTxRrvTime_ba, only in 2.4GHZ - uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 20, pDevice->byTopCCKBasicRate); - uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, pDevice->byTopCCKBasicRate); - uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, pDevice->byTopOFDMBasicRate); + uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate); + uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); } else if (byRTSRsvType == 2) { //RTSTxRrvTime_aa - uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 20, pDevice->byTopOFDMBasicRate); - uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, pDevice->byTopOFDMBasicRate); + uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopOFDMBasicRate); + uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); } else if (byRTSRsvType == 3) { //CTSTxRrvTime_ba, only in 2.4GHZ - uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, pDevice->byTopCCKBasicRate); - uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktTyp, 14, pDevice->byTopOFDMBasicRate); + uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uRrvTime = uCTSTime + uAckTime + uDataTime + 2*pDevice->uSIFS; return uRrvTime; } @@ -757,7 +757,7 @@ static UINT s_uFillDataHead ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pTxDataHead, IN UINT cbFrameLength, IN UINT uDMAIdx, @@ -775,11 +775,11 @@ s_uFillDataHead ( return 0; } - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (byFBOption == AUTO_FB_NONE) { PSTxDataHead_g pBuf = (PSTxDataHead_g)pTxDataHead; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktTyp, + BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); @@ -789,7 +789,7 @@ s_uFillDataHead ( pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get Duration and TimeStamp pBuf->wDuration_a = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, - byPktTyp, wCurrentRate, bNeedAck, uFragIdx, + byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //1: 2.4GHz pBuf->wDuration_b = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, @@ -805,7 +805,7 @@ s_uFillDataHead ( // Auto Fallback PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktTyp, + BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); @@ -814,13 +814,13 @@ s_uFillDataHead ( ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get Duration and TimeStamp - pBuf->wDuration_a = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktTyp, + pBuf->wDuration_a = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //1: 2.4GHz pBuf->wDuration_b = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //1: 2.4GHz - pBuf->wDuration_a_f0 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktTyp, + pBuf->wDuration_a_f0 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //1: 2.4GHz - pBuf->wDuration_a_f1 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktTyp, + pBuf->wDuration_a_f1 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //1: 2.4GHz pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); @@ -829,35 +829,35 @@ s_uFillDataHead ( return (pBuf->wDuration_a); } //if (byFBOption == AUTO_FB_NONE) } - else if (byPktTyp == PK_TYPE_11A) { + else if (byPktType == PK_TYPE_11A) { if ((byFBOption != AUTO_FB_NONE)) { // Auto Fallback PSTxDataHead_a_FB pBuf = (PSTxDataHead_a_FB)pTxDataHead; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktTyp, + BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration and TimeStampOff - pBuf->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktTyp, + pBuf->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //0: 5GHz - pBuf->wDuration_f0 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktTyp, + pBuf->wDuration_f0 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //0: 5GHz - pBuf->wDuration_f1 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktTyp, + pBuf->wDuration_f1 = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //0: 5GHz pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); return (pBuf->wDuration); } else { PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktTyp, + BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration and TimeStampOff - pBuf->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktTyp, + pBuf->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); @@ -869,12 +869,12 @@ s_uFillDataHead ( else { PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktTyp, + BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration and TimeStampOff - pBuf->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktTyp, + pBuf->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength, byPktType, wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); @@ -889,7 +889,7 @@ static VOID s_vFillRTSHead ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pvRTS, IN UINT cbFrameLength, IN BOOL bNeedAck, @@ -916,7 +916,7 @@ s_vFillRTSHead ( // Note: So far RTSHead dosen't appear in ATIM & Beacom DMA, so we don't need to take them into account. // Otherwise, we need to modified codes for them. - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (byFBOption == AUTO_FB_NONE) { PSRTS_g pBuf = (PSRTS_g)pvRTS; //Get SignalField,ServiceField,Length @@ -924,14 +924,14 @@ s_vFillRTSHead ( (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); - BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktTyp, + BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration pBuf->wDuration_bb = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData - pBuf->wDuration_aa = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3: 2.4G OFDMData - pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wDuration_aa = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3: 2.4G OFDMData + pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->Data.wDurationID = pBuf->wDuration_aa; //Get RTS Frame body @@ -957,19 +957,19 @@ s_vFillRTSHead ( (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b) ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); - BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktTyp, + BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a) ); pBuf->wTransmitLength_a = cpu_to_le16(wLen); //Get Duration pBuf->wDuration_bb = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData - pBuf->wDuration_aa = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3:2.4G OFDMData - pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDMData - pBuf->wRTSDuration_ba_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //4:wRTSDuration_ba_f0, 1:2.4G, 1:CCKData - pBuf->wRTSDuration_aa_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData - pBuf->wRTSDuration_ba_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData - pBuf->wRTSDuration_aa_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData + pBuf->wDuration_aa = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3:2.4G OFDMData + pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDMData + pBuf->wRTSDuration_ba_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //4:wRTSDuration_ba_f0, 1:2.4G, 1:CCKData + pBuf->wRTSDuration_aa_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData + pBuf->wRTSDuration_ba_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData + pBuf->wRTSDuration_aa_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData pBuf->Data.wDurationID = pBuf->wDuration_aa; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -991,16 +991,16 @@ s_vFillRTSHead ( } // if (byFBOption == AUTO_FB_NONE) } - else if (byPktTyp == PK_TYPE_11A) { + else if (byPktType == PK_TYPE_11A) { if (byFBOption == AUTO_FB_NONE) { PSRTS_ab pBuf = (PSRTS_ab)pvRTS; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktTyp, + BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData + pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData pBuf->Data.wDurationID = pBuf->wDuration; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -1024,14 +1024,14 @@ s_vFillRTSHead ( else { PSRTS_a_FB pBuf = (PSRTS_a_FB)pvRTS; //Get SignalField,ServiceField,Length - BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktTyp, + BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField) ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData - pBuf->wRTSDuration_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //5:RTSDuration_aa_f0, 0:5G, 0: 5G OFDMData - pBuf->wRTSDuration_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //7:RTSDuration_aa_f1, 0:5G, 0: + pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData + pBuf->wRTSDuration_f0 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:RTSDuration_aa_f0, 0:5G, 0: 5G OFDMData + pBuf->wRTSDuration_f1 = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:RTSDuration_aa_f1, 0:5G, 0: pBuf->Data.wDurationID = pBuf->wDuration; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -1051,7 +1051,7 @@ s_vFillRTSHead ( } } } - else if (byPktTyp == PK_TYPE_11B) { + else if (byPktType == PK_TYPE_11B) { PSRTS_ab pBuf = (PSRTS_ab)pvRTS; //Get SignalField,ServiceField,Length BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, @@ -1059,7 +1059,7 @@ s_vFillRTSHead ( ); pBuf->wTransmitLength = cpu_to_le16(wLen); //Get Duration - pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData + pBuf->wDuration = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData pBuf->Data.wDurationID = pBuf->wDuration; //Get RTS Frame body pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 @@ -1087,7 +1087,7 @@ VOID s_vFillCTSHead ( IN PSDevice pDevice, IN UINT uDMAIdx, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pvCTS, IN UINT cbFrameLength, IN BOOL bNeedAck, @@ -1109,7 +1109,7 @@ s_vFillCTSHead ( uCTSFrameLen -= 4; } - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) { // Auto Fall back PSCTS_FB pBuf = (PSCTS_FB)pvCTS; @@ -1121,15 +1121,15 @@ s_vFillCTSHead ( pBuf->wTransmitLength_b = cpu_to_le16(wLen); - pBuf->wDuration_ba = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wDuration_ba = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wDuration_ba += pDevice->wCTSDuration; pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba); //Get CTSDuration_ba_f0 - pBuf->wCTSDuration_ba_f0 = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption); //8:CTSDuration_ba_f0, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wCTSDuration_ba_f0 = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //8:CTSDuration_ba_f0, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wCTSDuration_ba_f0 += pDevice->wCTSDuration; pBuf->wCTSDuration_ba_f0 = cpu_to_le16(pBuf->wCTSDuration_ba_f0); //Get CTSDuration_ba_f1 - pBuf->wCTSDuration_ba_f1 = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption); //9:CTSDuration_ba_f1, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wCTSDuration_ba_f1 = (WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //9:CTSDuration_ba_f1, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wCTSDuration_ba_f1 += pDevice->wCTSDuration; pBuf->wCTSDuration_ba_f1 = cpu_to_le16(pBuf->wCTSDuration_ba_f1); //Get CTS Frame body @@ -1146,7 +1146,7 @@ s_vFillCTSHead ( ); pBuf->wTransmitLength_b = cpu_to_le16(wLen); //Get CTSDuration_ba - pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktTyp, wCurrentRate, bNeedAck, byFBOption)); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data + pBuf->wDuration_ba = cpu_to_le16((WORD)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wDuration_ba += pDevice->wCTSDuration; pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba); @@ -1191,7 +1191,7 @@ static VOID s_vGenerateTxParameter ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PVOID pTxBufHead, IN PVOID pvRrvTime, IN PVOID pvRTS, @@ -1209,7 +1209,7 @@ s_vGenerateTxParameter ( BYTE byFBOption = AUTO_FB_NONE; // WORD wCurrentRate = pDevice->wCurrentRate; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter...\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter...\n"); PSTxBufHead pFifoHead = (PSTxBufHead)pTxBufHead; pFifoHead->wReserved = wCurrentRate; wFifoCtl = pFifoHead->wFIFOCtl; @@ -1228,47 +1228,47 @@ s_vGenerateTxParameter ( if (pDevice->bLongHeader) cbMACHdLen = WLAN_HDR_ADDR3_LEN + 6; - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (pvRTS != NULL) { //RTS_need //Fill RsvTime if (pvRrvTime) { PSRrvTime_gRTS pBuf = (PSRrvTime_gRTS)pvRrvTime; - pBuf->wRTSTxRrvTime_aa = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 2, byPktTyp, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 1:2.4GHz - pBuf->wRTSTxRrvTime_ba = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 1, byPktTyp, cbFrameSize, wCurrentRate));//1:RTSTxRrvTime_ba, 1:2.4GHz - pBuf->wRTSTxRrvTime_bb = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 0, byPktTyp, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz - pBuf->wTxRrvTime_a = cpu_to_le16((WORD) s_uGetTxRsvTime(pDevice, byPktTyp, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM + pBuf->wRTSTxRrvTime_aa = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 1:2.4GHz + pBuf->wRTSTxRrvTime_ba = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 1, byPktType, cbFrameSize, wCurrentRate));//1:RTSTxRrvTime_ba, 1:2.4GHz + pBuf->wRTSTxRrvTime_bb = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz + pBuf->wTxRrvTime_a = cpu_to_le16((WORD) s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM pBuf->wTxRrvTime_b = cpu_to_le16((WORD) s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK } //Fill RTS - s_vFillRTSHead(pDevice, byPktTyp, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); } else {//RTS_needless, PCF mode //Fill RsvTime if (pvRrvTime) { PSRrvTime_gCTS pBuf = (PSRrvTime_gCTS)pvRrvTime; - pBuf->wTxRrvTime_a = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, byPktTyp, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM + pBuf->wTxRrvTime_a = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM pBuf->wTxRrvTime_b = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK - pBuf->wCTSTxRrvTime_ba = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 3, byPktTyp, cbFrameSize, wCurrentRate));//3:CTSTxRrvTime_Ba, 1:2.4GHz + pBuf->wCTSTxRrvTime_ba = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 3, byPktType, cbFrameSize, wCurrentRate));//3:CTSTxRrvTime_Ba, 1:2.4GHz } //Fill CTS - s_vFillCTSHead(pDevice, uDMAIdx, byPktTyp, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); + s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption); } } - else if (byPktTyp == PK_TYPE_11A) { + else if (byPktType == PK_TYPE_11A) { if (pvRTS != NULL) {//RTS_need, non PCF mode //Fill RsvTime if (pvRrvTime) { PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; - pBuf->wRTSTxRrvTime = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 2, byPktTyp, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz - pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, byPktTyp, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM + pBuf->wRTSTxRrvTime = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz + pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM } //Fill RTS - s_vFillRTSHead(pDevice, byPktTyp, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); } else if (pvRTS == NULL) {//RTS_needless, non PCF mode //Fill RsvTime @@ -1278,17 +1278,17 @@ s_vGenerateTxParameter ( } } } - else if (byPktTyp == PK_TYPE_11B) { + else if (byPktType == PK_TYPE_11B) { if ((pvRTS != NULL)) {//RTS_need, non PCF mode //Fill RsvTime if (pvRrvTime) { PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; - pBuf->wRTSTxRrvTime = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 0, byPktTyp, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz + pBuf->wRTSTxRrvTime = cpu_to_le16((WORD)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz pBuf->wTxRrvTime = cpu_to_le16((WORD)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK));//1:CCK } //Fill RTS - s_vFillRTSHead(pDevice, byPktTyp, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); + s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption); } else { //RTS_needless, non PCF mode //Fill RsvTime @@ -1298,7 +1298,7 @@ s_vGenerateTxParameter ( } } } - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter END.\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter END.\n"); } /* PBYTE pbyBuffer,//point to pTxBufHead @@ -1317,7 +1317,7 @@ s_vFillFragParameter( ) { PSTxBufHead pTxBufHead = (PSTxBufHead) pbyBuffer; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vFillFragParameter...\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vFillFragParameter...\n"); if (uTxType == TYPE_SYNCDMA) { //PSTxSyncDesc ptdCurr = (PSTxSyncDesc)s_pvGetTxDescHead(pDevice, uTxType, uCurIdx); @@ -1350,14 +1350,14 @@ s_vFillFragParameter( pTxBufHead->wFragCtl |= (WORD)wFragType;//0x0001; //0000 0000 0000 0001 - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vFillFragParameter END\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vFillFragParameter END\n"); } static UINT s_cbFillTxBufHead ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PBYTE pbyTxBufferAddr, IN UINT cbFrameBodySize, IN UINT uDMAIdx, @@ -1428,7 +1428,7 @@ s_cbFillTxBufHead ( pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd = NULL; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_cbFillTxBufHead...\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_cbFillTxBufHead...\n"); if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { @@ -1504,7 +1504,7 @@ s_cbFillTxBufHead ( ////////////////////////////////////////////////////// //Set RrvTime/RTS/CTS Buffer wTxBufSize = sizeof(STxBufHead); - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) {//802.11g packet + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet if (byFBOption == AUTO_FB_NONE) { if (bRTS == TRUE) {//RTS_need @@ -1603,7 +1603,7 @@ s_cbFillTxBufHead ( MIC_vAppend((PBYTE)&(psEthHeader->abyDstAddr[0]), 12); dwMIC_Priority = 0; MIC_vAppend((PBYTE)&dwMIC_Priority, 4); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1); } /////////////////////////////////////////////////////////////////// @@ -1633,15 +1633,15 @@ s_cbFillTxBufHead ( //========================= // Start Fragmentation //========================= - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start Fragmentation...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start Fragmentation...\n"); wFragType = FRAGCTL_STAFRAG; //Fill FIFO,RrvTime,RTS,and CTS - s_vGenerateTxParameter(pDevice, byPktTyp, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, + s_vGenerateTxParameter(pDevice, byPktType, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, cbFragmentSize, bNeedACK, uDMAIdx, psEthHeader, pDevice->wCurrentRate); //Fill DataHead - uDuration = s_uFillDataHead(pDevice, byPktTyp, pvTxDataHd, cbFragmentSize, uDMAIdx, bNeedACK, + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFragmentSize, uDMAIdx, bNeedACK, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption, pDevice->wCurrentRate); // Generate TX MAC Header vGenerateMACHeader(pDevice, pbyMacHdr, (WORD)uDuration, psEthHeader, bNeedEncrypt, @@ -1700,7 +1700,7 @@ s_cbFillTxBufHead ( uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len; if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize); MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFragPayloadSize); } @@ -1736,16 +1736,16 @@ s_cbFillTxBufHead ( //========================= // Last Fragmentation //========================= - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Last Fragmentation...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Last Fragmentation...\n"); //tmpDescIdx = (uDescIdx + uFragIdx) % pDevice->cbTD[uDMAIdx]; wFragType = FRAGCTL_ENDFRAG; //Fill FIFO,RrvTime,RTS,and CTS - s_vGenerateTxParameter(pDevice, byPktTyp, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, + s_vGenerateTxParameter(pDevice, byPktType, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, cbLastFragmentSize, bNeedACK, uDMAIdx, psEthHeader, pDevice->wCurrentRate); //Fill DataHead - uDuration = s_uFillDataHead(pDevice, byPktTyp, pvTxDataHd, cbLastFragmentSize, uDMAIdx, bNeedACK, + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbLastFragmentSize, uDMAIdx, bNeedACK, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption, pDevice->wCurrentRate); // Generate TX MAC Header @@ -1792,7 +1792,7 @@ s_cbFillTxBufHead ( } if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n", uMICFragLen, cbLastFragPayloadSize, uTmpLen); if (bMIC2Frag == FALSE) { @@ -1801,12 +1801,12 @@ s_cbFillTxBufHead ( pdwMIC_L = (PDWORD)(pbyBuffer + uLength + uTmpLen); pdwMIC_R = (PDWORD)(pbyBuffer + uLength + uTmpLen + 4); MIC_vGetMIC(pdwMIC_L, pdwMIC_R); - DEVICE_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 { if (uMICFragLen >= 4) { MEMvCopy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)), (cbMIClen - uMICFragLen)); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen >= 4: %X, %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen >= 4: %X, %d\n", *(PBYTE)((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)), (cbMIClen - uMICFragLen)); @@ -1814,15 +1814,15 @@ s_cbFillTxBufHead ( MEMvCopy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_L + uMICFragLen), (4 - uMICFragLen)); MEMvCopy((pbyBuffer + uLength + (4 - uMICFragLen)), &dwSafeMIC_R, 4); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen < 4: %X, %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen < 4: %X, %d\n", *(PBYTE)((PBYTE)&dwSafeMIC_R + uMICFragLen - 4), (cbMIClen - uMICFragLen)); } /* for (ii = 0; ii < cbLastFragPayloadSize + 8 + 24; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii - 8 - 24))); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii - 8 - 24))); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n\n"); */ } MIC_vUnInit(); @@ -1866,16 +1866,16 @@ s_cbFillTxBufHead ( //========================= // Middle Fragmentation //========================= - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Middle Fragmentation...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Middle Fragmentation...\n"); //tmpDescIdx = (uDescIdx + uFragIdx) % pDevice->cbTD[uDMAIdx]; wFragType = FRAGCTL_MIDFRAG; //Fill FIFO,RrvTime,RTS,and CTS - s_vGenerateTxParameter(pDevice, byPktTyp, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, + s_vGenerateTxParameter(pDevice, byPktType, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, cbFragmentSize, bNeedACK, uDMAIdx, psEthHeader, pDevice->wCurrentRate); //Fill DataHead - uDuration = s_uFillDataHead(pDevice, byPktTyp, pvTxDataHd, cbFragmentSize, uDMAIdx, bNeedACK, + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFragmentSize, uDMAIdx, bNeedACK, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption, pDevice->wCurrentRate); // Generate TX MAC Header @@ -1939,23 +1939,23 @@ s_cbFillTxBufHead ( dwSafeMIC_L = *pdwMIC_L; dwSafeMIC_R = *pdwMIC_R; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIDDLE: uMICFragLen:%d, cbFragPayloadSize:%d, uTmpLen:%d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIDDLE: uMICFragLen:%d, cbFragPayloadSize:%d, uTmpLen:%d\n", uMICFragLen, cbFragPayloadSize, uTmpLen); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Fill MIC in Middle frag [%d]\n", uMICFragLen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Fill MIC in Middle frag [%d]\n", uMICFragLen); /* for (ii = 0; ii < uMICFragLen; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength + uTmpLen) + ii))); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength + uTmpLen) + ii))); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); */ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Middle frag len: %d\n", uTmpLen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Middle frag len: %d\n", uTmpLen); /* for (ii = 0; ii < uTmpLen; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii))); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii))); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n\n"); */ } else { @@ -1994,18 +1994,18 @@ s_cbFillTxBufHead ( //========================= // No Fragmentation //========================= - //DEVICE_PRTGRP03(("No Fragmentation...\n")); - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Fragmentation...\n"); + //DBG_PRTGRP03(("No Fragmentation...\n")); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Fragmentation...\n"); wFragType = FRAGCTL_NONFRAG; //Set FragCtl in TxBufferHead psTxBufHd->wFragCtl |= (WORD)wFragType; //Fill FIFO,RrvTime,RTS,and CTS - s_vGenerateTxParameter(pDevice, byPktTyp, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, + s_vGenerateTxParameter(pDevice, byPktType, (PVOID)psTxBufHd, pvRrvTime, pvRTS, pvCTS, cbFrameSize, bNeedACK, uDMAIdx, psEthHeader, pDevice->wCurrentRate); //Fill DataHead - uDuration = s_uFillDataHead(pDevice, byPktTyp, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK, 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate); // Generate TX MAC Header @@ -2043,7 +2043,7 @@ s_cbFillTxBufHead ( //--------------------------- //Fill MICHDR //if (pDevice->bAES) { - // DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Fill MICHDR...\n"); + // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Fill MICHDR...\n"); // s_vFillMICHDR(pDevice, (PBYTE)pMICHDR, pbyMacHdr, (WORD)cbFrameBodySize); //} @@ -2063,12 +2063,12 @@ s_cbFillTxBufHead ( if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength); /* for (ii = 0; ii < (cbFrameBodySize - cb802_1_H_len); ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii))); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii))); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); */ MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFrameBodySize); @@ -2086,14 +2086,14 @@ s_cbFillTxBufHead ( pDevice->bTxMICFail = FALSE; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderLength, uPadding, cbIVlen); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lx, %lx\n", *pdwMIC_L, *pdwMIC_R); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderLength, uPadding, cbIVlen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lx, %lx\n", *pdwMIC_L, *pdwMIC_R); /* for (ii = 0; ii < 8; ii++) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(((PBYTE)(pdwMIC_L) + ii))); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(((PBYTE)(pdwMIC_L) + ii))); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); */ } @@ -2121,12 +2121,12 @@ s_cbFillTxBufHead ( pDevice->iTDUsed[uDMAIdx]++; -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" ptdCurr->m_dwReserved0[%d] ptdCurr->m_dwReserved1[%d].\n", ptdCurr->pTDInfo->dwReqCount, ptdCurr->pTDInfo->dwHeaderLength); -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cbHeaderLength[%d]\n", cbHeaderLength); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" ptdCurr->m_dwReserved0[%d] ptdCurr->m_dwReserved1[%d].\n", ptdCurr->pTDInfo->dwReqCount, ptdCurr->pTDInfo->dwHeaderLength); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cbHeaderLength[%d]\n", cbHeaderLength); } *puMACfragNum = uMACfragNum; - //DEVICE_PRTGRP03(("s_cbFillTxBufHead END\n")); + //DBG_PRTGRP03(("s_cbFillTxBufHead END\n")); return cbHeaderLength; } @@ -2134,7 +2134,7 @@ s_cbFillTxBufHead ( VOID vGenerateFIFOHeader ( IN PSDevice pDevice, - IN BYTE byPktTyp, + IN BYTE byPktType, IN PBYTE pbyTxBufferAddr, IN BOOL bNeedEncrypt, IN UINT cbPayloadSize, @@ -2206,16 +2206,16 @@ vGenerateFIFOHeader ( pTxBufHead->wFragCtl |= cpu_to_le16((WORD)(cbMacHdLen << 10)); //Set packet type - if (byPktTyp == PK_TYPE_11A) {//0000 0000 0000 0000 + if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000 ; } - else if (byPktTyp == PK_TYPE_11B) {//0000 0001 0000 0000 + else if (byPktType == PK_TYPE_11B) {//0000 0001 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11B; } - else if (byPktTyp == PK_TYPE_11GB) {//0000 0010 0000 0000 + else if (byPktType == PK_TYPE_11GB) {//0000 0010 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11GB; } - else if (byPktTyp == PK_TYPE_11GA) {//0000 0011 0000 0000 + else if (byPktType == PK_TYPE_11GA) {//0000 0011 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11GA; } //Set FIFOCTL_GrpAckPolicy @@ -2273,7 +2273,7 @@ vGenerateFIFOHeader ( if(pDevice->bEnableHostWEP) pTxBufHead->wFragCtl &= ~(FRAGCTL_TKIP | FRAGCTL_LEGACY |FRAGCTL_AES); */ - *pcbHeaderSize = s_cbFillTxBufHead(pDevice, byPktTyp, pbyTxBufferAddr, cbPayloadSize, + *pcbHeaderSize = s_cbFillTxBufHead(pDevice, byPktType, pbyTxBufferAddr, cbPayloadSize, uDMAIdx, pHeadTD, psEthHeader, pPacket, bNeedEncrypt, pTransmitKey, uNodeIndex, puMACfragNum); @@ -2378,7 +2378,7 @@ vGenerateMACHeader ( CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { PSTxDesc pFrstTD; - BYTE byPktTyp; + BYTE byPktType; PBYTE pbyTxBufferAddr; PVOID pvRTS; PSCTS pCTS; @@ -2419,10 +2419,10 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { wCurrentRate = RATE_6M; - byPktTyp = PK_TYPE_11A; + byPktType = PK_TYPE_11A; } else { wCurrentRate = RATE_1M; - byPktTyp = PK_TYPE_11B; + byPktType = PK_TYPE_11B; } // SetPower will cause error power TX state for OFDM Date packet in TX buffer. @@ -2440,21 +2440,21 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { if (pDevice->byFOETuning) { if ((pPacket->p80211Header->sA3.wFrameCtl & TYPE_DATE_NULL) == TYPE_DATE_NULL) { wCurrentRate = RATE_24M; - byPktTyp = PK_TYPE_11GA; + byPktType = PK_TYPE_11GA; } } //Set packet type - if (byPktTyp == PK_TYPE_11A) {//0000 0000 0000 0000 + if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000 pTxBufHead->wFIFOCtl = 0; } - else if (byPktTyp == PK_TYPE_11B) {//0000 0001 0000 0000 + else if (byPktType == PK_TYPE_11B) {//0000 0001 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11B; } - else if (byPktTyp == PK_TYPE_11GB) {//0000 0010 0000 0000 + else if (byPktType == PK_TYPE_11GB) {//0000 0010 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11GB; } - else if (byPktTyp == PK_TYPE_11GA) {//0000 0011 0000 0000 + else if (byPktType == PK_TYPE_11GA) {//0000 0011 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11GA; } @@ -2536,7 +2536,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter() //Set RrvTime/RTS/CTS Buffer - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) {//802.11g packet + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pMICHDR = NULL; @@ -2565,11 +2565,11 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { //Fill FIFO,RrvTime,RTS,and CTS - s_vGenerateTxParameter(pDevice, byPktTyp, pbyTxBufferAddr, pvRrvTime, pvRTS, pCTS, + s_vGenerateTxParameter(pDevice, byPktType, pbyTxBufferAddr, pvRrvTime, pvRTS, pCTS, cbFrameSize, bNeedACK, TYPE_TXDMA0, &sEthHeader, wCurrentRate); //Fill DataHead - uDuration = s_uFillDataHead(pDevice, byPktTyp, pvTxDataHd, cbFrameSize, TYPE_TXDMA0, bNeedACK, + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, TYPE_TXDMA0, bNeedACK, 0, 0, 1, AUTO_FB_NONE, wCurrentRate); pMACHeader = (PS802_11Header) (pbyTxBufferAddr + cbHeaderSize); @@ -2606,11 +2606,11 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) { // get group key if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); break; } } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get PTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get PTK.\n"); break; } } @@ -2618,9 +2618,9 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { pbyBSSID = pDevice->abyBroadcastAddr; if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) { pTransmitKey = NULL; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KEY is NULL. OP Mode[%d]\n", pDevice->eOPMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KEY is NULL. OP Mode[%d]\n", pDevice->eOPMode); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); } } while(FALSE); //Fill TXKEY @@ -2647,7 +2647,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { // This will cause AID-field of PS-POLL packet be incorrect (Because PS-POLL's AID field is // in the same place of other packet's Duration-field). // And it will cause Cisco-AP to issue Disassociation-packet - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { ((PSTxDataHead_g)pvTxDataHd)->wDuration_a = cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); ((PSTxDataHead_g)pvTxDataHd)->wDuration_b = cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); } else { @@ -2677,7 +2677,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { pDevice->iTDUsed[TYPE_TXDMA0]++; if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 1) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " available td0 <= 1\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " available td0 <= 1\n"); } pDevice->apCurrTD[TYPE_TXDMA0] = pFrstTD->next; @@ -2699,7 +2699,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { - BYTE byPktTyp; + BYTE byPktType; PBYTE pbyBuffer = (PBYTE)pDevice->tx_beacon_bufs; UINT cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN; UINT cbHeaderSize = 0; @@ -2715,10 +2715,10 @@ CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { wCurrentRate = RATE_6M; - byPktTyp = PK_TYPE_11A; + byPktType = PK_TYPE_11A; } else { wCurrentRate = RATE_2M; - byPktTyp = PK_TYPE_11B; + byPktType = PK_TYPE_11B; } //Set Preamble type always long @@ -2730,17 +2730,17 @@ CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { //Set packet type & Get Duration - if (byPktTyp == PK_TYPE_11A) {//0000 0000 0000 0000 - pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameSize, byPktTyp, + if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000 + pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameSize, byPktType, wCurrentRate, FALSE, 0, 0, 1, AUTO_FB_NONE)); } - else if (byPktTyp == PK_TYPE_11B) {//0000 0001 0000 0000 + else if (byPktType == PK_TYPE_11B) {//0000 0001 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11B; - pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameSize, byPktTyp, + pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameSize, byPktType, wCurrentRate, FALSE, 0, 0, 1, AUTO_FB_NONE)); } - BBvCaculateParameter(pDevice, cbFrameSize, wCurrentRate, byPktTyp, + BBvCaculateParameter(pDevice, cbFrameSize, wCurrentRate, byPktType, (PWORD)&(wLen), (PBYTE)&(pTxDataHead->byServiceField), (PBYTE)&(pTxDataHead->bySignalField) ); pTxDataHead->wTransmitLength = cpu_to_le16(wLen); @@ -2867,7 +2867,7 @@ VOID vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDULen) { PSTxDesc pFrstTD; - BYTE byPktTyp; + BYTE byPktType; PBYTE pbyTxBufferAddr; PVOID pvRTS; PVOID pvCTS; @@ -2931,10 +2931,10 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { wCurrentRate = RATE_6M; - byPktTyp = PK_TYPE_11A; + byPktType = PK_TYPE_11A; } else { wCurrentRate = RATE_1M; - byPktTyp = PK_TYPE_11B; + byPktType = PK_TYPE_11B; } // SetPower will cause error power TX state for OFDM Date packet in TX buffer. @@ -2952,23 +2952,23 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU if (pDevice->byFOETuning) { if ((p80211Header->sA3.wFrameCtl & TYPE_DATE_NULL) == TYPE_DATE_NULL) { wCurrentRate = RATE_24M; - byPktTyp = PK_TYPE_11GA; + byPktType = PK_TYPE_11GA; } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vDMA0_tx_80211: p80211Header->sA3.wFrameCtl = %x \n", p80211Header->sA3.wFrameCtl); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vDMA0_tx_80211: p80211Header->sA3.wFrameCtl = %x \n", p80211Header->sA3.wFrameCtl); //Set packet type - if (byPktTyp == PK_TYPE_11A) {//0000 0000 0000 0000 + if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000 pTxBufHead->wFIFOCtl = 0; } - else if (byPktTyp == PK_TYPE_11B) {//0000 0001 0000 0000 + else if (byPktType == PK_TYPE_11B) {//0000 0001 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11B; } - else if (byPktTyp == PK_TYPE_11GB) {//0000 0010 0000 0000 + else if (byPktType == PK_TYPE_11GB) {//0000 0010 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11GB; } - else if (byPktTyp == PK_TYPE_11GA) {//0000 0011 0000 0000 + else if (byPktType == PK_TYPE_11GA) {//0000 0011 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_11GA; } @@ -3078,7 +3078,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter() - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) {//802.11g packet + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS)); @@ -3109,11 +3109,11 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU //Fill FIFO,RrvTime,RTS,and CTS - s_vGenerateTxParameter(pDevice, byPktTyp, pbyTxBufferAddr, pvRrvTime, pvRTS, pvCTS, + s_vGenerateTxParameter(pDevice, byPktType, pbyTxBufferAddr, pvRrvTime, pvRTS, pvCTS, cbFrameSize, bNeedACK, TYPE_TXDMA0, &sEthHeader, wCurrentRate); //Fill DataHead - uDuration = s_uFillDataHead(pDevice, byPktTyp, pvTxDataHd, cbFrameSize, TYPE_TXDMA0, bNeedACK, + uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, TYPE_TXDMA0, bNeedACK, 0, 0, 1, AUTO_FB_NONE, wCurrentRate); pMACHeader = (PS802_11Header) (pbyTxBufferAddr + cbHeaderSize); @@ -3173,7 +3173,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU MIC_vAppend((PBYTE)&(sEthHeader.abyDstAddr[0]), 12); dwMIC_Priority = 0; MIC_vAppend((PBYTE)&dwMIC_Priority, 4); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0_tx_8021:MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0_tx_8021:MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1); uLength = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen; @@ -3191,9 +3191,9 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU pDevice->bTxMICFail = FALSE; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderSize, uPadding, cbIVlen); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lx, %lx\n", *pdwMIC_L, *pdwMIC_R); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderSize, uPadding, cbIVlen); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lx, %lx\n", *pdwMIC_L, *pdwMIC_R); } @@ -3223,7 +3223,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU // This will cause AID-field of PS-POLL packet be incorrect (Because PS-POLL's AID field is // in the same place of other packet's Duration-field). // And it will cause Cisco-AP to issue Disassociation-packet - if (byPktTyp == PK_TYPE_11GB || byPktTyp == PK_TYPE_11GA) { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { ((PSTxDataHead_g)pvTxDataHd)->wDuration_a = cpu_to_le16(p80211Header->sA2.wDurationID); ((PSTxDataHead_g)pvTxDataHd)->wDuration_b = cpu_to_le16(p80211Header->sA2.wDurationID); } else { @@ -3255,7 +3255,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU pDevice->iTDUsed[TYPE_TXDMA0]++; if (AVAIL_TD(pDevice, TYPE_TXDMA0) <= 1) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " available td0 <= 1\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " available td0 <= 1\n"); } pDevice->apCurrTD[TYPE_TXDMA0] = pFrstTD->next; diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index 92563bd011b2..d97d97d1e6c7 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -274,10 +274,10 @@ s_vProbeChannel( if (pTxPacket != NULL ){ for (ii = 0; ii < 2 ; ii++) { if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request sending fail.. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request sending fail.. \n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request is sending.. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request is sending.. \n"); } } } @@ -409,7 +409,7 @@ vCommandTimer ( return; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SCAN_START\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SCAN_START\n"); pItemSSID = (PWLAN_IE_SSID)pMgmt->abyScanSSID; // wait all Data TD complete if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){ @@ -429,7 +429,7 @@ vCommandTimer ( // Set Baseband's sensitivity back. // Set channel back CARDbSetChannel(pMgmt->pAdapter, pMgmt->uCurrChannel); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { CARDbSetBSSID(pMgmt->pAdapter, pMgmt->abyCurrBSSID, OP_MODE_ADHOC); } else { @@ -441,7 +441,7 @@ vCommandTimer ( } else { //2008-8-4 by chester if (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d \n",pMgmt->uScanChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d \n",pMgmt->uScanChannel); s_bCommandComplete(pDevice); return; } @@ -464,9 +464,9 @@ vCommandTimer ( vAdHocBeaconStop(pDevice); if (CARDbSetChannel(pMgmt->pAdapter, pMgmt->uScanChannel) == TRUE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel); } CARDbSetBSSID(pMgmt->pAdapter, pMgmt->abyCurrBSSID, OP_MODE_UNKNOWN); // printk("chester-mxch=%d\n",pDevice->byMaxChannel); @@ -502,7 +502,7 @@ vCommandTimer ( // Set Baseband's sensitivity back. // Set channel back CARDbSetChannel(pMgmt->pAdapter, pMgmt->uCurrChannel); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { CARDbSetBSSID(pMgmt->pAdapter, pMgmt->abyCurrBSSID, OP_MODE_ADHOC); } else { @@ -531,7 +531,7 @@ vCommandTimer ( spin_unlock_irq(&pDevice->lock); return; } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n"); // reason = 8 : disassoc because sta has left vMgrDisassocBeginSta((HANDLE)pDevice, pMgmt, pMgmt->abyCurrBSSID, (8), &Status); pDevice->bLinkPass = FALSE; @@ -551,7 +551,7 @@ vCommandTimer ( spin_unlock_irq(&pDevice->lock); return; }; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" CARDbRadioPowerOff\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" CARDbRadioPowerOff\n"); //2008-09-02 by chester // CARDbRadioPowerOff(pDevice); s_bCommandComplete(pDevice); @@ -582,15 +582,15 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS //((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN); pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pItemSSIDCurr = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID); if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSID->len =%d\n",pItemSSID->len); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSIDCurr->len = %d\n",pItemSSIDCurr->len); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" desire ssid = %s\n", pItemSSID->abySSID); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" curr ssid = %s\n", pItemSSIDCurr->abySSID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSID->len =%d\n",pItemSSID->len); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSIDCurr->len = %d\n",pItemSSIDCurr->len); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" desire ssid = %s\n", pItemSSID->abySSID); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" curr ssid = %s\n", pItemSSIDCurr->abySSID); } if ((pMgmt->eCurrState == WMAC_STATE_ASSOC) || @@ -629,7 +629,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->eCommandState = WLAN_AUTHENTICATE_WAIT; vCommandTimerWait((HANDLE)pDevice, AUTHENTICATE_TIMEOUT); spin_unlock_irq(&pDevice->lock); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Set eCommandState = WLAN_AUTHENTICATE_WAIT\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Set eCommandState = WLAN_AUTHENTICATE_WAIT\n"); return; } } @@ -649,7 +649,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS // start own IBSS vMgrCreateOwnIBSS((HANDLE)pDevice, &Status); if (Status != CMD_STATUS_SUCCESS){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n"); }; BSSvAddMulticastNode(pDevice); } @@ -661,7 +661,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS // start own IBSS vMgrCreateOwnIBSS((HANDLE)pDevice, &Status); if (Status != CMD_STATUS_SUCCESS){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_IBSS_CREATE fail ! \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_IBSS_CREATE fail ! \n"); }; BSSvAddMulticastNode(pDevice); if (netif_queue_stopped(pDevice->dev)){ @@ -670,7 +670,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->bLinkPass = TRUE; } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n"); #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT // if(pDevice->bWPASuppWextEnabled == TRUE) { @@ -688,15 +688,15 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS break; case WLAN_AUTHENTICATE_WAIT : - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n"); if (pMgmt->eCurrState == WMAC_STATE_AUTH) { // Call mgr to begin the association pDevice->byLinkWaitCount = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_AUTH\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_AUTH\n"); vMgrAssocBeginSta((HANDLE)pDevice, pMgmt, &Status); if (Status == CMD_STATUS_SUCCESS) { pDevice->byLinkWaitCount = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState = WLAN_ASSOCIATE_WAIT\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState = WLAN_ASSOCIATE_WAIT\n"); pDevice->eCommandState = WLAN_ASSOCIATE_WAIT; vCommandTimerWait((HANDLE)pDevice, ASSOCIATE_TIMEOUT); spin_unlock_irq(&pDevice->lock); @@ -732,7 +732,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS case WLAN_ASSOCIATE_WAIT : if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n"); if (pDevice->ePSMode != WMAC_POWER_CAM) { PSvEnablePowerSaving((HANDLE)pDevice, pMgmt->wListenInterval); } @@ -796,7 +796,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS break; case WLAN_CMD_AP_MODE_START : - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n"); if (pMgmt->eConfigMode == WMAC_CONFIG_AP) { del_timer(&pMgmt->sTimerSecondCallback); @@ -813,12 +813,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS vMgrCreateOwnIBSS((HANDLE)pDevice, &Status); if (Status != CMD_STATUS_SUCCESS){ - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " vMgrCreateOwnIBSS fail ! \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " vMgrCreateOwnIBSS fail ! \n"); }; // alway turn off unicast bit MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_UNICAST); pDevice->byRxMode &= ~RCR_UNICAST; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode ); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode ); BSSvAddMulticastNode(pDevice); if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); @@ -841,7 +841,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->bMoreData = TRUE; } if (!device_dma0_xmit(pDevice, skb, 0)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail \n"); } pMgmt->sNodeDBTable[0].wEnQueueCnt--; } @@ -851,7 +851,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) { if (pMgmt->sNodeDBTable[ii].bActive && pMgmt->sNodeDBTable[ii].bRxPSPoll) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d Enqueu Cnt= %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d Enqueu Cnt= %d\n", ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt); while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) != NULL) { if (skb_queue_empty(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) { @@ -864,7 +864,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->bMoreData = TRUE; } if (!device_dma0_xmit(pDevice, skb, ii)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail \n"); } pMgmt->sNodeDBTable[ii].wEnQueueCnt--; // check if sta ps enable, wait next pspoll @@ -876,7 +876,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS // clear tx map pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &= ~byMask[pMgmt->sNodeDBTable[ii].wAID & 7]; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d PS queue clear \n", ii); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d PS queue clear \n", ii); } pMgmt->sNodeDBTable[ii].bRxPSPoll = FALSE; } @@ -887,7 +887,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS case WLAN_CMD_RADIO_START : - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n"); if (pDevice->bRadioCmd == TRUE) CARDbRadioPowerOn(pDevice); else @@ -898,7 +898,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS case WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE : - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_CHECK_BBSENSITIVITY_START\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_CHECK_BBSENSITIVITY_START\n"); // wait all TD complete if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){ vCommandTimerWait((HANDLE)pDevice, 10); @@ -912,7 +912,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS } pDevice->byBBVGACurrent = pDevice->byBBVGANew; BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SetVGAGainOffset %02X\n", pDevice->byBBVGACurrent); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SetVGAGainOffset %02X\n", pDevice->byBBVGACurrent); s_bCommandComplete(pDevice); break; @@ -956,7 +956,7 @@ s_bCommandComplete ( pDevice->bCmdRunning = TRUE; switch ( pDevice->eCommand ) { case WLAN_CMD_BSSID_SCAN: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n"); pDevice->eCommandState = WLAN_CMD_SCAN_START; pMgmt->uScanChannel = 0; if (pSSID->len != 0) { @@ -979,7 +979,7 @@ s_bCommandComplete ( pSSID->len = WLAN_SSID_MAXLEN; if (pSSID->len != 0) MEMvCopy(pDevice->pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SSID_START\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SSID_START\n"); break; case WLAN_CMD_DISASSOCIATE: pDevice->eCommandState = WLAN_CMD_DISASSOCIATE_START; diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c index ac9ec7e0806a..2b41c1999834 100644 --- a/drivers/staging/vt6655/wctl.c +++ b/drivers/staging/vt6655/wctl.c @@ -217,7 +217,7 @@ UINT uHeaderSize; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); return(FALSE); } else { @@ -231,7 +231,7 @@ UINT uHeaderSize; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength += (cbFrameLength - uHeaderSize); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += (cbFrameLength - uHeaderSize); pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Second pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Second pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); } else { // seq error or frag # error flush DFCB @@ -247,7 +247,7 @@ UINT uHeaderSize; //enq defragcontrolblock pDevice->cbFreeDFCB++; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = FALSE; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); return(TRUE); } return(FALSE); diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index 6b3bf0746202..c6a6a0a35566 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -656,10 +656,10 @@ vMgrReAssocBeginSta( /* send the frame */ *pStatus = csMgmt_xmit(pDevice, pTxPacket); if (*pStatus != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx failed.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx failed.\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx sending.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx sending.\n"); } } @@ -836,8 +836,8 @@ s_vMgrRxAssocRequest( pDevice->bBarkerPreambleMd = TRUE; } - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID); - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", sFrame.pHdr->sA3.abyAddr2[0], sFrame.pHdr->sA3.abyAddr2[1], sFrame.pHdr->sA3.abyAddr2[2], @@ -845,7 +845,7 @@ s_vMgrRxAssocRequest( sFrame.pHdr->sA3.abyAddr2[4], sFrame.pHdr->sA3.abyAddr2[5] ) ; - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n", pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate); }//else { TODO: received STA under state1 handle } else { @@ -873,10 +873,10 @@ s_vMgrRxAssocRequest( /* send the frame */ Status = csMgmt_xmit(pDevice, pTxPacket); if (Status != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx failed\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx failed\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx sending..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx sending..\n"); } } @@ -996,8 +996,8 @@ s_vMgrRxReAssocRequest( pDevice->bBarkerPreambleMd = TRUE; } - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID); - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", sFrame.pHdr->sA3.abyAddr2[0], sFrame.pHdr->sA3.abyAddr2[1], sFrame.pHdr->sA3.abyAddr2[2], @@ -1005,7 +1005,7 @@ s_vMgrRxReAssocRequest( sFrame.pHdr->sA3.abyAddr2[4], sFrame.pHdr->sA3.abyAddr2[5] ) ; - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n", pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate); } @@ -1031,10 +1031,10 @@ s_vMgrRxReAssocRequest( } Status = csMgmt_xmit(pDevice, pTxPacket); if (Status != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx failed\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx failed\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx sending..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx sending..\n"); } } return; @@ -1099,13 +1099,13 @@ s_vMgrRxAssocResponse( pMgmt->wCurrAID = cpu_to_le16((*(sFrame.pwAid))); if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) ) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n"); }; - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15)); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15)); pMgmt->eCurrState = WMAC_STATE_ASSOC; BSSvUpdateAPNode((HANDLE)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); pDevice->bLinkPass = TRUE; pDevice->uBBVGADiffCount = 0; if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { @@ -1362,7 +1362,7 @@ s_vMgrRxAuthentication( s_vMgrRxAuthenSequence_4(pDevice, pMgmt, &sFrame); break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Auth Sequence error, seq = %d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Auth Sequence error, seq = %d\n", cpu_to_le16((*(sFrame.pwAuthSequence)))); break; } @@ -1469,9 +1469,9 @@ s_vMgrRxAuthenSequence_1( if (pDevice->bEnableHostapd) { return; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx.. \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx.. \n"); if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx failed.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx failed.\n"); } return; } @@ -1506,12 +1506,12 @@ s_vMgrRxAuthenSequence_2( { case WLAN_AUTH_ALG_OPENSYSTEM: if ( cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS ){ - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (OPEN) Successful.\n"); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (OPEN) Successful.\n"); pMgmt->eCurrState = WMAC_STATE_AUTH; timer_expire(pDevice->sTimerCommand, 0); } else { - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (OPEN) Failed.\n"); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (OPEN) Failed.\n"); s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus)))); pMgmt->eCurrState = WMAC_STATE_IDLE; } @@ -1556,12 +1556,12 @@ s_vMgrRxAuthenSequence_2( pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN; // send the frame if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx failed.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx failed.\n"); } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx ...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx ...\n"); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:rx Auth_reply sequence_2 status error ...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:rx Auth_reply sequence_2 status error ...\n"); if ( pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT ) { // spin_unlock_irq(&pDevice->lock); // vCommandTimerWait((HANDLE)pDevice, 0); @@ -1571,7 +1571,7 @@ s_vMgrRxAuthenSequence_2( } break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt: rx auth.seq = 2 unknown AuthAlgorithm=%d\n", cpu_to_le16((*(pFrame->pwAuthAlgorithm)))); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt: rx auth.seq = 2 unknown AuthAlgorithm=%d\n", cpu_to_le16((*(pFrame->pwAuthAlgorithm)))); break; } return; @@ -1629,7 +1629,7 @@ s_vMgrRxAuthenSequence_3( pMgmt->sNodeDBTable[uNodeIndex].byAuthSequence = 0; } uStatusCode = WLAN_MGMT_STATUS_SUCCESS; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Challenge text check ok..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Challenge text check ok..\n"); reply: // send auth reply @@ -1662,7 +1662,7 @@ reply: return; } if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_4 tx failed.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_4 tx failed.\n"); } return; @@ -1690,12 +1690,12 @@ s_vMgrRxAuthenSequence_4( { if ( cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS ){ - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (SHAREDKEY) Successful.\n"); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (SHAREDKEY) Successful.\n"); pMgmt->eCurrState = WMAC_STATE_AUTH; timer_expire(pDevice->sTimerCommand, 0); } else{ - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (SHAREDKEY) Failed.\n"); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (SHAREDKEY) Failed.\n"); s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus))) ); pMgmt->eCurrState = WMAC_STATE_IDLE; } @@ -1741,14 +1741,14 @@ s_vMgrRxDisassociation( BSSvRemoveOneNode(pDevice, uNodeIndex); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx disassoc, sta not found\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx disassoc, sta not found\n"); } } else if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ){ sFrame.len = pRxPacket->cbMPDULen; sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; vMgrDecodeDisassociation(&sFrame); - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason))); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason))); //TODO: do something let upper layer know or //try to send associate packet again because of inactivity timeout // if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { @@ -1822,7 +1822,7 @@ s_vMgrRxDeauthentication( BSSvRemoveOneNode(pDevice, uNodeIndex); } else { - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Rx deauth, sta not found\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Rx deauth, sta not found\n"); } } else { @@ -1830,7 +1830,7 @@ s_vMgrRxDeauthentication( sFrame.len = pRxPacket->cbMPDULen; sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; vMgrDecodeDeauthen(&sFrame); - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP deauthed me, reason=%d.\n", cpu_to_le16((*(sFrame.pwReason)))); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP deauthed me, reason=%d.\n", cpu_to_le16((*(sFrame.pwReason)))); // TODO: update BSS list for specific BSSID if pre-authentication case if (IS_ETH_ADDRESS_EQUAL(sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID)) { if (pMgmt->eCurrState >= WMAC_STATE_AUTHPENDING) { @@ -1972,7 +1972,7 @@ s_vMgrRxBeacon( (sFrame.pwCapInfo == 0) || (sFrame.pSSID == 0) || (sFrame.pSuppRates == 0) ) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n"); return; }; @@ -2008,7 +2008,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) pBSSList = BSSpAddrIsInBSSList((HANDLE)pDevice, sFrame.pHdr->sA3.abyAddr3, sFrame.pSSID); if (pBSSList == NULL) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon/insert: RxChannel = : %d\n", byCurrChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon/insert: RxChannel = : %d\n", byCurrChannel); BSSbInsertToBSSList((HANDLE)pDevice, sFrame.pHdr->sA3.abyAddr3, *sFrame.pqwTimestamp, @@ -2029,7 +2029,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ); } else { -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"update bcn: RxChannel = : %d\n", byCurrChannel); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"update bcn: RxChannel = : %d\n", byCurrChannel); BSSbUpdateToBSSList((HANDLE)pDevice, *sFrame.pqwTimestamp, *sFrame.pwBeaconInterval, @@ -2106,7 +2106,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if (pMgmt->sNodeDBTable[0].uInActiveCount != 0) { pMgmt->sNodeDBTable[0].uInActiveCount = 0; - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BCN:Wake Count= [%d]\n", pMgmt->wCountToWakeUp); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BCN:Wake Count= [%d]\n", pMgmt->wCountToWakeUp); } } // check if SSID the same @@ -2195,7 +2195,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) } } -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon 2 \n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon 2 \n"); // check if CF field exisit if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) { if (sFrame.pCFParms->wCFPDurRemaining > 0) { @@ -2276,23 +2276,23 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) (pMgmt->bMulticastTIM && (pMgmt->byDTIMCount == 0))) { pMgmt->bInTIMWake = TRUE; // send out ps-poll packet -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:In TIM\n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:In TIM\n"); if (pMgmt->bInTIM) { PSvSendPSPOLL((PSDevice)pDevice); -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:PS-POLL sent..\n"); }; } else { pMgmt->bInTIMWake = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Not In TIM..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Not In TIM..\n"); if (pDevice->bPWBitOn == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n"); if (PSbSendNullPacket(pDevice)) pDevice->bPWBitOn = TRUE; } if(PSbConsiderPowerDown(pDevice, FALSE, FALSE)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); }; } @@ -2369,7 +2369,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // if other stations jointed, indicate connect to upper layer.. if (pMgmt->eCurrState == WMAC_STATE_STARTED) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Current IBSS State: [Started]........to: [Jointed] \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Current IBSS State: [Started]........to: [Jointed] \n"); pMgmt->eCurrState = WMAC_STATE_JOINTED; pDevice->bLinkPass = TRUE; if (netif_queue_stopped(pDevice->dev)){ @@ -2397,7 +2397,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, WLAN_RATES_MAXLEN_11B); // set HW beacon interval and re-synchronizing.... - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rejoining to Other Adhoc group with same SSID........\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rejoining to Other Adhoc group with same SSID........\n"); VNSvOutPortW(pDevice->PortOffset + MAC_REG_BI, pMgmt->wCurrBeaconPeriod); CARDbUpdateTSF(pDevice, pRxPacket->byRxRate, qwTimestamp, qwLocalTSF); CARDvUpdateNextTBTT(pDevice->PortOffset, qwTimestamp, pMgmt->wCurrBeaconPeriod); @@ -2466,7 +2466,7 @@ vMgrCreateOwnIBSS( BYTE abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; WORD wSuppRate; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create Basic Service Set .......\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create Basic Service Set .......\n"); if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) { if ((pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) && @@ -2583,7 +2583,7 @@ vMgrCreateOwnIBSS( if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { // AP mode BSSID = MAC addr memcpy(pMgmt->abyCurrBSSID, pMgmt->abyMACAddr, WLAN_ADDR_LEN); - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO"AP beacon created BSSID:%02x-%02x-%02x-%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO"AP beacon created BSSID:%02x-%02x-%02x-%02x-%02x-%02x \n", pMgmt->abyCurrBSSID[0], pMgmt->abyCurrBSSID[1], pMgmt->abyCurrBSSID[2], @@ -2612,7 +2612,7 @@ vMgrCreateOwnIBSS( pMgmt->abyCurrBSSID[0] |= IEEE_ADDR_UNIVERSAL; - DEVICE_PRT(MSG_LEVEL_INFO, KERN_INFO"Adhoc beacon created bssid:%02x-%02x-%02x-%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO"Adhoc beacon created bssid:%02x-%02x-%02x-%02x-%02x-%02x \n", pMgmt->abyCurrBSSID[0], pMgmt->abyCurrBSSID[1], pMgmt->abyCurrBSSID[2], @@ -2743,7 +2743,7 @@ vMgrJoinBSSBegin( if (ii == MAX_BSS_NUM) { *pStatus = CMD_STATUS_RESOURCES; - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n"); return; }; @@ -2759,11 +2759,11 @@ vMgrJoinBSSBegin( if (pCurr == NULL){ *pStatus = CMD_STATUS_RESOURCES; pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID); return; }; - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n"); if (WLAN_GET_CAP_INFO_ESS(cpu_to_le16(pCurr->wCapInfo))){ if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA)||(pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK)) { @@ -2772,14 +2772,14 @@ vMgrJoinBSSBegin( /* if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) { if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); // encryption mode error pMgmt->eCurrState = WMAC_STATE_IDLE; return; } } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) { if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); // encryption mode error pMgmt->eCurrState = WMAC_STATE_IDLE; return; @@ -2866,10 +2866,10 @@ vMgrJoinBSSBegin( // This should only works for WPA2 BSS, and WPA2 BSS check must be done before. if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) { BOOL bResult = bAdd_PMKID_Candidate((HANDLE)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult); if (bResult == FALSE) { vFlush_PMKID_Candidate((HANDLE)pDevice); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 4\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 4\n"); bAdd_PMKID_Candidate((HANDLE)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); } } @@ -2877,11 +2877,11 @@ vMgrJoinBSSBegin( // Preamble type auto-switch: if AP can receive short-preamble cap, // we can turn on too. - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join ESS\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join ESS\n"); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"End of Join AP -- A/B/G Action\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"End of Join AP -- A/B/G Action\n"); } else { pMgmt->eCurrState = WMAC_STATE_IDLE; @@ -2949,7 +2949,7 @@ vMgrJoinBSSBegin( // pDevice->bLinkPass = TRUE; // memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join IBSS ok:%02x-%02x-%02x-%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join IBSS ok:%02x-%02x-%02x-%02x-%02x-%02x \n", pMgmt->abyCurrBSSID[0], pMgmt->abyCurrBSSID[1], pMgmt->abyCurrBSSID[2], @@ -3008,7 +3008,7 @@ s_vMgrSynchBSS ( pDevice->eEncryptionStatus, &(pMgmt->byCSSPK), &(pMgmt->byCSSGK)) == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "s_bCipherMatch Fail .......\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "s_bCipherMatch Fail .......\n"); return; } @@ -3046,7 +3046,7 @@ s_vMgrSynchBSS ( MACvReadBSSIDAddress(pDevice->PortOffset, pMgmt->abyCurrBSSID); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Sync:set CurrBSSID address = %02x-%02x-%02x=%02x-%02x-%02x\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Sync:set CurrBSSID address = %02x-%02x-%02x=%02x-%02x-%02x\n", pMgmt->abyCurrBSSID[0], pMgmt->abyCurrBSSID[1], pMgmt->abyCurrBSSID[2], @@ -3110,12 +3110,12 @@ s_vMgrSynchBSS ( pMgmt->abyCurrSuppRates, pMgmt->abyCurrExtSuppRates ) != TRUE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Phy Mode Fail [%d]\n", ePhyType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Phy Mode Fail [%d]\n", ePhyType); return; } // set channel and clear NAV if (CARDbSetChannel(pMgmt->pAdapter, pCurr->uChannel) == FALSE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel); return; } @@ -3128,7 +3128,7 @@ s_vMgrSynchBSS ( } if (pDevice->byBBVGANew != pDevice->byBBVGACurrent) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RSSI[%d] NewGain[%d] OldGain[%d] \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RSSI[%d] NewGain[%d] OldGain[%d] \n", (int)pCurr->ldBmMAX, pDevice->byBBVGANew, pDevice->byBBVGACurrent); printk("RSSI[%d] NewGain[%d] OldGain[%d] \n", (int)pCurr->ldBmMAX, pDevice->byBBVGANew, pDevice->byBBVGACurrent); @@ -3140,7 +3140,7 @@ s_vMgrSynchBSS ( pMgmt->uCurrChannel = pCurr->uChannel; pMgmt->eCurrentPHYMode = ePhyType; pMgmt->byERPContext = pCurr->sERP.byERP; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Sync:Set to channel = [%d]\n", (INT)pCurr->uChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Sync:Set to channel = [%d]\n", (INT)pCurr->uChannel); *pStatus = CMD_STATUS_SUCCESS; @@ -4395,13 +4395,13 @@ s_vMgrRxProbeResponse( (sFrame.pwCapInfo == 0) || (sFrame.pSSID == 0) || (sFrame.pSuppRates == 0)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p] \n", pRxPacket->p80211Header); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p] \n", pRxPacket->p80211Header); DBG_PORT80(0xCC); return; }; if(sFrame.pSSID->len == 0) - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n"); if (sFrame.pDSParms != 0) { if (byCurrChannel > CB_MAX_CHANNEL_24G) { @@ -4457,7 +4457,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Probe resp/insert: RxChannel = : %d\n", byCurrChannel); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Probe resp/insert: RxChannel = : %d\n", byCurrChannel); BSSbInsertToBSSList((HANDLE)pDevice, sFrame.pHdr->sA3.abyAddr3, *sFrame.pqwTimestamp, @@ -4517,7 +4517,7 @@ s_vMgrRxProbeRequest( sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; vMgrDecodeProbeRequest(&sFrame); /* - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request rx:MAC addr:%02x-%02x-%02x=%02x-%02x-%02x \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request rx:MAC addr:%02x-%02x-%02x=%02x-%02x-%02x \n", sFrame.pHdr->sA3.abyAddr2[0], sFrame.pHdr->sA3.abyAddr2[1], sFrame.pHdr->sA3.abyAddr2[2], @@ -4560,10 +4560,10 @@ s_vMgrRxProbeRequest( /* send the frame */ Status = csMgmt_xmit(pDevice, pTxPacket); if (Status != CMD_STATUS_PENDING) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx failed\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx failed\n"); } else { -// DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx sending..\n"); +// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx sending..\n"); } } } @@ -4613,7 +4613,7 @@ vMgrRxManagePacket( case WLAN_FSTYPE_ASSOCREQ: // Frame Clase = 2 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocreq\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocreq\n"); if (eNodeState < NODE_AUTH) { // send deauth notification // reason = (6) class 2 received from nonauth sta @@ -4623,7 +4623,7 @@ vMgrRxManagePacket( (6), &Status ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 1\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 1\n"); } else { s_vMgrRxAssocRequest(pDevice, pMgmt, pRxPacket, uNodeIndex); @@ -4632,14 +4632,14 @@ vMgrRxManagePacket( case WLAN_FSTYPE_ASSOCRESP: // Frame Clase = 2 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp1\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp1\n"); s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, FALSE); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp2\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp2\n"); break; case WLAN_FSTYPE_REASSOCREQ: // Frame Clase = 2 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocreq\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocreq\n"); // Todo: reassoc if (eNodeState < NODE_AUTH) { // send deauth notification @@ -4650,7 +4650,7 @@ vMgrRxManagePacket( (6), &Status ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 2\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 2\n"); } s_vMgrRxReAssocRequest(pDevice, pMgmt, pRxPacket, uNodeIndex); @@ -4658,26 +4658,26 @@ vMgrRxManagePacket( case WLAN_FSTYPE_REASSOCRESP: // Frame Clase = 2 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocresp\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocresp\n"); s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, TRUE); break; case WLAN_FSTYPE_PROBEREQ: // Frame Clase = 0 - //DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx probereq\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx probereq\n"); s_vMgrRxProbeRequest(pDevice, pMgmt, pRxPacket); break; case WLAN_FSTYPE_PROBERESP: // Frame Clase = 0 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx proberesp\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx proberesp\n"); s_vMgrRxProbeResponse(pDevice, pMgmt, pRxPacket); break; case WLAN_FSTYPE_BEACON: // Frame Clase = 0 - // DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); + // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); if (pMgmt->eScanState != WMAC_NO_SCANNING) { bInScan = TRUE; }; @@ -4686,12 +4686,12 @@ vMgrRxManagePacket( case WLAN_FSTYPE_ATIM: // Frame Clase = 1 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx atim\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx atim\n"); break; case WLAN_FSTYPE_DISASSOC: // Frame Clase = 2 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx disassoc\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx disassoc\n"); if (eNodeState < NODE_AUTH) { // send deauth notification // reason = (6) class 2 received from nonauth sta @@ -4701,25 +4701,25 @@ vMgrRxManagePacket( (6), &Status ); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 3\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 3\n"); } s_vMgrRxDisassociation(pDevice, pMgmt, pRxPacket); break; case WLAN_FSTYPE_AUTHEN: // Frame Clase = 1 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx authen\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx authen\n"); s_vMgrRxAuthentication(pDevice, pMgmt, pRxPacket); break; case WLAN_FSTYPE_DEAUTHEN: // Frame Clase = 1 - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx deauthen\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx deauthen\n"); s_vMgrRxDeauthentication(pDevice, pMgmt, pRxPacket); break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx unknown mgmt\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx unknown mgmt\n"); } return; @@ -4802,46 +4802,46 @@ s_vMgrLogStatus( { switch( wStatus ){ case WLAN_MGMT_STATUS_UNSPEC_FAILURE: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Unspecified error.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Unspecified error.\n"); break; case WLAN_MGMT_STATUS_CAPS_UNSUPPORTED: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Can't support all requested capabilities.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Can't support all requested capabilities.\n"); break; case WLAN_MGMT_STATUS_REASSOC_NO_ASSOC: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Reassoc denied, can't confirm original Association.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Reassoc denied, can't confirm original Association.\n"); break; case WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, undefine in spec\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, undefine in spec\n"); break; case WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Peer doesn't support authen algorithm.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Peer doesn't support authen algorithm.\n"); break; case WLAN_MGMT_STATUS_RX_AUTH_NOSEQ: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen frame received out of sequence.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen frame received out of sequence.\n"); break; case WLAN_MGMT_STATUS_CHALLENGE_FAIL: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen rejected, challenge failure.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen rejected, challenge failure.\n"); break; case WLAN_MGMT_STATUS_AUTH_TIMEOUT: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen rejected, timeout waiting for next frame.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen rejected, timeout waiting for next frame.\n"); break; case WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, AP too busy.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, AP too busy.\n"); break; case WLAN_MGMT_STATUS_ASSOC_DENIED_RATES: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we haven't enough basic rates.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we haven't enough basic rates.\n"); break; case WLAN_MGMT_STATUS_ASSOC_DENIED_SHORTPREAMBLE: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support short preamble.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support short preamble.\n"); break; case WLAN_MGMT_STATUS_ASSOC_DENIED_PBCC: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support PBCC.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support PBCC.\n"); break; case WLAN_MGMT_STATUS_ASSOC_DENIED_AGILITY: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support channel agility.\n"); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support channel agility.\n"); break; default: - DEVICE_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Unknown status code %d.\n", wStatus); + DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Unknown status code %d.\n", wStatus); break; } } @@ -4874,7 +4874,7 @@ bAdd_PMKID_Candidate ( PPMKID_CANDIDATE pCandidateList; UINT ii = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); if ((pDevice == NULL) || (pbyBSSID == NULL) || (psRSNCapObj == NULL)) return FALSE; @@ -4906,7 +4906,7 @@ bAdd_PMKID_Candidate ( } MEMvCopy(pCandidateList->BSSID, pbyBSSID, U_ETHER_ADDR_LEN); pDevice->gsPMKIDCandidate.NumCandidates++; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); return TRUE; } @@ -5024,7 +5024,7 @@ s_bCipherMatch ( } } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%d, %d, %d, %d, EncStatus:%d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%d, %d, %d, %d, EncStatus:%d\n", byMulticastCipher, byCipherMask, pBSSNode->bWPAValid, pBSSNode->bWPA2Valid, EncStatus); // mask our cap. with BSS diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index 87abae464725..93614a06efed 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -139,14 +139,14 @@ WPA_ParseRSN ( WPA_ClearRSN(pBSSList); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA_ParseRSN: [%d]\n", pRSN->len); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA_ParseRSN: [%d]\n", pRSN->len); // information element header makes sense if ((pRSN->len >= 6) // oui1(4)+ver(2) && (pRSN->byElementID == WLAN_EID_RSN_WPA) && MEMEqualMemory(pRSN->abyOUI, abyOUI01, 4) && (pRSN->wVersion == 1)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal RSN\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal RSN\n"); // update each variable if pRSN is long enough to contain the variable if (pRSN->len >= 10) //oui1(4)+ver(2)+GKSuite(4) { @@ -164,13 +164,13 @@ WPA_ParseRSN ( // any vendor checks here pBSSList->byGKType = WPA_NONE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byGKType: %x\n", pBSSList->byGKType); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byGKType: %x\n", pBSSList->byGKType); } if (pRSN->len >= 12) //oui1(4)+ver(2)+GKS(4)+PKSCnt(2) { j = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %ld\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType)); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %ld\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType)); for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(BYTE)); i++) { if(pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i) if (MEMEqualMemory(pRSN->PKSList[i].abyOUI, abyOUI00, 4)) @@ -190,18 +190,18 @@ WPA_ParseRSN ( //DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1])); } //for pBSSList->wPKCount = (WORD)j; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount); } m = pRSN->wPKCount; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"m: %d\n", m); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+m*4: %d\n", 14+m*4); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"m: %d\n", m); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+m*4: %d\n", 14+m*4); if (pRSN->len >= 14+m*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2) // overlay IE_RSN_Auth structure into correct place pIE_RSN_Auth = (PWLAN_IE_RSN_AUTH) pRSN->PKSList[m].abyOUI; j = 0; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %ld\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %ld\n", pIE_RSN_Auth->wAuthCount, sizeof(pBSSList->abyAuthType)); for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(BYTE)); i++) { if(pRSN->len >= 14+4+(m+i)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*i) @@ -219,15 +219,15 @@ WPA_ParseRSN ( } if(j > 0) pBSSList->wAuthCount = (WORD)j; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount); } if (pIE_RSN_Auth != NULL) { n = pIE_RSN_Auth->wAuthCount; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"n: %d\n", n); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"n: %d\n", n); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4); if(pRSN->len+2 >= 14+4+(m+n)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*n)+Cap(2) pbyCaps = (PBYTE)pIE_RSN_Auth->AuthKSList[n].abyOUI; diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index e2fdb331069e..82c972dbfbfe 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -127,7 +127,7 @@ WPA2vParseRSN ( PBYTE pbyOUI; BOOL bUseGK = FALSE; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len); WPA2_ClearRSN(pBSSNode); @@ -147,7 +147,7 @@ WPA2vParseRSN ( if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal 802.11i RSN\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal 802.11i RSN\n"); pbyOUI = &(pRSN->abyRSN[0]); if (MEMEqualMemory(pbyOUI, abyOUIWEP40, 4)) @@ -165,7 +165,7 @@ WPA2vParseRSN ( // any vendor checks here pBSSNode->byCSSGK = WLAN_11i_CSS_UNKNOWN; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"802.11i CSS: %X\n", pBSSNode->byCSSGK); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"802.11i CSS: %X\n", pBSSNode->byCSSGK); if (pRSN->len == 6) { pBSSNode->bWPA2Valid = TRUE; @@ -199,7 +199,7 @@ WPA2vParseRSN ( pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_UNKNOWN; } pbyOUI += 4; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyCSSPK[%d]: %X\n", j-1, pBSSNode->abyCSSPK[j-1]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyCSSPK[%d]: %X\n", j-1, pBSSNode->abyCSSPK[j-1]); } else break; } //for @@ -219,7 +219,7 @@ WPA2vParseRSN ( return; } pBSSNode->wCSSPKCount = (WORD)j; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount); } m = *((PWORD) &(pRSN->abyRSN[4])); @@ -237,12 +237,12 @@ WPA2vParseRSN ( else // any vendor checks here pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_UNKNOWN; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyAKMSSAuthType[%d]: %X\n", j-1, pBSSNode->abyAKMSSAuthType[j-1]); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyAKMSSAuthType[%d]: %X\n", j-1, pBSSNode->abyAKMSSAuthType[j-1]); } else break; } pBSSNode->wAKMSSAuthCount = (WORD)j; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount); n = *((PWORD) &(pRSN->abyRSN[6+4*m]));; if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2) diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index cc4f0adb963e..ec2839a70a20 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -130,7 +130,7 @@ static int wpa_init_wpadev(PSDevice pDevice) pDevice->wpadev->mem_end = dev->mem_end; ret = register_netdev(pDevice->wpadev); if (ret) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdev(WPA) failed!\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: register_netdev(WPA) failed!\n", dev->name); free_netdev(pDevice->wpadev); return -1; @@ -142,7 +142,7 @@ static int wpa_init_wpadev(PSDevice pDevice) return -ENOMEM; } - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdev %s for WPA management\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Registered netdev %s for WPA management\n", dev->name, pDevice->wpadev->name); return 0; @@ -171,7 +171,7 @@ static int wpa_release_wpadev(PSDevice pDevice) } if (pDevice->wpadev) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", pDevice->dev->name, pDevice->wpadev->name); unregister_netdev(pDevice->wpadev); free_netdev(pDevice->wpadev); @@ -241,7 +241,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) if (param->u.wpa_key.alg_name > WPA_ALG_CCMP) return -EINVAL; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "param->u.wpa_key.alg_name = %d \n", param->u.wpa_key.alg_name); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "param->u.wpa_key.alg_name = %d \n", param->u.wpa_key.alg_name); if (param->u.wpa_key.alg_name == WPA_ALG_NONE) { pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; pDevice->bEncryptionEnable = FALSE; @@ -322,7 +322,7 @@ spin_lock_irq(&pDevice->lock); } if (param->u.wpa_key.key_index >= MAX_GROUP_KEY) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return dwKeyIndex > 3\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return dwKeyIndex > 3\n"); return -EINVAL; } @@ -365,7 +365,7 @@ spin_lock_irq(&pDevice->lock); (param->u.wpa_key.key_len != MAX_KEY_LEN)) { // TKIP Key must be 256 bits //DBG_PRN_WLAN03(("return NDIS_STATUS_INVALID_DATA - TKIP Key must be 256 bits\n")); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return- TKIP Key must be 256 bits!\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return- TKIP Key must be 256 bits!\n"); return -EINVAL; } // Check AES key length @@ -379,7 +379,7 @@ spin_lock_irq(&pDevice->lock); // spin_lock_irq(&pDevice->lock); if (IS_BROADCAST_ADDRESS(¶m->addr[0]) || (param->addr == NULL)) { // If IS_BROADCAST_ADDRESS, set the key as every key entry's group key. - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Groupe Key Assign.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Groupe Key Assign.\n"); if ((KeybSetAllGroupKey(&(pDevice->sKey), dwKeyIndex, @@ -397,7 +397,7 @@ spin_lock_irq(&pDevice->lock); byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID) == TRUE) ) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n"); } else { //DBG_PRN_WLAN03(("return NDIS_STATUS_INVALID_DATA -KeybSetDefaultKey Fail.0\n")); @@ -406,11 +406,11 @@ spin_lock_irq(&pDevice->lock); } } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Assign.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Assign.\n"); // BSSID not 0xffffffffffff // Pairwise Key can't be WEP if (byKeyDecMode == KEY_CTL_WEP) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key can't be WEP\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key can't be WEP\n"); //spin_unlock_irq(&pDevice->lock); return -EINVAL; } @@ -430,7 +430,7 @@ spin_lock_irq(&pDevice->lock); byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID) == TRUE) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n"); } else { // Key Table Full @@ -455,7 +455,7 @@ spin_lock_irq(&pDevice->lock); //spin_unlock_irq(&pDevice->lock); /* - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx \n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " key=%x-%x-%x-%x-%x-xxxxx \n", pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][0], pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][1], pMgmt->sNodeDBTable[iNodeIndex].abyWepKey[byKeyIndex][2], @@ -752,7 +752,7 @@ static int wpa_get_scan(PSDevice pDevice, ret = -EFAULT; }; param->u.scan_results.scan_count = count; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count) + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count) kfree(pBuf); return ret; @@ -785,12 +785,12 @@ static int wpa_set_associate(PSDevice pDevice, BOOL bWepEnabled=FALSE; // set key type & algorithm - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise_suite = %d\n", param->u.wpa_associate.pairwise_suite); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "group_suite = %d\n", param->u.wpa_associate.group_suite); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "key_mgmt_suite = %d\n", param->u.wpa_associate.key_mgmt_suite); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "auth_alg = %d\n", param->u.wpa_associate.auth_alg); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "mode = %d\n", param->u.wpa_associate.mode); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ie_len = %d\n", param->u.wpa_associate.wpa_ie_len); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise_suite = %d\n", param->u.wpa_associate.pairwise_suite); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "group_suite = %d\n", param->u.wpa_associate.group_suite); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "key_mgmt_suite = %d\n", param->u.wpa_associate.key_mgmt_suite); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "auth_alg = %d\n", param->u.wpa_associate.auth_alg); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "mode = %d\n", param->u.wpa_associate.mode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ie_len = %d\n", param->u.wpa_associate.wpa_ie_len); if (param->u.wpa_associate.wpa_ie && @@ -943,59 +943,59 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p) switch (param->cmd) { case VIAWGET_SET_WPA: ret = wpa_set_wpa(pDevice, param); - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_WPA \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_WPA \n"); break; case VIAWGET_SET_KEY: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_KEY \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_KEY \n"); spin_lock_irq(&pDevice->lock); ret = wpa_set_keys(pDevice, param, FALSE); spin_unlock_irq(&pDevice->lock); break; case VIAWGET_SET_SCAN: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_SCAN \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_SCAN \n"); ret = wpa_set_scan(pDevice, param); break; case VIAWGET_GET_SCAN: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_SCAN\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_SCAN\n"); ret = wpa_get_scan(pDevice, param); wpa_ioctl = 1; break; case VIAWGET_GET_SSID: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_SSID \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_SSID \n"); ret = wpa_get_ssid(pDevice, param); wpa_ioctl = 1; break; case VIAWGET_GET_BSSID: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_BSSID \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_GET_BSSID \n"); ret = wpa_get_bssid(pDevice, param); wpa_ioctl = 1; break; case VIAWGET_SET_ASSOCIATE: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_ASSOCIATE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_ASSOCIATE \n"); ret = wpa_set_associate(pDevice, param); break; case VIAWGET_SET_DISASSOCIATE: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DISASSOCIATE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DISASSOCIATE \n"); ret = wpa_set_disassociate(pDevice, param); break; case VIAWGET_SET_DROP_UNENCRYPT: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DROP_UNENCRYPT \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DROP_UNENCRYPT \n"); break; case VIAWGET_SET_DEAUTHENTICATE: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DEAUTHENTICATE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_SET_DEAUTHENTICATE \n"); break; default: - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ioctl: unknown cmd=%d\n", + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ioctl: unknown cmd=%d\n", param->cmd); return -EOPNOTSUPP; break; diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c index 219ae21654e2..d16771e56d0f 100644 --- a/drivers/staging/vt6655/wroute.c +++ b/drivers/staging/vt6655/wroute.c @@ -83,7 +83,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI PSTxDesc pHeadTD, pLastTD; UINT cbFrameBodySize; UINT uMACfragNum; - BYTE byPktTyp; + BYTE byPktType; BOOL bNeedEncryption = FALSE; SKeyItem STempKey; PSKeyItem pTransmitKey = NULL; @@ -95,7 +95,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI if (AVAIL_TD(pDevice, TYPE_AC0DMA)<=0) { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Relay can't allocate TD1..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Relay can't allocate TD1..\n"); return FALSE; } @@ -118,9 +118,9 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI pbyBSSID = pDevice->abyBroadcastAddr; if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) { pTransmitKey = NULL; - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); } else { - DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); } } @@ -144,7 +144,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI if (uMACfragNum > AVAIL_TD(pDevice,TYPE_AC0DMA)) { return FALSE; } - byPktTyp = (BYTE)pDevice->byPacketType; + byPktType = (BYTE)pDevice->byPacketType; if (pDevice->bFixRate) { if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { @@ -170,9 +170,9 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeI } if (pDevice->wCurrentRate <= RATE_11M) - byPktTyp = PK_TYPE_11B; + byPktType = PK_TYPE_11B; - vGenerateFIFOHeader(pDevice, byPktTyp, pDevice->pbyTmpBuff, bNeedEncryption, + vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption, cbFrameBodySize, TYPE_AC0DMA, pHeadTD, &pDevice->sTxEthHeader, pbySkbData, pTransmitKey, uNodeIndex, &uMACfragNum, -- cgit v1.2.3-59-g8ed1b From 612822f5dd1638de442cf50eb9da54632fba0e66 Mon Sep 17 00:00:00 2001 From: Jim Lieb Date: Wed, 12 Aug 2009 14:54:03 -0700 Subject: Staging: vt665x: Text janitor in prep for driver merge, part 2 Text only changes to remove textual differences between the vt6655 and vt6656 trees in prep for driver merge. Signed-off-by: Jim Lieb Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/80211hdr.h | 5 ++- drivers/staging/vt6655/80211mgr.c | 8 ---- drivers/staging/vt6655/80211mgr.h | 6 +-- drivers/staging/vt6655/baseband.c | 10 +++-- drivers/staging/vt6655/baseband.h | 19 ++++----- drivers/staging/vt6655/bssdb.c | 48 +++++++++++----------- drivers/staging/vt6655/bssdb.h | 10 +++-- drivers/staging/vt6655/desc.h | 4 ++ drivers/staging/vt6655/device.h | 28 ++++++------- drivers/staging/vt6655/device_cfg.h | 5 ++- drivers/staging/vt6655/dpc.c | 21 ++++++---- drivers/staging/vt6655/dpc.h | 2 +- drivers/staging/vt6655/hostap.c | 7 +++- drivers/staging/vt6655/iocmd.h | 14 ++++--- drivers/staging/vt6655/ioctl.c | 10 ++--- drivers/staging/vt6655/iowpa.h | 3 +- drivers/staging/vt6655/iwctl.c | 79 +++++++++++++++++-------------------- drivers/staging/vt6655/iwctl.h | 1 + drivers/staging/vt6655/kcompat.h | 5 +-- drivers/staging/vt6655/key.c | 1 + drivers/staging/vt6655/mac.c | 7 ++++ drivers/staging/vt6655/mac.h | 6 +-- drivers/staging/vt6655/power.c | 1 + drivers/staging/vt6655/power.h | 1 - drivers/staging/vt6655/rc4.c | 5 ++- drivers/staging/vt6655/rf.c | 1 + drivers/staging/vt6655/rxtx.h | 2 +- drivers/staging/vt6655/srom.h | 8 +--- drivers/staging/vt6655/tpci.h | 2 + drivers/staging/vt6655/ttype.h | 5 ++- drivers/staging/vt6655/vntwifi.h | 3 +- drivers/staging/vt6655/wcmd.c | 12 ++++-- drivers/staging/vt6655/wcmd.h | 8 ++-- drivers/staging/vt6655/wmgr.c | 55 ++++++++++---------------- drivers/staging/vt6655/wpa2.h | 5 +-- drivers/staging/vt6655/wpactl.c | 24 ++++------- drivers/staging/vt6655/wpactl.h | 1 + 37 files changed, 216 insertions(+), 216 deletions(-) (limited to 'drivers/staging/vt6655/power.c') diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h index b4bbb8d3c243..84cb1d020cb7 100644 --- a/drivers/staging/vt6655/80211hdr.h +++ b/drivers/staging/vt6655/80211hdr.h @@ -16,10 +16,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: 80211hdr.h * - * Purpose: Defines the macros, types, and functions for dealing - * with 802.11 MAC headers. + * Purpose: 802.11 MAC headers related pre-defines and macros. + * * * Author: Lyndon Chen * diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index 54fc81ea96f6..da7c2ab29bad 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -16,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * * File: 80211mgr.c * * Purpose: Handles the 802.11 management support functions @@ -747,7 +746,6 @@ vMgrDecodeProbeResponse( ) { PWLAN_IE pItem; -// BYTE byCheckEID = 0; pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf; @@ -765,12 +763,6 @@ vMgrDecodeProbeResponse( + WLAN_PROBERESP_OFF_SSID); while( ((PBYTE)pItem) < (pFrame->pBuf + pFrame->len) ) { - /* - if (pItem->byElementID < byCheckEID) - break; - else - byCheckEID = pItem->byElementID; -*/ switch (pItem->byElementID) { case WLAN_EID_SSID: if (pFrame->pSSID == NULL) diff --git a/drivers/staging/vt6655/80211mgr.h b/drivers/staging/vt6655/80211mgr.h index 8ec63ca23ffc..18c9e3ad7fde 100644 --- a/drivers/staging/vt6655/80211mgr.h +++ b/drivers/staging/vt6655/80211mgr.h @@ -16,10 +16,11 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: 80211mgr.h * - * Purpose: Defines the macros, types, and functions for dealing - * with 802.11 management frames. + * Purpose: 802.11 managment frames pre-defines. + * * * Author: Lyndon Chen * @@ -273,7 +274,6 @@ typedef struct _WLAN_IE_FH_PARMS { BYTE byHopIndex; } WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS; - // DS Parameter Set #pragma pack(1) typedef struct tagWLAN_IE_DS_PARMS { diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 30c707d127fc..02cf0b735702 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: baseband.c * * Purpose: Implement functions to access baseband @@ -44,8 +45,11 @@ * Add the comments. * 09-01-2003 Bryan YC Fan: RF & BB tables updated. * Modified BBvLoopbackOn & BBvLoopbackOff(). + * + * */ + #if !defined(__TMACRO_H__) #include "tmacro.h" #endif @@ -80,6 +84,7 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Variables --------------------------*/ + /*--------------------- Static Functions --------------------------*/ /*--------------------- Export Variables --------------------------*/ @@ -1806,6 +1811,7 @@ BBuGetFrameTime ( if (uRateIdx > RATE_54M) { + ASSERT(0); return 0; } @@ -2897,8 +2903,6 @@ TimerSQ3CallBack ( PSDevice pDevice = (PSDevice)hDeviceContext; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack..."); - - spin_lock_irq(&pDevice->lock); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"3.[%08x][%08x], %d\n",(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->uDiversityCnt); @@ -2915,8 +2919,8 @@ TimerSQ3CallBack ( add_timer(&pDevice->TimerSQ3Tmax3); add_timer(&pDevice->TimerSQ3Tmax2); - spin_unlock_irq(&pDevice->lock); + spin_unlock_irq(&pDevice->lock); return; } diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h index 09cf4f961ac2..6fb4e5ff8862 100644 --- a/drivers/staging/vt6655/baseband.h +++ b/drivers/staging/vt6655/baseband.h @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: baseband.h * * Purpose: Implement functions to access baseband @@ -26,11 +27,9 @@ * */ - #ifndef __BASEBAND_H__ #define __BASEBAND_H__ - #if !defined(__TTYPE_H__) #include "ttype.h" #endif @@ -106,12 +105,11 @@ #define TOP_RATE_2M 0x00200000 #define TOP_RATE_1M 0x00100000 + /*--------------------- Export Types ------------------------------*/ /*--------------------- Export Macros ------------------------------*/ - - #define BBvClearFOE(dwIoBase) \ { \ BBbWriteEmbeded(dwIoBase, 0xB1, 0); \ @@ -173,13 +171,15 @@ VOID BBvSetDeepSleep(DWORD_PTR dwIoBase, BYTE byLocalID); VOID BBvExitDeepSleep(DWORD_PTR dwIoBase, BYTE byLocalID); // timer for antenna diversity + VOID -TimerSQ3CallBack( - IN HANDLE hDeviceContext +TimerSQ3CallBack ( + IN HANDLE hDeviceContext ); + VOID TimerState1CallBack( - IN HANDLE hDeviceContext + IN HANDLE hDeviceContext ); void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3); @@ -188,11 +188,8 @@ BBvClearAntDivSQ3Value (PSDevice pDevice); #ifdef __cplusplus -} /* End of extern "C" { */ +} /* End of extern "C" { */ #endif /* __cplusplus */ #endif // __BASEBAND_H__ - - - diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 3833ea634150..0c5b72f77940 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -170,7 +170,7 @@ BSSpSearchBSSList( IN HANDLE hDeviceContext, IN PBYTE pbyDesireBSSID, IN PBYTE pbyDesireSSID, - IN CARD_PHY_TYPE ePhyType + IN CARD_PHY_TYPE ePhyType ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -187,7 +187,7 @@ BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; *pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2), *(pbyDesireBSSID+3),*(pbyDesireBSSID+4),*(pbyDesireBSSID+5)); if ((!IS_BROADCAST_ADDRESS(pbyDesireBSSID)) && - (memcmp(pbyDesireBSSID, ZeroBSSID, 6)!= 0)) { + (memcmp(pbyDesireBSSID, ZeroBSSID, 6)!= 0)){ pbyBSSID = pbyDesireBSSID; } } @@ -246,11 +246,11 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; (pSSID->len != ((PWLAN_IE_SSID)pCurrBSS->abySSID)->len)) { // SSID not match skip this BSS continue; - } + } } if (((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) || ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) - ) { + ){ // Type not match skip this BSS DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo); continue; @@ -399,6 +399,7 @@ BSSpAddrIsInBSSList( + /*+ * * Routine Description: @@ -450,7 +451,7 @@ BSSbInsertToBSSList ( } if (ii == MAX_BSS_NUM){ - DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Get free KnowBSS node failed.\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Get free KnowBSS node failed.\n"); return FALSE; } // save the BSS info @@ -575,8 +576,6 @@ BSSbInsertToBSSList ( pIE_Country); } - - if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) { if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) && (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) { @@ -663,6 +662,7 @@ BSSbUpdateToBSSList ( if (pBSSList == NULL) return FALSE; + HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp)); LODWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(LODWORD(qwTimestamp)); pBSSList->wBeaconInterval = cpu_to_le16(wBeaconInterval); @@ -711,7 +711,7 @@ BSSbUpdateToBSSList ( } } - WPA_ClearRSN(pBSSList); //mike update + WPA_ClearRSN(pBSSList); //mike update if (pRSNWPA != NULL) { UINT uLen = pRSNWPA->len + 2; @@ -722,7 +722,7 @@ BSSbUpdateToBSSList ( } } - WPA2_ClearRSN(pBSSList); //mike update + WPA2_ClearRSN(pBSSList); //mike update if (pRSN != NULL) { UINT uLen = pRSN->len + 2; @@ -1067,7 +1067,7 @@ BSSvSecondCallBack( UINT uSleepySTACnt = 0; UINT uNonShortSlotSTACnt = 0; UINT uLongPreambleSTACnt = 0; -viawget_wpa_header* wpahdr; + viawget_wpa_header* wpahdr; //DavidWang spin_lock_irq(&pDevice->lock); @@ -1145,7 +1145,7 @@ start: union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; - printk("wireless_send_event--->SIOCGIWAP(disassociated)\n"); + PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } #endif @@ -1161,14 +1161,13 @@ start: for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) { if (pMgmt->sNodeDBTable[ii].bActive) { - // Increase in-activity counter pMgmt->sNodeDBTable[ii].uInActiveCount++; if (ii > 0) { if (pMgmt->sNodeDBTable[ii].uInActiveCount > MAX_INACTIVE_COUNT) { BSSvRemoveOneNode(pDevice, ii); - DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Inactive timeout [%d] sec, STA index = [%d] remove\n", MAX_INACTIVE_COUNT, ii); continue; } @@ -1200,7 +1199,6 @@ start: } // Rate fallback check - if (!pDevice->bFixRate) { /* if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (ii == 0)) @@ -1300,7 +1298,7 @@ start: pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pCurrSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; -//printk("pCurrSSID=%s\n",pCurrSSID->abySSID); + if ((pMgmt->eCurrMode == WMAC_MODE_STANDBY) || (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) { @@ -1309,17 +1307,18 @@ start: //if (pDevice->bUpdateBBVGA) { // s_vCheckSensitivity((HANDLE) pDevice); //} + if (pDevice->bUpdateBBVGA) { // s_vCheckSensitivity((HANDLE) pDevice); s_vCheckPreEDThreshold((HANDLE)pDevice); } + if ((pMgmt->sNodeDBTable[0].uInActiveCount >= (LOST_BEACON_COUNT/2)) && (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) ) { pDevice->byBBVGANew = pDevice->abyBBVGA[0]; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_BBSENSITIVITY, NULL); } - if (pMgmt->sNodeDBTable[0].uInActiveCount >= LOST_BEACON_COUNT) { pMgmt->sNodeDBTable[0].bActive = FALSE; pMgmt->eCurrMode = WMAC_MODE_STANDBY; @@ -1348,29 +1347,29 @@ start: union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; - printk("wireless_send_event--->SIOCGIWAP(disassociated)\n"); + PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } #endif - } + } } else if (pItemSSID->len != 0) { if (pDevice->uAutoReConnectTime < 10) { pDevice->uAutoReConnectTime++; - #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT + #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //network manager support need not do Roaming scan??? if(pDevice->bWPASuppWextEnabled ==TRUE) pDevice->uAutoReConnectTime = 0; #endif - } else { - //mike use old encryption status for wpa reauthen + //mike use old encryption status for wpa reauthen if(pDevice->bWPADEVUp) pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n"); BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); - pMgmt->eScanType = WMAC_SCAN_ACTIVE; + pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); pDevice->uAutoReConnectTime = 0; @@ -1386,13 +1385,14 @@ start: } else { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scaning ...\n"); - pMgmt->eScanType = WMAC_SCAN_ACTIVE; + pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); pDevice->uAutoReConnectTime = 0; }; } if (pMgmt->eCurrState == WMAC_STATE_JOINTED) { + if (pDevice->bUpdateBBVGA) { //s_vCheckSensitivity((HANDLE) pDevice); s_vCheckPreEDThreshold((HANDLE)pDevice); @@ -1600,6 +1600,7 @@ BSSvUpdateNodeTxCounter( return; + } @@ -1784,3 +1785,4 @@ VOID s_vCheckPreEDThreshold( } return; } + diff --git a/drivers/staging/vt6655/bssdb.h b/drivers/staging/vt6655/bssdb.h index d35616d4883d..b3b538bc7f36 100644 --- a/drivers/staging/vt6655/bssdb.h +++ b/drivers/staging/vt6655/bssdb.h @@ -33,7 +33,9 @@ //#if !defined(__DEVICE_H__) //#include "device.h" //#endif + #include + #if !defined(__80211HDR_H__) #include "80211hdr.h" #endif @@ -103,13 +105,13 @@ typedef enum _NDIS_802_11_NETWORK_TYPE typedef struct tagSERPObject { BOOL bERPExist; BYTE byERP; -} ERPObject, DEF* PERPObject; +}ERPObject, DEF* PERPObject; typedef struct tagSRSNCapObject { BOOL bRSNCapExist; WORD wRSNCap; -} SRSNCapObject, DEF* PSRSNCapObject; +}SRSNCapObject, DEF* PSRSNCapObject; // BSS info(AP) #pragma pack(1) @@ -126,11 +128,12 @@ typedef struct tagKnownBSS { WORD wCapInfo; BYTE abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE byRxRate; + // WORD wATIMWindow; BYTE byRSSIStatCnt; LONG ldBmMAX; LONG ldBmAverage[RSSI_STAT_COUNT]; - LONG ldBmAverRange; + LONG ldBmAverRange; //For any BSSID selection improvment BOOL bSelected; @@ -345,6 +348,7 @@ BSSvSecondCallBack( IN HANDLE hDeviceContext ); + VOID BSSvUpdateNodeTxCounter( IN HANDLE hDeviceContext, diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 087a3e0e2671..8243ecb290c9 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -43,6 +43,9 @@ #endif + + + /*--------------------- Export Definitions -------------------------*/ #define B_OWNED_BY_CHIP 1 // @@ -129,6 +132,7 @@ #define CB_PROTOCOL_RESERVED_SECTION 16 + // if retrys excess 15 times , tx will abort, and // if tx fifo underflow, tx will fail // we should try to resend it diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index 33d5a4452d9d..d95f39444e12 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -81,9 +81,10 @@ // - -// device specific // +// device specific +// + #if !defined(_KCOMPAT_H) #include "kcompat.h" #endif @@ -122,11 +123,9 @@ #if !defined(__DESC_H__) #include "desc.h" #endif - #if !defined(__KEY_H__) #include "key.h" #endif - #if !defined(__MAC_H__) #include "mac.h" #endif @@ -189,6 +188,7 @@ #define BB_VGA_CHANGE_THRESHOLD 16 + #ifndef RUN_AT #define RUN_AT(x) (jiffies+(x)) #endif @@ -312,7 +312,6 @@ typedef struct tagSPMKIDCandidateEvent { PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST]; } SPMKIDCandidateEvent, DEF* PSPMKIDCandidateEvent; - //-- //++ 802.11h related @@ -347,7 +346,6 @@ typedef struct tagSCacheEntry{ BYTE abyAddr2[U_ETHER_ADDR_LEN]; } SCacheEntry, *PSCacheEntry; - typedef struct tagSCache{ /* The receive cache is updated circularly. The next entry to be written is * indexed by the "InPtr". @@ -372,7 +370,6 @@ typedef struct tagSDeFragControlBlock - //flags for options #define DEVICE_FLAGS_IP_ALIGN 0x00000001UL #define DEVICE_FLAGS_PREAMBLE_TYPE 0x00000002UL @@ -417,11 +414,11 @@ typedef struct _RxManagementQueue typedef struct __device_opt { - int nRxDescs0; //Number of RX descriptors0 - int nRxDescs1; //Number of RX descriptors1 - int nTxDescs[2]; //Number of TX descriptors 0, 1 - int int_works; //interrupt limits - int rts_thresh; //rts threshold + int nRxDescs0; //Number of RX descriptors0 + int nRxDescs1; //Number of RX descriptors1 + int nTxDescs[2]; //Number of TX descriptors 0, 1 + int int_works; //interrupt limits + int rts_thresh; //rts threshold int frag_thresh; int data_rate; int channel_num; @@ -609,8 +606,8 @@ typedef struct __device_info { BYTE byERPFlag; WORD wUseProtectCntDown; - BOOL bRadioControlOff; - BOOL bRadioOff; + BOOL bRadioControlOff; + BOOL bRadioOff; BOOL bEnablePSMode; WORD wListenInterval; BOOL bPWBitOn; @@ -666,6 +663,7 @@ typedef struct __device_info { //2007-0925-01by MikeLiu //mike add :save old Encryption NDIS_802_11_WEP_STATUS eOldEncryptionStatus; + SKeyManagement sKey; DWORD dwIVCounter; @@ -674,7 +672,6 @@ typedef struct __device_info { RC4Ext SBox; BYTE abyPRNG[WLAN_WEPMAX_KEYLEN+3]; - BYTE byKeyIndex; UINT uKeyLength; BYTE abyKey[WLAN_WEP232_KEYLEN]; @@ -713,6 +710,7 @@ typedef struct __device_info { BYTE byBBPreEDRSSI; BYTE byBBPreEDIndex; + BOOL bRadioCmd; DWORD dwDiagRefCount; diff --git a/drivers/staging/vt6655/device_cfg.h b/drivers/staging/vt6655/device_cfg.h index 1cbb4440b46f..90b540874b89 100644 --- a/drivers/staging/vt6655/device_cfg.h +++ b/drivers/staging/vt6655/device_cfg.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 1996, 2003 VIA Networking, Inc. All rights reserved. + * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * * File: device_cfg.h * * Purpose: Driver configuration header @@ -100,6 +100,7 @@ struct _version { #ifndef DEVICE_VERSION #define DEVICE_VERSION "1.19.12" #endif + //config file #include #include diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index f7a5a662a3b5..5ab8f943c58a 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -144,6 +144,7 @@ static BOOL s_bAPModeRxCtl( ); + static BOOL s_bAPModeRxData ( IN PSDevice pDevice, IN struct sk_buff* skb, @@ -532,6 +533,8 @@ device_receive_frame ( return FALSE; } } + + if (IS_FC_WEP(pbyFrame)) { BOOL bRxDecryOK = FALSE; @@ -718,7 +721,6 @@ device_receive_frame ( } return FALSE; } - //mike add:station mode check eapol-key challenge---> { BYTE Protocol_Version; //802.1x Authentication @@ -742,8 +744,10 @@ device_receive_frame ( } } + // Data frame Handle + if (pDevice->bEnablePSMode) { if (IS_FC_MOREDATA((skb->data+4))) { if (BITbIsBitOn(*pbyRsr, RSR_ADDROK)) { @@ -890,12 +894,11 @@ device_receive_frame ( pDevice->dev->name); } } - -//2008-0409-07, by Einsn Liu + //2008-0409-07, by Einsn Liu #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //send event to wpa_supplicant //if(pDevice->bWPADevEnable == TRUE) - { + { union iwreq_data wrqu; struct iw_michaelmicfailure ev; int keyidx = pbyFrame[cbHeaderSize+3] >> 6; //top two-bits @@ -917,6 +920,8 @@ device_receive_frame ( } #endif + + if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && @@ -1067,6 +1072,7 @@ device_receive_frame ( } return FALSE; } + return TRUE; } @@ -1429,6 +1435,7 @@ static BOOL s_bHostWepRxEncryption ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0); if (byDecMode == KEY_CTL_TKIP) { + if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (bOnFly == FALSE)) { // Software TKIP // 1. 3253 A @@ -1471,8 +1478,6 @@ static BOOL s_bHostWepRxEncryption ( - - static BOOL s_bAPModeRxData ( IN PSDevice pDevice, IN struct sk_buff* skb, @@ -1487,9 +1492,9 @@ static BOOL s_bAPModeRxData ( BOOL bRelayOnly = FALSE; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; WORD wAID; - struct sk_buff* skbcpy = NULL; + struct sk_buff* skbcpy = NULL; if (FrameSize > CB_MAX_BUF_SIZE) return FALSE; @@ -1498,6 +1503,7 @@ static BOOL s_bAPModeRxData ( if (pMgmt->sNodeDBTable[0].bPSEnable) { skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz); + // if any node in PS mode, buffer packet until DTIM. if (skbcpy == NULL) { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n"); @@ -1507,6 +1513,7 @@ static BOOL s_bAPModeRxData ( skbcpy->len = FrameSize; memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize); skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skbcpy); + pMgmt->sNodeDBTable[0].wEnQueueCnt++; // set tx map pMgmt->abyPSTxMap[0] |= byMask[0]; diff --git a/drivers/staging/vt6655/dpc.h b/drivers/staging/vt6655/dpc.h index 68447c44dc2f..6295c99902e0 100644 --- a/drivers/staging/vt6655/dpc.h +++ b/drivers/staging/vt6655/dpc.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * File: whdr.h + * File: dpc.h * * Purpose: * diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index dfe4e0aa3526..658e1aec8f33 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -109,7 +109,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Enabling hostapd mode\n", dev->name); - pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); + pDevice->apdev = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL); if (pDevice->apdev == NULL) return -ENOMEM; memset(pDevice->apdev, 0, sizeof(struct net_device)); @@ -118,7 +118,7 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) *apdev_priv = *pDevice; memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); - pDevice->apdev->netdev_ops = &apdev_netdev_ops; + pDevice->apdev->netdev_ops = &apdev_netdev_ops; pDevice->apdev->type = ARPHRD_IEEE80211; @@ -288,7 +288,9 @@ static int hostap_add_sta(PSDevice pDevice, WLAN_GET_CAP_INFO_SHORTPREAMBLE(pMgmt->sNodeDBTable[uNodeIndex].wCapInfo); pMgmt->sNodeDBTable[uNodeIndex].wAID = (WORD)param->u.add_sta.aid; + pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer = jiffies; + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Add STA AID= %d \n", pMgmt->sNodeDBTable[uNodeIndex].wAID); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n", param->sta_addr[0], @@ -327,6 +329,7 @@ static int hostap_get_info_sta(PSDevice pDevice, if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) { param->u.get_info_sta.inactive_sec = (jiffies - pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer) / HZ; + //param->u.get_info_sta.txexc = pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts; } else { diff --git a/drivers/staging/vt6655/iocmd.h b/drivers/staging/vt6655/iocmd.h index ada9ee999767..fe34987af546 100644 --- a/drivers/staging/vt6655/iocmd.h +++ b/drivers/staging/vt6655/iocmd.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 1996, 2003 VIA Networking, Inc. All rights reserved. + * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,12 +74,12 @@ typedef enum tagWMAC_CMD { WLAN_CMD_SET_HOST_WEP, WLAN_CMD_SET_WPA, WLAN_CMD_GET_NODE_CNT, - WLAN_CMD_ZONETYPE_SET, + WLAN_CMD_ZONETYPE_SET, WLAN_CMD_GET_NODE_LIST } WMAC_CMD, DEF* PWMAC_CMD; - typedef enum tagWZONETYPE { +typedef enum tagWZONETYPE { ZoneType_USA=0, ZoneType_Japan=1, ZoneType_Europe=2 @@ -106,7 +107,6 @@ typedef enum tagWMAC_CMD { #define WEP_104BIT_LEN 13 #define WEP_232BIT_LEN 16 - // Ioctl interface structure // Command structure // @@ -118,7 +118,6 @@ typedef struct tagSCmdRequest { U16 wCmdCode; } SCmdRequest, *PSCmdRequest; - // // Scan // @@ -145,6 +144,10 @@ typedef struct tagSCmdBSSJoin { } SCmdBSSJoin, *PSCmdBSSJoin; +// +// Zonetype Setting +// + typedef struct tagSCmdZoneTypeSet { BOOL bWrite; @@ -162,7 +165,6 @@ typedef struct tagSWPAResult { } SWPAResult, *PSWPAResult; #endif - typedef struct tagSCmdStartAP { U16 wBSSType; diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index ddcf504cef5b..a4b0c939c40b 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -65,12 +65,11 @@ //static int msglevel =MSG_LEVEL_DEBUG; static int msglevel =MSG_LEVEL_INFO; -/*--------------------- Static Functions --------------------------*/ - #ifdef WPA_SM_Transtatus SWPAResult wpa_Result; #endif +/*--------------------- Static Functions --------------------------*/ /*--------------------- Export Variables --------------------------*/ @@ -101,7 +100,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; LONG ldBm; - pReq->wResult = 0; switch(pReq->wCmdCode) { @@ -250,7 +248,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { break; case WLAN_CMD_SET_WEP: - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_SET_WEP Key. \n"); memset(&sWEPCmd, 0 ,sizeof(SCmdSetWEP)); if (copy_from_user(&sWEPCmd, pReq->data, sizeof(SCmdSetWEP))) { @@ -695,13 +692,13 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { wpa_Result.key_mgmt = 0; wpa_Result.eap_type = 0; wpa_Result.authenticated = FALSE; - pDevice->fWPA_Authened = FALSE; + pDevice->fWPA_Authened = FALSE; if (copy_from_user(&wpa_Result, pReq->data, sizeof(wpa_Result))) { result = -EFAULT; break; } - if(wpa_Result.authenticated==TRUE) { +if(wpa_Result.authenticated==TRUE) { #ifdef SndEvt_ToAPI { union iwreq_data wrqu; @@ -728,7 +725,6 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { break; #endif - default: DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Private command not support..\n"); } diff --git a/drivers/staging/vt6655/iowpa.h b/drivers/staging/vt6655/iowpa.h index 451e2efc5ce5..15e3eb91ac30 100644 --- a/drivers/staging/vt6655/iowpa.h +++ b/drivers/staging/vt6655/iowpa.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 1996, 2003 VIA Networking, Inc. All rights reserved. + * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index e755ae711c29..5b80639ab8c8 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -105,6 +105,7 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) { PSDevice pDevice = netdev_priv(dev); long ldBm; + pDevice->wstats.status = pDevice->eOPMode; #ifdef Calcu_LinkQual #if 0 @@ -161,7 +162,6 @@ static int iwctl_commit(struct net_device *dev, return 0; } - /* * Wireless Handler : get protocol name */ @@ -197,8 +197,8 @@ int iwctl_siwscan(struct net_device *dev, char *extra) { PSDevice pDevice = (PSDevice)netdev_priv(dev); - struct iw_scan_req *req = (struct iw_scan_req *)extra; - PSMgmtObject pMgmt = &(pDevice->sMgmtObj); + PSMgmtObject pMgmt = &(pDevice->sMgmtObj); + struct iw_scan_req *req = (struct iw_scan_req *)extra; BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; PWLAN_IE_SSID pItemSSID=NULL; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWSCAN \n"); @@ -207,14 +207,14 @@ int iwctl_siwscan(struct net_device *dev, if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! //send scan event to wpa_Supplicant union iwreq_data wrqu; - printk("wireless_send_event--->SIOCGIWSCAN(scan done)\n"); + PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n"); memset(&wrqu, 0, sizeof(wrqu)); wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL); return 0; } spin_lock_irq(&pDevice->lock); - BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); + BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); //mike add: active scan OR passive scan OR desire_ssid scan if(wrq->length == sizeof(struct iw_scan_req)) { @@ -230,7 +230,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! else pItemSSID->len = req->essid_len; pMgmt->eScanType = WMAC_SCAN_PASSIVE; - printk("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID, + PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID, ((PWLAN_IE_SSID)abyScanSSID)->len); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); spin_unlock_irq(&pDevice->lock); @@ -246,6 +246,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! } pMgmt->eScanType = WMAC_SCAN_PASSIVE; + //printk("SIOCSIWSCAN:WLAN_CMD_BSSID_SCAN\n"); bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); spin_unlock_irq(&pDevice->lock); @@ -288,18 +289,19 @@ int iwctl_giwscan(struct net_device *dev, break; pBSS = &(pMgmt->sBSSList[jj]); if (pBSS->bActive) { + //ADD mac address memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWAP; iwe.u.ap_addr.sa_family = ARPHRD_ETHER; memcpy(iwe.u.ap_addr.sa_data, pBSS->abyBSSID, WLAN_BSSID_LEN); - current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_ADDR_LEN); + current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_ADDR_LEN); //ADD ssid memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWESSID; pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID; iwe.u.data.length = pItemSSID->len; iwe.u.data.flags = 1; - current_ev = iwe_stream_add_point(info,current_ev,end_buf, &iwe, pItemSSID->abySSID); + current_ev = iwe_stream_add_point(info,current_ev,end_buf, &iwe, pItemSSID->abySSID); //ADD mode memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWMODE; @@ -310,7 +312,7 @@ int iwctl_giwscan(struct net_device *dev, iwe.u.mode = IW_MODE_ADHOC; } iwe.len = IW_EV_UINT_LEN; - current_ev = iwe_stream_add_event(info,current_ev, end_buf, &iwe, IW_EV_UINT_LEN); + current_ev = iwe_stream_add_event(info,current_ev, end_buf, &iwe, IW_EV_UINT_LEN); //ADD frequency pSuppRates = (PWLAN_IE_SUPP_RATES)pBSS->abySuppRates; pExtSuppRates = (PWLAN_IE_SUPP_RATES)pBSS->abyExtSuppRates; @@ -319,9 +321,7 @@ int iwctl_giwscan(struct net_device *dev, iwe.u.freq.m = pBSS->uChannel; iwe.u.freq.e = 0; iwe.u.freq.i = 0; - current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN); - - + current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN); //2008-0409-04, by Einsn Liu { int f = (int)pBSS->uChannel - 1; @@ -329,7 +329,7 @@ int iwctl_giwscan(struct net_device *dev, iwe.u.freq.m = frequency_list[f] * 100000; iwe.u.freq.e = 1; } - current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN); + current_ev = iwe_stream_add_event(info,current_ev,end_buf, &iwe, IW_EV_FREQ_LEN); //ADD quality memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVQUAL; @@ -369,14 +369,14 @@ int iwctl_giwscan(struct net_device *dev, break; // Bit rate given in 500 kb/s units (+ 0x80) iwe.u.bitrate.value = ((pSuppRates->abyRates[kk] & 0x7f) * 500000); - current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN); - } + current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN); + } for (kk = 0 ; kk < 8 ; kk++) { if (pExtSuppRates->abyRates[kk] == 0) break; // Bit rate given in 500 kb/s units (+ 0x80) iwe.u.bitrate.value = ((pExtSuppRates->abyRates[kk] & 0x7f) * 500000); - current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN); + current_val = iwe_stream_add_value(info,current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN); } if((current_val - current_ev) > IW_EV_LCP_LEN) @@ -386,7 +386,7 @@ int iwctl_giwscan(struct net_device *dev, iwe.cmd = IWEVCUSTOM; sprintf(buf, "bcn_int=%d", pBSS->wBeaconInterval); iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf); + current_ev = iwe_stream_add_point(info,current_ev, end_buf, &iwe, buf); if ((pBSS->wWPALen > 0) && (pBSS->wWPALen <= MAX_WPA_IE_LEN)) { memset(&iwe, 0, sizeof(iwe)); @@ -712,7 +712,7 @@ int iwctl_siwap(struct net_device *dev, PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; - BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; + BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAP \n"); if (pMgmt->eScanState == WMAC_IS_SCANNING) { @@ -733,7 +733,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { //mike :add if ((IS_BROADCAST_ADDRESS(pMgmt->abyDesireBSSID)) || (memcmp(pMgmt->abyDesireBSSID, ZeroBSSID, 6) == 0)){ - printk("SIOCSIWAP:invalid desired BSSID return!\n"); + PRINT_K("SIOCSIWAP:invalid desired BSSID return!\n"); return rc; } //mike add: if desired AP is hidden ssid(there are two same BSSID in list), @@ -747,10 +747,11 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { } } if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!! - printk("SIOCSIWAP:ignore for desired AP in hidden mode\n"); + PRINT_K("SIOCSIWAP:ignore for desired AP in hidden mode\n"); return rc; } } + if (pDevice->flags & DEVICE_FLAGS_OPENED) { pDevice->bCommit = TRUE; } @@ -866,11 +867,10 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { } // Check if we asked for `any' if(wrq->flags == 0) { - // Just send an empty SSID list // Just send an empty SSID list memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); memset(pMgmt->abyDesireBSSID, 0xFF,6); - printk("set essid to 'any' \n"); + PRINT_K("set essid to 'any' \n"); #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //Unknown desired AP,so here need not associate?? //if(pDevice->bWPASuppWextEnabled == TRUE) { @@ -882,8 +882,9 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; pItemSSID->byElementID = WLAN_EID_SSID; + memcpy(pItemSSID->abySSID, extra, wrq->length); - if (pItemSSID->abySSID[wrq->length - 1] == '\0') { + if (pItemSSID->abySSID[wrq->length - 1] == '\0') { if(wrq->length>0) pItemSSID->len = wrq->length - 1; } @@ -896,7 +897,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { (memcmp(pItemSSID->abySSID,((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,len)==0)) return 0; - //mike:need clear desiredBSSID + //mike:need clear desiredBSSID if(pItemSSID->len==0) { memset(pMgmt->abyDesireBSSID, 0xFF,6); return 0; @@ -921,7 +922,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { ); if (pCurr == NULL){ - printk("SIOCSIWESSID:hidden ssid site survey before associate.......\n"); + PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n"); vResetCommandTimer((HANDLE) pDevice); pMgmt->eScanType = WMAC_SCAN_ACTIVE; bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); @@ -949,10 +950,6 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { #endif DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s \n", pItemSSID->abySSID); -/* - DBG_PRT(MSG_LEVEL_INFO, KERN_INFO " SIOCSIWESSID2 \n"); - pItemSSID->len = wrq->length; - */ } if (pDevice->flags & DEVICE_FLAGS_OPENED) { @@ -1064,8 +1061,7 @@ int iwctl_siwrate(struct net_device *dev, printk("Rate Fix\n"); pDevice->bFixRate = TRUE; if ((pDevice->byBBType == BB_TYPE_11B)&& (brate > 3)) { - - pDevice->uConnectionRate = 3; + pDevice->uConnectionRate = 3; } else { pDevice->uConnectionRate = brate; @@ -1077,7 +1073,7 @@ int iwctl_siwrate(struct net_device *dev, pDevice->bFixRate = FALSE; pDevice->uConnectionRate = 13; printk("auto rate:connection_rate is 13\n"); -} + } return rc; } @@ -1441,7 +1437,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ //End Modify,Einsn /* - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE \n"); // Check the size of the key if (wrq->length > WLAN_WEP232_KEYLEN) { @@ -1663,6 +1659,7 @@ int iwctl_giwencode(struct net_device *dev, return 0; } + /* * Wireless Handler : set power mode */ @@ -1790,20 +1787,19 @@ int iwctl_siwauth(struct net_device *dev, case IW_AUTH_WPA_VERSION: wpa_version = wrq->value; if(wrq->value == IW_AUTH_WPA_VERSION_DISABLED) { - printk("iwctl_siwauth:set WPADEV to disable at 1??????\n"); + PRINT_K("iwctl_siwauth:set WPADEV to disable at 1??????\n"); //pDevice->bWPADevEnable = FALSE; } else if(wrq->value == IW_AUTH_WPA_VERSION_WPA) { - printk("iwctl_siwauth:set WPADEV to WPA1******\n"); + PRINT_K("iwctl_siwauth:set WPADEV to WPA1******\n"); } else { - printk("iwctl_siwauth:set WPADEV to WPA2******\n"); + PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n"); } //pDevice->bWPASuppWextEnabled =TRUE; break; case IW_AUTH_CIPHER_PAIRWISE: pairwise = wrq->value; - if(pairwise == IW_AUTH_CIPHER_CCMP){ pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled; }else if(pairwise == IW_AUTH_CIPHER_TKIP){ @@ -1968,10 +1964,10 @@ int iwctl_siwencodeext(struct net_device *dev, //original member wpa_alg alg_name; u8 addr[6]; - int key_idx, set_tx; + int key_idx, set_tx=0; u8 seq[IW_ENCODE_SEQ_MAX_SIZE]; u8 key[64]; - size_t seq_len,key_len=0; + size_t seq_len=0,key_len=0; // // int ii; u8 *buf; @@ -1979,7 +1975,7 @@ int iwctl_siwencodeext(struct net_device *dev, u8 key_array[64]; int ret=0; -printk("SIOCSIWENCODEEXT...... \n"); +PRINT_K("SIOCSIWENCODEEXT...... \n"); blen = sizeof(*param); buf = kmalloc((int)blen, (int)GFP_KERNEL); @@ -2003,7 +1999,7 @@ switch (ext->alg) { alg_name = WPA_ALG_CCMP; break; default: - printk("Unknown alg = %d\n",ext->alg); + PRINT_K("Unknown alg = %d\n",ext->alg); ret= -ENOMEM; goto error; } @@ -2046,7 +2042,6 @@ param->u.wpa_key.seq = (u8 *)seq; param->u.wpa_key.seq_len = seq_len; #if 0 -int ii; printk("param->u.wpa_key.alg_name =%d\n",param->u.wpa_key.alg_name); printk("param->addr=%02x:%02x:%02x:%02x:%02x:%02x\n", param->addr[0],param->addr[1],param->addr[2], diff --git a/drivers/staging/vt6655/iwctl.h b/drivers/staging/vt6655/iwctl.h index 44ee46c2c475..962235f2f397 100644 --- a/drivers/staging/vt6655/iwctl.h +++ b/drivers/staging/vt6655/iwctl.h @@ -227,6 +227,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_point *wrq, char *extra); #endif // #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT +//End Add -- //2008-0409-07, by Einsn Liu extern const struct iw_handler_def iwctl_handler_def; diff --git a/drivers/staging/vt6655/kcompat.h b/drivers/staging/vt6655/kcompat.h index ee22006122ed..5aa9b0749a0e 100644 --- a/drivers/staging/vt6655/kcompat.h +++ b/drivers/staging/vt6655/kcompat.h @@ -1,6 +1,5 @@ /* - * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. - * All rights reserved. + * Copyright (c) 1996, 2003 VIA Networking, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,6 +65,7 @@ #ifndef IRQ_RETVAL typedef void irqreturn_t; + #define IRQ_RETVAL(x) #endif @@ -75,6 +75,5 @@ typedef void irqreturn_t; #define MODULE_LICESEN(x) #endif - #endif diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index 28fea2352516..41be46970f19 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -85,6 +85,7 @@ s_vCheckKeyTableValid (PSKeyManagement pTable, DWORD_PTR dwIoBase) (pTable->KeyTable[i].GroupKey[2].bKeyValid == FALSE) && (pTable->KeyTable[i].GroupKey[3].bKeyValid == FALSE) ) { + pTable->KeyTable[i].bInUse = FALSE; pTable->KeyTable[i].wKeyCtl = 0; pTable->KeyTable[i].bSoftWEP = FALSE; diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index da997541b212..29b0d0ac724a 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: mac.c * * Purpose: MAC routines @@ -67,6 +68,8 @@ * */ + + #if !defined(__TMACRO_H__) #include "tmacro.h" #endif @@ -95,6 +98,10 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Export Functions --------------------------*/ + + + + /* * Description: * Read All MAC Registers to buffer diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index edb70965d4dc..c92867b16899 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -24,18 +24,16 @@ * Author: Tevin Chen * * Date: May 21, 1996 + * * Revision History: * 07-01-2003 Bryan YC Fan: Re-write codes to support VT3253 spec. * 08-25-2003 Kyle Hsu: Porting MAC functions from sim53. * 09-03-2003 Bryan YC Fan: Add MACvDisableProtectMD & MACvEnableProtectMD - * */ #ifndef __MAC_H__ #define __MAC_H__ - - #if !defined(__TTYPE_H__) #include "ttype.h" #endif @@ -130,7 +128,7 @@ #define MAC_REG_IFREGCTL 0x70 // #define MAC_REG_IFDATA 0x71 // #define MAC_REG_ITRTMSET 0x74 // -#define MAC_REG_PAPEDELAY 0x77 // +#define MAC_REG_PAPEDELAY 0x77 #define MAC_REG_SOFTPWRCTL 0x78 // #define MAC_REG_GPIOCTL0 0x7A // #define MAC_REG_GPIOCTL1 0x7B // diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index 3661f8d21642..db5c1159a6b6 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: power.c * * Purpose: Handles 802.11 power management functions diff --git a/drivers/staging/vt6655/power.h b/drivers/staging/vt6655/power.h index 17f2160d077c..30634fabfe96 100644 --- a/drivers/staging/vt6655/power.h +++ b/drivers/staging/vt6655/power.h @@ -16,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * * File: power.h * * Purpose: Handles 802.11 power management functions diff --git a/drivers/staging/vt6655/rc4.c b/drivers/staging/vt6655/rc4.c index 0345e3247f4d..5ad12a3746c0 100644 --- a/drivers/staging/vt6655/rc4.c +++ b/drivers/staging/vt6655/rc4.c @@ -1,5 +1,6 @@ /* - * File: rc4.c + * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * File: rc4.c + * * Purpose: * * Functions: diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 9d4e3eb7c8e5..fa3aea5321d4 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -31,6 +31,7 @@ * Revision History: * */ + #if !defined(__MAC_H__) #include "mac.h" #endif diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h index 3e85264e2843..5320e72a8da7 100644 --- a/drivers/staging/vt6655/rxtx.h +++ b/drivers/staging/vt6655/rxtx.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * File: whdr.h + * File: rxtx.h * * Purpose: * diff --git a/drivers/staging/vt6655/srom.h b/drivers/staging/vt6655/srom.h index a4ca5f0b196d..d7a363d38d48 100644 --- a/drivers/staging/vt6655/srom.h +++ b/drivers/staging/vt6655/srom.h @@ -36,9 +36,10 @@ #endif -/*--------------------- Export Definitions -------------------------*/ +/*--------------------- Export Definitions -------------------------*/ + #define EEP_MAX_CONTEXT_SIZE 256 #define CB_EEPROM_READBYTE_WAIT 900 //us @@ -48,7 +49,6 @@ // // Contents in the EEPROM // - #define EEP_OFS_PAR 0x00 // physical address #define EEP_OFS_ANTENNA 0x16 #define EEP_OFS_RADIOCTL 0x17 @@ -97,8 +97,6 @@ #define EEP_RADIOCTL_ENABLE 0x80 #define EEP_RADIOCTL_INV 0x01 - - /*--------------------- Export Types ------------------------------*/ // AT24C02 eeprom contents @@ -175,5 +173,3 @@ BOOL SROMbAutoLoad (DWORD_PTR dwIoBase); #endif // __EEPROM_H__ - - diff --git a/drivers/staging/vt6655/tpci.h b/drivers/staging/vt6655/tpci.h index 4a1c8ed75ca6..3a04845cbb51 100644 --- a/drivers/staging/vt6655/tpci.h +++ b/drivers/staging/vt6655/tpci.h @@ -2,6 +2,7 @@ * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. * All rights reserved. * + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,6 +16,7 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * * * File: tpci.h diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h index 1f26702cabf6..0b62bb109ed9 100644 --- a/drivers/staging/vt6655/ttype.h +++ b/drivers/staging/vt6655/ttype.h @@ -1,5 +1,6 @@ /* - * File: ttype.h + * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * File: ttype.h + * * Purpose: define basic common types and macros * * Author: Tevin Chen diff --git a/drivers/staging/vt6655/vntwifi.h b/drivers/staging/vt6655/vntwifi.h index 3e620a726212..9af538bd44e4 100644 --- a/drivers/staging/vt6655/vntwifi.h +++ b/drivers/staging/vt6655/vntwifi.h @@ -39,6 +39,7 @@ #if !defined(__CARD_H__) #include "card.h" #endif +#include "wpa2.h" /*--------------------- Export Definitions -------------------------*/ #define RATE_1M 0 @@ -67,8 +68,6 @@ #define MAX_BSS_NUM 42 -#define MAX_PMKID_CACHE 16 - // Pre-configured Authenticaiton Mode (from XP) typedef enum tagWMAC_AUTHENTICATION_MODE { diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index d97d97d1e6c7..a2f399873dbc 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. * All rights reserved. * @@ -16,7 +16,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * * File: wcmd.c * * Purpose: Handles the management command interface functions @@ -122,6 +121,7 @@ s_MgrMakeProbeRequest( IN PWLAN_IE_SUPP_RATES pCurrExtSuppRates ); + static BOOL s_bCommandComplete ( @@ -134,6 +134,7 @@ s_bCommandComplete ( /*--------------------- Export Functions --------------------------*/ + /* * Description: * Stop AdHoc beacon during scan process @@ -186,7 +187,8 @@ vAdHocBeaconStop(PSDevice pDevice) MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); } -} +} /* vAdHocBeaconStop */ + /* * Description: @@ -224,6 +226,8 @@ vAdHocBeaconRestart(PSDevice pDevice) + + /*+ * * Routine Description: @@ -350,6 +354,7 @@ s_MgrMakeProbeRequest( + VOID vCommandTimerWait( IN HANDLE hDeviceContext, @@ -369,6 +374,7 @@ vCommandTimerWait( + VOID vCommandTimer ( IN HANDLE hDeviceContext diff --git a/drivers/staging/vt6655/wcmd.h b/drivers/staging/vt6655/wcmd.h index 8c6bbc49f0bc..c3bf3afafff3 100644 --- a/drivers/staging/vt6655/wcmd.h +++ b/drivers/staging/vt6655/wcmd.h @@ -46,6 +46,7 @@ #define AUTHENTICATE_TIMEOUT 1000 //ms #define ASSOCIATE_TIMEOUT 1000 //ms + // Command code typedef enum tagCMD_CODE { WLAN_CMD_BSSID_SCAN, @@ -67,11 +68,9 @@ typedef enum tagCMD_CODE { #define CMD_Q_SIZE 32 - -// Command code typedef enum tagCMD_STATUS { - CMD_STATUS_SUCCESS, + CMD_STATUS_SUCCESS = 0, CMD_STATUS_FAILURE, CMD_STATUS_RESOURCES, CMD_STATUS_TIMEOUT, @@ -106,6 +105,7 @@ typedef enum tagCMD_STATE { } CMD_STATE, DEF* PCMD_STATE; + /*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Variables --------------------------*/ @@ -115,7 +115,6 @@ typedef enum tagCMD_STATE { /*--------------------- Export Functions --------------------------*/ - VOID vResetCommandTimer( IN HANDLE hDeviceContext @@ -148,4 +147,5 @@ BSSvSecondTxData( IN HANDLE hDeviceContext ); #endif + #endif //__WCMD_H__ diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index c6a6a0a35566..fb15367b0fb7 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: wmgr.c * * Purpose: Handles the 802.11 management functions @@ -137,6 +138,7 @@ static BOOL ChannelExceedZoneType( IN PSDevice pDevice, IN BYTE byCurrChannel ); + // Association/diassociation functions static PSTxMgmtPacket @@ -363,33 +365,10 @@ s_bCipherMatch ( OUT PBYTE pbyCCSGK ); - static VOID Encyption_Rebuild( IN PSDevice pDevice, IN PKnownBSS pCurr ); -/* -static -VOID -s_vProbeChannel( - IN PSDevice pDevice - ); - -static -VOID -s_vListenChannel( - IN PSDevice pDevice - ); - -static -PSTxMgmtPacket -s_MgrMakeProbeRequest( - IN PSMgmtObject pMgmt, - IN PBYTE pScanBSSID, - IN PWLAN_IE_SSID pSSID, - IN PWLAN_IE_SUPP_RATES pCurrRates - ); -*/ @@ -1780,7 +1759,6 @@ s_vMgrRxDisassociation( wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } #endif - } /* else, ignore it */ @@ -1857,13 +1835,13 @@ s_vMgrRxDeauthentication( pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); }; - #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT + #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT // if(pDevice->bWPASuppWextEnabled == TRUE) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; - printk("wireless_send_event--->SIOCGIWAP(disauthen)\n"); + PRINT_K("wireless_send_event--->SIOCGIWAP(disauthen)\n"); wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } #endif @@ -3172,22 +3150,22 @@ s_vMgrSynchBSS ( pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK; if(pCurr->abyPKType[0] == WPA_TKIP) { pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP - printk("Encyption_Rebuild--->ssid reset config to [WPAPSK-TKIP]\n"); + PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-TKIP]\n"); } else if(pCurr->abyPKType[0] == WPA_AESCCMP) { pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled; //AES - printk("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n"); + PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n"); } } else if(pCurr->bWPA2Valid == TRUE) { //WPA2-PSK pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK; if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_TKIP) { pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP - printk("Encyption_Rebuild--->ssid reset config to [WPA2PSK-TKIP]\n"); + PRINT_K("Encyption_Rebuild--->ssid reset config to [WPA2PSK-TKIP]\n"); } else if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_CCMP) { pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled; //AES - printk("Encyption_Rebuild--->ssid reset config to [WPA2PSK-AES]\n"); + PRINT_K("Encyption_Rebuild--->ssid reset config to [WPA2PSK-AES]\n"); } } } @@ -3832,6 +3810,7 @@ s_MgrMakeAssocRequest( *pbyRSN++=0x01; *pbyRSN++=0x00; *pbyRSN++=0x00; + *pbyRSN++=0x50; *pbyRSN++=0xf2; if (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) { @@ -3843,12 +3822,15 @@ s_MgrMakeAssocRequest( else { *pbyRSN++=WPA_NONE; } + sFrame.pRSNWPA->len +=6; // RSN Capabilites + *pbyRSN++=0x00; *pbyRSN++=0x00; sFrame.pRSNWPA->len +=2; + 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; @@ -4087,6 +4069,7 @@ s_MgrMakeReAssocRequest( *pbyRSN++=0x01; *pbyRSN++=0x00; *pbyRSN++=0x00; + *pbyRSN++=0x50; *pbyRSN++=0xf2; if (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) { @@ -4096,12 +4079,14 @@ s_MgrMakeReAssocRequest( } else { *pbyRSN++=WPA_NONE; } + sFrame.pRSNWPA->len +=6; // RSN Capabilites *pbyRSN++=0x00; *pbyRSN++=0x00; sFrame.pRSNWPA->len +=2; + 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; @@ -4677,7 +4662,7 @@ vMgrRxManagePacket( case WLAN_FSTYPE_BEACON: // Frame Clase = 0 - // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); + //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); if (pMgmt->eScanState != WMAC_NO_SCANNING) { bInScan = TRUE; }; @@ -4953,7 +4938,6 @@ s_bCipherMatch ( return FALSE; // check cap. of BSS - if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && (EncStatus == Ndis802_11Encryption1Enabled)) { // default is WEP only @@ -4962,8 +4946,8 @@ s_bCipherMatch ( if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && (pBSSNode->bWPA2Valid == TRUE) && + //20080123-01, by Einsn Liu ((EncStatus == Ndis802_11Encryption3Enabled)||(EncStatus == Ndis802_11Encryption2Enabled))) { - //WPA2 // check Group Key Cipher if ((pBSSNode->byCSSGK == WLAN_11i_CSS_WEP40) || @@ -4993,10 +4977,10 @@ s_bCipherMatch ( i = pBSSNode->wCSSPKCount; } } + } else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && (pBSSNode->bWPAValid == TRUE) && - ((EncStatus == Ndis802_11Encryption3Enabled)||(EncStatus == Ndis802_11Encryption2Enabled))) { - + ((EncStatus == Ndis802_11Encryption3Enabled) || (EncStatus == Ndis802_11Encryption2Enabled))) { //WPA // check Group Key Cipher if ((pBSSNode->byGKType == WPA_WEP40) || @@ -5029,6 +5013,7 @@ s_bCipherMatch ( // mask our cap. with BSS if (EncStatus == Ndis802_11Encryption1Enabled) { + // For supporting Cisco migration mode, don't care pairwise key cipher if ((byMulticastCipher == KEY_CTL_WEP) && (byCipherMask == 0)) { diff --git a/drivers/staging/vt6655/wpa2.h b/drivers/staging/vt6655/wpa2.h index bda045b313b9..cd1ea14b586e 100644 --- a/drivers/staging/vt6655/wpa2.h +++ b/drivers/staging/vt6655/wpa2.h @@ -44,13 +44,12 @@ #if !defined(__BSSDB_H__) #include "bssdb.h" #endif -#if !defined(__VNTWIFI_H__) -#include "vntwifi.h" -#endif + /*--------------------- Export Definitions -------------------------*/ +#define MAX_PMKID_CACHE 16 typedef struct tagsPMKIDInfo { BYTE abyBSSID[6]; diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index ec2839a70a20..460182c74a3e 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * * File: wpactl.c * * Purpose: handle wpa supplicant ioctl input/out functions @@ -79,8 +80,6 @@ static int msglevel =MSG_LEVEL_INFO; /*--------------------- Export Variables --------------------------*/ - - static void wpadev_setup(struct net_device *dev) { dev->type = ARPHRD_IEEE80211; @@ -94,8 +93,6 @@ static void wpadev_setup(struct net_device *dev) dev->flags = IFF_BROADCAST|IFF_MULTICAST; } - - /* * Description: * register netdev for wpa supplicant deamon @@ -122,7 +119,6 @@ static int wpa_init_wpadev(PSDevice pDevice) wpadev_priv = netdev_priv(pDevice->wpadev); *wpadev_priv = *pDevice; - memcpy(pDevice->wpadev->dev_addr, dev->dev_addr, U_ETHER_ADDR_LEN); pDevice->wpadev->base_addr = dev->base_addr; pDevice->wpadev->irq = dev->irq; @@ -164,7 +160,6 @@ static int wpa_init_wpadev(PSDevice pDevice) static int wpa_release_wpadev(PSDevice pDevice) { - if (pDevice->skb) { dev_kfree_skb(pDevice->skb); pDevice->skb = NULL; @@ -201,8 +196,6 @@ static int wpa_release_wpadev(PSDevice pDevice) int wpa_set_wpadev(PSDevice pDevice, int val) { - - if (val) return wpa_init_wpadev(pDevice); else @@ -224,9 +217,9 @@ int wpa_set_wpadev(PSDevice pDevice, int val) * */ -int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) + int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) { - struct viawget_wpa_param *param=ctx; + struct viawget_wpa_param *param=ctx; PSMgmtObject pMgmt = pDevice->pMgmt; DWORD dwKeyIndex = 0; BYTE abyKey[MAX_KEY_LEN]; @@ -261,8 +254,8 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel) else { spin_unlock_irq(&pDevice->lock); if (param->u.wpa_key.key && - copy_from_user(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len)){ - spin_lock_irq(&pDevice->lock); + copy_from_user(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len)) { + spin_lock_irq(&pDevice->lock); return -EINVAL; } spin_lock_irq(&pDevice->lock); @@ -302,9 +295,8 @@ spin_lock_irq(&pDevice->lock); else { spin_unlock_irq(&pDevice->lock); if (param->u.wpa_key.seq && - copy_from_user(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len)){ - - spin_lock_irq(&pDevice->lock); + copy_from_user(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len)) { + spin_lock_irq(&pDevice->lock); return -EINVAL; } spin_lock_irq(&pDevice->lock); @@ -337,6 +329,7 @@ spin_lock_irq(&pDevice->lock); if (param->u.wpa_key.set_tx) dwKeyIndex |= (1 << 31); + if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) byKeyDecMode = KEY_CTL_CCMP; else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) @@ -359,7 +352,6 @@ spin_lock_irq(&pDevice->lock); byKeyDecMode = KEY_CTL_WEP; } - // Check TKIP key length if ((byKeyDecMode == KEY_CTL_TKIP) && (param->u.wpa_key.key_len != MAX_KEY_LEN)) { diff --git a/drivers/staging/vt6655/wpactl.h b/drivers/staging/vt6655/wpactl.h index 9e7889785306..b869cfdf42c3 100644 --- a/drivers/staging/vt6655/wpactl.h +++ b/drivers/staging/vt6655/wpactl.h @@ -33,6 +33,7 @@ #if !defined(__DEVICE_H__) #include "device.h" #endif + #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #if !defined(__IOWPA_H__) #include "iowpa.h" -- cgit v1.2.3-59-g8ed1b From a7ad322a46663755718a214a9a34e5cfe64d07f7 Mon Sep 17 00:00:00 2001 From: Jim Lieb Date: Wed, 12 Aug 2009 14:54:09 -0700 Subject: Staging: vt665x: Clean up include files, Part 2 Remove cplusplus lines from include files Remove needless ifdefs on includes to conform with C conventions. Remove misc commented code/includes Update TODO Signed-off-by: Jim Lieb Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/80211hdr.h | 5 ---- drivers/staging/vt6655/80211mgr.c | 16 ------------ drivers/staging/vt6655/80211mgr.h | 7 +----- drivers/staging/vt6655/IEEE11h.c | 20 --------------- drivers/staging/vt6655/IEEE11h.h | 16 ------------ drivers/staging/vt6655/TODO | 4 +-- drivers/staging/vt6655/aes_ccmp.c | 7 ------ drivers/staging/vt6655/aes_ccmp.h | 2 -- drivers/staging/vt6655/baseband.c | 17 ------------- drivers/staging/vt6655/baseband.h | 18 -------------- drivers/staging/vt6655/bssdb.c | 40 ------------------------------ drivers/staging/vt6655/bssdb.h | 13 ---------- drivers/staging/vt6655/card.c | 28 --------------------- drivers/staging/vt6655/card.h | 17 ------------- drivers/staging/vt6655/country.h | 15 ----------- drivers/staging/vt6655/datarate.c | 18 -------------- drivers/staging/vt6655/desc.h | 10 -------- drivers/staging/vt6655/device.h | 30 ---------------------- drivers/staging/vt6655/device_main.c | 48 ------------------------------------ drivers/staging/vt6655/dpc.c | 37 --------------------------- drivers/staging/vt6655/dpc.h | 22 +---------------- drivers/staging/vt6655/hostap.c | 19 -------------- drivers/staging/vt6655/hostap.h | 16 ------------ drivers/staging/vt6655/iocmd.h | 3 --- drivers/staging/vt6655/ioctl.c | 18 -------------- drivers/staging/vt6655/ioctl.h | 17 ------------- drivers/staging/vt6655/iowpa.h | 1 - drivers/staging/vt6655/iwctl.c | 23 ----------------- drivers/staging/vt6655/iwctl.h | 17 ------------- drivers/staging/vt6655/kcompat.h | 1 + drivers/staging/vt6655/key.c | 12 --------- drivers/staging/vt6655/key.h | 18 -------------- drivers/staging/vt6655/mac.c | 11 --------- drivers/staging/vt6655/mac.h | 13 ---------- drivers/staging/vt6655/mib.c | 17 ------------- drivers/staging/vt6655/mib.h | 21 ---------------- drivers/staging/vt6655/michael.c | 6 ----- drivers/staging/vt6655/michael.h | 4 +-- drivers/staging/vt6655/power.c | 27 -------------------- drivers/staging/vt6655/rc4.c | 2 -- drivers/staging/vt6655/rc4.h | 4 --- drivers/staging/vt6655/rf.c | 10 -------- drivers/staging/vt6655/rf.h | 14 +---------- drivers/staging/vt6655/rxtx.c | 33 ------------------------- drivers/staging/vt6655/rxtx.h | 8 ------ drivers/staging/vt6655/srom.c | 16 ------------ drivers/staging/vt6655/srom.h | 18 -------------- drivers/staging/vt6655/tbit.h | 5 ---- drivers/staging/vt6655/tcrc.c | 8 ------ drivers/staging/vt6655/tcrc.h | 18 -------------- drivers/staging/vt6655/tether.c | 13 ---------- drivers/staging/vt6655/tether.h | 20 --------------- drivers/staging/vt6655/tkip.c | 10 -------- drivers/staging/vt6655/tkip.h | 16 ------------ drivers/staging/vt6655/tmacro.h | 1 - drivers/staging/vt6655/tpci.h | 6 ----- drivers/staging/vt6655/umem.h | 4 --- drivers/staging/vt6655/upc.h | 5 ---- drivers/staging/vt6655/vntwifi.c | 19 +------------- drivers/staging/vt6655/vntwifi.h | 16 ------------ drivers/staging/vt6655/wcmd.c | 36 --------------------------- drivers/staging/vt6655/wcmd.h | 6 ----- drivers/staging/vt6655/wctl.c | 7 ------ drivers/staging/vt6655/wctl.h | 19 -------------- drivers/staging/vt6655/wmgr.c | 39 ----------------------------- drivers/staging/vt6655/wmgr.h | 21 +--------------- drivers/staging/vt6655/wpa.c | 22 ----------------- drivers/staging/vt6655/wpa.h | 14 ----------- drivers/staging/vt6655/wpa2.c | 10 +------- drivers/staging/vt6655/wpa2.h | 21 ---------------- drivers/staging/vt6655/wpactl.c | 18 -------------- drivers/staging/vt6655/wpactl.h | 18 -------------- drivers/staging/vt6655/wroute.c | 14 +---------- drivers/staging/vt6655/wroute.h | 18 -------------- 74 files changed, 11 insertions(+), 1132 deletions(-) (limited to 'drivers/staging/vt6655/power.c') diff --git a/drivers/staging/vt6655/80211hdr.h b/drivers/staging/vt6655/80211hdr.h index 84cb1d020cb7..e5cee6fd0533 100644 --- a/drivers/staging/vt6655/80211hdr.h +++ b/drivers/staging/vt6655/80211hdr.h @@ -28,15 +28,10 @@ * */ - - #ifndef __80211HDR_H__ #define __80211HDR_H__ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif /*--------------------- Export Definitions -------------------------*/ // bit type diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index da7c2ab29bad..d309049370eb 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -52,28 +52,12 @@ * */ - - -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WPA_H__) #include "wpa.h" -#endif - - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/80211mgr.h b/drivers/staging/vt6655/80211mgr.h index 18c9e3ad7fde..5efc13227eb8 100644 --- a/drivers/staging/vt6655/80211mgr.h +++ b/drivers/staging/vt6655/80211mgr.h @@ -28,17 +28,11 @@ * */ - #ifndef __80211MGR_H__ #define __80211MGR_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -719,6 +713,7 @@ typedef struct tagWLAN_FR_DEAUTHEN { } WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN; /*--------------------- Export Functions --------------------------*/ + VOID vMgrEncodeBeacon( IN PWLAN_FR_BEACON pFrame diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c index e1addc6d700a..ea546e5406ea 100644 --- a/drivers/staging/vt6655/IEEE11h.c +++ b/drivers/staging/vt6655/IEEE11h.c @@ -31,34 +31,14 @@ * */ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__IEEE11h_H__) #include "IEEE11h.h" -#endif - -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif - - /*--------------------- Static Definitions -------------------------*/ static int msglevel =MSG_LEVEL_INFO; diff --git a/drivers/staging/vt6655/IEEE11h.h b/drivers/staging/vt6655/IEEE11h.h index 22bcaf1f6817..0f61eddd6f26 100644 --- a/drivers/staging/vt6655/IEEE11h.h +++ b/drivers/staging/vt6655/IEEE11h.h @@ -31,17 +31,9 @@ #ifndef __IEEE11h_H__ #define __IEEE11h_H__ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -52,17 +44,9 @@ /*--------------------- Export Types ------------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ BOOL IEEE11hbMSRRepTx ( IN PVOID pMgmtHandle ); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __IEEE11h_H__ diff --git a/drivers/staging/vt6655/TODO b/drivers/staging/vt6655/TODO index ae46c525cbd9..8462cd17eb61 100644 --- a/drivers/staging/vt6655/TODO +++ b/drivers/staging/vt6655/TODO @@ -1,7 +1,7 @@ TODO: -- remove __cplusplus ifdefs +- remove __cplusplus ifdefs -- done - prepare for merge with vt6656 driver: - - rename DEVICE_PRT() to DBG_PRT() + - rename DEVICE_PRT() to DBG_PRT() -- done - share 80211*.h includes - move code for channel mapping from card.c to channel.c - split rf.c diff --git a/drivers/staging/vt6655/aes_ccmp.c b/drivers/staging/vt6655/aes_ccmp.c index 59cc018d48a2..e79a0d164282 100644 --- a/drivers/staging/vt6655/aes_ccmp.c +++ b/drivers/staging/vt6655/aes_ccmp.c @@ -33,16 +33,9 @@ * */ -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/aes_ccmp.h b/drivers/staging/vt6655/aes_ccmp.h index 2b1920f28609..f2ba1d5aa1e5 100644 --- a/drivers/staging/vt6655/aes_ccmp.h +++ b/drivers/staging/vt6655/aes_ccmp.h @@ -30,9 +30,7 @@ #ifndef __AES_H__ #define __AES_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 02cf0b735702..4b8f8db0097d 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -49,31 +49,14 @@ * */ - -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__SROM_H__) #include "srom.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif /*--------------------- Static Definitions -------------------------*/ //static int msglevel =MSG_LEVEL_DEBUG; diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h index 6fb4e5ff8862..0682a396ea44 100644 --- a/drivers/staging/vt6655/baseband.h +++ b/drivers/staging/vt6655/baseband.h @@ -30,18 +30,9 @@ #ifndef __BASEBAND_H__ #define __BASEBAND_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - -#if !defined(__TETHER_H__) #include "tether.h" -#endif - -#if !defined(__DEVICE_H__) #include "device.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -126,9 +117,6 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ UINT BBuGetFrameTime( @@ -186,10 +174,4 @@ void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3); VOID BBvClearAntDivSQ3Value (PSDevice pDevice); - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __BASEBAND_H__ diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 57c043b9822d..28c00578d209 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -39,65 +39,25 @@ * */ - -#if !defined(__TBIT_H__) #include "tbit.h" -#endif//chester -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__DATARATE_H__) #include "datarate.h" -#endif -#if !defined(__DESC_H__) #include "desc.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__WPA_H__) #include "wpa.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__WPA2_H__) #include "wpa2.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -//DavidWang -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif //#define PLICE_DEBUG /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/bssdb.h b/drivers/staging/vt6655/bssdb.h index 44962f6e3778..5ce4ef9c1bd1 100644 --- a/drivers/staging/vt6655/bssdb.h +++ b/drivers/staging/vt6655/bssdb.h @@ -30,23 +30,10 @@ #ifndef __BSSDB_H__ #define __BSSDB_H__ -//#if !defined(__DEVICE_H__) -//#include "device.h" -//#endif - #include - -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 93b767c18821..03051e899184 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -45,47 +45,19 @@ * */ -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__DESC_H__) #include "desc.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -#if !defined(__VNTWIFI_H__) #include "vntwifi.h" -#endif -#if !defined(__POWER_H__) #include "power.h" -#endif -#if !defined(__KEY_H__) #include "key.h" -#endif -#if !defined(__RC4_H__) #include "rc4.h" -#endif -#if !defined(__COUNTRY_H__) #include "country.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif - - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index bb292e14b0b3..264b844cf055 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -26,19 +26,10 @@ * */ - #ifndef __CARD_H__ #define __CARD_H__ -//#if !defined(__DEVICE_H__) -//#include "device.h" -//#endif -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - - /*--------------------- Export Definitions -------------------------*/ // @@ -94,9 +85,6 @@ typedef enum _CARD_OP_MODE { /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ BOOL ChannelValid(UINT CountryCode, UINT ChannelIndex); void CARDvSetRSPINF(PVOID pDeviceHandler, CARD_PHY_TYPE ePHYType); @@ -262,11 +250,6 @@ CARDbyAutoChannelSelect( BYTE CARDbyGetChannelNumber(PVOID pDeviceHandler, BYTE byChannelIndex); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __CARD_H__ diff --git a/drivers/staging/vt6655/country.h b/drivers/staging/vt6655/country.h index e60649350fb9..2005d2768680 100644 --- a/drivers/staging/vt6655/country.h +++ b/drivers/staging/vt6655/country.h @@ -30,10 +30,7 @@ #ifndef __COUNTRY_H__ #define __COUNTRY_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - /*--------------------- Export Definitions -------------------------*/ /************************************************************************ @@ -176,17 +173,5 @@ typedef struct tagSCountryTable extern SCountryTable ChannelRuleTab[CCODE_MAX+1]; /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - -/************************************************************************ - * Function prototype - ************************************************************************/ #endif /* __COUNTRY_H__ */ diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c index 92995a8f72cf..10da57f28449 100644 --- a/drivers/staging/vt6655/datarate.c +++ b/drivers/staging/vt6655/datarate.c @@ -33,33 +33,15 @@ * */ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__DATARATE_H__) #include "datarate.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__SROM_H__) #include "srom.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 45caea098b58..b573ef77abe1 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -28,23 +28,13 @@ * */ - #ifndef __DESC_H__ #define __DESC_H__ #include #include - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif - - - - /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index e8b13f782c50..7dfe80002912 100644 --- a/drivers/staging/vt6655/device.h +++ b/drivers/staging/vt6655/device.h @@ -85,50 +85,20 @@ // device specific // -#if !defined(_KCOMPAT_H) #include "kcompat.h" -#endif - -#if !defined(__DEVICE_CONFIG_H) #include "device_cfg.h" -#endif - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__MIB_H__) #include "mib.h" -#endif -#if !defined(__SROM_H__) #include "srom.h" -#endif -#if !defined(__RC4_H__) #include "rc4.h" -#endif -#if !defined(__TPCI_H__) #include "tpci.h" -#endif -#if !defined(__DESC_H__) #include "desc.h" -#endif -#if !defined(__KEY_H__) #include "key.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif //PLICE_DEBUG-> //#define THREAD diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index f158e4c530a7..b8788a315c47 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -60,80 +60,32 @@ */ #undef __NO_VERSION__ -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__WCTL_H__) #include "wctl.h" -#endif -#if !defined(__POWER_H__) #include "power.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__IOCMD_H__) #include "iocmd.h" -#endif -#if !defined(__TCRC_H__) #include "tcrc.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__WROUTE_H__) #include "wroute.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__HOSTAP_H__) #include "hostap.h" -#endif -#if !defined(__WPACTL_H__) #include "wpactl.h" -#endif -#if !defined(__IOCTL_H__) #include "ioctl.h" -#endif -#if !defined(__IWCTL_H__) #include "iwctl.h" -#endif -#if !defined(__DPC_H__) #include "dpc.h" -#endif -#if !defined(__DATARATE_H__) #include "datarate.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif - #include #include - //#define DEBUG /*--------------------- Static Definitions -------------------------*/ //static int msglevel =MSG_LEVEL_DEBUG; diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index 5810c1a921cd..aaae1e691d01 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -38,61 +38,24 @@ * */ - -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__MICHAEL_H__) #include "michael.h" -#endif -#if !defined(__TKIP_H__) #include "tkip.h" -#endif -#if !defined(__TCRC_H__) #include "tcrc.h" -#endif -#if !defined(__WCTL_H__) #include "wctl.h" -#endif -#if !defined(__WROUTE_H__) #include "wroute.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__HOSTAP_H__) #include "hostap.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif -#if !defined(__AES_H__) #include "aes_ccmp.h" -#endif //#define PLICE_DEBUG diff --git a/drivers/staging/vt6655/dpc.h b/drivers/staging/vt6655/dpc.h index 6295c99902e0..51508b9087ea 100644 --- a/drivers/staging/vt6655/dpc.h +++ b/drivers/staging/vt6655/dpc.h @@ -26,20 +26,12 @@ * */ - #ifndef __DPC_H__ #define __DPC_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -49,26 +41,14 @@ /*--------------------- Export Functions --------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - - BOOL device_receive_frame ( IN PSDevice pDevice, IN PSRxDesc pCurrRD ); - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - VOID MngWorkItem(PVOID Context); + #endif // __RXTX_H__ diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 658e1aec8f33..58abf44c76a6 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -30,32 +30,13 @@ * */ - -#if !defined(__HOSTAP_H__) #include "hostap.h" -#endif -#if !defined(__IOCMD_H__) #include "iocmd.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__WPACTL_H__) #include "wpactl.h" -#endif -#if !defined(__KEY_H__) #include "key.h" -#endif -#if !defined(__MAC_H__) -#include "mac.h" -#endif - #define VIAWGET_HOSTAPD_MAX_BUF_SIZE 1024 #define HOSTAP_CRYPT_FLAG_SET_TX_KEY BIT0 diff --git a/drivers/staging/vt6655/hostap.h b/drivers/staging/vt6655/hostap.h index c5ad3494b6e4..8fd667b542be 100644 --- a/drivers/staging/vt6655/hostap.h +++ b/drivers/staging/vt6655/hostap.h @@ -26,14 +26,10 @@ * */ - #ifndef __HOSTAP_H__ #define __HOSTAP_H__ -#if !defined(__DEVICE_H__) #include "device.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -57,11 +53,6 @@ /*--------------------- Export Functions --------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - #ifndef ETH_P_PAE #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ #endif /* ETH_P_PAE */ @@ -73,13 +64,6 @@ extern "C" { /* Assume C declarations for C++ */ int hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked); int hostap_ioctl(PSDevice pDevice, struct iw_point *p); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __HOSTAP_H__ diff --git a/drivers/staging/vt6655/iocmd.h b/drivers/staging/vt6655/iocmd.h index 8676bd6ecf84..60c0a3623613 100644 --- a/drivers/staging/vt6655/iocmd.h +++ b/drivers/staging/vt6655/iocmd.h @@ -29,10 +29,7 @@ #ifndef __IOCMD_H__ #define __IOCMD_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index a4b0c939c40b..47a5ff81df25 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -30,32 +30,14 @@ * */ - -#if !defined(__IOCTL_H__) #include "ioctl.h" -#endif -#if !defined(__IOCMD_H__) #include "iocmd.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__HOSTAP_H__) #include "hostap.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__WPACTL_H__) #include "wpactl.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/ioctl.h b/drivers/staging/vt6655/ioctl.h index 9c6816eab46c..07d228399c3c 100644 --- a/drivers/staging/vt6655/ioctl.h +++ b/drivers/staging/vt6655/ioctl.h @@ -26,14 +26,10 @@ * */ - #ifndef __IOCTL_H__ #define __IOCTL_H__ -#if !defined(__DEVICE_H__) #include "device.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -44,12 +40,6 @@ /*--------------------- Export Functions --------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - - int private_ioctl(PSDevice pDevice, struct ifreq *rq); /* @@ -61,13 +51,6 @@ VOID vConfigWEPKey ( ); */ -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __IOCTL_H__ diff --git a/drivers/staging/vt6655/iowpa.h b/drivers/staging/vt6655/iowpa.h index 15e3eb91ac30..33ae054478dc 100644 --- a/drivers/staging/vt6655/iowpa.h +++ b/drivers/staging/vt6655/iowpa.h @@ -29,7 +29,6 @@ #ifndef __IOWPA_H__ #define __IOWPA_H__ - /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 5b80639ab8c8..4b1ce8691764 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -30,43 +30,20 @@ * */ - -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__IOCTL_H__) #include "ioctl.h" -#endif -#if !defined(__IOCMD_H__) #include "iocmd.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__HOSTAP_H__) #include "hostap.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__POWER_H__) #include "power.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif -#if !defined(__WPACTL_H__) #include "wpactl.h" #endif -#endif #include extern WORD TxRate_iwconfig;//2008-5-8 by chester diff --git a/drivers/staging/vt6655/iwctl.h b/drivers/staging/vt6655/iwctl.h index 962235f2f397..3096de0ba1bd 100644 --- a/drivers/staging/vt6655/iwctl.h +++ b/drivers/staging/vt6655/iwctl.h @@ -26,14 +26,10 @@ * */ - #ifndef __IWCTL_H__ #define __IWCTL_H__ -#if !defined(__DEVICE_H__) #include "device.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -44,12 +40,6 @@ /*--------------------- Export Functions --------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - - struct iw_statistics *iwctl_get_wireless_stats (struct net_device *dev); @@ -233,13 +223,6 @@ int iwctl_siwmlme(struct net_device *dev, extern const struct iw_handler_def iwctl_handler_def; extern const struct iw_priv_args iwctl_private_args; -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __IWCTL_H__ diff --git a/drivers/staging/vt6655/kcompat.h b/drivers/staging/vt6655/kcompat.h index 7006e8f2ccd3..2cf634ca67d6 100644 --- a/drivers/staging/vt6655/kcompat.h +++ b/drivers/staging/vt6655/kcompat.h @@ -25,6 +25,7 @@ * Date: Apr 8, 2002 * */ + #ifndef _KCOMPAT_H #define _KCOMPAT_H diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index 41be46970f19..e63126f0c60a 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -36,23 +36,11 @@ * */ - -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__KEY_H__) #include "key.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/key.h b/drivers/staging/vt6655/key.h index 1b39f4fd3250..ba797c7b3c17 100644 --- a/drivers/staging/vt6655/key.h +++ b/drivers/staging/vt6655/key.h @@ -27,21 +27,12 @@ * */ - #ifndef __KEY_H__ #define __KEY_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - -#if !defined(__TETHER_H__) #include "tether.h" -#endif - -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif /*--------------------- Export Definitions -------------------------*/ #define MAX_GROUP_KEY 4 @@ -109,9 +100,6 @@ typedef struct tagSKeyManagement /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ VOID KeyvInitTable(PSKeyManagement pTable, DWORD_PTR dwIoBase); @@ -192,11 +180,5 @@ BOOL KeybSetAllGroupKey ( BYTE byLocalID ); -#ifdef __cplusplus -} /* End of extern "C" { */ - -#endif /* __cplusplus */ - - #endif // __KEY_H__ diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 29b0d0ac724a..889866c13c75 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -68,21 +68,10 @@ * */ - - -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif - WORD TxRate_iwconfig;//2008-5-8 by chester /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index c92867b16899..3ba87fb64d3c 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -34,15 +34,9 @@ #ifndef __MAC_H__ #define __MAC_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__UPC_H__) #include "upc.h" -#endif /*--------------------- Export Definitions -------------------------*/ // @@ -1079,9 +1073,6 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ extern WORD TxRate_iwconfig;//2008-5-8 by chester VOID MACvReadAllRegs(DWORD_PTR dwIoBase, PBYTE pbyMacRegs); @@ -1156,9 +1147,5 @@ void MACvDisableDefaultKey(DWORD_PTR dwIoBase); void MACvSetDefaultTKIPKeyEntry(DWORD_PTR dwIoBase, UINT uKeyLen, UINT uKeyIdx, PDWORD pdwKey, BYTE byLocalID); void MACvSetDefaultKeyCtl(DWORD_PTR dwIoBase, WORD wKeyCtl, UINT uEntryIdx, BYTE byLocalID); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - #endif // __MAC_H__ diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 2fc54e9dea38..f411aced3281 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -37,31 +37,14 @@ * */ - -#if !defined(__UPC_H__) #include "upc.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__MIB_H__) #include "mib.h" -#endif -#if !defined(__WCTL_H__) #include "wctl.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif /*--------------------- Static Definitions -------------------------*/ static int msglevel =MSG_LEVEL_INFO; diff --git a/drivers/staging/vt6655/mib.h b/drivers/staging/vt6655/mib.h index fc3675c76eab..69e04f70b6c1 100644 --- a/drivers/staging/vt6655/mib.h +++ b/drivers/staging/vt6655/mib.h @@ -29,19 +29,9 @@ #ifndef __MIB_H__ #define __MIB_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__DESC_H__) #include "desc.h" -#endif - - - -//#define ULONGLONG ULONG /*--------------------- Export Definitions -------------------------*/ // @@ -351,10 +341,6 @@ typedef struct tagSStatCounter { /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - void STAvClearAllCounter(PSStatCounter pStatistic); @@ -386,13 +372,6 @@ void STAvUpdate802_11Counter( void STAvClear802_11Counter(PSDot11Counters p802_11Counter); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __MIB_H__ diff --git a/drivers/staging/vt6655/michael.c b/drivers/staging/vt6655/michael.c index 7bda4c19e903..2c8f875659dd 100644 --- a/drivers/staging/vt6655/michael.c +++ b/drivers/staging/vt6655/michael.c @@ -39,15 +39,9 @@ * */ -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__MICHAEL_H__) #include "michael.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/michael.h b/drivers/staging/vt6655/michael.h index 62a24a6083aa..dcce12e5b6cc 100644 --- a/drivers/staging/vt6655/michael.h +++ b/drivers/staging/vt6655/michael.h @@ -28,13 +28,11 @@ * */ - #ifndef __MICHAEL_H__ #define __MICHAEL_H__ -#if !defined(__UMEM_H__) #include "umem.h" -#endif + /*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Types ------------------------------*/ diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index db5c1159a6b6..a0ca66ec1d08 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -37,44 +37,17 @@ * */ - - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__POWER_H__) #include "power.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif - - - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/rc4.c b/drivers/staging/vt6655/rc4.c index 5ad12a3746c0..e6c61312fd28 100644 --- a/drivers/staging/vt6655/rc4.c +++ b/drivers/staging/vt6655/rc4.c @@ -30,9 +30,7 @@ * */ -#if !defined(__RC4_H__) #include "rc4.h" -#endif VOID rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len) { diff --git a/drivers/staging/vt6655/rc4.h b/drivers/staging/vt6655/rc4.h index 2344f35ae1d6..bf607c9d446a 100644 --- a/drivers/staging/vt6655/rc4.h +++ b/drivers/staging/vt6655/rc4.h @@ -30,11 +30,7 @@ #ifndef __RC4_H__ #define __RC4_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Types ------------------------------*/ diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 40c7bb0e12d7..73648ba88a3e 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -32,21 +32,11 @@ * */ -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__SROM_H__) #include "srom.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/rf.h b/drivers/staging/vt6655/rf.h index 974abc3d20d9..f316bcced8e8 100644 --- a/drivers/staging/vt6655/rf.h +++ b/drivers/staging/vt6655/rf.h @@ -27,16 +27,12 @@ * */ - #ifndef __RF_H__ #define __RF_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif + /*--------------------- Export Definitions -------------------------*/ // // Baseband RF pair definition in eeprom (Bits 6..0) @@ -79,9 +75,6 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ BOOL IFRFbWriteEmbeded(DWORD_PTR dwIoBase, DWORD dwData); BOOL RFbSelectChannel(DWORD_PTR dwIoBase, BYTE byRFType, BYTE byChannel); @@ -107,11 +100,6 @@ RFvRSSITodBm( BOOL RFbAL7230SelectChannelPostProcess(DWORD_PTR dwIoBase, BYTE byOldChannel, BYTE byNewChannel); //}} RobertYu -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __RF_H__ diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 098a1355aece..eb73fdb801aa 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -48,55 +48,22 @@ * */ - -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__MICHAEL_H__) #include "michael.h" -#endif -#if !defined(__TKIP_H__) #include "tkip.h" -#endif -#if !defined(__TCRC_H__) #include "tcrc.h" -#endif -#if !defined(__WCTL_H__) #include "wctl.h" -#endif -#if !defined(__WROUTE_H__) #include "wroute.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__HOSTAP_H__) #include "hostap.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h index 5320e72a8da7..17bd1b1f40e6 100644 --- a/drivers/staging/vt6655/rxtx.h +++ b/drivers/staging/vt6655/rxtx.h @@ -26,20 +26,12 @@ * */ - #ifndef __RXTX_H__ #define __RXTX_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif - /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c index 655d68593701..81b3934326f4 100644 --- a/drivers/staging/vt6655/srom.c +++ b/drivers/staging/vt6655/srom.c @@ -42,28 +42,12 @@ * */ - -#if !defined(__UPC_H__) #include "upc.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__SROM_H__) #include "srom.h" -#endif - - - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/srom.h b/drivers/staging/vt6655/srom.h index 46c0f6a05523..ba123ee61d24 100644 --- a/drivers/staging/vt6655/srom.h +++ b/drivers/staging/vt6655/srom.h @@ -27,16 +27,10 @@ * */ - #ifndef __SROM_H__ #define __SROM_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - - /*--------------------- Export Definitions -------------------------*/ @@ -140,10 +134,6 @@ typedef struct tagSSromReg { /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - BYTE SROMbyReadEmbedded(DWORD_PTR dwIoBase, BYTE byContntOffset); BOOL SROMbWriteEmbedded(DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byData); @@ -164,12 +154,4 @@ VOID SROMvReadSubSysVenId(DWORD_PTR dwIoBase, PDWORD pdwSubSysVenId); BOOL SROMbAutoLoad (DWORD_PTR dwIoBase); - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __EEPROM_H__ diff --git a/drivers/staging/vt6655/tbit.h b/drivers/staging/vt6655/tbit.h index 7c3a82e9b608..1850282ce443 100644 --- a/drivers/staging/vt6655/tbit.h +++ b/drivers/staging/vt6655/tbit.h @@ -27,15 +27,10 @@ * */ - #ifndef __TBIT_H__ #define __TBIT_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/tcrc.c b/drivers/staging/vt6655/tcrc.c index b70080c267c8..79347e48369a 100644 --- a/drivers/staging/vt6655/tcrc.c +++ b/drivers/staging/vt6655/tcrc.c @@ -33,16 +33,8 @@ * */ - -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TCRC_H__) #include "tcrc.h" -#endif - - - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/tcrc.h b/drivers/staging/vt6655/tcrc.h index ebea22ed2da6..5faa48b0a748 100644 --- a/drivers/staging/vt6655/tcrc.h +++ b/drivers/staging/vt6655/tcrc.h @@ -26,16 +26,10 @@ * */ - #ifndef __TCRC_H__ #define __TCRC_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - - /*--------------------- Export Definitions -------------------------*/ @@ -48,23 +42,11 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed); DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte); DWORD CRCdwGetCrc32Ex(PBYTE pbyData, UINT cbByte, DWORD dwPreCRC); - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __TCRC_H__ diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c index fd69423fe14b..7268735d01ce 100644 --- a/drivers/staging/vt6655/tether.c +++ b/drivers/staging/vt6655/tether.c @@ -32,24 +32,11 @@ * */ -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TCRC_H__) #include "tcrc.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif - - - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/tether.h b/drivers/staging/vt6655/tether.h index 8f40a74bf3b9..5a3c326436c6 100644 --- a/drivers/staging/vt6655/tether.h +++ b/drivers/staging/vt6655/tether.h @@ -26,18 +26,10 @@ * */ - - #ifndef __TETHER_H__ #define __TETHER_H__ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - - /*--------------------- Export Definitions -------------------------*/ // @@ -233,23 +225,11 @@ S802_11Header, *PS802_11Header; /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr); //BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr); BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, UINT cbFrameLength); - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __TETHER_H__ diff --git a/drivers/staging/vt6655/tkip.c b/drivers/staging/vt6655/tkip.c index 2ded8420c390..c02ce6a713d3 100644 --- a/drivers/staging/vt6655/tkip.c +++ b/drivers/staging/vt6655/tkip.c @@ -32,20 +32,10 @@ * */ - -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__TKIP_H__) #include "tkip.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif - /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/tkip.h b/drivers/staging/vt6655/tkip.h index dc8382b67019..847ecdf97ee8 100644 --- a/drivers/staging/vt6655/tkip.h +++ b/drivers/staging/vt6655/tkip.h @@ -27,19 +27,11 @@ * */ - #ifndef __TKIP_H__ #define __TKIP_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - -#if !defined(__TETHER_H__) #include "tether.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ #define TKIP_KEY_LEN 16 @@ -53,9 +45,6 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ VOID TKIPvMixKey( PBYTE pbyTKey, @@ -65,11 +54,6 @@ VOID TKIPvMixKey( PBYTE pbyRC4Key ); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __TKIP_H__ diff --git a/drivers/staging/vt6655/tmacro.h b/drivers/staging/vt6655/tmacro.h index d18b01c6a470..e96c140de052 100644 --- a/drivers/staging/vt6655/tmacro.h +++ b/drivers/staging/vt6655/tmacro.h @@ -26,7 +26,6 @@ * */ - #ifndef __TMACRO_H__ #define __TMACRO_H__ diff --git a/drivers/staging/vt6655/tpci.h b/drivers/staging/vt6655/tpci.h index 3a04845cbb51..d1fe2560027b 100644 --- a/drivers/staging/vt6655/tpci.h +++ b/drivers/staging/vt6655/tpci.h @@ -29,16 +29,10 @@ * */ - #ifndef __TPCI_H__ #define __TPCI_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - - /*--------------------- Export Definitions -------------------------*/ #define MAX_PCI_BUS 4 // max. # of PCI bus that we support diff --git a/drivers/staging/vt6655/umem.h b/drivers/staging/vt6655/umem.h index 2c3eafa038e7..916adde864ae 100644 --- a/drivers/staging/vt6655/umem.h +++ b/drivers/staging/vt6655/umem.h @@ -31,11 +31,7 @@ #ifndef __UMEM_H__ #define __UMEM_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ // 4-byte memory tag diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h index 113fc2c88c11..acd1b661490d 100644 --- a/drivers/staging/vt6655/upc.h +++ b/drivers/staging/vt6655/upc.h @@ -26,16 +26,11 @@ * */ - #ifndef __UPC_H__ #define __UPC_H__ -#if !defined(DEVICE_H) #include "device.h" -#endif -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index 58a1ba0eac07..40bb1ccb1a39 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -31,32 +31,15 @@ * */ -#if !defined(__VNTWIFI_H__) #include "vntwifi.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif - - -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__IEEE11h_H__) #include "IEEE11h.h" -#endif -#if !defined(__COUNTRY_H__) #include "country.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__DATARATE_H__) #include "datarate.h" -#endif + //#define PLICE_DEBUG /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/vntwifi.h b/drivers/staging/vt6655/vntwifi.h index 9af538bd44e4..2854dfcb19aa 100644 --- a/drivers/staging/vt6655/vntwifi.h +++ b/drivers/staging/vt6655/vntwifi.h @@ -30,15 +30,9 @@ #ifndef __VNTWIFI_H__ #define __VNTWIFI_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif #include "wpa2.h" /*--------------------- Export Definitions -------------------------*/ @@ -146,11 +140,6 @@ typedef enum tagWMAC_POWER_MODE { /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - - VOID VNTWIFIvSetIBSSParameter ( IN PVOID pMgmtHandle, @@ -321,9 +310,4 @@ VNTWIFIbRadarPresent( ); */ -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif //__VNTWIFI_H__ diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index 5d7a12b9e75e..39a6988bd34f 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -38,58 +38,22 @@ * */ - - - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__POWER_H__) #include "power.h" -#endif -#if !defined(__WCTL_H__) #include "wctl.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -//DavidWang -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/wcmd.h b/drivers/staging/vt6655/wcmd.h index 778208a336e8..af32e57e335f 100644 --- a/drivers/staging/vt6655/wcmd.h +++ b/drivers/staging/vt6655/wcmd.h @@ -29,15 +29,9 @@ #ifndef __WCMD_H__ #define __WCMD_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c index 2b41c1999834..4406f8caa555 100644 --- a/drivers/staging/vt6655/wctl.c +++ b/drivers/staging/vt6655/wctl.c @@ -34,16 +34,9 @@ * */ - -#if !defined(__WCTL_H__) #include "wctl.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/wctl.h b/drivers/staging/vt6655/wctl.h index f75ca59f6c61..a1ac4791bfd3 100644 --- a/drivers/staging/vt6655/wctl.h +++ b/drivers/staging/vt6655/wctl.h @@ -26,21 +26,12 @@ * */ - #ifndef __WCTL_H__ #define __WCTL_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ @@ -105,22 +96,12 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ BOOL WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader); BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, UINT cbFrameLength, BOOL bWEP, BOOL bExtIV); UINT WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader); UINT WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __WCTL_H__ diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index fb15367b0fb7..ab845666b0c0 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -61,64 +61,25 @@ * */ - -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TBIT_H__) #include "tbit.h" -#endif -#if !defined(__DESC_H__) #include "desc.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__POWER_H__) #include "power.h" -#endif -#if !defined(__DATARATE_H__) #include "datarate.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__WPA_H__) #include "wpa.h" -#endif -#if !defined(__RF_H__) #include "rf.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif #define PLICE_DEBUG diff --git a/drivers/staging/vt6655/wmgr.h b/drivers/staging/vt6655/wmgr.h index 38c6ef2a8f6f..1c1f2ea5782c 100644 --- a/drivers/staging/vt6655/wmgr.h +++ b/drivers/staging/vt6655/wmgr.h @@ -31,36 +31,17 @@ * */ - #ifndef __WMGR_H__ #define __WMGR_H__ -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__WCMD_H__) #include "wcmd.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__CARD_H__) -#include "card.h" -#endif -#if !defined(__WPA2_H__) #include "wpa2.h" -#endif -#if !defined(__VNTWIFI_H__) #include "vntwifi.h" -#endif - - +#include "card.h" /*--------------------- Export Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index 93614a06efed..2e508973c42c 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -32,38 +32,16 @@ * */ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__TMACRO_H__) #include "tmacro.h" -#endif -#if !defined(__TETHER_H__) #include "tether.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__WPA_H__) #include "wpa.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif - /*--------------------- Static Variables --------------------------*/ static int msglevel =MSG_LEVEL_INFO; diff --git a/drivers/staging/vt6655/wpa.h b/drivers/staging/vt6655/wpa.h index 8000a37c6fc3..9d9ce01d0c61 100644 --- a/drivers/staging/vt6655/wpa.h +++ b/drivers/staging/vt6655/wpa.h @@ -31,14 +31,8 @@ #ifndef __WPA_H__ #define __WPA_H__ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif - /*--------------------- Export Definitions -------------------------*/ @@ -63,9 +57,6 @@ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ VOID WPA_ClearRSN( @@ -90,9 +81,4 @@ WPAb_Is_RSN( IN PWLAN_IE_RSN_EXT pRSN ); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __WPA_H__ diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index 82c972dbfbfe..1e6244fc23a0 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -30,19 +30,11 @@ * Date: Oct. 4, 2004 * */ -#if !defined(__WPA2_H__) + #include "wpa2.h" -#endif -#if !defined(__UMEM_H__) #include "umem.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif - /*--------------------- Static Definitions -------------------------*/ static int msglevel =MSG_LEVEL_INFO; diff --git a/drivers/staging/vt6655/wpa2.h b/drivers/staging/vt6655/wpa2.h index cd1ea14b586e..e553b3869008 100644 --- a/drivers/staging/vt6655/wpa2.h +++ b/drivers/staging/vt6655/wpa2.h @@ -31,22 +31,10 @@ #ifndef __WPA2_H__ #define __WPA2_H__ - -#if !defined(__TTYPE_H__) #include "ttype.h" -#endif -#if !defined(__80211MGR_H__) #include "80211mgr.h" -#endif -#if !defined(__80211HDR_H__) #include "80211hdr.h" -#endif -#if !defined(__BSSDB_H__) #include "bssdb.h" -#endif - - - /*--------------------- Export Definitions -------------------------*/ #define MAX_PMKID_CACHE 16 @@ -69,9 +57,6 @@ typedef struct tagSPMKIDCache { /*--------------------- Export Types ------------------------------*/ /*--------------------- Export Functions --------------------------*/ -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ VOID WPA2_ClearRSN ( @@ -90,10 +75,4 @@ WPA2uSetIEs( OUT PWLAN_IE_RSN pRSNIEs ); - -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - #endif // __WPA2_H__ diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 460182c74a3e..574e0b0a9c28 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -31,32 +31,14 @@ * */ - -#if !defined(__WPACTL_H__) #include "wpactl.h" -#endif -#if !defined(__KEY_H__) #include "key.h" -#endif -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__DEVICE_H__) #include "device.h" -#endif -#if !defined(__WMGR_H__) #include "wmgr.h" -#endif -#if !defined(__IOCMD_H__) #include "iocmd.h" -#endif -#if !defined(__IOWPA_H__) #include "iowpa.h" -#endif -//2008-0717-05, by James -#if !defined(__RF_H__) #include "rf.h" -#endif /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/wpactl.h b/drivers/staging/vt6655/wpactl.h index b869cfdf42c3..b0d92d51a2a6 100644 --- a/drivers/staging/vt6655/wpactl.h +++ b/drivers/staging/vt6655/wpactl.h @@ -26,19 +26,13 @@ * */ - #ifndef __WPACTL_H__ #define __WPACTL_H__ -#if !defined(__DEVICE_H__) #include "device.h" -#endif - #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT -#if !defined(__IOWPA_H__) #include "iowpa.h" #endif -#endif /*--------------------- Export Definitions -------------------------*/ @@ -68,22 +62,10 @@ typedef ULONGLONG NDIS_802_11_KEY_RSC; /*--------------------- Export Functions --------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - int wpa_set_wpadev(PSDevice pDevice, int val); int wpa_ioctl(PSDevice pDevice, struct iw_point *p); int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __WPACL_H__ diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c index d16771e56d0f..ab991618a298 100644 --- a/drivers/staging/vt6655/wroute.c +++ b/drivers/staging/vt6655/wroute.c @@ -31,25 +31,13 @@ * */ - -#if !defined(__MAC_H__) #include "mac.h" -#endif -#if !defined(__TCRC_H__) #include "tcrc.h" -#endif -#if !defined(__RXTX_H__) #include "rxtx.h" -#endif -#if !defined(__WROUTE_H__) #include "wroute.h" -#endif -#if !defined(__CARD_H__) #include "card.h" -#endif -#if !defined(__BASEBAND_H__) #include "baseband.h" -#endif + /*--------------------- Static Definitions -------------------------*/ /*--------------------- Static Classes ----------------------------*/ diff --git a/drivers/staging/vt6655/wroute.h b/drivers/staging/vt6655/wroute.h index ea5f5896e9ba..295cdc5b8e9d 100644 --- a/drivers/staging/vt6655/wroute.h +++ b/drivers/staging/vt6655/wroute.h @@ -26,16 +26,10 @@ * */ - #ifndef __WROUTE_H__ #define __WROUTE_H__ - -#if !defined(__DEVICE_H__) #include "device.h" -#endif - - /*--------------------- Export Definitions -------------------------*/ @@ -45,20 +39,8 @@ /*--------------------- Export Functions --------------------------*/ - -#ifdef __cplusplus -extern "C" { /* Assume C declarations for C++ */ -#endif /* __cplusplus */ - BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeIndex); -#ifdef __cplusplus -} /* End of extern "C" { */ -#endif /* __cplusplus */ - - - - #endif // __WROUTE_H__ -- cgit v1.2.3-59-g8ed1b From 51b6d9c299f10780b3093d3748257ecc4ae7340d Mon Sep 17 00:00:00 2001 From: Jim Lieb Date: Wed, 12 Aug 2009 14:54:10 -0700 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/IEEE11h.c | 15 ++-- drivers/staging/vt6655/aes_ccmp.c | 23 +++--- drivers/staging/vt6655/baseband.c | 1 - drivers/staging/vt6655/bssdb.c | 13 ++-- drivers/staging/vt6655/card.c | 11 ++- drivers/staging/vt6655/dpc.c | 11 ++- drivers/staging/vt6655/ioctl.c | 5 +- drivers/staging/vt6655/iwctl.c | 1 - drivers/staging/vt6655/key.c | 27 ++++--- drivers/staging/vt6655/mib.c | 9 +-- drivers/staging/vt6655/michael.h | 2 - drivers/staging/vt6655/power.c | 1 - drivers/staging/vt6655/rxtx.c | 159 +++++++++++++++++++------------------- drivers/staging/vt6655/tkip.c | 1 - drivers/staging/vt6655/umem.h | 71 ----------------- drivers/staging/vt6655/vntwifi.c | 11 ++- drivers/staging/vt6655/wcmd.c | 11 ++- drivers/staging/vt6655/wmgr.c | 57 +++++++------- drivers/staging/vt6655/wpa.c | 27 ++++--- drivers/staging/vt6655/wpa2.c | 31 ++++---- 20 files changed, 198 insertions(+), 289 deletions(-) delete mode 100644 drivers/staging/vt6655/umem.h (limited to 'drivers/staging/vt6655/power.c') 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 && uDMAIdx != TYPE_BEACONDMA) PSCTS pBuf = (PSCTS)pvCTS; @@ -1118,7 +1117,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); } } } @@ -1546,7 +1545,7 @@ s_cbFillTxBufHead ( } } // Auto Fall Back } - ZERO_MEMORY((PVOID)(pbyTxBufferAddr + wTxBufSize), (cbHeaderLength - wTxBufSize)); + memset((PVOID)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize)); ////////////////////////////////////////////////////////////////// if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { @@ -1627,13 +1626,13 @@ s_cbFillTxBufHead ( if (ntohs(psEthHeader->wType) > MAX_DATA_LEN) { if ((psEthHeader->wType == TYPE_PKT_IPX) || (psEthHeader->wType == cpu_to_le16(0xF380))) { - MEMvCopy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6); + memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6); } else { - MEMvCopy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6); + memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6); } pbyType = (PBYTE) (pbyPayloadHead + 6); - MEMvCopy(pbyType, &(psEthHeader->wType), sizeof(WORD)); + memcpy(pbyType, &(psEthHeader->wType), sizeof(WORD)); cb802_1_H_len = 8; } @@ -1655,10 +1654,10 @@ s_cbFillTxBufHead ( uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen + cb802_1_H_len; //copy TxBufferHeader + MacHeader to desc - MEMvCopy(pbyBuffer, (PVOID)psTxBufHd, uLength); + memcpy(pbyBuffer, (PVOID)psTxBufHd, uLength); // Copy the Packet into a tx Buffer - MEMvCopy((pbyBuffer + uLength), (pPacket + 14), (cbFragPayloadSize - cb802_1_H_len)); + memcpy((pbyBuffer + uLength), (pPacket + 14), (cbFragPayloadSize - cb802_1_H_len)); uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len; @@ -1742,12 +1741,12 @@ s_cbFillTxBufHead ( uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen; //copy TxBufferHeader + MacHeader to desc - MEMvCopy(pbyBuffer, (PVOID)psTxBufHd, uLength); + memcpy(pbyBuffer, (PVOID)psTxBufHd, uLength); // Copy the Packet into a tx Buffer if (bMIC2Frag == FALSE) { - MEMvCopy((pbyBuffer + uLength), + memcpy((pbyBuffer + uLength), (pPacket + 14 + uTotalCopyLength), (cbLastFragPayloadSize - cbMIClen) ); @@ -1768,16 +1767,16 @@ s_cbFillTxBufHead ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Last MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R); } else { if (uMICFragLen >= 4) { - MEMvCopy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)), + memcpy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)), (cbMIClen - uMICFragLen)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen >= 4: %X, %d\n", *(PBYTE)((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)), (cbMIClen - uMICFragLen)); } else { - MEMvCopy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_L + uMICFragLen), + memcpy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_L + uMICFragLen), (4 - uMICFragLen)); - MEMvCopy((pbyBuffer + uLength + (4 - uMICFragLen)), &dwSafeMIC_R, 4); + memcpy((pbyBuffer + uLength + (4 - uMICFragLen)), &dwSafeMIC_R, 4); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen < 4: %X, %d\n", *(PBYTE)((PBYTE)&dwSafeMIC_R + uMICFragLen - 4), (cbMIClen - uMICFragLen)); @@ -1877,10 +1876,10 @@ s_cbFillTxBufHead ( uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen; //copy TxBufferHeader + MacHeader to desc - MEMvCopy(pbyBuffer, (PVOID)psTxBufHd, uLength); + memcpy(pbyBuffer, (PVOID)psTxBufHd, uLength); // Copy the Packet into a tx Buffer - MEMvCopy((pbyBuffer + uLength), + memcpy((pbyBuffer + uLength), (pPacket + 14 + uTotalCopyLength), cbFragPayloadSize ); @@ -1991,13 +1990,13 @@ s_cbFillTxBufHead ( if (ntohs(psEthHeader->wType) > MAX_DATA_LEN) { if ((psEthHeader->wType == TYPE_PKT_IPX) || (psEthHeader->wType == cpu_to_le16(0xF380))) { - MEMvCopy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6); + memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6); } else { - MEMvCopy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6); + memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6); } pbyType = (PBYTE) (pbyPayloadHead + 6); - MEMvCopy(pbyType, &(psEthHeader->wType), sizeof(WORD)); + memcpy(pbyType, &(psEthHeader->wType), sizeof(WORD)); cb802_1_H_len = 8; } @@ -2017,10 +2016,10 @@ s_cbFillTxBufHead ( uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen + cb802_1_H_len; //copy TxBufferHeader + MacHeader to desc - MEMvCopy(pbyBuffer, (PVOID)psTxBufHd, uLength); + memcpy(pbyBuffer, (PVOID)psTxBufHd, uLength); // Copy the Packet into a tx Buffer - MEMvCopy((pbyBuffer + uLength), + memcpy((pbyBuffer + uLength), (pPacket + 14), cbFrameBodySize - cb802_1_H_len ); @@ -2120,7 +2119,7 @@ vGenerateFIFOHeader ( wTxBufSize = sizeof(STxBufHead); - ZERO_MEMORY(pTxBufHead, wTxBufSize); + memset(pTxBufHead, 0, wTxBufSize); //Set FIFOCTL_NEEDACK if ((pDevice->eOPMode == OP_MODE_ADHOC) || @@ -2280,7 +2279,7 @@ vGenerateMACHeader ( { PS802_11Header pMACHeader = (PS802_11Header)pbyBufferAddr; - ZERO_MEMORY(pMACHeader, (sizeof(S802_11Header))); //- sizeof(pMACHeader->dwIV))); + memset(pMACHeader, 0, (sizeof(S802_11Header))); //- sizeof(pMACHeader->dwIV))); if (uDMAIdx == TYPE_ATIMDMA) { pMACHeader->wFrameCtl = TYPE_802_11_ATIM; @@ -2289,21 +2288,21 @@ vGenerateMACHeader ( } if (pDevice->eOPMode == OP_MODE_AP) { - MEMvCopy(&(pMACHeader->abyAddr1[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(pMACHeader->abyAddr2[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(pMACHeader->abyAddr3[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr1[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr2[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr3[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); pMACHeader->wFrameCtl |= FC_FROMDS; } else { if (pDevice->eOPMode == OP_MODE_ADHOC) { - MEMvCopy(&(pMACHeader->abyAddr1[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(pMACHeader->abyAddr2[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(pMACHeader->abyAddr3[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr1[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr2[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr3[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); } else { - MEMvCopy(&(pMACHeader->abyAddr3[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(pMACHeader->abyAddr2[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(pMACHeader->abyAddr1[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr3[0]), &(psEthHeader->abyDstAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr2[0]), &(psEthHeader->abySrcAddr[0]), U_ETHER_ADDR_LEN); + memcpy(&(pMACHeader->abyAddr1[0]), &(pDevice->abyBSSID[0]), U_ETHER_ADDR_LEN); pMACHeader->wFrameCtl |= FC_TODS; } } @@ -2316,7 +2315,7 @@ vGenerateMACHeader ( if (pDevice->bLongHeader) { PWLAN_80211HDR_A4 pMACA4Header = (PWLAN_80211HDR_A4) pbyBufferAddr; pMACHeader->wFrameCtl |= (FC_TODS | FC_FROMDS); - MEMvCopy(pMACA4Header->abyAddr4, pDevice->abyBSSID, WLAN_ADDR_LEN); + memcpy(pMACA4Header->abyAddr4, pDevice->abyBSSID, WLAN_ADDR_LEN); } pMACHeader->wSeqCtl = cpu_to_le16(pDevice->wSeqCounter << 4); @@ -2518,10 +2517,10 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { cbHeaderSize = wTxBufSize + sizeof(SRrvTime_ab) + sizeof(STxDataHead_ab); } - ZERO_MEMORY((PVOID)(pbyTxBufferAddr + wTxBufSize), (cbHeaderSize - wTxBufSize)); + memset((PVOID)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderSize - wTxBufSize)); - MEMvCopy(&(sEthHeader.abyDstAddr[0]), &(pPacket->p80211Header->sA3.abyAddr1[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(sEthHeader.abySrcAddr[0]), &(pPacket->p80211Header->sA3.abyAddr2[0]), U_ETHER_ADDR_LEN); + memcpy(&(sEthHeader.abyDstAddr[0]), &(pPacket->p80211Header->sA3.abyAddr1[0]), U_ETHER_ADDR_LEN); + memcpy(&(sEthHeader.abySrcAddr[0]), &(pPacket->p80211Header->sA3.abyAddr2[0]), U_ETHER_ADDR_LEN); //========================= // No Fragmentation //========================= @@ -2591,13 +2590,13 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, (PBYTE)pMACHeader, (WORD)cbFrameBodySize, NULL); - MEMvCopy(pMACHeader, pPacket->p80211Header, cbMacHdLen); - MEMvCopy(pbyPayloadHead, ((PBYTE)(pPacket->p80211Header) + cbMacHdLen), + memcpy(pMACHeader, pPacket->p80211Header, cbMacHdLen); + memcpy(pbyPayloadHead, ((PBYTE)(pPacket->p80211Header) + cbMacHdLen), cbFrameBodySize); } else { // Copy the Packet into a tx Buffer - MEMvCopy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen); + memcpy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen); } pMACHeader->wSeqCtl = cpu_to_le16(pDevice->wSeqCounter << 4); @@ -2714,7 +2713,7 @@ CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { //Generate Beacon Header pMACHeader = (PS802_11Header)(pbyBuffer + cbHeaderSize); - MEMvCopy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen); + memcpy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen); pMACHeader->wDurationID = 0; pMACHeader->wSeqCtl = cpu_to_le16(pDevice->wSeqCounter << 4); @@ -3063,9 +3062,9 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, UINT cbMPDU } - ZERO_MEMORY((PVOID)(pbyTxBufferAddr + wTxBufSize), (cbHeaderSize - wTxBufSize)); - MEMvCopy(&(sEthHeader.abyDstAddr[0]), &(p80211Header->sA3.abyAddr1[0]), U_ETHER_ADDR_LEN); - MEMvCopy(&(sEthHeader.abySrcAddr[0]), &(p80211Header->sA3.abyAddr2[0]), U_ETHER_ADDR_LEN); + memset((PVOID)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderSize - wTxBufSize)); + memcpy(&(sEthHeader.abyDstAddr[0]), &(p80211Header->sA3.abyAddr1[0]), U_ETHER_ADDR_LEN); + memcpy(&(sEthHeader.abySrcAddr[0]), &(p80211Header->sA3.abyAddr2[0]), U_ETHER_ADDR_LEN); //========================= // No Fragmentation //========================= diff --git a/drivers/staging/vt6655/tkip.c b/drivers/staging/vt6655/tkip.c index c02ce6a713d3..bbb3e62f03c0 100644 --- a/drivers/staging/vt6655/tkip.c +++ b/drivers/staging/vt6655/tkip.c @@ -35,7 +35,6 @@ #include "tmacro.h" #include "tbit.h" #include "tkip.h" -#include "umem.h" /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/umem.h b/drivers/staging/vt6655/umem.h deleted file mode 100644 index 916adde864ae..000000000000 --- a/drivers/staging/vt6655/umem.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * - * File: umem.h - * - * Purpose: Define Memory macros - * - * Author: Tevin Chen - * - * Date: Mar 17, 1997 - * - */ - - -#ifndef __UMEM_H__ -#define __UMEM_H__ - -#include "ttype.h" - -/*--------------------- Export Definitions -------------------------*/ -// 4-byte memory tag -#define MEM_TAG 'mTEW' - -// Macros used for memory allocation and deallocation. - - - -#define ZERO_MEMORY(Destination,Length) { \ - memset((PVOID)(Destination), \ - 0, \ - (ULONG)(Length) \ - ); \ -} - -#define MEMvCopy(pvDest, pvSource, uCount) { \ - memcpy((PVOID)(pvDest), \ - (PVOID)(pvSource), \ - (ULONG)(uCount) \ - ); \ -} - - -#define MEMEqualMemory(Destination,Source,Length) (!memcmp((Destination),(Source),(Length))) -/*--------------------- Export Classes ----------------------------*/ - -/*--------------------- Export Variables --------------------------*/ - -/*--------------------- Export Functions --------------------------*/ - - - - -#endif // __UMEM_H__ - - diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index 40bb1ccb1a39..b9e70043fdf9 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -32,7 +32,6 @@ */ #include "vntwifi.h" -#include "umem.h" #include "tbit.h" #include "IEEE11h.h" #include "country.h" @@ -677,7 +676,7 @@ VNTWIFIbSetPMKIDCache ( return (FALSE); } pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount; - MEMvCopy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); + memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); return (TRUE); } @@ -741,24 +740,24 @@ VNTWIFIbMeasureReport( switch (pMgmt->pCurrMeasureEIDRep->byType) { case MEASURE_TYPE_BASIC : pMgmt->pCurrMeasureEIDRep->len += sizeof(MEASEURE_REP_BASIC); - MEMvCopy( &(pMgmt->pCurrMeasureEIDRep->sRep.sBasic), + memcpy( &(pMgmt->pCurrMeasureEIDRep->sRep.sBasic), &(((PWLAN_IE_MEASURE_REQ) pvMeasureEID)->sReq), sizeof(MEASEURE_REQ)); pMgmt->pCurrMeasureEIDRep->sRep.sBasic.byMap = byBasicMap; break; case MEASURE_TYPE_CCA : pMgmt->pCurrMeasureEIDRep->len += sizeof(MEASEURE_REP_CCA); - MEMvCopy( &(pMgmt->pCurrMeasureEIDRep->sRep.sCCA), + memcpy( &(pMgmt->pCurrMeasureEIDRep->sRep.sCCA), &(((PWLAN_IE_MEASURE_REQ) pvMeasureEID)->sReq), sizeof(MEASEURE_REQ)); pMgmt->pCurrMeasureEIDRep->sRep.sCCA.byCCABusyFraction = byCCAFraction; break; case MEASURE_TYPE_RPI : pMgmt->pCurrMeasureEIDRep->len += sizeof(MEASEURE_REP_RPI); - MEMvCopy( &(pMgmt->pCurrMeasureEIDRep->sRep.sRPI), + memcpy( &(pMgmt->pCurrMeasureEIDRep->sRep.sRPI), &(((PWLAN_IE_MEASURE_REQ) pvMeasureEID)->sReq), sizeof(MEASEURE_REQ)); - MEMvCopy(pMgmt->pCurrMeasureEIDRep->sRep.sRPI.abyRPIdensity, pbyRPIs, 8); + memcpy(pMgmt->pCurrMeasureEIDRep->sRep.sRPI.abyRPIdensity, pbyRPIs, 8); break; default : break; diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index 39a6988bd34f..d81f5b79a157 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -50,7 +50,6 @@ #include "wctl.h" #include "card.h" #include "baseband.h" -#include "umem.h" #include "rxtx.h" #include "rf.h" #include "iowpa.h" @@ -930,14 +929,14 @@ s_bCommandComplete ( pDevice->eCommandState = WLAN_CMD_SCAN_START; pMgmt->uScanChannel = 0; if (pSSID->len != 0) { - MEMvCopy(pMgmt->abyScanSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); + memcpy(pMgmt->abyScanSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); } else { memset(pMgmt->abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); } /* if ((bForceSCAN == FALSE) && (pDevice->bLinkPass == TRUE)) { if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) && - (MEMEqualMemory(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) { + ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) { pDevice->eCommandState = WLAN_CMD_IDLE; } } @@ -948,7 +947,7 @@ s_bCommandComplete ( if (pSSID->len > WLAN_SSID_MAXLEN) pSSID->len = WLAN_SSID_MAXLEN; if (pSSID->len != 0) - MEMvCopy(pDevice->pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); + memcpy(pDevice->pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SSID_START\n"); break; case WLAN_CMD_DISASSOCIATE: @@ -1001,13 +1000,13 @@ BOOL bScheduleCommand ( switch (eCommand) { case WLAN_CMD_BSSID_SCAN: - MEMvCopy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, + memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = FALSE; break; case WLAN_CMD_SSID: - MEMvCopy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, + memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); break; 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 diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index 2e508973c42c..f92d33ffe775 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -33,7 +33,6 @@ */ #include "ttype.h" -#include "umem.h" #include "tmacro.h" #include "tether.h" #include "device.h" @@ -121,22 +120,22 @@ WPA_ParseRSN ( // information element header makes sense if ((pRSN->len >= 6) // oui1(4)+ver(2) - && (pRSN->byElementID == WLAN_EID_RSN_WPA) && MEMEqualMemory(pRSN->abyOUI, abyOUI01, 4) + && (pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) && (pRSN->wVersion == 1)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal RSN\n"); // update each variable if pRSN is long enough to contain the variable if (pRSN->len >= 10) //oui1(4)+ver(2)+GKSuite(4) { - if (MEMEqualMemory(pRSN->abyMulticast, abyOUI01, 4)) + if ( !memcmp(pRSN->abyMulticast, abyOUI01, 4)) pBSSList->byGKType = WPA_WEP40; - else if (MEMEqualMemory(pRSN->abyMulticast, abyOUI02, 4)) + else if ( !memcmp(pRSN->abyMulticast, abyOUI02, 4)) pBSSList->byGKType = WPA_TKIP; - else if (MEMEqualMemory(pRSN->abyMulticast, abyOUI03, 4)) + else if ( !memcmp(pRSN->abyMulticast, abyOUI03, 4)) pBSSList->byGKType = WPA_AESWRAP; - else if (MEMEqualMemory(pRSN->abyMulticast, abyOUI04, 4)) + else if ( !memcmp(pRSN->abyMulticast, abyOUI04, 4)) pBSSList->byGKType = WPA_AESCCMP; - else if (MEMEqualMemory(pRSN->abyMulticast, abyOUI05, 4)) + else if ( !memcmp(pRSN->abyMulticast, abyOUI05, 4)) pBSSList->byGKType = WPA_WEP104; else // any vendor checks here @@ -151,13 +150,13 @@ WPA_ParseRSN ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %ld\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType)); for(i = 0; (i < pRSN->wPKCount) && (j < sizeof(pBSSList->abyPKType)/sizeof(BYTE)); i++) { if(pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i) - if (MEMEqualMemory(pRSN->PKSList[i].abyOUI, abyOUI00, 4)) + if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI00, 4)) pBSSList->abyPKType[j++] = WPA_NONE; - else if (MEMEqualMemory(pRSN->PKSList[i].abyOUI, abyOUI02, 4)) + else if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI02, 4)) pBSSList->abyPKType[j++] = WPA_TKIP; - else if (MEMEqualMemory(pRSN->PKSList[i].abyOUI, abyOUI03, 4)) + else if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI03, 4)) pBSSList->abyPKType[j++] = WPA_AESWRAP; - else if (MEMEqualMemory(pRSN->PKSList[i].abyOUI, abyOUI04, 4)) + else if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI04, 4)) pBSSList->abyPKType[j++] = WPA_AESCCMP; else // any vendor checks here @@ -183,9 +182,9 @@ WPA_ParseRSN ( pIE_RSN_Auth->wAuthCount, sizeof(pBSSList->abyAuthType)); for(i = 0; (i < pIE_RSN_Auth->wAuthCount) && (j < sizeof(pBSSList->abyAuthType)/sizeof(BYTE)); i++) { if(pRSN->len >= 14+4+(m+i)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*i) - if (MEMEqualMemory(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI01, 4)) + if ( !memcmp(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI01, 4)) pBSSList->abyAuthType[j++] = WPA_AUTH_IEEE802_1X; - else if (MEMEqualMemory(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI02, 4)) + else if ( !memcmp(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI02, 4)) pBSSList->abyAuthType[j++] = WPA_AUTH_PSK; else // any vendor checks here @@ -307,7 +306,7 @@ WPAb_Is_RSN ( return FALSE; if ((pRSN->len >= 6) && // oui1(4)+ver(2) - (pRSN->byElementID == WLAN_EID_RSN_WPA) && MEMEqualMemory(pRSN->abyOUI, abyOUI01, 4) && + (pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) && (pRSN->wVersion == 1)) { return TRUE; } diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index 1e6244fc23a0..931b6bd360e6 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -32,7 +32,6 @@ */ #include "wpa2.h" -#include "umem.h" #include "device.h" #include "wmgr.h" @@ -142,15 +141,15 @@ WPA2vParseRSN ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal 802.11i RSN\n"); pbyOUI = &(pRSN->abyRSN[0]); - if (MEMEqualMemory(pbyOUI, abyOUIWEP40, 4)) + if ( !memcmp(pbyOUI, abyOUIWEP40, 4)) pBSSNode->byCSSGK = WLAN_11i_CSS_WEP40; - else if (MEMEqualMemory(pbyOUI, abyOUITKIP, 4)) + else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) pBSSNode->byCSSGK = WLAN_11i_CSS_TKIP; - else if (MEMEqualMemory(pbyOUI, abyOUICCMP, 4)) + else if ( !memcmp(pbyOUI, abyOUICCMP, 4)) pBSSNode->byCSSGK = WLAN_11i_CSS_CCMP; - else if (MEMEqualMemory(pbyOUI, abyOUIWEP104, 4)) + else if ( !memcmp(pbyOUI, abyOUIWEP104, 4)) pBSSNode->byCSSGK = WLAN_11i_CSS_WEP104; - else if (MEMEqualMemory(pbyOUI, abyOUIGK, 4)) { + else if ( !memcmp(pbyOUI, abyOUIGK, 4)) { // invalid CSS, P802.11i/D10.0, p32 return; } else @@ -172,19 +171,19 @@ WPA2vParseRSN ( for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(BYTE)); i++) { if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i) - if (MEMEqualMemory(pbyOUI, abyOUIGK, 4)) { + if ( !memcmp(pbyOUI, abyOUIGK, 4)) { pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_USE_GROUP; bUseGK = TRUE; - } else if (MEMEqualMemory(pbyOUI, abyOUIWEP40, 4)) { + } else if ( !memcmp(pbyOUI, abyOUIWEP40, 4)) { // Invialid CSS, continue to parsing - } else if (MEMEqualMemory(pbyOUI, abyOUITKIP, 4)) { + } else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) { if (pBSSNode->byCSSGK != WLAN_11i_CSS_CCMP) pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_TKIP; else ; // Invialid CSS, continue to parsing - } else if (MEMEqualMemory(pbyOUI, abyOUICCMP, 4)) { + } else if ( !memcmp(pbyOUI, abyOUICCMP, 4)) { pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_CCMP; - } else if (MEMEqualMemory(pbyOUI, abyOUIWEP104, 4)) { + } else if ( !memcmp(pbyOUI, abyOUIWEP104, 4)) { // Invialid CSS, continue to parsing } else { // any vendor checks here @@ -222,9 +221,9 @@ WPA2vParseRSN ( pbyOUI = &(pRSN->abyRSN[8+4*m]); for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(BYTE)); i++) { if (pRSN->len >= 10+(m+i)*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSS(2)+AKS(4*i) - if (MEMEqualMemory(pbyOUI, abyOUI8021X, 4)) + if ( !memcmp(pbyOUI, abyOUI8021X, 4)) pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_802_1X; - else if (MEMEqualMemory(pbyOUI, abyOUIPSK, 4)) + else if ( !memcmp(pbyOUI, abyOUIPSK, 4)) pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_PSK; else // any vendor checks here @@ -332,7 +331,7 @@ WPA2uSetIEs( // RSN Capabilites if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { - MEMvCopy(&pRSNIEs->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); + memcpy(&pRSNIEs->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); } else { pRSNIEs->abyRSN[16] = 0; pRSNIEs->abyRSN[17] = 0; @@ -347,9 +346,9 @@ WPA2uSetIEs( *pwPMKID = 0; // Initialize PMKID count pbyBuffer = &pRSNIEs->abyRSN[20]; // Point to PMKID list for (ii = 0; ii < pMgmt->gsPMKIDCache.BSSIDInfoCount; ii++) { - if (MEMEqualMemory(&pMgmt->gsPMKIDCache.BSSIDInfo[ii].abyBSSID[0], pMgmt->abyCurrBSSID, U_ETHER_ADDR_LEN)) { + if ( !memcmp(&pMgmt->gsPMKIDCache.BSSIDInfo[ii].abyBSSID[0], pMgmt->abyCurrBSSID, U_ETHER_ADDR_LEN)) { (*pwPMKID) ++; - MEMvCopy(pbyBuffer, pMgmt->gsPMKIDCache.BSSIDInfo[ii].abyPMKID, 16); + memcpy(pbyBuffer, pMgmt->gsPMKIDCache.BSSIDInfo[ii].abyPMKID, 16); pbyBuffer += 16; } } -- cgit v1.2.3-59-g8ed1b From 256a816b6b78bf29fba0c0f1bbcf998953429422 Mon Sep 17 00:00:00 2001 From: Jim Lieb Date: Wed, 12 Aug 2009 14:54:16 -0700 Subject: Staging: vt665x: remove tbit.h part 2 Remove use of tbit macros adn remove header file. Signed-off-by: Jim Lieb Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/baseband.c | 9 ++-- drivers/staging/vt6655/bssdb.c | 19 ++++--- drivers/staging/vt6655/card.c | 7 ++- drivers/staging/vt6655/device_main.c | 23 ++++---- drivers/staging/vt6655/dpc.c | 11 ++-- drivers/staging/vt6655/key.c | 1 - drivers/staging/vt6655/mac.c | 75 +++++++++++++------------- drivers/staging/vt6655/mib.c | 101 +++++++++++++++++------------------ drivers/staging/vt6655/michael.c | 1 - drivers/staging/vt6655/power.c | 2 - drivers/staging/vt6655/rf.c | 3 +- drivers/staging/vt6655/rxtx.c | 1 - drivers/staging/vt6655/srom.c | 15 +++--- drivers/staging/vt6655/tbit.h | 73 ------------------------- drivers/staging/vt6655/tcrc.c | 1 - drivers/staging/vt6655/tether.c | 3 +- drivers/staging/vt6655/tkip.c | 1 - drivers/staging/vt6655/vntwifi.c | 3 +- drivers/staging/vt6655/wmgr.c | 1 - 19 files changed, 129 insertions(+), 221 deletions(-) delete mode 100644 drivers/staging/vt6655/tbit.h (limited to 'drivers/staging/vt6655/power.c') diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 685e9e8c82e4..cd5b8ea02538 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -50,7 +50,6 @@ */ #include "tmacro.h" -#include "tbit.h" #include "tether.h" #include "mac.h" #include "baseband.h" @@ -2029,7 +2028,7 @@ BOOL BBbReadEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, PBYTE pbyData) // W_MAX_TIMEOUT is the timeout period for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue); - if (BITbIsBitOn(byValue, BBREGCTL_DONE)) + if (byValue & BBREGCTL_DONE) break; } @@ -2074,7 +2073,7 @@ BOOL BBbWriteEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byData) // W_MAX_TIMEOUT is the timeout period for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue); - if (BITbIsBitOn(byValue, BBREGCTL_DONE)) + if (byValue & BBREGCTL_DONE) break; } @@ -2106,7 +2105,7 @@ BOOL BBbIsRegBitsOn (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byTestBits) BYTE byOrgData; BBbReadEmbeded(dwIoBase, byBBAddr, &byOrgData); - return BITbIsAllBitsOn(byOrgData, byTestBits); + return (byOrgData & byTestBits) == byTestBits; } @@ -2129,7 +2128,7 @@ BOOL BBbIsRegBitsOff (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byTestBits) BYTE byOrgData; BBbReadEmbeded(dwIoBase, byBBAddr, &byOrgData); - return BITbIsAllBitsOff(byOrgData, byTestBits); + return (byOrgData & byTestBits) == 0; } /* diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index f5ef1b571300..9535d4473c58 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -39,7 +39,6 @@ * */ -#include "tbit.h" #include "ttype.h" #include "tmacro.h" #include "tether.h" @@ -1035,14 +1034,14 @@ BSSvSecondCallBack( //2008-4-14 by chester for led issue #ifdef FOR_LED_ON_NOTEBOOK MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO); -if (((BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||(BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){ +if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){ cc=TRUE; } else if(cc==TRUE){ if(pDevice->bHWRadioOff == TRUE){ - if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)) -//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV))) + if ( !(pDevice->byGPIO & GPIO0_DATA)) +//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {if(status==1) goto start; status=1; CARDbRadioPowerOff(pDevice); @@ -1053,15 +1052,15 @@ CARDbRadioPowerOff(pDevice); pDevice->bLinkPass = FALSE; } - if (BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA)) -//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV))) + if (pDevice->byGPIO &GPIO0_DATA) +//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {if(status==2) goto start; status=2; CARDbRadioPowerOn(pDevice); } } else{ - if (BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA)) -//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV))) + if (pDevice->byGPIO & GPIO0_DATA) +//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {if(status==3) goto start; status=3; CARDbRadioPowerOff(pDevice); @@ -1072,8 +1071,8 @@ CARDbRadioPowerOff(pDevice); pDevice->bLinkPass = FALSE; } - if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)) -//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV))) + if ( !(pDevice->byGPIO & GPIO0_DATA)) +//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {if(status==4) goto start; status=4; CARDbRadioPowerOn(pDevice); diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 06d5be19906e..db786142717f 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -47,7 +47,6 @@ #include "tmacro.h" #include "card.h" -#include "tbit.h" #include "baseband.h" #include "mac.h" #include "desc.h" @@ -2374,7 +2373,7 @@ CARDbyAutoChannelSelect( } if (sChannelTbl[ii].byMAP == 0) { return ((BYTE) ii); - } else if (BITbIsBitOff(sChannelTbl[ii].byMAP, 0x08)) { + } else if ( !(sChannelTbl[ii].byMAP & 0x08)) { byOptionChannel = (BYTE) ii; } } @@ -2385,7 +2384,7 @@ CARDbyAutoChannelSelect( if (sChannelTbl[ii].bValid == TRUE) { if (sChannelTbl[ii].byMAP == 0) { aiWeight[ii] += 100; - } else if (BITbIsBitOn(sChannelTbl[ii].byMAP, 0x01)) { + } else if (sChannelTbl[ii].byMAP & 0x01) { if (ii > 3) { aiWeight[ii-3] -= 10; } @@ -2973,7 +2972,7 @@ BOOL CARDbGetCurrentTSF (DWORD_PTR dwIoBase, PQWORD pqwCurrTSF) MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TSFCNTRRD); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_TFTCTL, &byData); - if (BITbIsBitOff(byData, TFTCTL_TSFCNTRRD)) + if ( !(byData & TFTCTL_TSFCNTRRD)) break; } if (ww == W_MAX_TIMEOUT) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 545cf42a8a77..449e47a839d9 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -62,7 +62,6 @@ #include "device.h" #include "card.h" -#include "tbit.h" #include "baseband.h" #include "mac.h" #include "tether.h" @@ -789,8 +788,8 @@ else MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO); //2008-4-14 by chester for led issue #ifdef FOR_LED_ON_NOTEBOOK -if (BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA)){pDevice->bHWRadioOff = TRUE;} -if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;} +if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = TRUE;} +if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;} } if ( (pDevice->bRadioControlOff == TRUE)) { @@ -798,8 +797,8 @@ if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;} } else CARDbRadioPowerOn(pDevice); #else - if ((BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOff(pDevice->byRadioCtl, EEP_RADIOCTL_INV)) || - (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV))) { + if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) || + ( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) { pDevice->bHWRadioOff = TRUE; } } @@ -1703,7 +1702,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { uFIFOHeaderSize ); - if (BITbIsBitOff(byTsr1, TSR1_TERR)) { + if ( !(byTsr1 & TSR1_TERR)) { if (byTsr0 != 0) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X].\n", (INT)uIdx, byTsr1, byTsr0); @@ -1735,7 +1734,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) { } } - if (BITbIsBitOn(byTsr1, TSR1_TERR)) { + if (byTsr1 & TSR1_TERR) { if ((pTD->pTDInfo->byFlags & TD_FLAGS_PRIV_SKB) != 0) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] fail has error. tsr1[%02X] tsr0[%02X].\n", (INT)uIdx, byTsr1, byTsr0); @@ -2691,7 +2690,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { /* // 2008-05-21 by Richardtai, we can't read RSSI here, because no packet bound with RSSI - if ((BITbIsBitOn(pDevice->dwIsr, ISR_RXDMA0)) && + if ((pDevice->dwIsr & ISR_RXDMA0) && (pDevice->byLocalID != REV_ID_VT3253_B0) && (pDevice->bBSSIDFilter == TRUE)) { // update RSSI @@ -2732,7 +2731,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if (pDevice->byLocalID > REV_ID_VT3253_B1) { - if (BITbIsBitOn(pDevice->dwIsr, ISR_MEASURESTART)) { + if (pDevice->dwIsr & ISR_MEASURESTART) { // 802.11h measure start pDevice->byOrgChannel = pDevice->byCurrentCh; VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byOrgRCR)); @@ -2764,7 +2763,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { MACvSelectPage0(pDevice->PortOffset); } } - if (BITbIsBitOn(pDevice->dwIsr, ISR_MEASUREEND)) { + if (pDevice->dwIsr & ISR_MEASUREEND) { // 802.11h measure end pDevice->bMeasureInProgress = FALSE; VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR); @@ -2783,7 +2782,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { MACvSelectPage1(pDevice->PortOffset); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE); MACvSelectPage0(pDevice->PortOffset); - if (BITbIsBitOn(byData, MSRCTL_FINISH)) { + if (byData & MSRCTL_FINISH) { // measure success s_vCompleteCurrentMeasure(pDevice, 0); } else { @@ -2791,7 +2790,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { s_vCompleteCurrentMeasure(pDevice, MEASURE_MODE_LATE); } } - if (BITbIsBitOn(pDevice->dwIsr, ISR_QUIETSTART)) { + if (pDevice->dwIsr & ISR_QUIETSTART) { do { ; } while (CARDbStartQuiet(pDevice) == FALSE); diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index fa32229ef1dd..67f238c01b44 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -50,7 +50,6 @@ #include "tcrc.h" #include "wctl.h" #include "wroute.h" -#include "tbit.h" #include "hostap.h" #include "rf.h" #include "iowpa.h" @@ -441,7 +440,7 @@ device_receive_frame ( dwDuration = (FrameSize << 4); dwDuration /= acbyRxRate[*pbyRxRate%MAX_RATE]; if (*pbyRxRate <= RATE_11M) { - if (BITbIsBitOn(*pbyRxSts, 0x01)) { + if (*pbyRxSts & 0x01) { // long preamble dwDuration += 192; } else { @@ -572,7 +571,7 @@ device_receive_frame ( //remove the CRC length FrameSize -= U_CRC_LEN; - if ((BITbIsAllBitsOff(*pbyRsr, (RSR_ADDRBROAD | RSR_ADDRMULTI))) && // unicast address + if (( !(*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI))) && // unicast address (IS_FRAGMENT_PKT((skb->data+4))) ) { // defragment @@ -661,7 +660,7 @@ device_receive_frame ( else { if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { //In AP mode, hw only check addr1(BSSID or RA) if equal to local MAC. - if (BITbIsBitOff(*pbyRsr, RSR_BSSIDOK)) { + if ( !(*pbyRsr & RSR_BSSIDOK)) { if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", @@ -674,7 +673,7 @@ device_receive_frame ( else { // discard DATA packet while not associate || BSSID error if ((pDevice->bLinkPass == FALSE) || - BITbIsBitOff(*pbyRsr, RSR_BSSIDOK)) { + !(*pbyRsr & RSR_BSSIDOK)) { if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", @@ -712,7 +711,7 @@ device_receive_frame ( if (pDevice->bEnablePSMode) { if (IS_FC_MOREDATA((skb->data+4))) { - if (BITbIsBitOn(*pbyRsr, RSR_ADDROK)) { + if (*pbyRsr & RSR_ADDROK) { //PSbSendPSPOLL((PSDevice)pDevice); } } diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index 781a371e79a9..a4d2184d826d 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -37,7 +37,6 @@ */ #include "tmacro.h" -#include "tbit.h" #include "key.h" #include "mac.h" diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 889866c13c75..cdd7cd5e4095 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -69,7 +69,6 @@ */ #include "tmacro.h" -#include "tbit.h" #include "tether.h" #include "mac.h" @@ -146,7 +145,7 @@ BOOL MACbIsRegBitsOn (DWORD_PTR dwIoBase, BYTE byRegOfs, BYTE byTestBits) BYTE byData; VNSvInPortB(dwIoBase + byRegOfs, &byData); - return BITbIsAllBitsOn(byData, byTestBits); + return (byData & byTestBits) == byTestBits; } /* @@ -169,7 +168,7 @@ BOOL MACbIsRegBitsOff (DWORD_PTR dwIoBase, BYTE byRegOfs, BYTE byTestBits) BYTE byData; VNSvInPortB(dwIoBase + byRegOfs, &byData); - return BITbIsAllBitsOff(byData, byTestBits); + return !(byData & byTestBits); } /* @@ -565,7 +564,7 @@ BOOL MACbIsInLoopbackMode (DWORD_PTR dwIoBase) BYTE byOrgValue; VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue); - if (BITbIsAnyBitsOn(byOrgValue, (TEST_LBINT | TEST_LBEXT))) + if (byOrgValue & (TEST_LBINT | TEST_LBEXT)) return TRUE; return FALSE; } @@ -592,7 +591,7 @@ void MACvSetPacketFilter (DWORD_PTR dwIoBase, WORD wFilterType) // if only in DIRECTED mode, multicast-address will set to zero, // but if other mode exist (e.g. PROMISCUOUS), multicast-address // will be open - if (BITbIsBitOn(wFilterType, PKT_TYPE_DIRECTED)) { + if (wFilterType & PKT_TYPE_DIRECTED) { // set multicast address to accept none MACvSelectPage1(dwIoBase); VNSvOutPortD(dwIoBase + MAC_REG_MAR0, 0L); @@ -600,7 +599,7 @@ void MACvSetPacketFilter (DWORD_PTR dwIoBase, WORD wFilterType) MACvSelectPage0(dwIoBase); } - if (BITbIsAnyBitsOn(wFilterType, PKT_TYPE_PROMISCUOUS | PKT_TYPE_ALL_MULTICAST)) { + if (wFilterType & (PKT_TYPE_PROMISCUOUS | PKT_TYPE_ALL_MULTICAST)) { // set multicast address to accept all MACvSelectPage1(dwIoBase); VNSvOutPortD(dwIoBase + MAC_REG_MAR0, 0xFFFFFFFFL); @@ -608,20 +607,20 @@ void MACvSetPacketFilter (DWORD_PTR dwIoBase, WORD wFilterType) MACvSelectPage0(dwIoBase); } - if (BITbIsBitOn(wFilterType, PKT_TYPE_PROMISCUOUS)) { + if (wFilterType & PKT_TYPE_PROMISCUOUS) { byNewRCR |= (RCR_RXALLTYPE | RCR_UNICAST | RCR_MULTICAST | RCR_BROADCAST); byNewRCR &= ~RCR_BSSID; } - if (BITbIsAnyBitsOn(wFilterType, (PKT_TYPE_ALL_MULTICAST | PKT_TYPE_MULTICAST))) + if (wFilterType & (PKT_TYPE_ALL_MULTICAST | PKT_TYPE_MULTICAST)) byNewRCR |= RCR_MULTICAST; - if (BITbIsBitOn(wFilterType, PKT_TYPE_BROADCAST)) + if (wFilterType & PKT_TYPE_BROADCAST) byNewRCR |= RCR_BROADCAST; - if (BITbIsBitOn(wFilterType, PKT_TYPE_ERROR_CRC)) + if (wFilterType & PKT_TYPE_ERROR_CRC) byNewRCR |= RCR_ERRCRC; VNSvInPortB(dwIoBase + MAC_REG_RCR, &byOldRCR); @@ -785,7 +784,7 @@ BOOL MACbSoftwareReset (DWORD_PTR dwIoBase) for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_HOSTCR, &byData); - if (BITbIsBitOff(byData, HOSTCR_SOFTRST)) + if ( !(byData & HOSTCR_SOFTRST)) break; } if (ww == W_MAX_TIMEOUT) @@ -853,7 +852,7 @@ BOOL MACbSafeRxOff (DWORD_PTR dwIoBase) VNSvOutPortD(dwIoBase + MAC_REG_RXDMACTL1, DMACTL_CLRRUN); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_RXDMACTL0, &dwData); - if (BITbIsAllBitsOff(dwData, DMACTL_RUN)) + if (!(dwData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -863,7 +862,7 @@ BOOL MACbSafeRxOff (DWORD_PTR dwIoBase) } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_RXDMACTL1, &dwData); - if (BITbIsAllBitsOff(dwData, DMACTL_RUN)) + if ( !(dwData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -877,7 +876,7 @@ BOOL MACbSafeRxOff (DWORD_PTR dwIoBase) // W_MAX_TIMEOUT is the timeout period for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_HOSTCR, &byData); - if (BITbIsAllBitsOff(byData, HOSTCR_RXONST)) + if ( !(byData & HOSTCR_RXONST)) break; } if (ww == W_MAX_TIMEOUT) { @@ -916,7 +915,7 @@ BOOL MACbSafeTxOff (DWORD_PTR dwIoBase) for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_TXDMACTL0, &dwData); - if (BITbIsAllBitsOff(dwData, DMACTL_RUN)) + if ( !(dwData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -926,7 +925,7 @@ BOOL MACbSafeTxOff (DWORD_PTR dwIoBase) } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_AC0DMACTL, &dwData); - if (BITbIsAllBitsOff(dwData, DMACTL_RUN)) + if ( !(dwData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -941,7 +940,7 @@ BOOL MACbSafeTxOff (DWORD_PTR dwIoBase) // W_MAX_TIMEOUT is the timeout period for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_HOSTCR, &byData); - if (BITbIsAllBitsOff(byData, HOSTCR_TXONST)) + if ( !(byData & HOSTCR_TXONST)) break; } if (ww == W_MAX_TIMEOUT) { @@ -1049,7 +1048,7 @@ void MACvInitialize (DWORD_PTR dwIoBase) //while (TRUE) { // U8 u8Data; // VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &u8Data); - // if (BITbIsBitOff(u8Data, I2MCSR_AUTOLD)) + // if ( !(u8Data & I2MCSR_AUTOLD)) // break; //} @@ -1087,19 +1086,19 @@ BYTE byData; BYTE byOrgDMACtl; VNSvInPortB(dwIoBase + MAC_REG_RXDMACTL0, &byOrgDMACtl); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_RXDMACTL0+2, DMACTL_RUN); } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_RXDMACTL0, &byData); - if (BITbIsAllBitsOff(byData, DMACTL_RUN)) + if ( !(byData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x13); } VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR0, dwCurrDescAddr); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_RXDMACTL0, DMACTL_RUN); } } @@ -1125,19 +1124,19 @@ BYTE byData; BYTE byOrgDMACtl; VNSvInPortB(dwIoBase + MAC_REG_RXDMACTL1, &byOrgDMACtl); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_RXDMACTL1+2, DMACTL_RUN); } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_RXDMACTL1, &byData); - if (BITbIsAllBitsOff(byData, DMACTL_RUN)) + if ( !(byData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x14); } VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR1, dwCurrDescAddr); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_RXDMACTL1, DMACTL_RUN); } } @@ -1163,19 +1162,19 @@ BYTE byData; BYTE byOrgDMACtl; VNSvInPortB(dwIoBase + MAC_REG_TXDMACTL0, &byOrgDMACtl); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_TXDMACTL0+2, DMACTL_RUN); } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_TXDMACTL0, &byData); - if (BITbIsAllBitsOff(byData, DMACTL_RUN)) + if ( !(byData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { DBG_PORT80(0x25); } VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0, dwCurrDescAddr); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_TXDMACTL0, DMACTL_RUN); } } @@ -1202,12 +1201,12 @@ BYTE byData; BYTE byOrgDMACtl; VNSvInPortB(dwIoBase + MAC_REG_AC0DMACTL, &byOrgDMACtl); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_AC0DMACTL+2, DMACTL_RUN); } for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_AC0DMACTL, &byData); - if (BITbIsAllBitsOff(byData, DMACTL_RUN)) + if (!(byData & DMACTL_RUN)) break; } if (ww == W_MAX_TIMEOUT) { @@ -1215,7 +1214,7 @@ BYTE byOrgDMACtl; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x26)\n"); } VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, dwCurrDescAddr); - if (BITbIsAllBitsOn(byOrgDMACtl, DMACTL_RUN)) { + if (byOrgDMACtl & DMACTL_RUN) { VNSvOutPortB(dwIoBase + MAC_REG_AC0DMACTL, DMACTL_RUN); } } @@ -1257,7 +1256,7 @@ UINT uu,ii; for (uu = 0; uu < uDelay; uu++) { VNSvInPortB(dwIoBase + MAC_REG_TMCTL0, &byValue); if ((byValue == 0) || - (BITbIsAllBitsOn(byValue, TMCTL_TSUSP))) { + (byValue & TMCTL_TSUSP)) { VNSvOutPortB(dwIoBase + MAC_REG_TMCTL0, 0); return; } @@ -1329,14 +1328,14 @@ UINT ww = 0; VNSvOutPortB(dwIoBase + MAC_REG_TXDMACTL0+2, DMACTL_RUN); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_TXDMACTL0, &byData); - if (BITbIsAllBitsOff(byData, DMACTL_RUN)) + if ( !(byData & DMACTL_RUN)) break; } } else if (idx == TYPE_AC0DMA) { VNSvOutPortB(dwIoBase + MAC_REG_AC0DMACTL+2, DMACTL_RUN); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_AC0DMACTL, &byData); - if (BITbIsAllBitsOff(byData, DMACTL_RUN)) + if ( !(byData & DMACTL_RUN)) break; } } @@ -1354,14 +1353,14 @@ void MACvClearBusSusInd (DWORD_PTR dwIoBase) UINT ww; // check if BcnSusInd enabled VNSvInPortD(dwIoBase + MAC_REG_ENCFG , &dwOrgValue); - if(BITbIsBitOff(dwOrgValue, EnCFG_BcnSusInd)) + if( !(dwOrgValue & EnCFG_BcnSusInd)) return; //Set BcnSusClr dwOrgValue = dwOrgValue | EnCFG_BcnSusClr; VNSvOutPortD(dwIoBase + MAC_REG_ENCFG, dwOrgValue); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_ENCFG , &dwOrgValue); - if(BITbIsBitOff(dwOrgValue, EnCFG_BcnSusInd)) + if( !(dwOrgValue & EnCFG_BcnSusInd)) break; } if (ww == W_MAX_TIMEOUT) { @@ -1383,7 +1382,7 @@ void MACvEnableBusSusEn (DWORD_PTR dwIoBase) VNSvOutPortB(dwIoBase + MAC_REG_ENCFG, byOrgValue); for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_ENCFG , &dwOrgValue); - if(BITbIsBitOn(dwOrgValue, EnCFG_BcnSusInd)) + if(dwOrgValue & EnCFG_BcnSusInd) break; } if (ww == W_MAX_TIMEOUT) { @@ -1406,7 +1405,7 @@ BOOL MACbFlushSYNCFifo (DWORD_PTR dwIoBase) // Check if SyncFlushOK for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_MACCR , &byOrgValue); - if(BITbIsBitOn(byOrgValue, MACCR_SYNCFLUSHOK)) + if(byOrgValue & MACCR_SYNCFLUSHOK) break; } if (ww == W_MAX_TIMEOUT) { @@ -1430,7 +1429,7 @@ BOOL MACbPSWakeup (DWORD_PTR dwIoBase) // Check if SyncFlushOK for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortB(dwIoBase + MAC_REG_PSCTL , &byOrgValue); - if(BITbIsBitOn(byOrgValue, PSCTL_WAKEDONE)) + if(byOrgValue & PSCTL_WAKEDONE) break; } if (ww == W_MAX_TIMEOUT) { diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 48484bbe7f24..fb11595c82cb 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -39,7 +39,6 @@ #include "upc.h" #include "mac.h" -#include "tbit.h" #include "tether.h" #include "mib.h" #include "wctl.h" @@ -104,58 +103,58 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, DWORD dwIsr) } //Added by Kyle - if (BITbIsBitOn(dwIsr, ISR_TXDMA0)) // ISR, bit0 + if (dwIsr & ISR_TXDMA0) // ISR, bit0 pStatistic->ISRStat.dwIsrTx0OK++; // TXDMA0 successful - if (BITbIsBitOn(dwIsr, ISR_AC0DMA)) // ISR, bit1 + if (dwIsr & ISR_AC0DMA) // ISR, bit1 pStatistic->ISRStat.dwIsrAC0TxOK++; // AC0DMA successful - if (BITbIsBitOn(dwIsr, ISR_BNTX)) // ISR, bit2 + if (dwIsr & ISR_BNTX) // ISR, bit2 pStatistic->ISRStat.dwIsrBeaconTxOK++; // BeaconTx successful - if (BITbIsBitOn(dwIsr, ISR_RXDMA0)) // ISR, bit3 + if (dwIsr & ISR_RXDMA0) // ISR, bit3 pStatistic->ISRStat.dwIsrRx0OK++; // Rx0 successful - if (BITbIsBitOn(dwIsr, ISR_TBTT)) // ISR, bit4 + if (dwIsr & ISR_TBTT) // ISR, bit4 pStatistic->ISRStat.dwIsrTBTTInt++; // TBTT successful - if (BITbIsBitOn(dwIsr, ISR_SOFTTIMER)) // ISR, bit6 + if (dwIsr & ISR_SOFTTIMER) // ISR, bit6 pStatistic->ISRStat.dwIsrSTIMERInt++; - if (BITbIsBitOn(dwIsr, ISR_WATCHDOG)) // ISR, bit7 + if (dwIsr & ISR_WATCHDOG) // ISR, bit7 pStatistic->ISRStat.dwIsrWatchDog++; - if (BITbIsBitOn(dwIsr, ISR_FETALERR)) // ISR, bit8 + if (dwIsr & ISR_FETALERR) // ISR, bit8 pStatistic->ISRStat.dwIsrUnrecoverableError++; - if (BITbIsBitOn(dwIsr, ISR_SOFTINT)) // ISR, bit9 + if (dwIsr & ISR_SOFTINT) // ISR, bit9 pStatistic->ISRStat.dwIsrSoftInterrupt++; // software interrupt - if (BITbIsBitOn(dwIsr, ISR_MIBNEARFULL)) // ISR, bit10 + if (dwIsr & ISR_MIBNEARFULL) // ISR, bit10 pStatistic->ISRStat.dwIsrMIBNearfull++; - if (BITbIsBitOn(dwIsr, ISR_RXNOBUF)) // ISR, bit11 + if (dwIsr & ISR_RXNOBUF) // ISR, bit11 pStatistic->ISRStat.dwIsrRxNoBuf++; // Rx No Buff - if (BITbIsBitOn(dwIsr, ISR_RXDMA1)) // ISR, bit12 + if (dwIsr & ISR_RXDMA1) // ISR, bit12 pStatistic->ISRStat.dwIsrRx1OK++; // Rx1 successful -// if (BITbIsBitOn(dwIsr, ISR_ATIMTX)) // ISR, bit13 +// if (dwIsr & ISR_ATIMTX) // ISR, bit13 // pStatistic->ISRStat.dwIsrATIMTxOK++; // ATIMTX successful -// if (BITbIsBitOn(dwIsr, ISR_SYNCTX)) // ISR, bit14 +// if (dwIsr & ISR_SYNCTX) // ISR, bit14 // pStatistic->ISRStat.dwIsrSYNCTxOK++; // SYNCTX successful -// if (BITbIsBitOn(dwIsr, ISR_CFPEND)) // ISR, bit18 +// if (dwIsr & ISR_CFPEND) // ISR, bit18 // pStatistic->ISRStat.dwIsrCFPEnd++; -// if (BITbIsBitOn(dwIsr, ISR_ATIMEND)) // ISR, bit19 +// if (dwIsr & ISR_ATIMEND) // ISR, bit19 // pStatistic->ISRStat.dwIsrATIMEnd++; -// if (BITbIsBitOn(dwIsr, ISR_SYNCFLUSHOK)) // ISR, bit20 +// if (dwIsr & ISR_SYNCFLUSHOK) // ISR, bit20 // pStatistic->ISRStat.dwIsrSYNCFlushOK++; - if (BITbIsBitOn(dwIsr, ISR_SOFTTIMER1)) // ISR, bit21 + if (dwIsr & ISR_SOFTTIMER1) // ISR, bit21 pStatistic->ISRStat.dwIsrSTIMER1Int++; } @@ -184,20 +183,20 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, //need change PS802_11Header pHeader = (PS802_11Header)pbyBuffer; - if (BITbIsBitOn(byRSR, RSR_ADDROK)) + if (byRSR & RSR_ADDROK) pStatistic->dwRsrADDROk++; - if (BITbIsBitOn(byRSR, RSR_CRCOK)) { + if (byRSR & RSR_CRCOK) { pStatistic->dwRsrCRCOk++; pStatistic->ullRsrOK++; if (cbFrameLength >= U_ETHER_ADDR_LEN) { // update counters in case that successful transmit - if (BITbIsBitOn(byRSR, RSR_ADDRBROAD)) { + if (byRSR & RSR_ADDRBROAD) { pStatistic->ullRxBroadcastFrames++; pStatistic->ullRxBroadcastBytes += (ULONGLONG)cbFrameLength; } - else if (BITbIsBitOn(byRSR, RSR_ADDRMULTI)) { + else if (byRSR & RSR_ADDRMULTI) { pStatistic->ullRxMulticastFrames++; pStatistic->ullRxMulticastBytes += (ULONGLONG)cbFrameLength; } @@ -210,84 +209,84 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, if(byRxRate==22) { pStatistic->CustomStat.ullRsr11M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr11MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"11M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr11M, (INT)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR); } else if(byRxRate==11) { pStatistic->CustomStat.ullRsr5M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr5MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 5M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr5M, (INT)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR); } else if(byRxRate==4) { pStatistic->CustomStat.ullRsr2M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr2MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 2M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr2M, (INT)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR); } else if(byRxRate==2){ pStatistic->CustomStat.ullRsr1M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr1MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 1M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr1M, (INT)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR); } else if(byRxRate==12){ pStatistic->CustomStat.ullRsr6M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr6MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 6M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr6M, (INT)pStatistic->CustomStat.ullRsr6MCRCOk); } else if(byRxRate==18){ pStatistic->CustomStat.ullRsr9M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr9MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 9M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr9M, (INT)pStatistic->CustomStat.ullRsr9MCRCOk); } else if(byRxRate==24){ pStatistic->CustomStat.ullRsr12M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr12MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"12M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr12M, (INT)pStatistic->CustomStat.ullRsr12MCRCOk); } else if(byRxRate==36){ pStatistic->CustomStat.ullRsr18M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr18MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"18M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr18M, (INT)pStatistic->CustomStat.ullRsr18MCRCOk); } else if(byRxRate==48){ pStatistic->CustomStat.ullRsr24M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr24MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"24M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr24M, (INT)pStatistic->CustomStat.ullRsr24MCRCOk); } else if(byRxRate==72){ pStatistic->CustomStat.ullRsr36M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr36MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"36M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr36M, (INT)pStatistic->CustomStat.ullRsr36MCRCOk); } else if(byRxRate==96){ pStatistic->CustomStat.ullRsr48M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr48MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"48M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr48M, (INT)pStatistic->CustomStat.ullRsr48MCRCOk); } else if(byRxRate==108){ pStatistic->CustomStat.ullRsr54M++; - if(BITbIsBitOn(byRSR, RSR_CRCOK)) { + if(byRSR & RSR_CRCOK) { pStatistic->CustomStat.ullRsr54MCRCOk++; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"54M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr54M, (INT)pStatistic->CustomStat.ullRsr54MCRCOk); @@ -296,27 +295,27 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown: Total[%d], CRCOK[%d]\n", (INT)pStatistic->dwRsrRxPacket+1, (INT)pStatistic->dwRsrCRCOk); } - if (BITbIsBitOn(byRSR, RSR_BSSIDOK)) + if (byRSR & RSR_BSSIDOK) pStatistic->dwRsrBSSIDOk++; - if (BITbIsBitOn(byRSR, RSR_BCNSSIDOK)) + if (byRSR & RSR_BCNSSIDOK) pStatistic->dwRsrBCNSSIDOk++; - if (BITbIsBitOn(byRSR, RSR_IVLDLEN)) //invalid len (> 2312 byte) + if (byRSR & RSR_IVLDLEN) //invalid len (> 2312 byte) pStatistic->dwRsrLENErr++; - if (BITbIsBitOn(byRSR, RSR_IVLDTYP)) //invalid packet type + if (byRSR & RSR_IVLDTYP) //invalid packet type pStatistic->dwRsrTYPErr++; - if (BITbIsBitOn(byRSR, (RSR_IVLDTYP | RSR_IVLDLEN))) + if (byRSR & (RSR_IVLDTYP | RSR_IVLDLEN)) pStatistic->dwRsrErr++; - if (BITbIsBitOn(byNewRSR, NEWRSR_DECRYPTOK)) + if (byNewRSR & NEWRSR_DECRYPTOK) pStatistic->dwNewRsrDECRYPTOK++; - if (BITbIsBitOn(byNewRSR, NEWRSR_CFPIND)) + if (byNewRSR & NEWRSR_CFPIND) pStatistic->dwNewRsrCFP++; - if (BITbIsBitOn(byNewRSR, NEWRSR_HWUTSF)) + if (byNewRSR & NEWRSR_HWUTSF) pStatistic->dwNewRsrUTSF++; - if (BITbIsBitOn(byNewRSR, NEWRSR_BCNHITAID)) + if (byNewRSR & NEWRSR_BCNHITAID) pStatistic->dwNewRsrHITAID++; - if (BITbIsBitOn(byNewRSR, NEWRSR_BCNHITAID0)) + if (byNewRSR & NEWRSR_BCNHITAID0) pStatistic->dwNewRsrHITAID0++; // increase rx packet count @@ -332,9 +331,9 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, pStatistic->dwRsrRxControl++; } - if (BITbIsBitOn(byRSR, RSR_ADDRBROAD)) + if (byRSR & RSR_ADDRBROAD) pStatistic->dwRsrBroadcast++; - else if (BITbIsBitOn(byRSR, RSR_ADDRMULTI)) + else if (byRSR & RSR_ADDRMULTI) pStatistic->dwRsrMulticast++; else pStatistic->dwRsrDirected++; @@ -486,13 +485,13 @@ STAvUpdateTDStatCounter ( } } else { - if (BITbIsBitOn(byTSR1, TSR1_TERR)) + if (byTSR1 & TSR1_TERR) pStatistic->dwTsrErr[uIdx]++; - if (BITbIsBitOn(byTSR1, TSR1_RETRYTMO)) + if (byTSR1 & TSR1_RETRYTMO) pStatistic->dwTsrRetryTimeout[uIdx]++; - if (BITbIsBitOn(byTSR1, TSR1_TMO)) + if (byTSR1 & TSR1_TMO) pStatistic->dwTsrTransmitTimeout[uIdx]++; - if (BITbIsBitOn(byTSR1, ACK_DATA)) + if (byTSR1 & ACK_DATA) pStatistic->dwTsrACKData[uIdx]++; } diff --git a/drivers/staging/vt6655/michael.c b/drivers/staging/vt6655/michael.c index 2c8f875659dd..c930e0cdb853 100644 --- a/drivers/staging/vt6655/michael.c +++ b/drivers/staging/vt6655/michael.c @@ -40,7 +40,6 @@ */ #include "tmacro.h" -#include "tbit.h" #include "michael.h" /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index 255cfc51c169..84eda0455381 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -38,13 +38,11 @@ */ #include "ttype.h" -#include "tbit.h" #include "mac.h" #include "device.h" #include "wmgr.h" #include "power.h" #include "wcmd.h" -#include "tbit.h" #include "rxtx.h" #include "card.h" diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index 73648ba88a3e..01ab73f1cc3f 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -34,7 +34,6 @@ #include "mac.h" #include "srom.h" -#include "tbit.h" #include "rf.h" #include "baseband.h" @@ -633,7 +632,7 @@ BOOL IFRFbWriteEmbeded (DWORD_PTR dwIoBase, DWORD dwData) // W_MAX_TIMEOUT is the timeout period for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { VNSvInPortD(dwIoBase + MAC_REG_IFREGCTL, &dwValue); - if (BITbIsBitOn(dwValue, IFREGCTL_DONE)) + if (dwValue & IFREGCTL_DONE) break; } diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 0c5ff19db353..ed3070edcac1 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -60,7 +60,6 @@ #include "tcrc.h" #include "wctl.h" #include "wroute.h" -#include "tbit.h" #include "hostap.h" #include "rf.h" diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c index 81b3934326f4..5a7c6ca724b3 100644 --- a/drivers/staging/vt6655/srom.c +++ b/drivers/staging/vt6655/srom.c @@ -44,7 +44,6 @@ #include "upc.h" #include "tmacro.h" -#include "tbit.h" #include "tether.h" #include "mac.h" #include "srom.h" @@ -97,12 +96,12 @@ BYTE SROMbyReadEmbedded(DWORD_PTR dwIoBase, BYTE byContntOffset) // wait DONE be set for (wDelay = 0; wDelay < W_MAX_TIMEOUT; wDelay++) { VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &byWait); - if (BITbIsAnyBitsOn(byWait, (I2MCSR_DONE | I2MCSR_NACK))) + if (byWait & (I2MCSR_DONE | I2MCSR_NACK)) break; PCAvDelayByIO(CB_DELAY_LOOP_WAIT); } if ((wDelay < W_MAX_TIMEOUT) && - (BITbIsBitOff(byWait, I2MCSR_NACK))) { + ( !(byWait & I2MCSR_NACK))) { break; } } @@ -146,13 +145,13 @@ BOOL SROMbWriteEmbedded (DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byData) // wait DONE be set for (wDelay = 0; wDelay < W_MAX_TIMEOUT; wDelay++) { VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &byWait); - if (BITbIsAnyBitsOn(byWait, (I2MCSR_DONE | I2MCSR_NACK))) + if (byWait & (I2MCSR_DONE | I2MCSR_NACK)) break; PCAvDelayByIO(CB_DELAY_LOOP_WAIT); } if ((wDelay < W_MAX_TIMEOUT) && - (BITbIsBitOff(byWait, I2MCSR_NACK))) { + ( !(byWait & I2MCSR_NACK))) { break; } } @@ -228,7 +227,7 @@ BOOL SROMbIsRegBitsOn (DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byTestBits) BYTE byOrgData; byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset); - return BITbIsAllBitsOn(byOrgData, byTestBits); + return (byOrgData & byTestBits) == byTestBits; } @@ -251,7 +250,7 @@ BOOL SROMbIsRegBitsOff (DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byTestBits BYTE byOrgData; byOrgData = SROMbyReadEmbedded(dwIoBase, byContntOffset); - return BITbIsAllBitsOff(byOrgData, byTestBits); + return !(byOrgData & byTestBits); } @@ -407,7 +406,7 @@ BOOL SROMbAutoLoad (DWORD_PTR dwIoBase) for (ii = 0; ii < EEP_MAX_CONTEXT_SIZE; ii++) { MACvTimer0MicroSDelay(dwIoBase, CB_EEPROM_READBYTE_WAIT); VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &byWait); - if (BITbIsBitOff(byWait, I2MCSR_AUTOLD)) + if ( !(byWait & I2MCSR_AUTOLD)) break; } diff --git a/drivers/staging/vt6655/tbit.h b/drivers/staging/vt6655/tbit.h deleted file mode 100644 index 1850282ce443..000000000000 --- a/drivers/staging/vt6655/tbit.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * - * File: tbit.h - * - * Purpose: Bit routines - * - * Author: Tevin Chen - * - * Date: May 21, 1996 - * - */ - -#ifndef __TBIT_H__ -#define __TBIT_H__ - -#include "ttype.h" - -/*--------------------- Export Definitions -------------------------*/ - -/*--------------------- Export Types ------------------------------*/ - -/*--------------------- Export Macros ------------------------------*/ - -// test single bit on -#define BITbIsBitOn(tData, tTestBit) \ - (((tData) & (tTestBit)) != 0) - -// test single bit off -#define BITbIsBitOff(tData, tTestBit) \ - (((tData) & (tTestBit)) == 0) - - -#define BITbIsAllBitsOn(tData, tTestBit) \ - (((tData) & (tTestBit)) == (tTestBit)) - -#define BITbIsAllBitsOff(tData, tTestBit) \ - (((tData) & (tTestBit)) == 0) - -#define BITbIsAnyBitsOn(tData, tTestBit) \ - (((tData) & (tTestBit)) != 0) - -#define BITbIsAnyBitsOff(tData, tTestBit) \ - (((tData) & (tTestBit)) != (tTestBit)) - -/*--------------------- Export Classes ----------------------------*/ - -/*--------------------- Export Variables --------------------------*/ - -/*--------------------- Export Functions --------------------------*/ - - - -#endif // __TBIT_H__ - - - diff --git a/drivers/staging/vt6655/tcrc.c b/drivers/staging/vt6655/tcrc.c index 79347e48369a..5f0c74763f87 100644 --- a/drivers/staging/vt6655/tcrc.c +++ b/drivers/staging/vt6655/tcrc.c @@ -33,7 +33,6 @@ * */ -#include "tbit.h" #include "tcrc.h" /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c index 7268735d01ce..c90b469ad545 100644 --- a/drivers/staging/vt6655/tether.c +++ b/drivers/staging/vt6655/tether.c @@ -34,7 +34,6 @@ #include "device.h" #include "tmacro.h" -#include "tbit.h" #include "tcrc.h" #include "tether.h" @@ -74,7 +73,7 @@ BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr) // reverse most bit to least bit for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) { byHash <<= 1; - if (BITbIsBitOn(byTmpHash, 0x01)) + if (byTmpHash & 0x01) byHash |= 1; byTmpHash >>= 1; } diff --git a/drivers/staging/vt6655/tkip.c b/drivers/staging/vt6655/tkip.c index bbb3e62f03c0..8ca154080e98 100644 --- a/drivers/staging/vt6655/tkip.c +++ b/drivers/staging/vt6655/tkip.c @@ -33,7 +33,6 @@ */ #include "tmacro.h" -#include "tbit.h" #include "tkip.h" /*--------------------- Static Definitions -------------------------*/ diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index b9e70043fdf9..fbe27a834ce3 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -32,7 +32,6 @@ */ #include "vntwifi.h" -#include "tbit.h" #include "IEEE11h.h" #include "country.h" #include "device.h" @@ -691,7 +690,7 @@ VNTWIFIwGetMaxSupportRate( PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject; for(wRate = RATE_54M; wRate > RATE_1M; wRate--) { - if (BITbIsBitOn(pMgmt->sNodeDBTable[0].wSuppRate, (1<sNodeDBTable[0].wSuppRate & (1<