Skip to content

Commit

Permalink
mac80211: Fix output of minstrels rc_stats
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Hannemann authored and John W. Linville committed Aug 28, 2009
1 parent 2aa7b01 commit eadac6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/rc80211_minstrel_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 << 10) / 96);
prob = mr->cur_prob / 18;
eprob = mr->probability / 18;

Expand Down

0 comments on commit eadac6b

Please sign in to comment.