svn commit: r220098 - head/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Mon Mar 28 11:48:49 UTC 2011


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.


More information about the svn-src-all mailing list