summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDavid Weidenkopf <David.Weidenkopf@Arthrex.com>2020-01-28 00:43:46 +0000
committerDaniel Wagner <wagi@monom.org>2020-01-28 09:06:24 +0100
commit0b0277cccd78361723d160ed8221c69e014df07f (patch)
treebaeb02dcd88e3addc9b5e6b4134b08552c2e13d2 /plugins
parentf02dc4bd190c1229b813eb80372ffb3385654f16 (diff)
downloadconnman-0b0277cccd78361723d160ed8221c69e014df07f.tar.gz
iwd: Transform signal strength from iwd range to ConnMan range
This transforms the signal strength, according to the comment regarding expected iwd values.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/iwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/iwd.c b/plugins/iwd.c
index ab50bf61..7b5d9b92 100644
--- a/plugins/iwd.c
+++ b/plugins/iwd.c
@@ -953,7 +953,7 @@ static unsigned char calculate_strength(int strength)
* ConnMan expects it in the range from 100 (strongest) to 0
* (weakest).
*/
- res = (unsigned char)((strength * -10000) / 100);
+ res = (unsigned char)((strength + 10000) / 100);
return res;
}