From owner-svn-src-head@FreeBSD.ORG Tue Feb 26 10:24:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D14E4FC; Tue, 26 Feb 2013 10:24:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AAE50A36; Tue, 26 Feb 2013 10:24:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1QAOncw067218; Tue, 26 Feb 2013 10:24:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1QAOnUO067217; Tue, 26 Feb 2013 10:24:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201302261024.r1QAOnUO067217@svn.freebsd.org> From: Adrian Chadd Date: Tue, 26 Feb 2013 10:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r247317 - head/sys/dev/ath/ath_rate/sample X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 10:24:49 -0000 Author: adrian Date: Tue Feb 26 10:24:49 2013 New Revision: 247317 URL: http://svnweb.freebsd.org/changeset/base/247317 Log: Update the EWMA statistics for each intermediary rate as well as the final rate. This fixes two things: * The intermediary rates now also have their EWMA values changed; * The existing code was using the wrong value for longtries - so the EWMA stats were only adjusted for the first rate and not subsequent rates in a MRR setup. TODO: * Merge the EWMA updates into update_stats() now.. Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Tue Feb 26 08:53:33 2013 (r247316) +++ head/sys/dev/ath/ath_rate/sample/sample.c Tue Feb 26 10:24:49 2013 (r247317) @@ -1008,6 +1008,15 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, long_tries > rc[0].tries, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[0].rix, rc[0].tries, + rc[1].rix, rc[1].tries, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + short_tries, long_tries, + long_tries > rc[0].tries, + nframes, nbad); + long_tries -= rc[0].tries; } @@ -1020,6 +1029,14 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[1].rix, rc[1].tries, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + 0, 0, + short_tries, long_tries, + status, + nframes, nbad); long_tries -= rc[1].tries; } @@ -1032,6 +1049,14 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + 0, 0, + 0, 0, + short_tries, long_tries, + status, + nframes, nbad); long_tries -= rc[2].tries; } @@ -1044,17 +1069,15 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[3].rix, rc[3].tries, + 0, 0, + 0, 0, + 0, 0, + short_tries, long_tries, + status, + nframes, nbad); } - - update_ewma_stats(sc, an, frame_size, - rc[0].rix, rc[0].tries, - rc[1].rix, rc[1].tries, - rc[2].rix, rc[2].tries, - rc[3].rix, rc[3].tries, - short_tries, long_tries, - long_tries > rc[0].tries, - nframes, nbad); - } }