From owner-svn-src-head@FreeBSD.ORG Mon Mar 28 11:48:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E1E71065680; Mon, 28 Mar 2011 11:48:49 +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 5C4AE8FC0A; Mon, 28 Mar 2011 11:48:49 +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 p2SBmni4093479; Mon, 28 Mar 2011 11:48:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2SBmnNq093477; Mon, 28 Mar 2011 11:48:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103281148.p2SBmnNq093477@svn.freebsd.org> From: Adrian Chadd Date: Mon, 28 Mar 2011 11:48:49 +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: r220098 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2011 11:48:49 -0000 Author: adrian Date: Mon Mar 28 11:48:49 2011 New Revision: 220098 URL: http://svn.freebsd.org/changeset/base/220098 Log: Add in HT protection but disable it by default. I'll clear how it's supposed to work with Bernhard and then look at enabling this in the correct situations. But this -does- enable HT RTS protection (using the appropriate legacy rates) if this bit of code is enabled. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Mon Mar 28 11:08:58 2011 (r220097) +++ head/sys/dev/ath/if_ath_tx.c Mon Mar 28 11:48:49 2011 (r220098) @@ -702,6 +702,24 @@ ath_tx_start(struct ath_softc *sc, struc sc->sc_stats.ast_tx_protect++; } +#if 0 + /* + * If 11n protection is enabled and it's a HT frame, + * enable RTS. + * + * XXX ic_htprotmode or ic_curhtprotmode? + * XXX should it_htprotmode only matter if ic_curhtprotmode + * XXX indicates it's not a HT pure environment? + */ + if ((ic->ic_htprotmode == IEEE80211_PROT_RTSCTS) && + rt->info[rix].phy == IEEE80211_T_HT && + (flags & HAL_TXDESC_NOACK) == 0) { + cix = rt->info[sc->sc_protrix].controlRate; + flags |= HAL_TXDESC_RTSENA; + sc->sc_stats.ast_tx_htprotect++; + } +#endif + /* * Calculate duration. This logically belongs in the 802.11 * layer but it lacks sufficient information to calculate it.