From: John Whitmore Date: Fri, 3 Aug 2018 00:02:08 +0000 (+0100) Subject: staging:rtl8192u: Rename constants RateAdaptiveTH_Low_* - Style X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c972be9a7525db60dbc500658ef4d532c70eb3d7;p=linux.git staging:rtl8192u: Rename constants RateAdaptiveTH_Low_* - Style The two constants, RateAdaptiveTH_Low_20M and RateAdaptiveTH_Low_40M generate a checkpatch warning about CamelCase naming. The two have been renamed to clear this issue. RATE_ADAPTIVE_TH_LOW_20M and RATE_ADAPTIVE_TH_LOW_40M This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index d4a063afca55e..6129ac55656f1 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -3082,14 +3082,14 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev) if (priv->undecorated_smoothed_pwdb >= (RATE_ADAPTIVE_TH_HIGH + 5)) { rx_chk_cnt = 0; /* high rssi, check rx stuck right now. */ } else if (priv->undecorated_smoothed_pwdb < (RATE_ADAPTIVE_TH_HIGH + 5) && - ((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_40M) || - (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_20M))) { + ((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_40M) || + (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_20M))) { if (rx_chk_cnt < 2) return bStuck; rx_chk_cnt = 0; - } else if (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_40M) || - (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_20M)) && + } else if (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RATE_ADAPTIVE_TH_LOW_40M) || + (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RATE_ADAPTIVE_TH_LOW_20M)) && priv->undecorated_smoothed_pwdb >= VeryLowRSSI) { if (rx_chk_cnt < 4) return bStuck; diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index b9b751fb96c37..21107a00776fd 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -244,12 +244,12 @@ void init_rate_adaptive(struct net_device *dev) pra->ratr_state = DM_RATR_STA_MAX; pra->high2low_rssi_thresh_for_ra = RATE_ADAPTIVE_TH_HIGH; - pra->low2high_rssi_thresh_for_ra20M = RateAdaptiveTH_Low_20M+5; - pra->low2high_rssi_thresh_for_ra40M = RateAdaptiveTH_Low_40M+5; + pra->low2high_rssi_thresh_for_ra20M = RATE_ADAPTIVE_TH_LOW_20M + 5; + pra->low2high_rssi_thresh_for_ra40M = RATE_ADAPTIVE_TH_LOW_40M + 5; pra->high_rssi_thresh_for_ra = RATE_ADAPTIVE_TH_HIGH + 5; - pra->low_rssi_thresh_for_ra20M = RateAdaptiveTH_Low_20M; - pra->low_rssi_thresh_for_ra40M = RateAdaptiveTH_Low_40M; + pra->low_rssi_thresh_for_ra20M = RATE_ADAPTIVE_TH_LOW_20M; + pra->low_rssi_thresh_for_ra40M = RATE_ADAPTIVE_TH_LOW_40M; if (priv->CustomerID == RT_CID_819x_Netcore) pra->ping_rssi_enable = 1; diff --git a/drivers/staging/rtl8192u/r8192U_dm.h b/drivers/staging/rtl8192u/r8192U_dm.h index 07e80e064f763..a1378488423b4 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.h +++ b/drivers/staging/rtl8192u/r8192U_dm.h @@ -41,8 +41,8 @@ #define RX_PATH_SELECTION_DIFF_TH 18 #define RATE_ADAPTIVE_TH_HIGH 50 -#define RateAdaptiveTH_Low_20M 30 -#define RateAdaptiveTH_Low_40M 10 +#define RATE_ADAPTIVE_TH_LOW_20M 30 +#define RATE_ADAPTIVE_TH_LOW_40M 10 #define VeryLowRSSI 15 #define CTSToSelfTHVal 30