mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Raphaël Beamonte" <raphael.beamonte@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Raphaël Beamonte" <raphael.beamonte@gmail.com>,
	"Cristina Opriceana" <cristina.opriceana@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCHv3 10/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp
Date: Sun, 20 Sep 2015 13:14:22 -0400	[thread overview]
Message-ID: <7ba4aee5c92e00fc0f22c06972a9574fb4f4ddff.1442769012.git.raphael.beamonte@gmail.com> (raw)
In-Reply-To: <cover.1442769012.git.raphael.beamonte@gmail.com>
In-Reply-To: <cover.1442769012.git.raphael.beamonte@gmail.com>

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

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.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 510f08d..b3dd18b 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3997,7 +3997,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;
@@ -4065,27 +4065,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


  parent reply	other threads:[~2015-09-20 17:19 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  7:29 [PATCHv2 00/16] staging: rtl8192u: code clean up Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 01/16] staging: rtl8192u: r8192U_core: fix comments lines over 80 characters Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 02/16] staging: rtl8192u: r8192U_core: add line breaks to keep lines under " Raphaël Beamonte
2015-09-17  4:55   ` Greg Kroah-Hartman
2015-09-11  7:29 ` [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary variables " Raphaël Beamonte
2015-09-17  4:57   ` Greg Kroah-Hartman
2015-09-17  5:06     ` Raphaël Beamonte
2015-09-17  5:18       ` Greg Kroah-Hartman
2015-09-17 18:26         ` Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get " Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 05/16] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 06/16] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: " Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 07/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 08/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 09/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_statistics to sb_stats Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 10/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 11/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 12/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 13/16] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 14/16] staging: rtl8192u: r8192U_core: rtl8192_ioctl: reorganize function Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 15/16] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {} Raphaël Beamonte
2015-09-11  7:29 ` [PATCHv2 16/16] staging: rtl8192u: remove all code framed by symbol TO_DO_LIST Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 00/15] staging: rtl8192u: code clean up Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 01/15] staging: rtl8192u: r8192U_core: add line breaks to keep lines under 80 characters Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary variables " Raphaël Beamonte
2015-09-21  2:16   ` Greg Kroah-Hartman
2015-09-21 16:31     ` Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 03/15] staging: rtl8192u: r8192U_core: reverse conditions to get " Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 04/15] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 05/15] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: " Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 06/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 07/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 08/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_statistics to sb_stats Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 09/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable Raphaël Beamonte
2015-09-20 17:14 ` Raphaël Beamonte [this message]
2015-09-20 17:14 ` [PATCHv3 11/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 12/15] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 13/15] staging: rtl8192u: r8192U_core: rtl8192_ioctl: reorganize function Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 14/15] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {} Raphaël Beamonte
2015-09-20 17:14 ` [PATCHv3 15/15] staging: rtl8192u: remove all code framed by symbol TO_DO_LIST Raphaël Beamonte

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=7ba4aee5c92e00fc0f22c06972a9574fb4f4ddff.1442769012.git.raphael.beamonte@gmail.com \
    --to=raphael.beamonte@gmail.com \
    --cc=cristina.opriceana@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

all inboxes | Powered by JetHome®