linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Whitmore <johnfwhitmore@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	John Whitmore <johnfwhitmore@gmail.com>
Subject: [PATCH 01/13] staging:rtl8192u: Remove HTHalfMcsToDataRate() - Style
Date: Wed, 26 Sep 2018 20:16:52 +0100	[thread overview]
Message-ID: <20180926191704.16322-2-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180926191704.16322-1-johnfwhitmore@gmail.com>

The function HTHalfMcsToDataRate() is unused in code so has simply
been removed from the code.

As a result two static functions, (IsHTHalfNmode40Bandwidth and
IsHTHalfNmodeSGI), are not longer called, so they have been removed
as well.

These are coding style changes which should have no impact on
runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 .../staging/rtl8192u/ieee80211/ieee80211.h    |  1 -
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 57 -------------------
 2 files changed, 58 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index b4e7ae60ac1c..cc694e567040 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2382,7 +2382,6 @@ u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame);
 //extern void HTSetConnectBwModeCallback(unsigned long data);
 void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo);
 bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee);
-u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate);
 u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate);
 u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate);
 //function in BAPROC.c
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index 9bf52cebe4cd..ea1261e33a68 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -216,63 +216,6 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)
 				pHTInfoEle->BasicMSC[1], pHTInfoEle->BasicMSC[2], pHTInfoEle->BasicMSC[3], pHTInfoEle->BasicMSC[4]);
 }
 
-/*
- *	Return:		true if station in half n mode and AP supports 40 bw
- */
-static bool IsHTHalfNmode40Bandwidth(struct ieee80211_device *ieee)
-{
-	bool			retValue = false;
-	PRT_HIGH_THROUGHPUT	 pHTInfo = ieee->pHTInfo;
-
-	if (!pHTInfo->bCurrentHTSupport)		// wireless is n mode
-		retValue = false;
-	else if (!pHTInfo->bRegBW40MHz)		// station supports 40 bw
-		retValue = false;
-	else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))	// station in half n mode
-		retValue = false;
-	else if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ChlWidth) // ap support 40 bw
-		retValue = true;
-	else
-		retValue = false;
-
-	return retValue;
-}
-
-static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz)
-{
-	bool			retValue = false;
-	PRT_HIGH_THROUGHPUT	 pHTInfo = ieee->pHTInfo;
-
-	if (!pHTInfo->bCurrentHTSupport)		// wireless is n mode
-		retValue = false;
-	else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))	// station in half n mode
-		retValue = false;
-	else if (is40MHz) { // ap support 40 bw
-		if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz) // ap support 40 bw short GI
-			retValue = true;
-		else
-			retValue = false;
-	} else {
-		if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz) // ap support 40 bw short GI
-			retValue = true;
-		else
-			retValue = false;
-	}
-
-	return retValue;
-}
-
-u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee,	u8	nMcsRate)
-{
-	u8	is40MHz;
-	u8	isShortGI;
-
-	is40MHz = (IsHTHalfNmode40Bandwidth(ieee)) ? 1 : 0;
-	isShortGI = (IsHTHalfNmodeSGI(ieee, is40MHz)) ? 1 : 0;
-
-	return MCS_DATA_RATE[is40MHz][isShortGI][(nMcsRate & 0x7f)];
-}
-
 u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate)
 {
 	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
-- 
2.18.0


  reply	other threads:[~2018-09-26 19:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 19:16 [PATCH 00/13] staging:rtl8192u: Style & memory leak fix John Whitmore
2018-09-26 19:16 ` John Whitmore [this message]
2018-09-26 19:16 ` [PATCH 02/13] staging:rtl8192u: Make HTMcsToDataRate static - Style John Whitmore
2018-09-26 19:16 ` [PATCH 03/13] staging:rtl8192u: Remove definition of HTSetConnectBwMode " John Whitmore
2018-09-26 19:16 ` [PATCH 04/13] staging:rtl8192u: Move HTSetConnectBwModeCallback() " John Whitmore
2018-09-26 19:16 ` [PATCH 05/13] staging:rtl8192u: Remove AdvCoding and GreenField " John Whitmore
2018-09-28 12:35   ` Greg KH
2018-09-28 22:38     ` John Whitmore
2018-09-28 14:31   ` Dan Carpenter
2018-09-28 22:32     ` John Whitmore
2018-09-26 19:16 ` [PATCH 06/13] staging:rtl8192u: Remove TxSTBC and RxSTBC " John Whitmore
2018-09-28 12:36   ` Greg KH
2018-09-28 14:32   ` Dan Carpenter
2018-09-26 19:16 ` [PATCH 07/13] staging:rtl8192u: Remove DelayBA, PSMP and Rsvd1 " John Whitmore
2018-09-28 14:33   ` Dan Carpenter
2018-09-26 19:16 ` [PATCH 08/13] staging:rtl8192u: Remove LSigTxopProtect " John Whitmore
2018-09-26 19:17 ` [PATCH 09/13] staging:rtl8192u: Remove Rsvd2 " John Whitmore
2018-09-26 19:17 ` [PATCH 10/13] staging:rtl8192u: Remove ExtHTCapInfo " John Whitmore
2018-09-26 19:17 ` [PATCH 11/13] staging:rtl8192u: Remove TxBFCap " John Whitmore
2018-09-26 19:17 ` [PATCH 12/13] staging:rtl8192u: Remove ASCap " John Whitmore
2018-09-26 19:17 ` [PATCH 13/13] staging:rtl8192u: Remove potential memory leak 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=20180926191704.16322-2-johnfwhitmore@gmail.com \
    --to=johnfwhitmore@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).