Commit 0d86eba5 authored by Ana Rey's avatar Ana Rey Committed by Greg Kroah-Hartman

staging: rtl8192u: Move open brace on the previous line

Move open brace on the previous line and fix coding style in
these lines when It is necessary in ieee80211/dot11d.c

Fix checkpatch.pl errors:
ERROR: that open brace { should be on the previous line
Signed-off-by: default avatarAna Rey <anarey@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c21ce6c7
...@@ -66,8 +66,7 @@ Dot11d_UpdateCountryIe( ...@@ -66,8 +66,7 @@ Dot11d_UpdateCountryIe(
MaxChnlNum = 0; MaxChnlNum = 0;
NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */ NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3); pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
for(i = 0; i < NumTriples; i++) for (i = 0; i < NumTriples; i++) {
{
if (MaxChnlNum >= pTriple->FirstChnl) { if (MaxChnlNum >= pTriple->FirstChnl) {
/* It is not in a monotonically increasing order, so /* It is not in a monotonically increasing order, so
* stop processing. * stop processing.
...@@ -83,8 +82,7 @@ Dot11d_UpdateCountryIe( ...@@ -83,8 +82,7 @@ Dot11d_UpdateCountryIe(
return; return;
} }
for(j = 0 ; j < pTriple->NumChnls; j++) for (j = 0; j < pTriple->NumChnls; j++) {
{
pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1; pDot11dInfo->channel_map[pTriple->FirstChnl + j] = 1;
pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm; pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = pTriple->MaxTxPowerInDbm;
MaxChnlNum = pTriple->FirstChnl + j; MaxChnlNum = pTriple->FirstChnl + j;
...@@ -115,13 +113,11 @@ DOT11D_GetMaxTxPwrInDbm( ...@@ -115,13 +113,11 @@ DOT11D_GetMaxTxPwrInDbm(
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
u8 MaxTxPwrInDbm = 255; u8 MaxTxPwrInDbm = 255;
if(MAX_CHANNEL_NUMBER < Channel) if (MAX_CHANNEL_NUMBER < Channel) {
{
printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n"); printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
return MaxTxPwrInDbm; return MaxTxPwrInDbm;
} }
if(pDot11dInfo->channel_map[Channel]) if (pDot11dInfo->channel_map[Channel]) {
{
MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel]; MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel];
} }
...@@ -136,8 +132,7 @@ DOT11D_ScanComplete( ...@@ -136,8 +132,7 @@ DOT11D_ScanComplete(
{ {
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
switch (pDot11dInfo->State) switch (pDot11dInfo->State) {
{
case DOT11D_STATE_LEARNED: case DOT11D_STATE_LEARNED:
pDot11dInfo->State = DOT11D_STATE_DONE; pDot11dInfo->State = DOT11D_STATE_DONE;
break; break;
...@@ -160,8 +155,7 @@ int IsLegalChannel( ...@@ -160,8 +155,7 @@ int IsLegalChannel(
{ {
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
if(MAX_CHANNEL_NUMBER < channel) if (MAX_CHANNEL_NUMBER < channel) {
{
printk("IsLegalChannel(): Invalid Channel\n"); printk("IsLegalChannel(): Invalid Channel\n");
return 0; return 0;
} }
...@@ -179,17 +173,14 @@ int ToLegalChannel( ...@@ -179,17 +173,14 @@ int ToLegalChannel(
u8 default_chn = 0; u8 default_chn = 0;
u32 i = 0; u32 i = 0;
for (i=1; i<= MAX_CHANNEL_NUMBER; i++) for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) {
{ if (pDot11dInfo->channel_map[i] > 0) {
if(pDot11dInfo->channel_map[i] > 0)
{
default_chn = i; default_chn = i;
break; break;
} }
} }
if(MAX_CHANNEL_NUMBER < channel) if (MAX_CHANNEL_NUMBER < channel) {
{
printk("IsLegalChannel(): Invalid Channel\n"); printk("IsLegalChannel(): Invalid Channel\n");
return default_chn; return default_chn;
} }
......
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