lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Sep 2015 03:29:19 -0400
From:	Raphaël Beamonte <raphael.beamonte@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	Raphaël Beamonte <raphael.beamonte@...il.com>,
	Cristina Opriceana <cristina.opriceana@...il.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCHv2 11/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp

Rename variable to a shorter name to allow easier code
refactoring in following patches.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@...il.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 100fbbe..6bc92a7 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4047,7 +4047,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 				    struct ieee80211_rx_stats *pcurrent_stats)
 {
 	bool bcheck = false;
-	u8	rfpath;
+	u8 rfp;
 	u32	nspatial_stream, tmp_val;
 	static u32 slide_rssi_index, slide_rssi_statistics;
 	static u32 slide_evm_index, slide_evm_statistics;
@@ -4115,27 +4115,28 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 	 */
 	if (!prev_stats->bIsCCK &&
 	    (prev_stats->bPacketToSelf || prev_stats->bToSelfBA)) {
-		for (rfpath = RF90_PATH_A; rfpath < priv->NumTotalRFPath; rfpath++) {
+		for (rfp = RF90_PATH_A; rfp < priv->NumTotalRFPath; rfp++) {
 			if (!rtl8192_phy_CheckIsLegalRFPath(
-					priv->ieee80211->dev, rfpath))
+					priv->ieee80211->dev, rfp))
 				continue;
 
-			if (priv->stats.rx_rssi_percentage[rfpath] == 0)
-				priv->stats.rx_rssi_percentage[rfpath] =
-					prev_stats->RxMIMOSignalStrength[rfpath];
-			if (prev_stats->RxMIMOSignalStrength[rfpath]  > priv->stats.rx_rssi_percentage[rfpath]) {
-				priv->stats.rx_rssi_percentage[rfpath] =
-					((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) +
-					 (prev_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
-				priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath]  + 1;
+			if (priv->stats.rx_rssi_percentage[rfp] == 0)
+				priv->stats.rx_rssi_percentage[rfp] =
+					prev_stats->RxMIMOSignalStrength[rfp];
+
+			if (prev_stats->RxMIMOSignalStrength[rfp]  > priv->stats.rx_rssi_percentage[rfp]) {
+				priv->stats.rx_rssi_percentage[rfp] =
+					((priv->stats.rx_rssi_percentage[rfp] * (Rx_Smooth_Factor - 1)) +
+					 (prev_stats->RxMIMOSignalStrength[rfp])) / (Rx_Smooth_Factor);
+				priv->stats.rx_rssi_percentage[rfp] = priv->stats.rx_rssi_percentage[rfp]  + 1;
 			} else {
-				priv->stats.rx_rssi_percentage[rfpath] =
-					((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) +
-					 (prev_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
+				priv->stats.rx_rssi_percentage[rfp] =
+					((priv->stats.rx_rssi_percentage[rfp] * (Rx_Smooth_Factor - 1)) +
+					 (prev_stats->RxMIMOSignalStrength[rfp])) / (Rx_Smooth_Factor);
 			}
 			RT_TRACE(COMP_DBG,
 				 "priv->stats.rx_rssi_percentage[rfPath]  = %d\n",
-				 priv->stats.rx_rssi_percentage[rfpath]);
+				 priv->stats.rx_rssi_percentage[rfp]);
 		}
 	}
 
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ