aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Hannemann <hannemann@nets.rwth-aachen.de>2009-08-24 14:51:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:43 -0400
commiteadac6bf95e1945bb64e6f8f22d8509391645e2e (patch)
treec8657948ec7725f8c2c893dda51194c258fecf5e
parent2aa7b01fe4f2d0978115bfd40364f52d86003606 (diff)
mac80211: Fix output of minstrels rc_stats
An integer overflow in the minstrel debug code prevented the throughput to be displayed correctly. This patch fixes that, by permutating operations like proposed by Pavel Roskin. Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/rc80211_minstrel_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
index 98f480708050..3d72ec5730d4 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)
83 p += sprintf(p, "%3u%s", mr->bitrate / 2, 83 p += sprintf(p, "%3u%s", mr->bitrate / 2,
84 (mr->bitrate & 1 ? ".5" : " ")); 84 (mr->bitrate & 1 ? ".5" : " "));
85 85
86 tp = ((mr->cur_tp * 96) / 18000) >> 10; 86 tp = mr->cur_tp / ((18000 << 10) / 96);
87 prob = mr->cur_prob / 18; 87 prob = mr->cur_prob / 18;
88 eprob = mr->probability / 18; 88 eprob = mr->probability / 18;
89 89