Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 12:55:50 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225008 - user/adrian/if_ath_tx/sys/dev/ath
Message-ID:  <201108191255.p7JCtoHb004477@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri Aug 19 12:55:50 2011
New Revision: 225008
URL: http://svn.freebsd.org/changeset/base/225008

Log:
  Use the aggregate length when calculating the packet duration.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx_ht.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx_ht.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx_ht.c	Fri Aug 19 12:48:06 2011	(r225007)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx_ht.c	Fri Aug 19 12:55:50 2011	(r225008)
@@ -176,6 +176,9 @@ ath_compute_num_delims(struct ath_softc 
  * Setup a 11n rate series structure
  *
  * This should be called for both legacy and MCS rates.
+ *
+ * It, along with ath_buf_set_rate, must be called -after- a burst
+ * or aggregate is setup.
  */
 static void
 ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni,
@@ -187,7 +190,7 @@ ath_rateseries_setup(struct ath_softc *s
 	HAL_BOOL shortPreamble = AH_FALSE;
 	const HAL_RATE_TABLE *rt = sc->sc_currates;
 	int i;
-	int pktlen = bf->bf_state.bfs_pktlen;
+	int pktlen;
 	int flags = bf->bf_state.bfs_flags;
 	struct ath_rc_series *rc = bf->bf_state.bfs_rc;
 
@@ -195,6 +198,15 @@ ath_rateseries_setup(struct ath_softc *s
 	    (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE))
 		shortPreamble = AH_TRUE;
 
+	/*
+	 * If this is the first frame in an aggregate series,
+	 * use the aggregate length.
+	 */
+	if (bf->bf_state.bfs_aggr)
+		pktlen = bf->bf_state.bfs_al;
+	else
+		pktlen = bf->bf_state.bfs_pktlen;
+
 	memset(series, 0, sizeof(HAL_11N_RATE_SERIES) * 4);
 	for (i = 0; i < 4;  i++) {
 		/* Only set flags for actual TX attempts */



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