Commit 8efe1ab3 authored by Andres More's avatar Andres More Committed by Greg Kroah-Hartman

staging: vt6656: removed Calcu_LinkQual definition

Removed an always defined macro, perhaps used to patch the driver
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 24fe608a
...@@ -93,10 +93,7 @@ const WORD awHWRetry1[5][5] = { ...@@ -93,10 +93,7 @@ const WORD awHWRetry1[5][5] = {
void s_vCheckSensitivity(void *hDeviceContext); void s_vCheckSensitivity(void *hDeviceContext);
void s_vCheckPreEDThreshold(void *hDeviceContext); void s_vCheckPreEDThreshold(void *hDeviceContext);
#ifdef Calcu_LinkQual
void s_uCalculateLinkQual(void *hDeviceContext); void s_uCalculateLinkQual(void *hDeviceContext);
#endif
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
...@@ -1015,9 +1012,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) && ...@@ -1015,9 +1012,7 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
} }
pMgmt->eLastState = pMgmt->eCurrState ; pMgmt->eLastState = pMgmt->eCurrState ;
#ifdef Calcu_LinkQual
s_uCalculateLinkQual((void *)pDevice); s_uCalculateLinkQual((void *)pDevice);
#endif
for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) { for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) {
...@@ -1573,7 +1568,6 @@ void s_vCheckSensitivity(void *hDeviceContext) ...@@ -1573,7 +1568,6 @@ void s_vCheckSensitivity(void *hDeviceContext)
} }
} }
#ifdef Calcu_LinkQual
void s_uCalculateLinkQual(void *hDeviceContext) void s_uCalculateLinkQual(void *hDeviceContext)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
...@@ -1618,7 +1612,6 @@ else ...@@ -1618,7 +1612,6 @@ else
pDevice->scStatistic.TxRetryOkCount = 0; pDevice->scStatistic.TxRetryOkCount = 0;
return; return;
} }
#endif
void BSSvClearAnyBSSJoinRecord(void *hDeviceContext) void BSSvClearAnyBSSJoinRecord(void *hDeviceContext)
{ {
......
...@@ -342,9 +342,7 @@ RXbBulkInProcessData ( ...@@ -342,9 +342,7 @@ RXbBulkInProcessData (
PBYTE pbyRxSts; PBYTE pbyRxSts;
PBYTE pbyRxRate; PBYTE pbyRxRate;
PBYTE pbySQ; PBYTE pbySQ;
#ifdef Calcu_LinkQual
PBYTE pby3SQ; PBYTE pby3SQ;
#endif
unsigned int cbHeaderSize; unsigned int cbHeaderSize;
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
WORD wRxTSC15_0 = 0; WORD wRxTSC15_0 = 0;
...@@ -415,7 +413,6 @@ RXbBulkInProcessData ( ...@@ -415,7 +413,6 @@ RXbBulkInProcessData (
wPLCPwithPadding = ( (*pwPLCP_Length / 4) + ( (*pwPLCP_Length % 4) ? 1:0 ) ) *4; wPLCPwithPadding = ( (*pwPLCP_Length / 4) + ( (*pwPLCP_Length % 4) ? 1:0 ) ) *4;
pqwTSFTime = (PQWORD) (pbyDAddress + 8 + wPLCPwithPadding); pqwTSFTime = (PQWORD) (pbyDAddress + 8 + wPLCPwithPadding);
#ifdef Calcu_LinkQual
if(pDevice->byBBType == BB_TYPE_11G) { if(pDevice->byBBType == BB_TYPE_11G) {
pby3SQ = pbyDAddress + 8 + wPLCPwithPadding + 12; pby3SQ = pbyDAddress + 8 + wPLCPwithPadding + 12;
pbySQ = pby3SQ; pbySQ = pby3SQ;
...@@ -424,9 +421,6 @@ RXbBulkInProcessData ( ...@@ -424,9 +421,6 @@ RXbBulkInProcessData (
pbySQ = pbyDAddress + 8 + wPLCPwithPadding + 8; pbySQ = pbyDAddress + 8 + wPLCPwithPadding + 8;
pby3SQ = pbySQ; pby3SQ = pbySQ;
} }
#else
pbySQ = pbyDAddress + 8 + wPLCPwithPadding + 8;
#endif
pbyNewRsr = pbyDAddress + 8 + wPLCPwithPadding + 9; pbyNewRsr = pbyDAddress + 8 + wPLCPwithPadding + 9;
pbyRSSI = pbyDAddress + 8 + wPLCPwithPadding + 10; pbyRSSI = pbyDAddress + 8 + wPLCPwithPadding + 10;
pbyRsr = pbyDAddress + 8 + wPLCPwithPadding + 11; pbyRsr = pbyDAddress + 8 + wPLCPwithPadding + 11;
......
...@@ -83,13 +83,9 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) ...@@ -83,13 +83,9 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
long ldBm; long ldBm;
pDevice->wstats.status = pDevice->eOPMode; pDevice->wstats.status = pDevice->eOPMode;
#ifdef Calcu_LinkQual
if(pDevice->scStatistic.LinkQuality > 100) if(pDevice->scStatistic.LinkQuality > 100)
pDevice->scStatistic.LinkQuality = 100; pDevice->scStatistic.LinkQuality = 100;
pDevice->wstats.qual.qual =(BYTE) pDevice->scStatistic.LinkQuality; pDevice->wstats.qual.qual =(BYTE) pDevice->scStatistic.LinkQuality;
#else
pDevice->wstats.qual.qual = pDevice->byCurrSQ;
#endif
RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm);
pDevice->wstats.qual.level = ldBm; pDevice->wstats.qual.level = ldBm;
//pDevice->wstats.qual.level = 0x100 - pDevice->uCurrRSSI; //pDevice->wstats.qual.level = 0x100 - pDevice->uCurrRSSI;
...@@ -583,11 +579,7 @@ int iwctl_giwrange(struct net_device *dev, ...@@ -583,11 +579,7 @@ int iwctl_giwrange(struct net_device *dev,
} }
range->num_frequency = k; range->num_frequency = k;
// Hum... Should put the right values there // Hum... Should put the right values there
#ifdef Calcu_LinkQual
range->max_qual.qual = 100; range->max_qual.qual = 100;
#else
range->max_qual.qual = 255;
#endif
range->max_qual.level = 0; range->max_qual.level = 0;
range->max_qual.noise = 0; range->max_qual.noise = 0;
range->sensitivity = 255; range->sensitivity = 255;
......
...@@ -467,12 +467,10 @@ STAvUpdateTDStatCounter ( ...@@ -467,12 +467,10 @@ STAvUpdateTDStatCounter (
} }
if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) { if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
#ifdef Calcu_LinkQual
if (byRetyCnt < 2) if (byRetyCnt < 2)
pStatistic->TxNoRetryOkCount ++; pStatistic->TxNoRetryOkCount ++;
else else
pStatistic->TxRetryOkCount ++; pStatistic->TxRetryOkCount ++;
#endif
pStatistic->ullTsrOK++; pStatistic->ullTsrOK++;
pStatistic->CustomStat.ullTsrAllOK++; pStatistic->CustomStat.ullTsrAllOK++;
...@@ -493,9 +491,7 @@ STAvUpdateTDStatCounter ( ...@@ -493,9 +491,7 @@ STAvUpdateTDStatCounter (
} }
else { else {
#ifdef Calcu_LinkQual
pStatistic->TxFailCount ++; pStatistic->TxFailCount ++;
#endif
pStatistic->dwTsrErr++; pStatistic->dwTsrErr++;
if (byTSR & TSR_RETRYTMO) if (byTSR & TSR_RETRYTMO)
......
...@@ -356,7 +356,6 @@ typedef struct tagSStatCounter { ...@@ -356,7 +356,6 @@ typedef struct tagSStatCounter {
SCustomCounters CustomStat; SCustomCounters CustomStat;
#ifdef Calcu_LinkQual
//Tx count: //Tx count:
unsigned long TxNoRetryOkCount; /* success tx no retry ! */ unsigned long TxNoRetryOkCount; /* success tx no retry ! */
unsigned long TxRetryOkCount; /* success tx but retry ! */ unsigned long TxRetryOkCount; /* success tx but retry ! */
...@@ -367,7 +366,6 @@ typedef struct tagSStatCounter { ...@@ -367,7 +366,6 @@ typedef struct tagSStatCounter {
//statistic //statistic
unsigned long SignalStren; unsigned long SignalStren;
unsigned long LinkQuality; unsigned long LinkQuality;
#endif
} SStatCounter, *PSStatCounter; } SStatCounter, *PSStatCounter;
......
...@@ -40,10 +40,6 @@ typedef int BOOL; ...@@ -40,10 +40,6 @@ typedef int BOOL;
#define FALSE 0 #define FALSE 0
#endif #endif
#ifndef Calcu_LinkQual
#define Calcu_LinkQual
#endif
/****** Simple typedefs ***************************************************/ /****** Simple typedefs ***************************************************/
typedef unsigned char BYTE; // 8-bit typedef unsigned char BYTE; // 8-bit
......
...@@ -591,9 +591,7 @@ s_nsBulkInUsbIoCompleteRead( ...@@ -591,9 +591,7 @@ s_nsBulkInUsbIoCompleteRead(
pDevice->ulBulkInError++; pDevice->ulBulkInError++;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK In failed %d\n", status); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK In failed %d\n", status);
#ifdef Calcu_LinkQual
pDevice->scStatistic.RxFcsErrCnt ++; pDevice->scStatistic.RxFcsErrCnt ++;
#endif
//todo...xxxxxx //todo...xxxxxx
// if (status == USBD_STATUS_CRC) { // if (status == USBD_STATUS_CRC) {
// pDevice->ulBulkInContCRCError++; // pDevice->ulBulkInContCRCError++;
...@@ -607,9 +605,7 @@ s_nsBulkInUsbIoCompleteRead( ...@@ -607,9 +605,7 @@ s_nsBulkInUsbIoCompleteRead(
pDevice->ulBulkInContCRCError = 0; pDevice->ulBulkInContCRCError = 0;
pDevice->ulBulkInBytesRead += bytesRead; pDevice->ulBulkInBytesRead += bytesRead;
#ifdef Calcu_LinkQual
pDevice->scStatistic.RxOkCnt ++; pDevice->scStatistic.RxOkCnt ++;
#endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment