summaryrefslogtreecommitdiff
path: root/package/iwinfo/src
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-03-21 19:47:16 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-03-21 19:47:16 +0000
commit659369891b560abd447bf1c3a88f9bc15d5fa91e (patch)
tree602f83f7086c3e2fd30e1c0f7ec60e9ade9c804d /package/iwinfo/src
parent0e4c67b63adb4797b5a6c6ff17b6f20280491511 (diff)
[package] iwinfo: properly cast nl80211 mBm signal levels to reported dBm values (#11161)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31053 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/iwinfo/src')
-rw-r--r--package/iwinfo/src/iwinfo_nl80211.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/iwinfo/src/iwinfo_nl80211.c b/package/iwinfo/src/iwinfo_nl80211.c
index bd3a60b0ac..704049007a 100644
--- a/package/iwinfo/src/iwinfo_nl80211.c
+++ b/package/iwinfo/src/iwinfo_nl80211.c
@@ -1541,7 +1541,8 @@ static int nl80211_get_scanlist_cb(struct nl_msg *msg, void *arg)
if (bss[NL80211_BSS_SIGNAL_MBM])
{
- sl->e->signal = nla_get_u32(bss[NL80211_BSS_SIGNAL_MBM]) / 100;
+ sl->e->signal =
+ (uint8_t)((int32_t)nla_get_u32(bss[NL80211_BSS_SIGNAL_MBM]) / 100);
rssi = sl->e->signal - 0x100;