diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2012-04-07 03:22:11 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2012-04-07 03:22:11 +0000 |
commit | 045bc7882e5c2f6bfae19a9d693b1f93a5c0b48d (patch) | |
tree | ca673f08e61e2454f9ac4f07ef23518a60949213 /sys/dev/ath/if_ath_tx_ht.c | |
parent | ce656facf3156b08cf0e83f4d348bdc6d345cc4f (diff) | |
download | src-045bc7882e5c2f6bfae19a9d693b1f93a5c0b48d.tar.gz src-045bc7882e5c2f6bfae19a9d693b1f93a5c0b48d.zip |
Enforce the RTS aggregation limit if RTS/CTS protection is enabled;
if any subframes in an aggregate have different protection from the
first frame in the formed aggregate, don't add that frame to the
aggregate.
This is likely a suboptimal method (I think we'll mostly be OK marking
frames that have seqno's with the same protection as normal data frames)
but I'll just be cautious for now.
Notes
Notes:
svn path=/head/; revision=233970
Diffstat (limited to 'sys/dev/ath/if_ath_tx_ht.c')
-rw-r--r-- | sys/dev/ath/if_ath_tx_ht.c | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/sys/dev/ath/if_ath_tx_ht.c b/sys/dev/ath/if_ath_tx_ht.c index 976464cb9dfa..b7875a3fbc0e 100644 --- a/sys/dev/ath/if_ath_tx_ht.c +++ b/sys/dev/ath/if_ath_tx_ht.c @@ -707,14 +707,6 @@ ath_tx_form_aggr(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, */ /* - * XXX TODO: AR5416 has an 8K aggregation size limit - * when RTS is enabled, and RTS is required for dual-stream - * rates. - * - * For now, limit all aggregates for the AR5416 to be 8K. - */ - - /* * do not exceed aggregation limit */ al_delta = ATH_AGGR_DELIM_SZ + bf->bf_state.bfs_pktlen; @@ -725,6 +717,20 @@ ath_tx_form_aggr(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, } /* + * If RTS/CTS is set on the first frame, enforce + * the RTS aggregate limit. + */ + if (bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_CTSENA | HAL_TXDESC_RTSENA)) { + if (nframes && + (sc->sc_rts_aggr_limit < + (al + bpad + al_delta + prev_al))) { + status = ATH_AGGR_8K_LIMITED; + break; + } + } + + /* * Do not exceed subframe limit. */ if ((nframes + prev_frames) >= MIN((h_baw), @@ -734,7 +740,24 @@ ath_tx_form_aggr(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, } /* - * TODO: If it's _before_ the BAW left edge, complain very loudly. + * If the current frame has an RTS/CTS configuration + * that differs from the first frame, don't include + * this in the aggregate. It's possible that the + * "right" thing to do here is enforce the aggregate + * configuration. + */ + if ((bf_first->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) != + (bf->bf_state.bfs_txflags & + (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA))) { + status = ATH_AGGR_NONAGGR; + break; + } + + /* + * TODO: If it's _before_ the BAW left edge, complain very + * loudly. + * * This means something (else) has slid the left edge along * before we got a chance to be TXed. */ @@ -814,11 +837,6 @@ ath_tx_form_aggr(struct ath_softc *sc, struct ath_node *an, struct ath_tid *tid, bf->bf_state.bfs_addedbaw = 1; /* - * XXX TODO: If any frame in the aggregate requires RTS/CTS, - * set the first frame. - */ - - /* * XXX enforce ACK for aggregate frames (this needs to be * XXX handled more gracefully? */ |