Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1228917

[PATCHv3 10/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp

From Raphaël Beamonte <raphael.beamonte@gmail.com>
Newsgroups linux.kernel
Subject [PATCHv3 10/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp
Date 2015-09-20 19:20 +0200
Message-ID <qaQro-6fo-33@gated-at.bofh.it> (permalink)
References <qaQrn-6fo-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2 00/16] staging: rtl8192u: code clean up Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 01/16] staging: rtl8192u: r8192U_core: fix comments lines over 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 10/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 11/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 15/16] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {} Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 07/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 06/16] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 13/16] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
    Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-17 07:00 +0200
      Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-17 07:10 +0200
        Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-17 07:20 +0200
          Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-17 20:30 +0200
  [PATCHv2 12/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 08/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 05/16] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  Re: [PATCHv2 02/16] staging: rtl8192u: r8192U_core: add line breaks  to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-17 07:00 +0200
  [PATCHv3 00/15] staging: rtl8192u: code clean up Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 11/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 06/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 04/15] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 13/15] staging: rtl8192u: r8192U_core: rtl8192_ioctl: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 05/15] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 10/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 07/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 14/15] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {} Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 15/15] staging: rtl8192u: remove all code framed by symbol TO_DO_LIST Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 09/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200
    [PATCHv3 08/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_statistics to sb_stats Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200
    [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200
      Re: [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-21 06:40 +0200
        Re: [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-21 18:40 +0200
    [PATCHv3 03/15] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200

csiph-web