From 2d2fef2be0a1ca4fe9f05c621bb2494d7a9ca47c Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 7 Jul 2005 00:04:50 +0000 Subject: only invoke ath_rate_tx_complete to update rate control state when the frame being sent is to be ack'd and hasn't been filtered by the h/w; this insures we don't pass in tx descriptors that have no meaningful state (e.g. mcast/bcast frames are not acked and so have no tx retry counts) Approved by: re (scottl) Obtained from: Atheros --- sys/dev/ath/if_ath.c | 5 ++++- sys/dev/ath/if_athvar.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 10adb9b..65d2892 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -3534,6 +3534,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf , ctsrate /* rts/cts rate */ , ctsduration /* rts/cts duration */ ); + bf->bf_flags = flags; /* * Setup the multi-rate retry state only when we're * going to use it. This assumes ath_hal_setuptxdesc @@ -3709,7 +3710,9 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) /* * Hand the descriptor to the rate control algorithm. */ - ath_rate_tx_complete(sc, an, ds, ds0); + if ((ds->ds_txstat.ts_status & HAL_TXERR_FILT) == 0 && + (bf->bf_flags & HAL_TXDESC_NOACK) == 0) + ath_rate_tx_complete(sc, an, ds, ds0); /* * Reclaim reference to node. * diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 543b249..95aa365 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -98,6 +98,7 @@ struct ath_node { struct ath_buf { STAILQ_ENTRY(ath_buf) bf_list; int bf_nseg; + int bf_flags; /* tx descriptor flags */ struct ath_desc *bf_desc; /* virtual addr of desc */ bus_addr_t bf_daddr; /* physical addr of desc */ bus_dmamap_t bf_dmamap; /* DMA map for mbuf chain */ -- cgit v1.1