Skip to content

Commit

Permalink
rtlwifi: rtl8192cu: replace _rtl92c_evm_db_to_percentage with generic…
Browse files Browse the repository at this point in the history
… version

Function _rtl92c_evm_db_to_percentage is functionally identical
to the generic version rtl_evm_db_to_percentage, so remove
_rtl92c_evm_db_to_percentage and use the generic version instead.

Signed-off-by: Michael Straube <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
MichaelStraube authored and Kalle Valo committed Sep 13, 2019
1 parent 1335ad2 commit 622c19e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,22 +577,6 @@ static u8 _rtl92c_query_rxpwrpercentage(s8 antpower)
return 100 + antpower;
}

static u8 _rtl92c_evm_db_to_percentage(s8 value)
{
s8 ret_val;

ret_val = value;
if (ret_val >= 0)
ret_val = 0;
if (ret_val <= -33)
ret_val = -33;
ret_val = 0 - ret_val;
ret_val *= 3;
if (ret_val == 99)
ret_val = 100;
return ret_val;
}

static long _rtl92c_signal_scale_mapping(struct ieee80211_hw *hw,
long currsig)
{
Expand Down Expand Up @@ -743,7 +727,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
else
max_spatial_stream = 1;
for (i = 0; i < max_spatial_stream; i++) {
evm = _rtl92c_evm_db_to_percentage(p_drvinfo->rxevm[i]);
evm = rtl_evm_db_to_percentage(p_drvinfo->rxevm[i]);
if (packet_match_bssid) {
if (i == 0)
pstats->signalquality =
Expand Down

0 comments on commit 622c19e

Please sign in to comment.