All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: r8192U_core: fix negative noise value
@ 2015-10-11 13:31 Luis de Bethencourt
  0 siblings, 0 replies; only message in thread
From: Luis de Bethencourt @ 2015-10-11 13:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: gregkh, raphael.beamonte, cristina.opriceana, koray.gulcu,
	mahfouz.saif.elyazal, devel, Luis de Bethencourt

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>
---
 drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 28b54ba..fa5be66 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4724,7 +4724,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,
 	};
@@ -4835,7 +4835,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,
 	};
-- 
2.5.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-11 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-11 13:31 [PATCH] staging: rtl8192u: r8192U_core: fix negative noise value Luis de Bethencourt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.