summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-08-17 09:39:39 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-08-17 09:39:39 +0000
commitdfc9e5c27ca0120730d56b6be0c2d417c20ed7a2 (patch)
treed220a8e2b84a0ffd6fd7ca3e4ae92fd3f28d87e1 /sys/dev
parentc0cda473f3ae6015527f8a7be77eececb25f9d0c (diff)
If the stack demands protection by setting the USEPROT flag then set the
corresponding bit in the iwm(4) Tx command regardless of frame length. ok sthen@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_iwm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index a79362f4160..58d72721c8a 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.98 2016/08/15 12:59:53 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.99 2016/08/17 09:39:38 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -4515,11 +4515,11 @@ iwm_tx(struct iwm_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac)
flags |= IWM_TX_CMD_FLG_ACK;
}
- if (type == IEEE80211_FC0_TYPE_DATA
- && (totlen + IEEE80211_CRC_LEN > ic->ic_rtsthreshold)
- && !IEEE80211_IS_MULTICAST(wh->i_addr1)) {
+ if (type == IEEE80211_FC0_TYPE_DATA &&
+ !IEEE80211_IS_MULTICAST(wh->i_addr1) &&
+ (totlen + IEEE80211_CRC_LEN > ic->ic_rtsthreshold ||
+ (ic->ic_flags & IEEE80211_F_USEPROT)))
flags |= IWM_TX_CMD_FLG_PROT_REQUIRE;
- }
if (IEEE80211_IS_MULTICAST(wh->i_addr1) ||
type != IEEE80211_FC0_TYPE_DATA)