summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-03-28 11:48:49 +0000
committeradrian <adrian@FreeBSD.org>2011-03-28 11:48:49 +0000
commit178df47a1873e387f516524ae528cd44cbaf5d68 (patch)
treed831728e04bee495a0d74f5db91257d79acc9b9b
parent5a15df2be8660a975998881731239fa2fb34798b (diff)
downloadFreeBSD-src-178df47a1873e387f516524ae528cd44cbaf5d68.zip
FreeBSD-src-178df47a1873e387f516524ae528cd44cbaf5d68.tar.gz
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.
-rw-r--r--sys/dev/ath/if_ath_tx.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c
index d889858..f4cee6d 100644
--- a/sys/dev/ath/if_ath_tx.c
+++ b/sys/dev/ath/if_ath_tx.c
@@ -702,6 +702,24 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf
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.
OpenPOWER on IntegriCloud