From 9c00c5ccf3978444190771580fbc77073f016276 Mon Sep 17 00:00:00 2001 From: mentor Date: Mon, 25 Feb 2008 03:17:52 +0000 Subject: [PATCH] Merge -dfs to trunk - r3361 1/2 Calculate correct ratio of 'lookaround' packets git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3363 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath_rate/minstrel/minstrel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ath_rate/minstrel/minstrel.c b/ath_rate/minstrel/minstrel.c index 60ff2da..2c4fe49 100644 --- a/ath_rate/minstrel/minstrel.c +++ b/ath_rate/minstrel/minstrel.c @@ -334,7 +334,10 @@ ath_rate_findrate(struct ath_softc *sc, struct ath_node *an, sn->packet_count++; sn->random_n = (sn->a * sn->random_n) + sn->b; offset = sn->random_n & 0xf; - if ((((100 * sn->sample_count) / (sn->sample_count + sn->packet_count)) < ath_lookaround_rate) && (offset < 2)) { + + if ((((100 * sn->sample_count) / sn->packet_count) < + ath_lookaround_rate) && + (offset < 2)) { sn->sample_count++; sn->is_sampling = 1; if (sn->packet_count >= 10000) { -- 2.35.1