diff options
author | Luis de Bethencourt <luisbg@osg.samsung.com> | 2015-10-11 14:31:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-12 20:40:48 -0700 |
commit | f517f3bf07f1f776f12b2413dbefa21523021ac1 (patch) | |
tree | f0645b15b06f11d56be38d8451ce83bd66e8cb8d /drivers/staging/rtl8192u | |
parent | 879f3074c2484e7fc972cebf23d0a55fd2430605 (diff) | |
download | linux-f517f3bf07f1f776f12b2413dbefa21523021ac1.tar.gz |
staging: rtl8192u: r8192U_core: fix negative noise value
ieee80211_rx_stats.noise is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 98, which is the equivalent
to -98 dBm 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>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 0bae93b1132f..eab0d811e85a 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -4778,7 +4778,7 @@ static void rtl8192_rx_nomal(struct sk_buff *skb) struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct ieee80211_rx_stats stats = { .signal = 0, - .noise = -98, + .noise = 0x100 - 98, .rate = 0, .freq = IEEE80211_24GHZ_BAND, }; @@ -4889,7 +4889,7 @@ static void rtl8192_rx_cmd(struct sk_buff *skb) /* TODO */ struct ieee80211_rx_stats stats = { .signal = 0, - .noise = -98, + .noise = 0x100 - 98, .rate = 0, .freq = IEEE80211_24GHZ_BAND, }; |