summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-07-21 08:38:34 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-07-21 08:38:34 +0000
commita20cc5082a7f9bf7c18025285abeb7bc92bc6bfc (patch)
treec559f1b17baffd6fdacf714313ff255e23dd934a /sys/dev/pci
parent6b4d05e64bd2ce4e80103154e7c738ca90d3ee47 (diff)
Make rtwn(4) and urtwn(4) respect the RTS threshold set by net80211.
ok mpi@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_rtwn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c
index 9836bde7c90..a50eec59b52 100644
--- a/sys/dev/pci/if_rtwn.c
+++ b/sys/dev/pci/if_rtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rtwn.c,v 1.22 2016/06/17 10:53:55 stsp Exp $ */
+/* $OpenBSD: if_rtwn.c,v 1.23 2016/07/21 08:38:33 stsp Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -985,7 +985,10 @@ rtwn_tx(void *cookie, struct mbuf *m, struct ieee80211_node *ni)
SM(R92C_TXDW1_RAID, raid) |
R92C_TXDW1_AGGBK);
- if (ic->ic_flags & IEEE80211_F_USEPROT) {
+ if (m->m_pkthdr.len + IEEE80211_CRC_LEN > ic->ic_rtsthreshold) {
+ txd->txdw4 |= htole32(R92C_TXDW4_RTSEN |
+ R92C_TXDW4_HWRTSEN);
+ } else if (ic->ic_flags & IEEE80211_F_USEPROT) {
if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) {
txd->txdw4 |= htole32(R92C_TXDW4_CTS2SELF |
R92C_TXDW4_HWRTSEN);