Fix inverted logic in iwm(4).

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 all other BSDs (OpenBSD, FreeBSD, DragonflyBSD...)
This commit is contained in:
maya 2016-09-23 19:53:52 +00:00
parent e1a93a1b84
commit f093c4a000
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_iwm.c,v 1.42 2016/06/10 13:27:14 ozaki-r Exp $ */
/* $NetBSD: if_iwm.c,v 1.43 2016/09/23 19:53:52 maya Exp $ */
/* OpenBSD: if_iwm.c,v 1.41 2015/05/22 06:50:54 kettenis Exp */
/*
@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.42 2016/06/10 13:27:14 ozaki-r Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.43 2016/09/23 19:53:52 maya Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -3939,7 +3939,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;