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/channel.c | |
parent | 4e8a7e5fc29697f881f5c358f84df52914908703 (diff) | |
download | linux-stable-bc5cf6563576bb36baa7e93417b9a2e29999a5c6.tar.gz linux-stable-bc5cf6563576bb36baa7e93417b9a2e29999a5c6.tar.bz2 linux-stable-bc5cf6563576bb36baa7e93417b9a2e29999a5c6.zip |
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/channel.c')
-rw-r--r-- | drivers/staging/vt6655/channel.c | 77 |
1 files changed, 35 insertions, 42 deletions
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index e69c312d1242..d5b89b7aaf23 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -420,9 +420,8 @@ void init_channel_table(void *pDeviceHandler) bool bMultiBand = false; unsigned int ii; - for (ii = 1; ii <= CARD_MAX_CHANNEL_TBL; ii++) { + for (ii = 1; ii <= CARD_MAX_CHANNEL_TBL; ii++) sChannelTbl[ii].bValid = false; - } switch (pDevice->byRFType) { case RF_RFMD2959: @@ -525,13 +524,11 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) PSDevice pDevice = (PSDevice) pDeviceHandler; bool bResult = true; - if (pDevice->byCurrentCh == uConnectionChannel) { + if (pDevice->byCurrentCh == uConnectionChannel) return bResult; - } - if (!sChannelTbl[uConnectionChannel].bValid) { + if (!sChannelTbl[uConnectionChannel].bValid) return false; - } if ((uConnectionChannel > CB_MAX_CHANNEL_24G) && (pDevice->eCurrentPHYType != PHY_TYPE_11A)) { @@ -546,9 +543,8 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) //{{ RobertYu: 20041202 //// TX_PE will reserve 3 us for MAX2829 A mode only, it is for better TX throughput - if (pDevice->byRFType == RF_AIROHA7230) { + if (pDevice->byRFType == RF_AIROHA7230) RFbAL7230SelectChannelPostProcess(pDevice->PortOffset, pDevice->byCurrentCh, (unsigned char)uConnectionChannel); - } //}} RobertYu pDevice->byCurrentCh = (unsigned char)uConnectionChannel; @@ -570,11 +566,10 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) MACvSelectPage0(pDevice->PortOffset); } - if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { + if (pDevice->eCurrentPHYType == PHY_TYPE_11B) RFbSetPower(pDevice, RATE_1M, pDevice->byCurrentCh); - } else { + else RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh); - } return bResult; } @@ -601,15 +596,15 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE) if (ePHYType == PHY_TYPE_11A) { pDevice->bCountryInfo5G = true; - for (ii = CB_MAX_CHANNEL_24G + 1; ii <= CARD_MAX_CHANNEL_TBL; ii++) { + for (ii = CB_MAX_CHANNEL_24G + 1; ii <= CARD_MAX_CHANNEL_TBL; ii++) sChannelTbl[ii].bValid = false; - } + step = 4; } else { pDevice->bCountryInfo24G = true; - for (ii = 1; ii <= CB_MAX_CHANNEL_24G; ii++) { + for (ii = 1; ii <= CB_MAX_CHANNEL_24G; ii++) sChannelTbl[ii].bValid = false; - } + step = 1; } pDevice->abyCountryCode[0] = pIE_Country->abyCountryString[0]; @@ -652,19 +647,19 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) byCount = 0; if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == true) { for (ii = 28; ii < 36; ii += 2) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) byCount++; - } } + *pbyChTupple++ = 34; *pbyChTupple++ = byCount; byLen += 2; } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == true) { for (ii = 29; ii < 36; ii += 2) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) byCount++; - } } + *pbyChTupple++ = 36; *pbyChTupple++ = byCount; byLen += 2; @@ -673,10 +668,10 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) byCount = 0; if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == true) { for (ii = 36; ii < 40; ii++) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) byCount++; - } } + *pbyChTupple++ = 52; *pbyChTupple++ = byCount; byLen += 2; @@ -685,19 +680,19 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) byCount = 0; if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == true) { for (ii = 40; ii < 51; ii++) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) byCount++; - } } + *pbyChTupple++ = 100; *pbyChTupple++ = byCount; byLen += 2; } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == true) { for (ii = 51; ii < 56; ii++) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) byCount++; - } } + *pbyChTupple++ = 149; *pbyChTupple++ = byCount; byLen += 2; @@ -764,14 +759,13 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) if (ePHYType == PHY_TYPE_11A) { for (ii = CB_MAX_CHANNEL_24G + 1; ii <= CB_MAX_CHANNEL; ii++) { if (sChannelTbl[ii].bValid) { - if (byOptionChannel == 0) { + if (byOptionChannel == 0) byOptionChannel = (unsigned char) ii; - } - if (sChannelTbl[ii].byMAP == 0) { + + if (sChannelTbl[ii].byMAP == 0) return (unsigned char) ii; - } else if (!(sChannelTbl[ii].byMAP & 0x08)) { + else if (!(sChannelTbl[ii].byMAP & 0x08)) byOptionChannel = (unsigned char) ii; - } } } } else { @@ -781,25 +775,24 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) if (sChannelTbl[ii].byMAP == 0) { aiWeight[ii] += 100; } else if (sChannelTbl[ii].byMAP & 0x01) { - if (ii > 3) { + if (ii > 3) aiWeight[ii - 3] -= 10; - } - if (ii > 2) { + + if (ii > 2) aiWeight[ii - 2] -= 20; - } - if (ii > 1) { + + if (ii > 1) aiWeight[ii - 1] -= 40; - } + aiWeight[ii] -= 80; - if (ii < CB_MAX_CHANNEL_24G) { + if (ii < CB_MAX_CHANNEL_24G) aiWeight[ii + 1] -= 40; - } - if (ii < (CB_MAX_CHANNEL_24G - 1)) { + + if (ii < (CB_MAX_CHANNEL_24G - 1)) aiWeight[ii+2] -= 20; - } - if (ii < (CB_MAX_CHANNEL_24G - 2)) { + + if (ii < (CB_MAX_CHANNEL_24G - 2)) aiWeight[ii+3] -= 10; - } } } } |