From: John Whitmore <johnfwhitmore@gmail.com>
To: gregkh@linuxfoundation.org
Cc: kstewart@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, johnfwhitmore@gmail.com,
colin.king@canonical.com, tglx@linutronix.de
Subject: [PATCH 02/13] coding style chages to the switch statements in the file.
Date: Mon, 14 May 2018 16:53:07 +0100 [thread overview]
Message-ID: <20180514155318.32195-3-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180514155318.32195-1-johnfwhitmore@gmail.com>
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
.../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 93 ++++++++++------------
1 file changed, 44 insertions(+), 49 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index 17a720966253..9e596577e544 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -187,38 +187,36 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)
IEEE80211_DEBUG(IEEE80211_DL_HT, "\tPrimary channel = %d\n", pHTInfoEle->ControlChl);
IEEE80211_DEBUG(IEEE80211_DL_HT, "\tSecondary channel =");
- switch (pHTInfoEle->ExtChlOffset)
- {
- case 0:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "Not Present\n");
- break;
- case 1:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "Upper channel\n");
- break;
- case 2:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "Reserved. Eooro!!!\n");
- break;
- case 3:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "Lower Channel\n");
- break;
+ switch (pHTInfoEle->ExtChlOffset) {
+ case 0:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "Not Present\n");
+ break;
+ case 1:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "Upper channel\n");
+ break;
+ case 2:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "Reserved. Eooro!!!\n");
+ break;
+ case 3:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "Lower Channel\n");
+ break;
}
IEEE80211_DEBUG(IEEE80211_DL_HT, "\tRecommended channel width = %s\n", (pHTInfoEle->RecommemdedTxWidth)?"20Mhz": "40Mhz");
IEEE80211_DEBUG(IEEE80211_DL_HT, "\tOperation mode for protection = ");
- switch (pHTInfoEle->OptMode)
- {
- case 0:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "No Protection\n");
- break;
- case 1:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "HT non-member protection mode\n");
- break;
- case 2:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "Suggest to open protection\n");
- break;
- case 3:
- IEEE80211_DEBUG(IEEE80211_DL_HT, "HT mixed mode\n");
- break;
+ switch (pHTInfoEle->OptMode) {
+ case 0:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "No Protection\n");
+ break;
+ case 1:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "HT non-member protection mode\n");
+ break;
+ case 2:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "Suggest to open protection\n");
+ break;
+ case 3:
+ IEEE80211_DEBUG(IEEE80211_DL_HT, "HT mixed mode\n");
+ break;
}
IEEE80211_DEBUG(IEEE80211_DL_HT, "\tBasic MCS Rate Set = [%x][%x][%x][%x][%x]\n", pHTInfoEle->BasicMSC[0],\
@@ -821,36 +819,33 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)
return false;
}
- switch (ieee->mode)
- {
+ switch (ieee->mode) {
case IEEE_A:
case IEEE_B:
case IEEE_G:
- //legacy rate routine handled at selectedrate
+ //legacy rate routine handled at selectedrate
- //no MCS rate
- for(i=0;i<=15;i++){
- pOperateMCS[i] = 0;
- }
- break;
+ //no MCS rate
+ for(i=0;i<=15;i++){
+ pOperateMCS[i] = 0;
+ }
+ break;
case IEEE_N_24G: //assume CCK rate ok
case IEEE_N_5G:
- // Legacy part we only use 6, 5.5,2,1 for N_24G and 6 for N_5G.
- // Legacy part shall be handled at SelectRateSet().
-
- //HT part
- // TODO: may be different if we have different number of antenna
- pOperateMCS[0] &=RATE_ADPT_1SS_MASK; //support MCS 0~7
- pOperateMCS[1] &=RATE_ADPT_2SS_MASK;
- pOperateMCS[3] &=RATE_ADPT_MCS32_MASK;
- break;
+ // Legacy part we only use 6, 5.5,2,1 for N_24G and 6 for N_5G.
+ // Legacy part shall be handled at SelectRateSet().
- //should never reach here
- default:
-
- break;
+ //HT part
+ // TODO: may be different if we have different number of antenna
+ pOperateMCS[0] &=RATE_ADPT_1SS_MASK; //support MCS 0~7
+ pOperateMCS[1] &=RATE_ADPT_2SS_MASK;
+ pOperateMCS[3] &=RATE_ADPT_MCS32_MASK;
+ break;
+ //should never reach here
+ default:
+ break;
}
return true;
--
2.16.3
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2018-05-14 15:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 15:53 Coding Style of drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c John Whitmore
2018-05-14 15:53 ` [PATCH 01/13] Coding style changes to block comments John Whitmore
2018-05-14 15:58 ` Greg KH
2018-05-14 15:53 ` John Whitmore [this message]
2018-05-14 15:59 ` [PATCH 02/13] coding style chages to the switch statements in the file Greg KH
2018-05-14 15:53 ` [PATCH 03/13] coding style corrections for if statements John Whitmore
2018-05-14 15:53 ` [PATCH 04/13] coding style corrections, spaces around ', ' characters and removal of blank lines John Whitmore
2018-05-14 15:53 ` [PATCH 05/13] Coding style corrections. Added spaces around operators John Whitmore
2018-05-14 15:53 ` [PATCH 06/13] Coding style, removal of redundant braces John Whitmore
2018-05-14 15:53 ` [PATCH 07/13] Coding style, removal of redundant returns from void functions John Whitmore
2018-05-14 15:53 ` [PATCH 08/13] Coding style, added blank line after declarations John Whitmore
2018-05-14 15:53 ` [PATCH 09/13] Coding style, corrected bad indentation of a statement John Whitmore
2018-05-14 15:53 ` [PATCH 10/13] Coding style: Removal of prohibited spaces John Whitmore
2018-05-14 15:53 ` [PATCH 11/13] Coding style: corrections to for statements John Whitmore
2018-05-14 15:53 ` [PATCH 12/13] Coding style, removal of braces from single statement blocks John Whitmore
2018-05-14 15:53 ` [PATCH 13/13] Coding style, corrected an indentation issue, (use tabs) John Whitmore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180514155318.32195-3-johnfwhitmore@gmail.com \
--to=johnfwhitmore@gmail.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.