Rename variable to a shorter name to allow easier code refactoring in following patch. Signed-off-by: Raphaël Beamonte <raphael.beamonte@xxxxxxxxx> --- drivers/staging/rtl8192u/r8192U_core.c | 84 +++++++++++++++++----------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7314e2f..1fd51ab 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3993,7 +3993,7 @@ static long rtl819x_translate_todbm(u8 signal_strength_index) * and it will be reinitialized when returned from S3/S4. */ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, - struct ieee80211_rx_stats *pprevious_stats, + struct ieee80211_rx_stats *prev_stats, struct ieee80211_rx_stats *pcurrent_stats) { bool bcheck = false; @@ -4019,7 +4019,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, pcurrent_stats->Seq_Num = seq; /* Check whether we should take the previous packet into accounting */ - if (!pprevious_stats->bIsAMPDU) { + if (!prev_stats->bIsAMPDU) { /* if previous packet is not aggregated packet */ bcheck = true; } @@ -4029,10 +4029,10 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, last_rssi = priv->stats.slide_signal_strength[slide_rssi_index]; priv->stats.slide_rssi_total -= last_rssi; } - priv->stats.slide_rssi_total += pprevious_stats->SignalStrength; + priv->stats.slide_rssi_total += prev_stats->SignalStrength; priv->stats.slide_signal_strength[slide_rssi_index++] = - pprevious_stats->SignalStrength; + prev_stats->SignalStrength; if (slide_rssi_index >= PHY_RSSI_SLID_WIN_MAX) slide_rssi_index = 0; @@ -4042,8 +4042,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, pcurrent_stats->rssi = priv->stats.signal_strength; /* If the previous packet does not match the criteria, neglect it */ - if (!pprevious_stats->bPacketMatchBSSID) { - if (!pprevious_stats->bToSelfBA) + if (!prev_stats->bPacketMatchBSSID) { + if (!prev_stats->bToSelfBA) return; } @@ -4052,7 +4052,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, /* only rtl8190 supported - * rtl8190_process_cck_rxpathsel(priv,pprevious_stats); + * rtl8190_process_cck_rxpathsel(priv,prev_stats); */ /* Check RSSI */ @@ -4064,8 +4064,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, /* <2> Showed on UI for engineering * hardware does not provide rssi information for each rf path in CCK */ - if (!pprevious_stats->bIsCCK && - (pprevious_stats->bPacketToSelf || pprevious_stats->bToSelfBA)) { + if (!prev_stats->bIsCCK && + (prev_stats->bPacketToSelf || prev_stats->bToSelfBA)) { for (rfpath = RF90_PATH_A; rfpath < priv->NumTotalRFPath; rfpath++) { if (!rtl8192_phy_CheckIsLegalRFPath( priv->ieee80211->dev, rfpath)) @@ -4073,16 +4073,16 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, if (priv->stats.rx_rssi_percentage[rfpath] == 0) priv->stats.rx_rssi_percentage[rfpath] = - pprevious_stats->RxMIMOSignalStrength[rfpath]; - if (pprevious_stats->RxMIMOSignalStrength[rfpath] > 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)) + - (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor); + (prev_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor); priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath] + 1; } else { priv->stats.rx_rssi_percentage[rfpath] = ((priv->stats.rx_rssi_percentage[rfpath] * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor); + (prev_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor); } RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath] = %d\n", @@ -4093,57 +4093,57 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, /* Check PWDB. */ RT_TRACE(COMP_RXDESC, "Smooth %s PWDB = %d\n", - pprevious_stats->bIsCCK ? "CCK" : "OFDM", - pprevious_stats->RxPWDBAll); + prev_stats->bIsCCK ? "CCK" : "OFDM", + prev_stats->RxPWDBAll); - if (pprevious_stats->bPacketBeacon) { + 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; last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index]; priv->stats.Slide_Beacon_Total -= last_beacon_adc_pwdb; } - priv->stats.Slide_Beacon_Total += pprevious_stats->RxPWDBAll; - priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = pprevious_stats->RxPWDBAll; + priv->stats.Slide_Beacon_Total += prev_stats->RxPWDBAll; + priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index] = prev_stats->RxPWDBAll; slide_beacon_adc_pwdb_index++; if (slide_beacon_adc_pwdb_index >= PHY_Beacon_RSSI_SLID_WIN_MAX) slide_beacon_adc_pwdb_index = 0; - pprevious_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total / slide_beacon_adc_pwdb_statistics; - if (pprevious_stats->RxPWDBAll >= 3) - pprevious_stats->RxPWDBAll -= 3; + prev_stats->RxPWDBAll = priv->stats.Slide_Beacon_Total / slide_beacon_adc_pwdb_statistics; + if (prev_stats->RxPWDBAll >= 3) + prev_stats->RxPWDBAll -= 3; } RT_TRACE(COMP_RXDESC, "Smooth %s PWDB = %d\n", - pprevious_stats->bIsCCK ? "CCK" : "OFDM", - pprevious_stats->RxPWDBAll); + prev_stats->bIsCCK ? "CCK" : "OFDM", + prev_stats->RxPWDBAll); - if (pprevious_stats->bPacketToSelf || - pprevious_stats->bPacketBeacon || - pprevious_stats->bToSelfBA) { + if (prev_stats->bPacketToSelf || + prev_stats->bPacketBeacon || + prev_stats->bToSelfBA) { if (priv->undecorated_smoothed_pwdb < 0) /* initialize */ priv->undecorated_smoothed_pwdb = - pprevious_stats->RxPWDBAll; - if (pprevious_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb) { + prev_stats->RxPWDBAll; + if (prev_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb) { priv->undecorated_smoothed_pwdb = (((priv->undecorated_smoothed_pwdb) * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor); + (prev_stats->RxPWDBAll)) / (Rx_Smooth_Factor); priv->undecorated_smoothed_pwdb = priv->undecorated_smoothed_pwdb + 1; } else { priv->undecorated_smoothed_pwdb = (((priv->undecorated_smoothed_pwdb) * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor); + (prev_stats->RxPWDBAll)) / (Rx_Smooth_Factor); } } /* Check EVM */ /* record the general EVM to the sliding window. */ - if (pprevious_stats->SignalQuality) { - if (pprevious_stats->bPacketToSelf || - pprevious_stats->bPacketBeacon || - pprevious_stats->bToSelfBA) { + if (prev_stats->SignalQuality) { + if (prev_stats->bPacketToSelf || + prev_stats->bPacketBeacon || + prev_stats->bToSelfBA) { if (slide_evm_statistics++ >= PHY_RSSI_SLID_WIN_MAX) { slide_evm_statistics = PHY_RSSI_SLID_WIN_MAX; last_evm = priv->stats.slide_evm[slide_evm_index]; @@ -4151,10 +4151,10 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, } priv->stats.slide_evm_total += - pprevious_stats->SignalQuality; + prev_stats->SignalQuality; priv->stats.slide_evm[slide_evm_index++] = - pprevious_stats->SignalQuality; + prev_stats->SignalQuality; if (slide_evm_index >= PHY_RSSI_SLID_WIN_MAX) slide_evm_index = 0; @@ -4169,16 +4169,16 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, } /* <2> Showed on UI for engineering */ - if (pprevious_stats->bPacketToSelf || - pprevious_stats->bPacketBeacon || - pprevious_stats->bToSelfBA) { + if (prev_stats->bPacketToSelf || + prev_stats->bPacketBeacon || + prev_stats->bToSelfBA) { for (nspatial_stream = 0; nspatial_stream < 2; nspatial_stream++) { /* 2 spatial stream */ - if (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] != -1) { + if (prev_stats->RxMIMOSignalQuality[nspatial_stream] != -1) { if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */ - priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream]; + priv->stats.rx_evm_percentage[nspatial_stream] = prev_stats->RxMIMOSignalQuality[nspatial_stream]; priv->stats.rx_evm_percentage[nspatial_stream] = ((priv->stats.rx_evm_percentage[nspatial_stream] * (Rx_Smooth_Factor - 1)) + - (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) / (Rx_Smooth_Factor); + (prev_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) / (Rx_Smooth_Factor); } } } -- 2.5.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel