From b261883129250c69c098ef72c91e27cbc774a69b Mon Sep 17 00:00:00 2001 From: stsp Date: Wed, 17 Aug 2016 09:39:38 +0000 Subject: [PATCH] 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@ --- sys/dev/pci/if_iwm.c | 10 +++++----- 1 file 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 @@ -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) -- 2.20.1