Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2011 15:47:19 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225557 - in user/adrian/if_ath_tx/sys/dev/ath/ath_rate: amrr onoe
Message-ID:  <201109141547.p8EFlJQg032715@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109141547.p8EFlJQg032715>