diff options
author | Guido MartÃnez <guido@vanguardiasur.com.ar> | 2014-04-19 16:45:00 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-15 13:26:37 -0700 |
commit | bc5cf6563576bb36baa7e93417b9a2e29999a5c6 (patch) | |
tree | da9dc6ca3942286a8ea23ab62e7061df89bc6a78 /drivers/staging/vt6655/mib.c | |
parent | 4e8a7e5fc29697f881f5c358f84df52914908703 (diff) |
staging: vt6655: fix checkpatch bracing issues
This patchs fixes tons of warnings such as:
WARNING: braces {} are not necessary for single statement blocks
#354: FILE: drivers/staging/vt6655/wmgr.c:354:
+ for (ii = 0; ii < WLAN_BSSID_LEN; ii++) {
+ pMgmt->abyDesireBSSID[ii] = 0xFF;
+ }
Please note: this patch only fixes bracing issues (and there is still a
lot to do); so if you run checkpatch it _will_ throw a lot of errors.
Use --test-only=braces
Signed-off-by: Guido MartÃnez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/mib.c')
-rw-r--r-- | drivers/staging/vt6655/mib.c | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 881c05413cb6..36895970a892 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -187,75 +187,75 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, if (byRxRate == 22) { pStatistic->CustomStat.ullRsr11M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr11MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "11M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr11M, (int)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR); } else if (byRxRate == 11) { pStatistic->CustomStat.ullRsr5M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr5MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 5M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr5M, (int)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR); } else if (byRxRate == 4) { pStatistic->CustomStat.ullRsr2M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr2MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 2M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr2M, (int)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR); } else if (byRxRate == 2) { pStatistic->CustomStat.ullRsr1M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr1MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 1M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr1M, (int)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR); } else if (byRxRate == 12) { pStatistic->CustomStat.ullRsr6M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr6MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 6M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr6M, (int)pStatistic->CustomStat.ullRsr6MCRCOk); } else if (byRxRate == 18) { pStatistic->CustomStat.ullRsr9M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr9MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 9M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr9M, (int)pStatistic->CustomStat.ullRsr9MCRCOk); } else if (byRxRate == 24) { pStatistic->CustomStat.ullRsr12M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr12MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "12M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr12M, (int)pStatistic->CustomStat.ullRsr12MCRCOk); } else if (byRxRate == 36) { pStatistic->CustomStat.ullRsr18M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr18MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "18M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr18M, (int)pStatistic->CustomStat.ullRsr18MCRCOk); } else if (byRxRate == 48) { pStatistic->CustomStat.ullRsr24M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr24MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "24M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr24M, (int)pStatistic->CustomStat.ullRsr24MCRCOk); } else if (byRxRate == 72) { pStatistic->CustomStat.ullRsr36M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr36MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "36M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr36M, (int)pStatistic->CustomStat.ullRsr36MCRCOk); } else if (byRxRate == 96) { pStatistic->CustomStat.ullRsr48M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr48MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "48M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr48M, (int)pStatistic->CustomStat.ullRsr48MCRCOk); } else if (byRxRate == 108) { pStatistic->CustomStat.ullRsr54M++; - if (byRSR & RSR_CRCOK) { + if (byRSR & RSR_CRCOK) pStatistic->CustomStat.ullRsr54MCRCOk++; - } + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "54M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr54M, (int)pStatistic->CustomStat.ullRsr54MCRCOk); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unknown: Total[%d], CRCOK[%d]\n", (int)pStatistic->dwRsrRxPacket+1, (int)pStatistic->dwRsrCRCOk); @@ -288,13 +288,12 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, pStatistic->dwRsrRxPacket++; pStatistic->dwRsrRxOctet += cbFrameLength; - if (IS_TYPE_DATA(pbyBuffer)) { + if (IS_TYPE_DATA(pbyBuffer)) pStatistic->dwRsrRxData++; - } else if (IS_TYPE_MGMT(pbyBuffer)) { + else if (IS_TYPE_MGMT(pbyBuffer)) pStatistic->dwRsrRxManage++; - } else if (IS_TYPE_CONTROL(pbyBuffer)) { + else if (IS_TYPE_CONTROL(pbyBuffer)) pStatistic->dwRsrRxControl++; - } if (byRSR & RSR_ADDRBROAD) pStatistic->dwRsrBroadcast++; @@ -306,23 +305,22 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic, if (WLAN_GET_FC_MOREFRAG(pHeader->wFrameCtl)) pStatistic->dwRsrRxFragment++; - if (cbFrameLength < ETH_ZLEN + 4) { + if (cbFrameLength < ETH_ZLEN + 4) pStatistic->dwRsrRunt++; - } else if (cbFrameLength == ETH_ZLEN + 4) { + else if (cbFrameLength == ETH_ZLEN + 4) pStatistic->dwRsrRxFrmLen64++; - } else if ((65 <= cbFrameLength) && (cbFrameLength <= 127)) { + else if ((65 <= cbFrameLength) && (cbFrameLength <= 127)) pStatistic->dwRsrRxFrmLen65_127++; - } else if ((128 <= cbFrameLength) && (cbFrameLength <= 255)) { + else if ((128 <= cbFrameLength) && (cbFrameLength <= 255)) pStatistic->dwRsrRxFrmLen128_255++; - } else if ((256 <= cbFrameLength) && (cbFrameLength <= 511)) { + else if ((256 <= cbFrameLength) && (cbFrameLength <= 511)) pStatistic->dwRsrRxFrmLen256_511++; - } else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) { + else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) pStatistic->dwRsrRxFrmLen512_1023++; - } else if ((1024 <= cbFrameLength) && (cbFrameLength <= ETH_FRAME_LEN + 4)) { + else if ((1024 <= cbFrameLength) && (cbFrameLength <= ETH_FRAME_LEN + 4)) pStatistic->dwRsrRxFrmLen1024_1518++; - } else if (cbFrameLength > ETH_FRAME_LEN + 4) { + else if (cbFrameLength > ETH_FRAME_LEN + 4) pStatistic->dwRsrLong++; - } } /* @@ -399,11 +397,11 @@ STAvUpdateTDStatCounter( unsigned char byTSR0_NCR = byTSR0 & TSR0_NCR; pHeader = (PWLAN_80211HDR_A4) pbyBuffer; - if (WLAN_GET_FC_TODS(pHeader->wFrameCtl) == 0) { + if (WLAN_GET_FC_TODS(pHeader->wFrameCtl) == 0) pbyDestAddr = &(pHeader->abyAddr1[0]); - } else { + else pbyDestAddr = &(pHeader->abyAddr3[0]); - } + // increase tx packet count pStatistic->dwTsrTxPacket[uIdx]++; pStatistic->dwTsrTxOctet[uIdx] += cbFrameLength; |