If the stack demands protection by setting the USEPROT flag then set
the corresponding bit in the Tx command regardless of frame length.
Index: if_iwm.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
retrieving revision 1.98
diff -u -p -r1.98 if_iwm.c
--- if_iwm.c 15 Aug 2016 12:59:53 -0000 1.98
+++ if_iwm.c 15 Aug 2016 19:02:16 -0000
@@ -4515,11 +4515,11 @@ iwm_tx(struct iwm_softc *sc, struct mbuf
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)