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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Sep 2015 03:29:16 -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 08/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index

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

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

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 2a7d46d..25c4cbd 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4053,7 +4053,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 	static u32 slide_evm_index, slide_evm_statistics;
 	static u32 last_rssi, last_evm;
 
-	static u32 slide_beacon_adc_pwdb_index;
+	static u32 sb_index;
 	static u32 slide_beacon_adc_pwdb_statistics;
 	static u32 last_beacon_adc_pwdb;
 
@@ -4150,14 +4150,14 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 		/* record the beacon pwdb to the sliding window. */
 		if (slide_beacon_adc_pwdb_statistics++ >= PHY_Beacon_RSSI_SLID_WIN_MAX) {
 			slide_beacon_adc_pwdb_statistics = PHY_Beacon_RSSI_SLID_WIN_MAX;
-			last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index];
+			last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[sb_index];
 			priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb;
 		}
 		priv->stats.Slide_Beacon_Total += prev_stats->RxPWDBAll;
-		priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = prev_stats->RxPWDBAll;
-		slide_beacon_adc_pwdb_index++;
-		if (slide_beacon_adc_pwdb_index >= PHY_Beacon_RSSI_SLID_WIN_MAX)
-			slide_beacon_adc_pwdb_index = 0;
+		priv->stats.Slide_Beacon_pwdb[sb_index] = prev_stats->RxPWDBAll;
+		sb_index++;
+		if (sb_index >= PHY_Beacon_RSSI_SLID_WIN_MAX)
+			sb_index = 0;
 		prev_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total / slide_beacon_adc_pwdb_statistics;
 		if (prev_stats->RxPWDBAll >= 3)
 			prev_stats->RxPWDBAll -= 3;
-- 
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