Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Fix inverted logic in iwm(4).



details:   https://anonhg.NetBSD.org/src/rev/fea7f6a3fdab
branches:  trunk
changeset: 818073:fea7f6a3fdab
user:      maya <maya%NetBSD.org@localhost>
date:      Fri Sep 23 19:53:52 2016 +0000

description:
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...)

diffstat:

 sys/dev/pci/if_iwm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 158fe556641f -r fea7f6a3fdab sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Fri Sep 23 19:36:50 2016 +0000
+++ b/sys/dev/pci/if_iwm.c      Fri Sep 23 19:53:52 2016 +0000
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index