From owner-svn-src-user@FreeBSD.ORG Wed Aug 31 07:20:44 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CBA3106567B; Wed, 31 Aug 2011 07:20:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1EB8FC1C; Wed, 31 Aug 2011 07:20:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7V7KiTq087987; Wed, 31 Aug 2011 07:20:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7V7KiDG087985; Wed, 31 Aug 2011 07:20:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108310720.p7V7KiDG087985@svn.freebsd.org> From: Adrian Chadd Date: Wed, 31 Aug 2011 07:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225284 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2011 07:20:44 -0000 Author: adrian Date: Wed Aug 31 07:20:43 2011 New Revision: 225284 URL: http://svn.freebsd.org/changeset/base/225284 Log: Fix up the rate control logic a little more to correctly tracking failed aggregate packet counts. This still isn't entirely correct but it's better than before. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Wed Aug 31 06:48:00 2011 (r225283) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Wed Aug 31 07:20:43 2011 (r225284) @@ -557,7 +557,7 @@ update_stats(struct ath_softc *sc, struc (tt * (100 - ssc->smoothing_rate))) / 100; } - if (status != 0) { + if (nframes == nbad) { int y; sn->stats[size_bin][rix0].successive_failures += nbad; for (y = size_bin+1; y < NUM_PACKET_SIZE_BINS; y++) { @@ -572,7 +572,7 @@ update_stats(struct ath_softc *sc, struc sn->stats[y][rix0].total_packets += nframes; } } else { - sn->stats[size_bin][rix0].packets_acked += nframes; + sn->stats[size_bin][rix0].packets_acked += (nframes - nbad); sn->stats[size_bin][rix0].successive_failures = 0; } sn->stats[size_bin][rix0].tries += tries; @@ -624,10 +624,6 @@ ath_rate_tx_complete(struct ath_softc *s if (frame_size == 0) /* NB: should not happen */ frame_size = 1500; - /* If nbad > 1, override status to FAIL */ - if (nbad > 0) - status = 1; - if (sn->ratemask == 0) { IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, &an->an_node,