Module Name:    src
Committed By:   maya
Date:           Fri Sep 23 19:53:52 UTC 2016

Modified Files:
        src/sys/dev/pci: if_iwm.c

Log Message:
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...)


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/if_iwm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.42 src/sys/dev/pci/if_iwm.c:1.43
--- src/sys/dev/pci/if_iwm.c:1.42	Fri Jun 10 13:27:14 2016
+++ src/sys/dev/pci/if_iwm.c	Fri Sep 23 19:53:52 2016
@@ -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
 		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;

Reply via email to