From: Jim Lieb Date: Thu, 30 Jul 2009 17:27:21 +0000 (-0700) Subject: Staging: vt6655 textual cleanup in prep for driver merge X-Git-Tag: MMI-PSA29.97-13-9~26941^2~258 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e809a9b10ab5ee985e23dea537e0236f026d1ca;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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,