From 74adf80539f5e84f9d2aa5e18985ba2b52efceef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imre=20Vad=C3=A1sz?= Date: Wed, 27 Jul 2016 20:43:08 +0000 Subject: [PATCH] [iwm] Fix inverted logic in iwm_tx(). The PROT_REQUIRE flag in should be set for data frames above a certain length, but we were setting it for !data frames above a certain length, which makes no sense at all. Taken-From: OpenBSD, Linux iwlwifi Approved by: adrian (mentor) Obtained from: DragonFlyBSD git 8cc03924a36c572c2908e659e624f44636dc2b33 Differential Revision: https://reviews.freebsd.org/D7323 --- sys/dev/iwm/if_iwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index 02f454fa5249..60a03a8769e7 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -3344,7 +3344,7 @@ 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 + if (type == IEEE80211_FC0_TYPE_DATA && (totlen + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= IWM_TX_CMD_FLG_PROT_REQUIRE;