diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2013-03-04 23:30:02 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 16:36:07 +0100 |
commit | c8ca8c2f933a516b5f4586d7dc6055b72107f246 (patch) | |
tree | 87a1285588a6dcec2926e804e52fdc4d9bf8fba6 /net/mac80211/rc80211_minstrel_debugfs.c | |
parent | a512d4b543ea20ec84f712f90a5229ab88a9709c (diff) | |
download | op-kernel-dev-c8ca8c2f933a516b5f4586d7dc6055b72107f246.zip op-kernel-dev-c8ca8c2f933a516b5f4586d7dc6055b72107f246.tar.gz |
mac80211: merge value scaling macros of minstrel_ht and minstrel
Both minstrel versions use individual ways to scale up integer values
to perform calculations. Merge minstrel_ht's scaling macros into
minstrels header file and use them in both minstrel versions.
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_debugfs.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel_debugfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c index d5a5622..c0ebfac 100644 --- a/net/mac80211/rc80211_minstrel_debugfs.c +++ b/net/mac80211/rc80211_minstrel_debugfs.c @@ -79,9 +79,9 @@ 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 / ((18000 << 10) / 96); - prob = mr->cur_prob / 18; - eprob = mr->probability / 18; + tp = MINSTREL_TRUNC(mr->cur_tp / 10); + prob = MINSTREL_TRUNC(mr->cur_prob * 1000); + eprob = MINSTREL_TRUNC(mr->probability * 1000); p += sprintf(p, " %6u.%1u %6u.%1u %6u.%1u " "%3u(%3u) %8llu %8llu\n", |