diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-07-18 13:09:59 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-07-18 13:09:59 +0000 |
commit | 2a58e8604fec4413d2b75f850467f03a1b5a8e52 (patch) | |
tree | b93a1b936fbfb776ce6c547eb66466167118b352 | |
parent | f54846b7b758bf1dc2462fbbe984e6741cce8758 (diff) |
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. Found while comparing
our driver's Tx code to iwlwifi.
ok mpi@
-rw-r--r-- | sys/dev/pci/if_iwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 21675f6e517..96cd14948ea 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.93 2016/07/18 13:09:08 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.94 2016/07/18 13:09:58 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -4517,7 +4517,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 > ic->ic_rtsthreshold) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= IWM_TX_CMD_FLG_PROT_REQUIRE; |