[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1427031320-10913-4-git-send-email-plaes@plaes.org>
Date: Sun, 22 Mar 2015 15:35:19 +0200
From: Priit Laes <plaes@...es.org>
To: Kalle Valo <kvalo@...eaurora.org>
Cc: Larry Finger <Larry.Finger@...inger.net>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Chaoming Li <chaoming_li@...lsil.com.cn>,
Joe Perches <joe@...ches.com>, Priit Laes <plaes@...es.org>
Subject: [PATCH v2 3/4] rtlwifi: Rename rtl_translate_todbm to rtl_signalpower_todbm
Signed-off-by: Priit Laes <plaes@...es.org>
---
drivers/net/wireless/rtlwifi/stats.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/stats.c b/drivers/net/wireless/rtlwifi/stats.c
index 9ebeb6e..4cce472 100644
--- a/drivers/net/wireless/rtlwifi/stats.c
+++ b/drivers/net/wireless/rtlwifi/stats.c
@@ -48,14 +48,9 @@ u8 rtl_evm_db_to_percentage(char value)
}
EXPORT_SYMBOL(rtl_evm_db_to_percentage);
-static long rtl_translate_todbm(struct ieee80211_hw *hw,
- u8 signal_strength_index)
+static long rtl_signalpower_todbm(u8 signal_strength_index)
{
- long signal_power;
-
- signal_power = (long)((signal_strength_index + 1) >> 1);
- signal_power -= 95;
- return signal_power;
+ return (long)((signal_strength_index + 1) >> 1) - 95;
}
long rtl_signal_scale_mapping(long currsig)
@@ -93,7 +88,7 @@ static void rtl_process_ui_rssi(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_phy *rtlphy = &(rtlpriv->phy);
u8 rfpath;
- u32 last_rssi, tmpval;
+ u32 last_rssi;
if (!pstatus->packet_toself && !pstatus->packet_beacon)
return;
@@ -112,10 +107,9 @@ static void rtl_process_ui_rssi(struct ieee80211_hw *hw,
pstatus->signalstrength;
if (rtlpriv->stats.ui_rssi.index >= PHY_RSSI_SLID_WIN_MAX)
rtlpriv->stats.ui_rssi.index = 0;
- tmpval = rtlpriv->stats.ui_rssi.total_val /
- rtlpriv->stats.ui_rssi.total_num;
- rtlpriv->stats.signal_strength = rtl_translate_todbm(hw,
- (u8) tmpval);
+ rtlpriv->stats.signal_strength = rtl_signalpower_todbm(
+ (u8)rtlpriv->stats.ui_rssi.total_val /
+ rtlpriv->stats.ui_rssi.total_num);
pstatus->rssi = rtlpriv->stats.signal_strength;
if (pstatus->is_cck)
--
2.3.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists