svn commit: r246536 - head/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Fri Feb 8 09:07:04 UTC 2013
Author: adrian
Date: Fri Feb 8 09:07:03 2013
New Revision: 246536
URL: http://svnweb.freebsd.org/changeset/base/246536
Log:
Fix a corner case that I noticed with the AR5416 (and it's currently
crappy 802.11n performance, sigh.)
With the AR5416, aggregates need to be limited to 8KiB if RTS/CTS is
enabled. However, larger aggregates were going out with RTSCTS enabled.
The following was going on:
* The first buffer in the list would have RTS/CTS enabled in
bf->bf_state.txflags;
* The aggregate would be formed;
* The "copy over the txflags from the first buffer" logic that I added
blanked the RTS/CTS TX flags fields, and then copied the bf_first
RTS/CTS flags over;
* .. but that'd cause bf_first to be blanked out! And thus the flag
was cleared;
* So the rest of the aggregate formation would run with those flags
cleared, and thus > 8KiB aggregates were formed.
The driver is now (again) correctly limiting aggregate formation for
the AR5416 but there are still other pending issues to resolve.
Tested:
* AR5416, STA mode
Modified:
head/sys/dev/ath/if_ath_tx_ht.c
Modified: head/sys/dev/ath/if_ath_tx_ht.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 8 08:03:18 2013 (r246535)
+++ head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 8 09:07:03 2013 (r246536)
@@ -688,11 +688,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s
bf->bf_next = NULL;
/*
- * Don't unlock the tid lock until we're sure we are going
- * to queue this frame.
- */
-
- /*
* If the frame doesn't have a sequence number that we're
* tracking in the BAW (eg NULL QOS data frame), we can't
* aggregate it. Stop the aggregation process; the sender
@@ -749,11 +744,13 @@ ath_tx_form_aggr(struct ath_softc *sc, s
* that differs from the first frame, override the
* subsequent frame with this config.
*/
- bf->bf_state.bfs_txflags &=
- ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA);
- bf->bf_state.bfs_txflags |=
- bf_first->bf_state.bfs_txflags &
- (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA);
+ if (bf != bf_first) {
+ bf->bf_state.bfs_txflags &=
+ ~ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA);
+ bf->bf_state.bfs_txflags |=
+ bf_first->bf_state.bfs_txflags &
+ (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA);
+ }
/*
* If the packet has a sequence number, do not
More information about the svn-src-all
mailing list