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
This commit is contained in:
mentor 2008-02-25 03:17:52 +00:00
parent b99d972b64
commit 9c00c5ccf3
1 changed files with 4 additions and 1 deletions

View 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) {