Merge -dfs to trunk - r3361 1/2
authormentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 25 Feb 2008 03:17:52 +0000 (03:17 +0000)
committermentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 25 Feb 2008 03:17:52 +0000 (03:17 +0000)
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

index 60ff2dad97a46bb84a44d37c8e6c2ede4406f9a2..2c4fe49f7dcf1ed102fec9cf5cd1c68a8ac545ec 100644 (file)
@@ -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) {