linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Whitmore <johnfwhitmore@gmail.com>
To: gregkh@linuxfoundation.org
Cc: kstewart@linuxfoundation.org, colin.king@canonical.com,
	tglx@linutronix.de, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, johnfwhitmore@gmail.com
Subject: [PATCH 11/13] Coding style: corrections to for statements.
Date: Mon, 14 May 2018 16:53:16 +0100	[thread overview]
Message-ID: <20180514155318.32195-12-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180514155318.32195-1-johnfwhitmore@gmail.com>

I few other minor coding style issues.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c    | 42 ++++++++++------------
 1 file changed, 19 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index 25db009e0a37..742eb35ae442 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -547,7 +547,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 		u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	// For 11n EWC definition, 2007.07.17, by Emily
 
 		memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-		pCapELE = (PHT_CAPABILITY_ELE) &posHTCap[4];
+		pCapELE = (PHT_CAPABILITY_ELE)&posHTCap[4];
 	} else {
 		pCapELE = (PHT_CAPABILITY_ELE)posHTCap;
 	}
@@ -602,7 +602,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) {
 		int i;
 
-		for(i = 1; i < 16; i++)
+		for (i = 1; i < 16; i++)
 			pCapELE->MCS[i] = 0;
 	}
 
@@ -719,7 +719,7 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
 	*posRT2RTAgg++ = 0x4c;
 	*posRT2RTAgg++ = 0x02;
 	*posRT2RTAgg++ = 0x01;
-	*posRT2RTAgg = 0x10;//*posRT2RTAgg = 0x02;
+	*posRT2RTAgg = 0x10;    // *posRT2RTAgg = 0x02;
 
 	if (ieee->bSupportRemoteWakeUp)
 		*posRT2RTAgg |= 0x08;//RT_HT_CAP_USE_WOW;
@@ -729,16 +729,14 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
 #ifdef TODO
 #if (HAL_CODE_BASE == RTL8192 && DEV_BUS_TYPE == USB_INTERFACE)
 	/*
-	//Emily. If it is required to Ask Realtek AP to send AMPDU during AES mode, enable this
-	   section of code.
-	if(IS_UNDER_11N_AES_MODE(Adapter))
-	{
-		posRT2RTAgg->Octet[5] |=RT_HT_CAP_USE_AMPDU;
-	}else
-	{
-		posRT2RTAgg->Octet[5] &= 0xfb;
-	}
-	*/
+	 * Emily. If it is required to Ask Realtek AP to send AMPDU during AES
+	 * mode, enable this section of code.
+	 *   if(IS_UNDER_11N_AES_MODE(Adapter)) {
+	 *           posRT2RTAgg->Octet[5] |=RT_HT_CAP_USE_AMPDU;
+	 *   } else {
+	 *           posRT2RTAgg->Octet[5] &= 0xfb;
+	 *   }
+	 */
 #else
 	// Do Nothing
 #endif
@@ -770,7 +768,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)
 		//legacy rate routine handled at selectedrate
 
 		//no MCS rate
-		for(i = 0; i <= 15; i++){
+		for (i = 0; i <= 15; i++) {
 			pOperateMCS[i] = 0;
 		}
 		break;
@@ -826,23 +824,21 @@ u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, u8 *pMCSRateSet, u8 *pMCSF
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "pMCSRateSet or pMCSFilter can't be null in HTGetHighestMCSRate()\n");
 		return false;
 	}
-	for(i = 0; i < 16; i++)
+	for (i = 0; i < 16; i++)
 		availableMcsRate[i] = pMCSRateSet[i] & pMCSFilter[i];
 
-	for(i = 0; i < 16; i++)
-	{
+	for (i = 0; i < 16; i++) {
 		if (availableMcsRate[i] != 0)
 			break;
 	}
 	if (i == 16)
 		return false;
 
-	for(i = 0; i < 16; i++)
+	for (i = 0; i < 16; i++)
 	{
 		if (availableMcsRate[i] != 0) {
 			bitMap = availableMcsRate[i];
-			for(j = 0; j < 8; j++)
-			{
+			for (j = 0; j < 8; j++) {
 				if ((bitMap % 2) != 0) {
 					if (HTMcsToDataRate(ieee, (8 * i + j)) > HTMcsToDataRate(ieee, mcsRate))
 						mcsRate = (8 * i + j);
@@ -869,7 +865,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,
 	u8 i = 0;
 
 	// filter out operational rate set not supported by AP, the length of it is 16
-	for(i = 0; i <= 15; i++){
+	for (i = 0; i <= 15; i++) {
 		pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i] & pSupportMCS[i];
 	}
 
@@ -890,7 +886,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,
 	 * For RTL819X, we support only MCS0~15.
 	 * And also, we do not know how to use MCS32 now.
 	 */
-	for(i = 2; i <= 15; i++)
+	for (i = 2; i <= 15; i++)
 		pOperateMCS[i] = 0;
 
 	return true;
@@ -1016,7 +1012,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 
 	// Lanhsin: mark for tmp to avoid deauth by ap from  s3
 	//if(memcmp(pMgntInfo->Bssid, NETGEAR834Bv2_BROADCOM, 3)==0)
-	if (0){
+	if (0) {
 		pHTInfo->bCurrentAMPDUEnable = false;
 		pHTInfo->ForcedAMSDUMode = HT_AGG_FORCE_ENABLE;
 		pHTInfo->ForcedAMSDUMaxSize = 7935;
-- 
2.16.3

  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 ` [PATCH 02/13] coding style chages to the switch statements in the file John Whitmore
2018-05-14 15:59   ` 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 ` John Whitmore [this message]
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-12-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).