Commit 7354a175 authored by Petar Dimitrijevic's avatar Petar Dimitrijevic Committed by Greg Kroah-Hartman

staging: vt6655: Fixed checkpatch errors

This patch fixes the errors report by the checkpatch script.
Most of them are use of C99 comments.

The checkpatch doesn't report any errors after the clean up.
However, please not that there are still ton of warnings left.
Signed-off-by: default avatarPetar Dimitrijevic <petar.dimitrijevic@vorteksed.com.mk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4025ef18
...@@ -47,11 +47,12 @@ ...@@ -47,11 +47,12 @@
/*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Classes ----------------------------*/
extern unsigned short TxRate_iwconfig; //2008-5-8 <add> by chester extern unsigned short TxRate_iwconfig; /* 2008-5-8 <add> by chester */
/*--------------------- Static Variables --------------------------*/ /*--------------------- Static Variables --------------------------*/
static int msglevel = MSG_LEVEL_INFO; static int msglevel = MSG_LEVEL_INFO;
static const unsigned char acbyIERate[MAX_RATE] = static const unsigned char acbyIERate[MAX_RATE] = {
{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; 0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C
};
#define AUTORATE_TXOK_CNT 0x0400 #define AUTORATE_TXOK_CNT 0x0400
#define AUTORATE_TXFAIL_CNT 0x0064 #define AUTORATE_TXFAIL_CNT 0x0064
...@@ -70,7 +71,7 @@ s_vResetCounter( ...@@ -70,7 +71,7 @@ s_vResetCounter(
{ {
unsigned char ii; unsigned char ii;
// clear statistic counter for auto_rate /* clear statistic counter for auto_rate */
for (ii = 0; ii <= MAX_RATE; ii++) { for (ii = 0; ii <= MAX_RATE; ii++) {
psNodeDBTable->uTxOk[ii] = 0; psNodeDBTable->uTxOk[ii] = 0;
psNodeDBTable->uTxFail[ii] = 0; psNodeDBTable->uTxFail[ii] = 0;
...@@ -102,8 +103,8 @@ DATARATEbyGetRateIdx( ...@@ -102,8 +103,8 @@ DATARATEbyGetRateIdx(
{ {
unsigned char ii; unsigned char ii;
//Erase basicRate flag. /* Erase basicRate flag. */
byRate = byRate & 0x7F;//0111 1111 byRate = byRate & 0x7F;/* 0111 1111 */
for (ii = 0; ii < MAX_RATE; ii++) { for (ii = 0; ii < MAX_RATE; ii++) {
if (acbyIERate[ii] == byRate) if (acbyIERate[ii] == byRate)
...@@ -151,13 +152,14 @@ wGetRateIdx( ...@@ -151,13 +152,14 @@ wGetRateIdx(
{ {
unsigned short ii; unsigned short ii;
//Erase basicRate flag. /* Erase basicRate flag. */
byRate = byRate & 0x7F;//0111 1111 byRate = byRate & 0x7F;/* 0111 1111 */
for (ii = 0; ii < MAX_RATE; ii++) { for (ii = 0; ii < MAX_RATE; ii++) {
if (acbyIERate[ii] == byRate) if (acbyIERate[ii] == byRate)
return ii; return ii;
} }
return 0; return 0;
} }
...@@ -218,7 +220,7 @@ RATEvParseMaxRate( ...@@ -218,7 +220,7 @@ RATEvParseMaxRate(
for (ii = 0; ii < uRateLen; ii++) { for (ii = 0; ii < uRateLen; ii++) {
byRate = (unsigned char)(pItemRates->abyRates[ii]); byRate = (unsigned char)(pItemRates->abyRates[ii]);
if (WLAN_MGMT_IS_BASICRATE(byRate) && bUpdateBasicRate) { if (WLAN_MGMT_IS_BASICRATE(byRate) && bUpdateBasicRate) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate /* Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate */
CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate)); CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
DBG_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));
} }
...@@ -238,9 +240,9 @@ RATEvParseMaxRate( ...@@ -238,9 +240,9 @@ RATEvParseMaxRate(
for (ii = 0; ii < uExtRateLen; ii++) { for (ii = 0; ii < uExtRateLen; ii++) {
byRate = (unsigned char)(pItemExtRates->abyRates[ii]); byRate = (unsigned char)(pItemExtRates->abyRates[ii]);
// select highest basic rate /* select highest basic rate */
if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) { if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate /* Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate */
CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate)); CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
DBG_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));
} }
...@@ -302,10 +304,9 @@ RATEvTxRateFallBack( ...@@ -302,10 +304,9 @@ RATEvTxRateFallBack(
unsigned short wIdxUpRate = 0; unsigned short wIdxUpRate = 0;
unsigned long dwTxDiff = 0; unsigned long dwTxDiff = 0;
if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING) { if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING)
// Don't do Fallback when scanning Channel /* Don't do Fallback when scanning Channel */
return; return;
}
psNodeDBTable->uTimeCount++; psNodeDBTable->uTimeCount++;
...@@ -357,11 +358,13 @@ RATEvTxRateFallBack( ...@@ -357,11 +358,13 @@ RATEvTxRateFallBack(
(psNodeDBTable->uTxFail[MAX_RATE] * 4)) { (psNodeDBTable->uTxFail[MAX_RATE] * 4)) {
psNodeDBTable->wTxDataRate = wIdxUpRate; psNodeDBTable->wTxDataRate = wIdxUpRate;
} }
} else { // adhoc, if uTxOk =0 & uTxFail = 0 } else {
/* adhoc, if uTxOk =0 & uTxFail = 0 */
if (psNodeDBTable->uTxFail[MAX_RATE] == 0) if (psNodeDBTable->uTxFail[MAX_RATE] == 0)
psNodeDBTable->wTxDataRate = wIdxUpRate; psNodeDBTable->wTxDataRate = wIdxUpRate;
} }
//2008-5-8 <add> by chester
/* 2008-5-8 <add> by chester */
TxRate_iwconfig = psNodeDBTable->wTxDataRate; TxRate_iwconfig = psNodeDBTable->wTxDataRate;
s_vResetCounter(psNodeDBTable); s_vResetCounter(psNodeDBTable);
......
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