From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755623AbbITRTo (ORCPT ); Sun, 20 Sep 2015 13:19:44 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:35446 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755333AbbITRQf (ORCPT ); Sun, 20 Sep 2015 13:16:35 -0400 From: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= To: Greg Kroah-Hartman Cc: =?UTF-8?q?Rapha=C3=ABl=20Beamonte?= , Cristina Opriceana , 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 Message-Id: <7ba4aee5c92e00fc0f22c06972a9574fb4f4ddff.1442769012.git.raphael.beamonte@gmail.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename variable to a shorter name to allow easier code refactoring in following patches. Signed-off-by: Raphaƫl Beamonte --- 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