projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
387f149
)
rtlwifi: Clean rtl_evm_db_to_percentage a bit
author
Priit Laes
<plaes@plaes.org>
Wed, 11 Mar 2015 20:03:25 +0000
(22:03 +0200)
committer
Kalle Valo
<kvalo@codeaurora.org>
Mon, 16 Mar 2015 15:54:11 +0000
(17:54 +0200)
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/stats.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/rtlwifi/stats.c
b/drivers/net/wireless/rtlwifi/stats.c
index
2d0736a
..
4201d73
100644
(file)
--- a/
drivers/net/wireless/rtlwifi/stats.c
+++ b/
drivers/net/wireless/rtlwifi/stats.c
@@
-39,15
+39,8
@@
EXPORT_SYMBOL(rtl_query_rxpwrpercentage);
u8 rtl_evm_db_to_percentage(char value)
{
- char 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;
+ char ret_val = clamp(-value, 0, 33) * 3;
+
if (ret_val == 99)
ret_val = 100;