From owner-svn-src-user@FreeBSD.ORG Wed Sep 14 15:47:19 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 80BF21065673; Wed, 14 Sep 2011 15:47:19 +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 3BA988FC1A; Wed, 14 Sep 2011 15:47:19 +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 p8EFlJ0R032718; Wed, 14 Sep 2011 15:47:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8EFlJQg032715; Wed, 14 Sep 2011 15:47:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109141547.p8EFlJQg032715@svn.freebsd.org> From: Adrian Chadd Date: Wed, 14 Sep 2011 15:47:19 +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: r225557 - in user/adrian/if_ath_tx/sys/dev/ath/ath_rate: amrr onoe 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, 14 Sep 2011 15:47:19 -0000 Author: adrian Date: Wed Sep 14 15:47:18 2011 New Revision: 225557 URL: http://svn.freebsd.org/changeset/base/225557 Log: Convert amrr/onoe over to use the new calling API. This is currently untested and doesn't support 11n. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/amrr/amrr.c user/adrian/if_ath_tx/sys/dev/ath/ath_rate/onoe/onoe.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/amrr/amrr.c Wed Sep 14 15:16:53 2011 (r225556) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/amrr/amrr.c Wed Sep 14 15:47:18 2011 (r225557) @@ -122,19 +122,21 @@ ath_rate_findrate(struct ath_softc *sc, */ void ath_rate_getxtxrates(struct ath_softc *sc, struct ath_node *an, - uint8_t rix0, uint8_t *rix, uint8_t *try) + uint8_t rix0, struct ath_rc_series *rc) { struct amrr_node *amn = ATH_NODE_AMRR(an); - rix[0] = amn->amn_tx_rate0; - rix[1] = amn->amn_tx_rate1; - rix[2] = amn->amn_tx_rate2; - rix[3] = amn->amn_tx_rate3; - - try[0] = amn->amn_tx_try0; - try[1] = amn->amn_tx_try1; - try[2] = amn->amn_tx_try2; - try[3] = amn->amn_tx_try3; + rc[0].flags = rc[1].flags = rc[2].flags = rc[3].flags = 0; + + rc[0].rix = amn->amn_tx_rate0; + rc[1].rix = amn->amn_tx_rate1; + rc[2].rix = amn->amn_tx_rate2; + rc[3].rix = amn->amn_tx_rate3; + + rc[0].tries = amn->amn_tx_try0; + rc[1].tries = amn->amn_tx_try1; + rc[2].tries = amn->amn_tx_try2; + rc[3].tries = amn->amn_tx_try3; } @@ -153,10 +155,10 @@ ath_rate_setupxtxdesc(struct ath_softc * void ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an, - const struct ath_buf *bf) + const struct ath_rc_series *rc, const struct ath_tx_status *ts, + int frame_size, int nframes, int nbad) { struct amrr_node *amn = ATH_NODE_AMRR(an); - const struct ath_tx_status *ts = &bf->bf_status.ds_txstat; int sr = ts->ts_shortretry; int lr = ts->ts_longretry; int retry_count = sr + lr; Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/onoe/onoe.c Wed Sep 14 15:16:53 2011 (r225556) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/onoe/onoe.c Wed Sep 14 15:47:18 2011 (r225557) @@ -130,19 +130,21 @@ ath_rate_findrate(struct ath_softc *sc, */ void ath_rate_getxtxrates(struct ath_softc *sc, struct ath_node *an, - uint8_t rix0, uint8_t *rix, uint8_t *try) + uint8_t rix0, struct ath_rc_series *rc) { struct onoe_node *on = ATH_NODE_ONOE(an); - rix[0] = on->on_tx_rate0; - rix[1] = on->on_tx_rate1; - rix[2] = on->on_tx_rate2; - rix[3] = on->on_tx_rate3; - - try[0] = on->on_tx_try0; - try[1] = 2; - try[2] = 2; - try[3] = 2; + rc[0].flags = rc[1].flags = rc[2].flags = rc[3].flags = 0; + + rc[0].rix = on->on_tx_rate0; + rc[1].rix = on->on_tx_rate1; + rc[2].rix = on->on_tx_rate2; + rc[3].rix = on->on_tx_rate3; + + rc[0].tries = on->on_tx_try0; + rc[1].tries = 2; + rc[2].tries = 2; + rc[3].tries = 2; } void @@ -160,10 +162,10 @@ ath_rate_setupxtxdesc(struct ath_softc * void ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an, - const struct ath_buf *bf) + const struct ath_rc_series *rc, const struct ath_tx_status *ts, + int frame_size, int nframes, int nbad) { struct onoe_node *on = ATH_NODE_ONOE(an); - const struct ath_tx_status *ts = &bf->bf_status.ds_txstat; if (ts->ts_status == 0) on->on_tx_ok++;