Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48caf5a0 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: vt6655: Convert DBG_PRT to pr_<level>



DBG_PRT uses are unnecessarily complex.

Convert DBG_PRT msglevel to pr_<level>.
This changes the KERN_<level> type of several uses.
It also enables dynamic_debug for the pr_debug conversions.

This patch can be a prelude to converting these pr_<level>
uses to dev_<level> as appropriate.

Other changes:

Realign arguments of these conversions.
Remove now unused static int msglevel declarations.
Remove now unused DBG_PRT #define.

Compile tested only.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c7b09efa
Loading
Loading
Loading
Loading
+11 −22
Original line number Diff line number Diff line
@@ -63,10 +63,6 @@

/*---------------------  Static Classes  ----------------------------*/

/*---------------------  Static Variables  --------------------------*/

static int msglevel = MSG_LEVEL_INFO;
/* static int          msglevel                =MSG_LEVEL_DEBUG; */
/*---------------------  Static Functions  --------------------------*/

/*---------------------  Export Variables  --------------------------*/
@@ -218,8 +214,7 @@ vMgrDecodeBeacon(
			break;

		default:
			DBG_PRT(MSG_LEVEL_DEBUG,
				KERN_INFO "Unrecognized EID=%dd in beacon decode.\n",
			pr_debug("Unrecognized EID=%dd in beacon decode\n",
				 pItem->byElementID);
			break;

@@ -406,8 +401,7 @@ vMgrDecodeAssocRequest(
			break;

		default:
			DBG_PRT(MSG_LEVEL_DEBUG,
				KERN_INFO "Unrecognized EID=%dd in assocreq decode.\n",
			pr_debug("Unrecognized EID=%dd in assocreq decode\n",
				 pItem->byElementID);
			break;
		}
@@ -489,9 +483,7 @@ vMgrDecodeAssocResponse(
	if ((((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len)) &&
	    (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
		pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
		DBG_PRT(MSG_LEVEL_DEBUG,
			KERN_INFO "pFrame->pExtSuppRates=[%p].\n",
			pItem);
		pr_debug("pFrame->pExtSuppRates=[%p]\n", pItem);
	} else {
		pFrame->pExtSuppRates = NULL;
	}
@@ -594,8 +586,7 @@ vMgrDecodeReassocRequest(
						    (PWLAN_IE_SUPP_RATES)pItem;
			break;
		default:
			DBG_PRT(MSG_LEVEL_DEBUG,
				KERN_INFO "Unrecognized EID=%dd in reassocreq decode.\n",
			pr_debug("Unrecognized EID=%dd in reassocreq decode\n",
				 pItem->byElementID);
			break;
		}
@@ -666,8 +657,7 @@ vMgrDecodeProbeRequest(
			break;

		default:
			DBG_PRT(MSG_LEVEL_DEBUG,
				KERN_INFO "Bad EID=%dd in probereq\n",
			pr_debug("Bad EID=%dd in probereq\n",
				 pItem->byElementID);
			break;
		}
@@ -819,8 +809,7 @@ vMgrDecodeProbeResponse(
			break;

		default:
			DBG_PRT(MSG_LEVEL_DEBUG,
				KERN_INFO "Bad EID=%dd in proberesp\n",
			pr_debug("Bad EID=%dd in proberesp\n",
				 pItem->byElementID);
			break;
		}
+35 −27
Original line number Diff line number Diff line
@@ -56,10 +56,6 @@
#include "srom.h"
#include "rf.h"

/*---------------------  Static Definitions -------------------------*/
/* static int          msglevel                =MSG_LEVEL_DEBUG; */
static int msglevel = MSG_LEVEL_INFO;

/*---------------------  Static Classes  ----------------------------*/

/*---------------------  Static Variables  --------------------------*/
@@ -2009,7 +2005,7 @@ bool BBbReadEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned ch

	if (ww == W_MAX_TIMEOUT) {
		DBG_PORT80(0x30);
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x30)\n");
		pr_debug(" DBG_PORT80(0x30)\n");
		return false;
	}
	return true;
@@ -2050,7 +2046,7 @@ bool BBbWriteEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned c

	if (ww == W_MAX_TIMEOUT) {
		DBG_PORT80(0x31);
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x31)\n");
		pr_debug(" DBG_PORT80(0x31)\n");
		return false;
	}
	return true;
@@ -2725,18 +2721,22 @@ void BBvAntennaDiversity(struct vnt_private *pDevice,

	if (pDevice->byAntennaState == 0) {
		if (pDevice->uDiversityCnt > pDevice->ulDiversityNValue) {
			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ulDiversityNValue=[%d],54M-[%d]\n",
				(int)pDevice->ulDiversityNValue, (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate]);
			pr_debug("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);
				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SQ3_State0, rate = [%08x]\n", (int)pDevice->ulRatio_State0);
				pr_debug("SQ3_State0, rate = [%08x]\n",
					 (int)pDevice->ulRatio_State0);

				if (pDevice->byTMax == 0)
					return;
				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);
				pr_debug("1.[%08x], uNumSQ3[%d]=%d, %d\n",
					 (int)pDevice->ulRatio_State0,
					 (int)pDevice->wAntDiversityMaxRate,
					 (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate],
					 (int)pDevice->uDiversityCnt);

				s_vChangeAntenna(pDevice);
				pDevice->byAntennaState = 1;
@@ -2758,14 +2758,17 @@ void BBvAntennaDiversity(struct vnt_private *pDevice,
			del_timer(&pDevice->TimerSQ3Tmax1);

			pDevice->ulRatio_State1 = s_ulGetRatio(pDevice);
			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "RX:SQ3_State1, rate0 = %08x,rate1 = %08x\n",
				(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1);
			pr_debug("RX:SQ3_State1, rate0 = %08x,rate1 = %08x\n",
				 (int)pDevice->ulRatio_State0,
				 (int)pDevice->ulRatio_State1);

			if (pDevice->ulRatio_State1 < pDevice->ulRatio_State0) {
				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "2.[%08x][%08x], uNumSQ3[%d]=%d, %d\n",
					(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
				pr_debug("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);
					 (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate],
					 (int)pDevice->uDiversityCnt);

				s_vChangeAntenna(pDevice);
				pDevice->TimerSQ3Tmax3.expires =  RUN_AT(pDevice->byTMax3 * HZ);
@@ -2800,10 +2803,12 @@ TimerSQ3CallBack(
{
	struct vnt_private *pDevice = hDeviceContext;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "TimerSQ3CallBack...");
	pr_debug("TimerSQ3CallBack...\n");
	spin_lock_irq(&pDevice->lock);

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "3.[%08x][%08x], %d\n", (int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->uDiversityCnt);
	pr_debug("3.[%08x][%08x], %d\n",
		 (int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
		 (int)pDevice->uDiversityCnt);

	s_vChangeAntenna(pDevice);
	pDevice->byAntennaState = 0;
@@ -2842,7 +2847,7 @@ TimerState1CallBack(
{
	struct vnt_private *pDevice = hDeviceContext;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "TimerState1CallBack...");
	pr_debug("TimerState1CallBack...\n");

	spin_lock_irq(&pDevice->lock);
	if (pDevice->uDiversityCnt < pDevice->ulDiversityMValue/100) {
@@ -2853,14 +2858,17 @@ TimerState1CallBack(
		add_timer(&pDevice->TimerSQ3Tmax2);
	} else {
		pDevice->ulRatio_State1 = s_ulGetRatio(pDevice);
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SQ3_State1, rate0 = %08x,rate1 = %08x\n",
			(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1);
		pr_debug("SQ3_State1, rate0 = %08x,rate1 = %08x\n",
			 (int)pDevice->ulRatio_State0,
			 (int)pDevice->ulRatio_State1);

		if (pDevice->ulRatio_State1 < pDevice->ulRatio_State0) {
			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "2.[%08x][%08x], uNumSQ3[%d]=%d, %d\n",
				(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
			pr_debug("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);
				 (int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate],
				 (int)pDevice->uDiversityCnt);

			s_vChangeAntenna(pDevice);

+34 −23
Original line number Diff line number Diff line
@@ -63,8 +63,6 @@
/*---------------------  Static Classes  ----------------------------*/

/*---------------------  Static Variables  --------------------------*/
static int msglevel = MSG_LEVEL_INFO;

static const unsigned short awHWRetry0[5][5] = {
	{RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M},
	{RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M},
@@ -127,8 +125,7 @@ BSSpSearchBSSList(
	unsigned int ii = 0;

	if (pbyDesireBSSID != NULL) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
			"BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID);
		pr_debug("BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID);
		if ((!is_broadcast_ether_addr(pbyDesireBSSID)) &&
		    (memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0))
			pbyBSSID = pbyDesireBSSID;
@@ -194,7 +191,9 @@ BSSpSearchBSSList(
				    ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo))
) {
					/* Type not match skip this BSS */
					DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo);
					pr_debug("BSS type mismatch.... Config[%d] BSS[0x%04x]\n",
						 pMgmt->eConfigMode,
						 pCurrBSS->wCapInfo);
					continue;
				}

@@ -202,7 +201,9 @@ BSSpSearchBSSList(
					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 */
						DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Physical type mismatch.... ePhyType[%d] BSS[%d]\n", ePhyType, pCurrBSS->eNetworkTypeInUse);
						pr_debug("Physical type mismatch.... ePhyType[%d] BSS[%d]\n",
							 ePhyType,
							 pCurrBSS->eNetworkTypeInUse);
						continue;
					}
				}
@@ -350,7 +351,7 @@ BSSbInsertToBSSList(
	}

	if (ii == MAX_BSS_NUM) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Get free KnowBSS node failed.\n");
		pr_debug("Get free KnowBSS node failed\n");
		return false;
	}
	/* save the BSS info */
@@ -375,7 +376,8 @@ BSSbInsertToBSSList(
		if (pExtSuppRates->len > WLAN_RATES_MAXLEN)
			pExtSuppRates->len = WLAN_RATES_MAXLEN;
		memcpy(pBSSList->abyExtSuppRates, pExtSuppRates, pExtSuppRates->len + WLAN_IEHDR_LEN);
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BSSbInsertToBSSList: pExtSuppRates->len = %d\n", pExtSuppRates->len);
		pr_debug("BSSbInsertToBSSList: pExtSuppRates->len = %d\n",
			 pExtSuppRates->len);

	} else {
		memset(pBSSList->abyExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
@@ -740,7 +742,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
	/* if not found replace uInActiveCount is largest one */
	if (ii == (MAX_NODE_NUM + 1)) {
		*puNodeIndex = SelectIndex;
		DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Replace inactive node = %d\n", SelectIndex);
		pr_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)
@@ -757,7 +759,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
	skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue);
	pMgmt->sNodeDBTable[*puNodeIndex].byAuthSequence = 0;
	pMgmt->sNodeDBTable[*puNodeIndex].wEnQueueCnt = 0;
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii);
	pr_debug("Create node index = %d\n", ii);
	return;
};

@@ -842,7 +844,8 @@ BSSvUpdateAPNode(
	netdev_dbg(pDevice->dev, "BSSvUpdateAPNode:MaxSuppRate is %d\n",
		   pMgmt->sNodeDBTable[0].wMaxSuppRate);
	/* auto rate fallback function initiation */
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->sNodeDBTable[0].wTxDataRate = %d\n", pMgmt->sNodeDBTable[0].wTxDataRate);
	pr_debug("pMgmt->sNodeDBTable[0].wTxDataRate = %d\n",
		 pMgmt->sNodeDBTable[0].wTxDataRate);
};

/*+
@@ -959,8 +962,8 @@ BSSvSecondCallBack(
			if (ii > 0) {
				if (pMgmt->sNodeDBTable[ii].uInActiveCount > MAX_INACTIVE_COUNT) {
					BSSvRemoveOneNode(pDevice, ii);
					DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
						"Inactive timeout [%d] sec, STA index = [%d] remove\n", MAX_INACTIVE_COUNT, ii);
					pr_debug("Inactive timeout [%d] sec, STA index = [%d] remove\n",
						 MAX_INACTIVE_COUNT, ii);
					continue;
				}

@@ -1010,11 +1013,13 @@ BSSvSecondCallBack(

			/* check if pending PS queue */
			if (pMgmt->sNodeDBTable[ii].wEnQueueCnt != 0) {
				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index= %d, Queue = %d pending\n",
					ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt);
				pr_debug("Index= %d, Queue = %d pending\n",
					 ii,
					 pMgmt->sNodeDBTable[ii].wEnQueueCnt);
				if ((ii > 0) && (pMgmt->sNodeDBTable[ii].wEnQueueCnt > 15)) {
					BSSvRemoveOneNode(pDevice, ii);
					DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Pending many queues PS STA Index = %d remove\n", ii);
					pr_info("Pending many queues PS STA Index = %d remove\n",
						ii);
					continue;
				}
			}
@@ -1098,7 +1103,8 @@ BSSvSecondCallBack(
				netif_stop_queue(pDevice->dev);
				pDevice->bLinkPass = false;
				pDevice->bRoaming = true;
				DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount);
				pr_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;
@@ -1143,7 +1149,7 @@ BSSvSecondCallBack(
				if (pDevice->bWPADEVUp)
					pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus;

				DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n");
				pr_debug("Roaming ...\n");
				BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass);
				pMgmt->eScanType = WMAC_SCAN_ACTIVE;
				bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
@@ -1159,7 +1165,7 @@ BSSvSecondCallBack(
			if (pDevice->uAutoReConnectTime < 10) {
				pDevice->uAutoReConnectTime++;
			} else {
				DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scanning ...\n");
				pr_info("Adhoc re-scanning ...\n");
				pMgmt->eScanType = WMAC_SCAN_ACTIVE;
				bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
				bScheduleCommand((void *)pDevice, WLAN_CMD_SSID, NULL);
@@ -1170,7 +1176,8 @@ BSSvSecondCallBack(
			if (pDevice->bUpdateBBVGA)
				s_vCheckPreEDThreshold((void *)pDevice);
			if (pMgmt->sNodeDBTable[0].uInActiveCount >= ADHOC_LOST_BEACON_COUNT) {
				DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost other STA beacon [%d] sec, started !\n", pMgmt->sNodeDBTable[0].uInActiveCount);
				pr_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);
@@ -1229,7 +1236,8 @@ BSSvUpdateNodeTxCounter(

	/* Only Unicast using support rates */
	if (pTxBufHead->wFIFOCtl & FIFOCTL_NEEDACK) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wRate %04X, byTsr0 %02X, byTsr1 %02X\n", wRate, byTsr0, byTsr1);
		pr_debug("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) {
@@ -1370,7 +1378,7 @@ BSSvClearNodeDBTable(
			/* check if sTxPSQueue has been initial */
			if (pMgmt->sNodeDBTable[ii].sTxPSQueue.next != NULL) {
				while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) != NULL) {
					DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS skb != NULL %d\n", ii);
					pr_debug("PS skb != NULL %d\n", ii);
					dev_kfree_skb(skb);
				}
			}
@@ -1412,7 +1420,10 @@ void s_vCheckSensitivity(
			if (uNumofdBm > 0) {
				LocalldBmAverage = LocalldBmAverage/uNumofdBm;
				for (ii = 0; ii < BB_VGA_LEVEL; ii++) {
					DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "LocalldBmAverage:%ld, %ld %02x\n", LocalldBmAverage, pDevice->ldBmThreshold[ii], pDevice->abyBBVGA[ii]);
					pr_debug("LocalldBmAverage:%ld, %ld %02x\n",
						 LocalldBmAverage,
						 pDevice->ldBmThreshold[ii],
						 pDevice->abyBBVGA[ii]);
					if (LocalldBmAverage < pDevice->ldBmThreshold[ii]) {
						pDevice->byBBVGANew = pDevice->abyBBVGA[ii];
						break;
+15 −15
Original line number Diff line number Diff line
@@ -59,8 +59,6 @@

/*---------------------  Static Definitions -------------------------*/

static int msglevel = MSG_LEVEL_INFO;

#define C_SIFS_A        16      // micro sec.
#define C_SIFS_BG       10

@@ -747,14 +745,14 @@ bool CARDbSetBSSID(struct vnt_private *pDevice,
		MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
		pDevice->bBSSIDFilter = false;
		pDevice->byRxMode &= ~RCR_BSSID;
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode);
		pr_debug("wcmd: rx_mode = %x\n", pDevice->byRxMode);
	} else {
		if (is_zero_ether_addr(pDevice->abyBSSID) == false) {
			MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
			pDevice->bBSSIDFilter = true;
			pDevice->byRxMode |= RCR_BSSID;
		}
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: rx_mode = %x\n", pDevice->byRxMode);
		pr_debug("wmgr: rx_mode = %x\n", pDevice->byRxMode);
	}
	// Adopt BSS state in Adapter Device Object
	pDevice->eOPMode = eOPMode;
@@ -838,7 +836,7 @@ CARDbPowerDown(
	}

	MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE);
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
	pr_debug("Go to Doze ZZZZZZZZZZZZZZZ\n");
	return true;
}

@@ -975,17 +973,18 @@ CARDbAdd_PMKID_Candidate(
	struct pmkid_candidate *pCandidateList;
	unsigned int ii = 0;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
	pr_debug("bAdd_PMKID_Candidate START: (%d)\n",
		 (int)pDevice->gsPMKIDCandidate.NumCandidates);

	if (pDevice->gsPMKIDCandidate.NumCandidates >= MAX_PMKIDLIST) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "vFlush_PMKID_Candidate: 3\n");
		pr_debug("vFlush_PMKID_Candidate: 3\n");
		memset(&pDevice->gsPMKIDCandidate, 0, sizeof(SPMKIDCandidateEvent));
	}

	for (ii = 0; ii < 6; ii++)
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02X ", *(pbyBSSID + ii));
		pr_debug("%02X ", *(pbyBSSID + ii));

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
	pr_debug("\n");

	// Update Old Candidate
	for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) {
@@ -1009,7 +1008,8 @@ CARDbAdd_PMKID_Candidate(

	memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN);
	pDevice->gsPMKIDCandidate.NumCandidates++;
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
	pr_debug("NumCandidates:%d\n",
		 (int)pDevice->gsPMKIDCandidate.NumCandidates);
	return true;
}

@@ -1559,22 +1559,22 @@ static unsigned short CARDwGetOFDMControlRate(struct vnt_private *pDevice,
{
	unsigned int ui = (unsigned int) wRateIdx;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BASIC RATE: %X\n", pDevice->wBasicRate);
	pr_debug("BASIC RATE: %X\n", pDevice->wBasicRate);

	if (!CARDbIsOFDMinBasicRate((void *)pDevice)) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "CARDwGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx);
		pr_debug("CARDwGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx);
		if (wRateIdx > RATE_24M)
			wRateIdx = RATE_24M;
		return wRateIdx;
	}
	while (ui > RATE_11M) {
		if (pDevice->wBasicRate & ((unsigned short)1 << ui)) {
			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "CARDwGetOFDMControlRate : %d\n", ui);
			pr_debug("CARDwGetOFDMControlRate : %d\n", ui);
			return (unsigned short)ui;
		}
		ui--;
	}
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "CARDwGetOFDMControlRate: 6M\n");
	pr_debug("CARDwGetOFDMControlRate: 6M\n");
	return (unsigned short)RATE_24M;
}

@@ -2017,5 +2017,5 @@ void CARDvUpdateNextTBTT(void __iomem *dwIoBase, u64 qwTSF, unsigned short wBeac
	VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT, (u32)qwTSF);
	VNSvOutPortD(dwIoBase + MAC_REG_NEXTTBTT + 4, (u32)(qwTSF >> 32));
	MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN);
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Card:Update Next TBTT[%8llx]\n", qwTSF);
	pr_debug("Card:Update Next TBTT[%8llx]\n", qwTSF);
}
+4 −3
Original line number Diff line number Diff line
@@ -30,8 +30,6 @@

#define CARD_MAX_CHANNEL_TBL    56

static int msglevel = MSG_LEVEL_INFO;

/*---------------------  Static Variables  --------------------------*/

static SChannelTblElement sChannelTbl[CARD_MAX_CHANNEL_TBL + 1] =
@@ -480,7 +478,10 @@ void init_channel_table(void *pDeviceHandler)
		}
	}

	DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Zone=[%d][%c][%c]!!\n", pDevice->byZoneType, ChannelRuleTab[pDevice->byZoneType].chCountryCode[0], ChannelRuleTab[pDevice->byZoneType].chCountryCode[1]);
	pr_info("Zone=[%d][%c][%c]!!\n",
		pDevice->byZoneType,
		ChannelRuleTab[pDevice->byZoneType].chCountryCode[0],
		ChannelRuleTab[pDevice->byZoneType].chCountryCode[1]);

	for (ii = 0; ii < CARD_MAX_CHANNEL_TBL; ii++) {
		if (pDevice->abyRegPwr[ii + 1] == 0)
Loading