Commit f517f3bf authored by Luis de Bethencourt's avatar Luis de Bethencourt Committed by Greg Kroah-Hartman

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: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 879f3074
......@@ -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,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment