diff options
author | Andres More <more.andres@gmail.com> | 2010-07-12 12:12:25 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 11:42:00 -0700 |
commit | 89b28e5db83dc748f37fb7442cc880da49c348ce (patch) | |
tree | 8bf141a8361136499c19210a70cd0175ccaaeb7f /drivers/staging/vt6656/datarate.c | |
parent | 73bce12e445edc228fbfc84d66693601c5744837 (diff) |
staging: vt6656: removed '#if 1'/'#if 0' definitions
Removed code guarded by always false definitions.
Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6656/datarate.c')
-rw-r--r-- | drivers/staging/vt6656/datarate.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c index 51dc540da2f..5c2719fa72f 100644 --- a/drivers/staging/vt6656/datarate.c +++ b/drivers/staging/vt6656/datarate.c @@ -309,7 +309,6 @@ RATEvTxRateFallBack( { PSDevice pDevice = (PSDevice) pDeviceHandler; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); -#if 1 //mike fixed old: use packet lose ratio algorithm to control rate WORD wIdxDownRate = 0; unsigned int ii; BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; @@ -389,66 +388,6 @@ DWORD dwTxDiff = 0; s_vResetCounter(psNodeDBTable); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rate: %d, U:%d, D:%d\n", (int)psNodeDBTable->wTxDataRate, (int)wIdxUpRate, (int)wIdxDownRate); return; -#else //mike fixed new: use differ-signal strength to control rate -WORD wIdxUpRate = 0; -BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; -unsigned int ii; -long ldBm; - - if (pMgmt->eScanState != WMAC_NO_SCANNING) { - // Don't do Fallback when scanning Channel - return; - } - - for (ii = 0; ii < MAX_RATE; ii++) { - if (psNodeDBTable->wSuppRate & (0x0001<<ii)) { - if (bAutoRate[ii] == TRUE) { - wIdxUpRate = (WORD) ii; - } - } else { - bAutoRate[ii] = FALSE; - } - } - - RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); - - if (ldBm > -55) { - if ( psNodeDBTable->wSuppRate & (0x0001<<RATE_54M) ) //11a/g - { - psNodeDBTable->wTxDataRate = RATE_54M; - } - else{ //11b - psNodeDBTable->wTxDataRate = RATE_11M; - } - } - -if (wIdxUpRate == RATE_54M ) { //11a/g - if (ldBm > -56 ) - psNodeDBTable->wTxDataRate = RATE_54M; - else if (ldBm > -61 ) - psNodeDBTable->wTxDataRate = RATE_48M; - else if (ldBm > -66 ) - psNodeDBTable->wTxDataRate = RATE_36M; - else if (ldBm > -72 ) - psNodeDBTable->wTxDataRate = RATE_24M; - else if (ldBm > -80 ) - psNodeDBTable->wTxDataRate = RATE_5M; - else { - psNodeDBTable->wTxDataRate = RATE_1M; - //increasingVGA = TRUE; - } - } - else { //11b - if (ldBm > -65 ) - psNodeDBTable->wTxDataRate = RATE_11M; - else if (ldBm > -75 ) - psNodeDBTable->wTxDataRate = RATE_5M; - else - psNodeDBTable->wTxDataRate = RATE_1M; - } - - return; -#endif } /*+ |