aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
diff options
context:
space:
mode:
authorLuis de Bethencourt <luisbg@osg.samsung.com>2015-09-30 13:12:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-02 11:48:15 +0200
commit86dc65b36cb55b81d1bd90b7483bea06375f5078 (patch)
treebff5a815b5d32dc9f89ac87ea11f8688c1c524cb /drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
parentstaging: rtl8188eu: Add missing include (diff)
downloadlinux-dev-86dc65b36cb55b81d1bd90b7483bea06375f5078.tar.xz
linux-dev-86dc65b36cb55b81d1bd90b7483bea06375f5078.zip
staging: rtl8192e: rtl_wx: fix negative noise value
wstats->qual.noise is of type uint8, so it shouldn't be assigned a negative number. Assigning it 0x100 - 100, which is the equivalent to -100 dBm when IW_QUAL_DBM is set. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e/rtl_wx.c')
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_wx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 984cb9a0abae..70df6a1485d6 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -1225,7 +1225,7 @@ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
if (ieee->state < RTLLIB_LINKED) {
wstats->qual.qual = 10;
wstats->qual.level = 0;
- wstats->qual.noise = -100;
+ wstats->qual.noise = 0x100 - 100; /* -100 dBm */
wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
return wstats;
}