summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/datarate.c
diff options
context:
space:
mode:
authorPetar Dimitrijevic <petar.dimitrijevic@vorteksed.com.mk>2014-07-20 09:34:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-21 14:18:45 -0700
commit7354a17509376fc1e0a7b82518426d4249e933ea (patch)
treecb47888d3242068de3c6d33edfd3f7ff6bbef49f /drivers/staging/vt6655/datarate.c
parent4025ef18c8919f080c620f497f89032a56e476e6 (diff)
downloadtalos-obmc-linux-7354a17509376fc1e0a7b82518426d4249e933ea.tar.gz
talos-obmc-linux-7354a17509376fc1e0a7b82518426d4249e933ea.zip
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: Petar Dimitrijevic <petar.dimitrijevic@vorteksed.com.mk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/datarate.c')
-rw-r--r--drivers/staging/vt6655/datarate.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c
index f8420d65cd94..83ad74cf6841 100644
--- a/drivers/staging/vt6655/datarate.c
+++ b/drivers/staging/vt6655/datarate.c
@@ -47,11 +47,12 @@
/*--------------------- 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 int msglevel = MSG_LEVEL_INFO;
-static const unsigned char acbyIERate[MAX_RATE] =
-{0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
+static const unsigned char acbyIERate[MAX_RATE] = {
+0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C
+};
#define AUTORATE_TXOK_CNT 0x0400
#define AUTORATE_TXFAIL_CNT 0x0064
@@ -70,7 +71,7 @@ s_vResetCounter(
{
unsigned char ii;
- // clear statistic counter for auto_rate
+ /* clear statistic counter for auto_rate */
for (ii = 0; ii <= MAX_RATE; ii++) {
psNodeDBTable->uTxOk[ii] = 0;
psNodeDBTable->uTxFail[ii] = 0;
@@ -102,8 +103,8 @@ DATARATEbyGetRateIdx(
{
unsigned char ii;
- //Erase basicRate flag.
- byRate = byRate & 0x7F;//0111 1111
+ /* Erase basicRate flag. */
+ byRate = byRate & 0x7F;/* 0111 1111 */
for (ii = 0; ii < MAX_RATE; ii++) {
if (acbyIERate[ii] == byRate)
@@ -151,13 +152,14 @@ wGetRateIdx(
{
unsigned short ii;
- //Erase basicRate flag.
- byRate = byRate & 0x7F;//0111 1111
+ /* Erase basicRate flag. */
+ byRate = byRate & 0x7F;/* 0111 1111 */
for (ii = 0; ii < MAX_RATE; ii++) {
if (acbyIERate[ii] == byRate)
return ii;
}
+
return 0;
}
@@ -218,7 +220,7 @@ RATEvParseMaxRate(
for (ii = 0; ii < uRateLen; ii++) {
byRate = (unsigned char)(pItemRates->abyRates[ii]);
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));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
}
@@ -238,9 +240,9 @@ RATEvParseMaxRate(
for (ii = 0; ii < uExtRateLen; ii++) {
byRate = (unsigned char)(pItemExtRates->abyRates[ii]);
- // select highest basic rate
+ /* select highest basic rate */
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));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
}
@@ -302,10 +304,9 @@ RATEvTxRateFallBack(
unsigned short wIdxUpRate = 0;
unsigned long dwTxDiff = 0;
- if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING) {
- // Don't do Fallback when scanning Channel
+ if (pDevice->pMgmt->eScanState != WMAC_NO_SCANNING)
+ /* Don't do Fallback when scanning Channel */
return;
- }
psNodeDBTable->uTimeCount++;
@@ -357,11 +358,13 @@ RATEvTxRateFallBack(
(psNodeDBTable->uTxFail[MAX_RATE] * 4)) {
psNodeDBTable->wTxDataRate = wIdxUpRate;
}
- } else { // adhoc, if uTxOk =0 & uTxFail = 0
+ } else {
+ /* adhoc, if uTxOk =0 & uTxFail = 0 */
if (psNodeDBTable->uTxFail[MAX_RATE] == 0)
psNodeDBTable->wTxDataRate = wIdxUpRate;
}
-//2008-5-8 <add> by chester
+
+ /* 2008-5-8 <add> by chester */
TxRate_iwconfig = psNodeDBTable->wTxDataRate;
s_vResetCounter(psNodeDBTable);
OpenPOWER on IntegriCloud