linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix output of minstrels rc_stats
@ 2009-08-24 17:42 Arnd Hannemann
  2009-08-24 17:57 ` Joe Perches
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Hannemann @ 2009-08-24 17:42 UTC (permalink / raw)
  To: linux-wireless; +Cc: Arnd Hannemann

An integer overflow in the minstrel debug code prevented the
throughput to be displayed correctly. This patch fixes that,
by swaping the division and multiplication.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
---
 net/mac80211/rc80211_minstrel_debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
index 98f4807..caf9453 100644
--- a/net/mac80211/rc80211_minstrel_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_debugfs.c
@@ -83,7 +83,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
 		p += sprintf(p, "%3u%s", mr->bitrate / 2,
 				(mr->bitrate & 1 ? ".5" : "  "));
 
-		tp = ((mr->cur_tp * 96) / 18000) >> 10;
+		tp = ((mr->cur_tp / 18000) * 96) >> 10;
 		prob = mr->cur_prob / 18;
 		eprob = mr->probability / 18;
 
-- 
1.6.4.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-09-01  8:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-24 17:42 [PATCH] mac80211: Fix output of minstrels rc_stats Arnd Hannemann
2009-08-24 17:57 ` Joe Perches
2009-08-24 18:19   ` Arnd Hannemann
2009-08-24 18:20   ` Pavel Roskin
2009-08-24 18:36     ` Arnd Hannemann
2009-08-24 18:38       ` Arnd Hannemann
2009-08-24 18:51     ` [PATCH v2] " Arnd Hannemann
2009-09-01  0:54       ` Julian Calaby
2009-09-01  8:05         ` Arnd Hannemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).