[PATCHv2 09/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_statistics to sb_stats

Raphaël Beamonte raphael.beamonte at gmail.com
Fri Sep 11 07:29:17 UTC 2015


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

Signed-off-by: Raphaël Beamonte <raphael.beamonte at gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 25c4cbd..d779506 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4054,7 +4054,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 	static u32 last_rssi, last_evm;
 
 	static u32 sb_index;
-	static u32 slide_beacon_adc_pwdb_statistics;
+	static u32 sb_stats;
 	static u32 last_beacon_adc_pwdb;
 
 	struct rtl_80211_hdr_3addr *hdr;
@@ -4148,8 +4148,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 
 	if (prev_stats->bPacketBeacon) {
 		/* 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;
+		if (sb_stats++ >= PHY_Beacon_RSSI_SLID_WIN_MAX) {
+			sb_stats = PHY_Beacon_RSSI_SLID_WIN_MAX;
 			last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[sb_index];
 			priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb;
 		}
@@ -4158,7 +4158,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 		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;
+		prev_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total / sb_stats;
 		if (prev_stats->RxPWDBAll >= 3)
 			prev_stats->RxPWDBAll -= 3;
 	}
-- 
2.5.1



More information about the devel mailing list