Rename variable to a shorter name to allow easier code refactoring in following patches. Signed-off-by: Raphaël Beamonte <raphael.beamonte@xxxxxxxxx> --- 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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel