From owner-svn-src-all@FreeBSD.ORG Sun Mar 13 08:23:59 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 DA7501065672; Sun, 13 Mar 2011 08:23:59 +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 C7A4E8FC1E; Sun, 13 Mar 2011 08:23:59 +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 p2D8Nxsc046888; Sun, 13 Mar 2011 08:23:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2D8Nxkh046886; Sun, 13 Mar 2011 08:23:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103130823.p2D8Nxkh046886@svn.freebsd.org> From: Adrian Chadd Date: Sun, 13 Mar 2011 08:23:59 +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: r219588 - 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: Sun, 13 Mar 2011 08:23:59 -0000 Author: adrian Date: Sun Mar 13 08:23:59 2011 New Revision: 219588 URL: http://svn.freebsd.org/changeset/base/219588 Log: The number of streams is not based on the interface stream count, but the number of streams needed for that MCS rate. 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 Sun Mar 13 08:22:46 2011 (r219587) +++ head/sys/dev/ath/if_ath_tx_ht.c Sun Mar 13 08:23:59 2011 (r219588) @@ -98,6 +98,7 @@ ath_rateseries_setup(struct ath_softc *s HAL_11N_RATE_SERIES *series, unsigned int pktlen, uint8_t *rix, uint8_t *try, int flags) { +#define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1) struct ieee80211com *ic = ni->ni_ic; struct ath_hal *ah = sc->sc_ah; HAL_BOOL shortPreamble = AH_FALSE; @@ -151,14 +152,15 @@ ath_rateseries_setup(struct ath_softc *s series[i].PktDuration = ath_computedur_ht(pktlen , series[i].Rate - , ic->ic_txstream - , 0 /* disable 20/40 for now */ + , HT_RC_2_STREAMS(series[i].Rate) + , series[i].RateFlags & HAL_RATESERIES_2040 , series[i].RateFlags & HAL_RATESERIES_HALFGI); } else { series[i].PktDuration = ath_hal_computetxtime(ah, rt, pktlen, rix[i], shortPreamble); } } +#undef HT_RC_2_STREAMS } #if 0