From owner-svn-src-all@FreeBSD.ORG Sat Feb 12 02:14:19 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 CA8AD106564A; Sat, 12 Feb 2011 02:14:19 +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 ADD0F8FC19; Sat, 12 Feb 2011 02:14:19 +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 p1C2EJlC081633; Sat, 12 Feb 2011 02:14:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1C2EJHv081629; Sat, 12 Feb 2011 02:14:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201102120214.p1C2EJHv081629@svn.freebsd.org> From: Adrian Chadd Date: Sat, 12 Feb 2011 02:14:19 +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: r218593 - 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: Sat, 12 Feb 2011 02:14:20 -0000 Author: adrian Date: Sat Feb 12 02:14:19 2011 New Revision: 218593 URL: http://svn.freebsd.org/changeset/base/218593 Log: The current code used the fields in ath_set11nratescenario() . Use them correctly: * pass in whether to allow the hardware to override the duration field in the main data frame (durupdate_en) - PS_POLL frames in particular don't have the duration bit overriden; * there's no rts/cts duration here; that's done elsehwere Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx_ht.c head/sys/dev/ath/if_ath_tx_ht.h Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Feb 12 02:10:08 2011 (r218592) +++ head/sys/dev/ath/if_ath_tx.c Sat Feb 12 02:14:19 2011 (r218593) @@ -812,7 +812,7 @@ ath_tx_start(struct ath_softc *sc, struc } if (ath_tx_is_11n(sc)) { - ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, rate, try); + ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == HAL_PKT_TYPE_PSPOLL), rate, try); } ath_tx_handoff(sc, txq, bf); @@ -998,7 +998,7 @@ ath_tx_raw_start(struct ath_softc *sc, s * notice that rix doesn't include any of the "magic" flags txrate * does for communicating "other stuff" to the HAL. */ - ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, rate, try); + ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == HAL_PKT_TYPE_PSPOLL), rate, try); } /* NB: no buffered multicast in power save support */ Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Sat Feb 12 02:10:08 2011 (r218592) +++ head/sys/dev/ath/if_ath_tx_ht.c Sat Feb 12 02:14:19 2011 (r218593) @@ -168,7 +168,7 @@ ath_rateseries_print(HAL_11N_RATE_SERIES void ath_buf_set_rate(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, - int pktlen, int flags, uint8_t ctsrate, uint8_t *rix, uint8_t *try) + int pktlen, int flags, uint8_t ctsrate, int is_pspoll, uint8_t *rix, uint8_t *try) { HAL_11N_RATE_SERIES series[4]; struct ath_desc *ds = bf->bf_desc; @@ -189,8 +189,9 @@ ath_buf_set_rate(struct ath_softc *sc, s /* Set rate scenario */ ath_hal_set11nratescenario(ah, ds, + !is_pspoll, /* whether to override the duration or not */ + /* don't allow hardware to override the duration on ps-poll packets */ ctsrate, /* rts/cts rate */ - 0, /* rts/cts duration */ series, /* 11n rate series */ 4, /* number of series */ flags); Modified: head/sys/dev/ath/if_ath_tx_ht.h ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.h Sat Feb 12 02:10:08 2011 (r218592) +++ head/sys/dev/ath/if_ath_tx_ht.h Sat Feb 12 02:14:19 2011 (r218593) @@ -33,7 +33,7 @@ extern void ath_buf_set_rate(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf, - int pktlen, int flags, uint8_t ctsrate, uint8_t *rix, - uint8_t *try); + int pktlen, int flags, uint8_t ctsrate, int is_pspoll, + uint8_t *rix, uint8_t *try); #endif