diff options
author | Luis de Bethencourt | 2015-10-11 15:42:01 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-10-13 05:40:48 +0200 |
commit | 3cd66a18138ce6439ef11dca6347c6c1e180189c (patch) | |
tree | df2b9e1947a2dc33b5fb1efda36b6cbe360a4d49 | |
parent | staging: rtl8192u: r8192U_core: fix negative noise value (diff) | |
download | kernel-qcow2-linux-3cd66a18138ce6439ef11dca6347c6c1e180189c.tar.gz kernel-qcow2-linux-3cd66a18138ce6439ef11dca6347c6c1e180189c.tar.xz kernel-qcow2-linux-3cd66a18138ce6439ef11dca6347c6c1e180189c.zip |
staging: rtl8192u: r8192U_wx: fix negative noise and level values
range->max_qual.noise and level are of type uint8, so they shouldn't be
assigned a negative number. Assigning them 0x100 - 98, and 0x100 - 78 which
are the equivalent to -98 dBm and -78 dBm, respectively, when IW_QUAL_DBM
is set.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_wx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index 83597051a448..4911fef2e2e5 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c @@ -263,12 +263,12 @@ static int rtl8180_wx_get_range(struct net_device *dev, range->max_qual.qual = 100; /* TODO: Find real max RSSI and stick here */ range->max_qual.level = 0; - range->max_qual.noise = -98; + range->max_qual.noise = 0x100 - 98; range->max_qual.updated = 7; /* Updated all three */ range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */ /* TODO: Find real 'good' to 'bad' threshold value for RSSI */ - range->avg_qual.level = 20 + -98; + range->avg_qual.level = 0x100 - 78; range->avg_qual.noise = 0; range->avg_qual.updated = 7; /* Updated all three */ |