From owner-svn-src-all@FreeBSD.ORG Tue Feb 22 04:41:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2F91065675; Tue, 22 Feb 2011 04:41:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 401528FC15; Tue, 22 Feb 2011 04:41:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1M4f51n094188; Tue, 22 Feb 2011 04:41:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1M4f5Ht094186; Tue, 22 Feb 2011 04:41:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201102220441.p1M4f5Ht094186@svn.freebsd.org> From: Adrian Chadd Date: Tue, 22 Feb 2011 04:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218935 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 04:41:05 -0000 Author: adrian Date: Tue Feb 22 04:41:04 2011 New Revision: 218935 URL: http://svn.freebsd.org/changeset/base/218935 Log: Don't set the RTS/CTS enable bit per-scenario if the global RTS/CTS flags aren't set. 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 Tue Feb 22 04:07:15 2011 (r218934) +++ head/sys/dev/ath/if_ath_tx_ht.c Tue Feb 22 04:41:04 2011 (r218935) @@ -96,7 +96,7 @@ __FBSDID("$FreeBSD$"); static void ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni, HAL_11N_RATE_SERIES *series, unsigned int pktlen, uint8_t *rix, - uint8_t *try) + uint8_t *try, int flags) { struct ieee80211com *ic = ni->ni_ic; struct ath_hal *ah = sc->sc_ah; @@ -125,12 +125,7 @@ ath_rateseries_setup(struct ath_softc *s */ series[i].ChSel = sc->sc_txchainmask; - /* - * This merely enables RTS or RTS/CTS for the given scenario; - * it needs to be enabled elsewhere. - */ - if (ic->ic_protmode == IEEE80211_PROT_RTSCTS || - ic->ic_protmode == IEEE80211_PROT_CTSONLY) + if (flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) series[i].RateFlags |= HAL_RATESERIES_RTS_CTS; if (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) @@ -201,7 +196,7 @@ ath_buf_set_rate(struct ath_softc *sc, s /* Setup rate scenario */ memset(&series, 0, sizeof(series)); - ath_rateseries_setup(sc, ni, series, pktlen, rix, try); + ath_rateseries_setup(sc, ni, series, pktlen, rix, try, flags); /* Enforce AR5416 aggregate limit - can't do RTS w/ an agg frame > 8k */ @@ -210,6 +205,11 @@ ath_buf_set_rate(struct ath_softc *sc, s /* Get a pointer to the last tx descriptor in the list */ lastds = &bf->bf_desc[bf->bf_nseg - 1]; +#if 0 + printf("pktlen: %d; flags 0x%x\n", pktlen, flags); + ath_rateseries_print(series); +#endif + /* Set rate scenario */ ath_hal_set11nratescenario(ah, ds, !is_pspoll, /* whether to override the duration or not */