Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2011 11:48:49 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220098 - head/sys/dev/ath
Message-ID:  <201103281148.p2SBmnNq093477@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103281148.p2SBmnNq093477>