Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jan 2017 09:56:50 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r311637 - in projects/bsnmp-ipv6-mib: . contrib/tcp_wrappers contrib/tcpdump crypto/openssh etc gnu/lib/libgcc gnu/usr.bin/binutils/ld lib/lib80211 lib/libcam lib/libsysdecode sbin/camc...
Message-ID:  <201701070956.v079uoAG012645@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sat Jan  7 09:56:50 2017
New Revision: 311637
URL: https://svnweb.freebsd.org/changeset/base/311637

Log:
  MFhead@r311635

Added:
  projects/bsnmp-ipv6-mib/usr.bin/cmp/tests/cmp_test2.sh
     - copied unchanged from r311635, head/usr.bin/cmp/tests/cmp_test2.sh
Modified:
  projects/bsnmp-ipv6-mib/Makefile.inc1
  projects/bsnmp-ipv6-mib/Makefile.libcompat
  projects/bsnmp-ipv6-mib/contrib/tcp_wrappers/tcpd.h
  projects/bsnmp-ipv6-mib/contrib/tcpdump/print-tcp.c
  projects/bsnmp-ipv6-mib/crypto/openssh/config.h
  projects/bsnmp-ipv6-mib/etc/snmpd.config
  projects/bsnmp-ipv6-mib/gnu/lib/libgcc/Makefile
  projects/bsnmp-ipv6-mib/gnu/usr.bin/binutils/ld/Makefile.mips
  projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.c
  projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.h
  projects/bsnmp-ipv6-mib/lib/libcam/scsi_cmdparse.c
  projects/bsnmp-ipv6-mib/lib/libsysdecode/mktables
  projects/bsnmp-ipv6-mib/sbin/camcontrol/modeedit.c
  projects/bsnmp-ipv6-mib/sbin/ifconfig/ifieee80211.c
  projects/bsnmp-ipv6-mib/secure/usr.sbin/sshd/Makefile
  projects/bsnmp-ipv6-mib/sys/dev/cxgbe/tom/t4_connect.c
  projects/bsnmp-ipv6-mib/sys/kern/sys_socket.c
  projects/bsnmp-ipv6-mib/sys/kern/uipc_socket.c
  projects/bsnmp-ipv6-mib/sys/mips/conf/MALTA64
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211.c
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211.h
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211_ioctl.c
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211_ioctl.h
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211_node.h
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211_proto.h
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211_scan.h
  projects/bsnmp-ipv6-mib/sys/net80211/ieee80211_var.h
  projects/bsnmp-ipv6-mib/sys/sys/socket.h
  projects/bsnmp-ipv6-mib/tools/build/mk/OptionalObsoleteFiles.inc
  projects/bsnmp-ipv6-mib/usr.bin/clang/llvm-ar/Makefile
  projects/bsnmp-ipv6-mib/usr.bin/cmp/special.c
  projects/bsnmp-ipv6-mib/usr.bin/cmp/tests/Makefile
  projects/bsnmp-ipv6-mib/usr.bin/users/users.cc
Directory Properties:
  projects/bsnmp-ipv6-mib/   (props changed)
  projects/bsnmp-ipv6-mib/contrib/tcpdump/   (props changed)
  projects/bsnmp-ipv6-mib/crypto/openssh/   (props changed)
  projects/bsnmp-ipv6-mib/gnu/lib/   (props changed)
  projects/bsnmp-ipv6-mib/gnu/usr.bin/binutils/   (props changed)

Modified: projects/bsnmp-ipv6-mib/Makefile.inc1
==============================================================================
--- projects/bsnmp-ipv6-mib/Makefile.inc1	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/Makefile.inc1	Sat Jan  7 09:56:50 2017	(r311637)
@@ -606,7 +606,7 @@ XCFLAGS+=	${BFLAGS}
 .endif
 
 .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
-    ${TARGET_ARCH} == "powerpc64")
+    ${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != ""
 LIBCOMPAT= 32
 .include "Makefile.libcompat"
 .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6"

Modified: projects/bsnmp-ipv6-mib/Makefile.libcompat
==============================================================================
--- projects/bsnmp-ipv6-mib/Makefile.libcompat	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/Makefile.libcompat	Sat Jan  7 09:56:50 2017	(r311637)
@@ -4,8 +4,7 @@
 __<${_this:T}>__:
 
 # Makefile for the compatibility libraries.
-# - 32-bit compat libraries on PowerPC and AMD64.
-#   could also be for mips, but that doesn't work today.
+# - 32-bit compat libraries on MIPS, PowerPC, and AMD64.
 
 # -------------------------------------------------------------------
 # 32 bit world
@@ -15,6 +14,7 @@ LIB32CPUFLAGS=	-march=i686 -mmmx -msse -
 .else
 LIB32CPUFLAGS=	-march=${TARGET_CPUTYPE}
 .endif
+LIB32CPUFLAGS+=	-m32
 LIB32WMAKEENV=	MACHINE=i386 MACHINE_ARCH=i386 \
 		MACHINE_CPU="i686 mmx sse sse2"
 LIB32WMAKEFLAGS=	\
@@ -28,14 +28,30 @@ LIB32CPUFLAGS=	-mcpu=powerpc
 .else
 LIB32CPUFLAGS=	-mcpu=${TARGET_CPUTYPE}
 .endif
+LIB32CPUFLAGS+=	-m32
 LIB32WMAKEENV=	MACHINE=powerpc MACHINE_ARCH=powerpc
 LIB32WMAKEFLAGS=	\
 		LD="${XLD} -m elf32ppc_fbsd" \
 		OBJCOPY="${XOBJCOPY}"
+
+.elif ${TARGET_ARCH:Mmips64*} != ""
+.if empty(TARGET_CPUTYPE)
+LIB32CPUFLAGS=	-march=mips3
+.else
+LIB32CPUFLAGS=	-march=${TARGET_CPUTYPE}
+.endif
+LIB32CPUFLAGS+= -mabi=32
+LIB32WMAKEENV=	MACHINE=mips MACHINE_ARCH=mips
+.if ${TARGET_ARCH:Mmips64el*} != ""
+LIB32WMAKEFLAGS= LD="${XLD} -m elf32ltsmip_fbsd"
+.else
+LIB32WMAKEFLAGS= LD="${XLD} -m elf32btsmip_fbsd"
+.endif
+LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}"
 .endif
 
 
-LIB32CFLAGS=	-m32 -DCOMPAT_32BIT
+LIB32CFLAGS=	-DCOMPAT_32BIT
 LIB32DTRACE=	${DTRACE} -32
 LIB32WMAKEFLAGS+=	-DCOMPAT_32BIT
 

Modified: projects/bsnmp-ipv6-mib/contrib/tcp_wrappers/tcpd.h
==============================================================================
--- projects/bsnmp-ipv6-mib/contrib/tcp_wrappers/tcpd.h	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/contrib/tcp_wrappers/tcpd.h	Sat Jan  7 09:56:50 2017	(r311637)
@@ -12,6 +12,11 @@
 #define	TCPD_SOCKADDR struct sockaddr_in
 #endif
 
+#ifndef _STDFILE_DECLARED
+#define _STDFILE_DECLARED
+typedef struct __sFILE FILE;
+#endif
+
 /* Structure to describe one communications endpoint. */
 
 #define	STRING_LENGTH	128		/* hosts, users, processes */

Modified: projects/bsnmp-ipv6-mib/contrib/tcpdump/print-tcp.c
==============================================================================
--- projects/bsnmp-ipv6-mib/contrib/tcpdump/print-tcp.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/contrib/tcpdump/print-tcp.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -253,7 +253,7 @@ tcp_print(netdissect_options *ndo,
                 if (ip6) {
                         register struct tcp_seq_hash6 *th;
                         struct tcp_seq_hash6 *tcp_seq_hash;
-                        const struct in6_addr *src, *dst;
+                        const void *src, *dst;
                         struct tha6 tha;
 
                         tcp_seq_hash = tcp_seq_hash6;
@@ -309,7 +309,7 @@ tcp_print(netdissect_options *ndo,
 #endif /*INET6*/
                         register struct tcp_seq_hash *th;
                         struct tcp_seq_hash *tcp_seq_hash;
-                        const struct in_addr *src, *dst;
+                        const void *src, *dst;
                         struct tha tha;
 
                         tcp_seq_hash = tcp_seq_hash4;

Modified: projects/bsnmp-ipv6-mib/crypto/openssh/config.h
==============================================================================
--- projects/bsnmp-ipv6-mib/crypto/openssh/config.h	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/crypto/openssh/config.h	Sat Jan  7 09:56:50 2017	(r311637)
@@ -1408,7 +1408,7 @@
 /* #undef LASTLOG_WRITE_PUTUTXLINE */
 
 /* Define if you want TCP Wrappers support */
-#define LIBWRAP 1
+/* #undef LIBWRAP */
 
 /* Define to whatever link() returns for "not supported" if it doesn't return
    EOPNOTSUPP. */

Modified: projects/bsnmp-ipv6-mib/etc/snmpd.config
==============================================================================
--- projects/bsnmp-ipv6-mib/etc/snmpd.config	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/etc/snmpd.config	Sat Jan  7 09:56:50 2017	(r311637)
@@ -122,6 +122,14 @@ snmpEnableAuthenTraps = 2
 # order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)`
 # can only be used if %usm is uncommented.
 #
+# Modules are loaded in the order listed, so they must be before any
+# dependent modules, e.g. "mibII" vs "bridge".
+#
+
+#
+# MIB-2 module
+#
+begemotSnmpdModulePath."mibII"	= "/usr/lib/snmp_mibII.so"
 
 #
 # Bridge module
@@ -146,11 +154,6 @@ snmpEnableAuthenTraps = 2
 #begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so"
 
 #
-# MIB-2 module
-#
-begemotSnmpdModulePath."mibII"	= "/usr/lib/snmp_mibII.so"
-
-#
 # Netgraph module
 #
 #begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"

Modified: projects/bsnmp-ipv6-mib/gnu/lib/libgcc/Makefile
==============================================================================
--- projects/bsnmp-ipv6-mib/gnu/lib/libgcc/Makefile	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/gnu/lib/libgcc/Makefile	Sat Jan  7 09:56:50 2017	(r311637)
@@ -133,7 +133,8 @@ LIBADD+=	compiler_rt
 .if ${TARGET_CPUARCH} == mips
 LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
 # ABIs other than o32 need this
-.if ${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != ""
+.if (${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != "") && \
+    !defined(COMPAT_32BIT)
 LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c
 LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c
 LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c

Modified: projects/bsnmp-ipv6-mib/gnu/usr.bin/binutils/ld/Makefile.mips
==============================================================================
--- projects/bsnmp-ipv6-mib/gnu/usr.bin/binutils/ld/Makefile.mips	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/gnu/usr.bin/binutils/ld/Makefile.mips	Sat Jan  7 09:56:50 2017	(r311637)
@@ -8,6 +8,7 @@ _EMULATION_ENDIAN=b
 
 .if ${TARGET_ARCH:Mmips64*} != ""
 NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
+LIBSEARCHPATH.elf32${_EMULATION_ENDIAN}tsmip_fbsd=\"=/usr/lib32\"
 .elif ${TARGET_ARCH:Mmipsn32*} != ""
 NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
 .else

Modified: projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.c
==============================================================================
--- projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -123,6 +123,10 @@ start_element(void *data, const char *na
 			mt->curband = &mt->rd->bands_11ng;
 		else if (iseq(mode, "11na"))
 			mt->curband = &mt->rd->bands_11na;
+		else if (iseq(mode, "11ac"))
+			mt->curband = &mt->rd->bands_11ac;
+		else if (iseq(mode, "11acg"))
+			mt->curband = &mt->rd->bands_11acg;
 		else
 			warnx("unknown mode \"%s\" at line %ld",
 			    __DECONST(char *, mode),
@@ -184,6 +188,14 @@ decode_flag(struct mystate *mt, const ch
 		FLAG(IEEE80211_CHAN_G),
 		FLAG(IEEE80211_CHAN_HT20),
 		FLAG(IEEE80211_CHAN_HT40),
+		FLAG(IEEE80211_CHAN_VHT20),
+		FLAG(IEEE80211_CHAN_VHT40),
+		FLAG(IEEE80211_CHAN_VHT80),
+		/*
+		 * XXX VHT80_80? This likely should be done by
+		 * 80MHz chan logic in net80211 / ifconfig.
+		 */
+		FLAG(IEEE80211_CHAN_VHT160),
 		FLAG(IEEE80211_CHAN_ST),
 		FLAG(IEEE80211_CHAN_TURBO),
 		FLAG(IEEE80211_CHAN_PASSIVE),
@@ -515,6 +527,24 @@ lib80211_regdomain_readconfig(struct reg
 			}
 			nb->band = id;
 		}
+		LIST_FOREACH(nb, &dp->bands_11ac, next) {
+			id = findid(rdp, nb->band, FREQBAND);
+			if (id == NULL) {
+				warnx("undefined 11ac band \"%s\"",
+				    __DECONST(char *, nb->band));
+				errors++;
+			}
+			nb->band = id;
+		}
+		LIST_FOREACH(nb, &dp->bands_11acg, next) {
+			id = findid(rdp, nb->band, FREQBAND);
+			if (id == NULL) {
+				warnx("undefined 11acg band \"%s\"",
+				    __DECONST(char *, nb->band));
+				errors++;
+			}
+			nb->band = id;
+		}
 	}
 	LIST_FOREACH(cp, &rdp->countries, next) {
 		id = cp->rd;
@@ -562,6 +592,8 @@ lib80211_regdomain_cleanup(struct regdat
 		cleanup_bands(&dp->bands_11a);
 		cleanup_bands(&dp->bands_11ng);
 		cleanup_bands(&dp->bands_11na);
+		cleanup_bands(&dp->bands_11ac);
+		cleanup_bands(&dp->bands_11acg);
 		if (dp->name != NULL)
 			free(__DECONST(char *, dp->name));
 	}

Modified: projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.h
==============================================================================
--- projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.h	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/lib/lib80211/lib80211_regdomain.h	Sat Jan  7 09:56:50 2017	(r311637)
@@ -75,6 +75,8 @@ struct regdomain {
 	netband_head	 bands_11a;	/* 11a operation */
 	netband_head	 bands_11ng;/* 11ng operation */
 	netband_head	 bands_11na;/* 11na operation */
+	netband_head	 bands_11ac;/* 11ac 5GHz operation */
+	netband_head	 bands_11acg;/* 11ac 2GHz operation */
 
 	LIST_ENTRY(regdomain)	next;
 };

Modified: projects/bsnmp-ipv6-mib/lib/libcam/scsi_cmdparse.c
==============================================================================
--- projects/bsnmp-ipv6-mib/lib/libcam/scsi_cmdparse.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/lib/libcam/scsi_cmdparse.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -100,10 +100,11 @@ __FBSDID("$FreeBSD$");
  */
 
 static int
-do_buff_decode(u_int8_t *databuf, size_t len,
+do_buff_decode(u_int8_t *buff, size_t len,
 	       void (*arg_put)(void *, int , void *, int, char *),
 	       void *puthook, const char *fmt, va_list *ap)
 {
+	int ind = 0;
 	int assigned = 0;
 	int width;
 	int suppress;
@@ -112,21 +113,17 @@ do_buff_decode(u_int8_t *databuf, size_t
 	static u_char mask[] = {0, 0x01, 0x03, 0x07, 0x0f,
 				   0x1f, 0x3f, 0x7f, 0xff};
 	int value;
-	u_char *base = databuf;
 	char *intendp;
 	char letter;
 	char field_name[80];
 
-#	define ARG_PUT(ARG) \
-	do \
-	{ \
-		if (!suppress) \
-		{ \
+#define ARG_PUT(ARG) \
+	do { \
+		if (!suppress) { \
 			if (arg_put) \
-				(*arg_put)(puthook, (letter == 't' ? \
-					'b' : letter), \
-					(void *)((long)(ARG)), width, \
-					field_name); \
+				(*arg_put)(puthook, (letter == 't' ? 'b' : \
+				    letter), (void *)((long)(ARG)), width, \
+				    field_name); \
 			else \
 				*(va_arg(*ap, int *)) = (ARG); \
 			assigned++; \
@@ -187,7 +184,11 @@ do_buff_decode(u_int8_t *databuf, size_t
 				done = 1;
 			else {
 				if (shift <= 0) {
-					bits = *databuf++;
+					if (ind >= len) {
+						done = 1;
+						break;
+					}
+					bits = buff[ind++];
 					shift = 8;
 				}
 				value = (bits >> (shift - width)) &
@@ -209,29 +210,31 @@ do_buff_decode(u_int8_t *databuf, size_t
 			fmt++;
 			width = strtol(fmt, &intendp, 10);
 			fmt = intendp;
+			if (ind + width > len) {
+				done = 1;
+				break;
+			}
 			switch(width) {
 			case 1:
-				ARG_PUT(*databuf);
-				databuf++;
+				ARG_PUT(buff[ind]);
+				ind++;
 				break;
 
 			case 2:
-				ARG_PUT((*databuf) << 8 | *(databuf + 1));
-				databuf += 2;
+				ARG_PUT(buff[ind] << 8 | buff[ind + 1]);
+				ind += 2;
 				break;
 
 			case 3:
-				ARG_PUT((*databuf) << 16 |
-					(*(databuf + 1)) << 8 | *(databuf + 2));
-				databuf += 3;
+				ARG_PUT(buff[ind] << 16 |
+					buff[ind + 1] << 8 | buff[ind + 2]);
+				ind += 3;
 				break;
 
 			case 4:
-				ARG_PUT((*databuf) << 24 |
-					(*(databuf + 1)) << 16 |
-					(*(databuf + 2)) << 8 |
-					*(databuf + 3));
-				databuf += 4;
+				ARG_PUT(buff[ind] << 24 | buff[ind + 1] << 16 |
+					buff[ind + 2] << 8 | buff[ind + 3]);
+				ind += 4;
 				break;
 
 			default:
@@ -242,32 +245,35 @@ do_buff_decode(u_int8_t *databuf, size_t
 			break;
 
 		case 'c':	/* Characters (i.e., not swapped) */
-		case 'z':	/* Characters with zeroed trailing
-					   spaces  */
+		case 'z':	/* Characters with zeroed trailing spaces */
 			shift = 0;
 			fmt++;
 			width = strtol(fmt, &intendp, 10);
 			fmt = intendp;
+			if (ind + width > len) {
+				done = 1;
+				break;
+			}
 			if (!suppress) {
 				if (arg_put)
 					(*arg_put)(puthook,
-						(letter == 't' ? 'b' : letter),
-						databuf, width, field_name);
+					    (letter == 't' ? 'b' : letter),
+					    &buff[ind], width, field_name);
 				else {
 					char *dest;
 					dest = va_arg(*ap, char *);
-					bcopy(databuf, dest, width);
+					bcopy(&buff[ind], dest, width);
 					if (letter == 'z') {
 						char *p;
 						for (p = dest + width - 1;
-						     (p >= (char *)dest)
-						     && (*p == ' '); p--)
+						    p >= dest && *p == ' ';
+						    p--)
 							*p = 0;
 					}
 				}
 				assigned++;
 			}
-			databuf += width;
+			ind += width;
 			field_name[0] = 0;
 			suppress = 0;
 			break;
@@ -295,9 +301,9 @@ do_buff_decode(u_int8_t *databuf, size_t
 			}
 
 			if (plus)
-				databuf += width;	/* Relative seek */
+				ind += width;	/* Relative seek */
 			else
-				databuf = base + width;	/* Absolute seek */
+				ind = width;	/* Absolute seek */
 
 			break;
 

Modified: projects/bsnmp-ipv6-mib/lib/libsysdecode/mktables
==============================================================================
--- projects/bsnmp-ipv6-mib/lib/libsysdecode/mktables	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/lib/libsysdecode/mktables	Sat Jan  7 09:56:50 2017	(r311637)
@@ -142,7 +142,7 @@ gen_table "seekwhence"      "SEEK_[A-Z]+
 gen_table "fcntlcmd"        "F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]+"   "sys/fcntl.h"	"F_CANCEL|F_..LCK"
 gen_table "mmapflags"       "MAP_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+"        "sys/mman.h"
 gen_table "rtpriofuncs"     "RTP_[A-Z]+[[:space:]]+[0-9]+"                 "sys/rtprio.h"
-gen_table "msgflags"        "MSG_[A-Z]+[[:space:]]+0x[0-9]+"               "sys/socket.h"	"MSG_SOCALLBCK"
+gen_table "msgflags"        "MSG_[A-Z]+[[:space:]]+0x[0-9]+"               "sys/socket.h"	"MSG_SOCALLBCK|MSG_MORETOCOME"
 gen_table "sigcode"         "SI_[A-Z]+[[:space:]]+0(x[0-9abcdef]+)?"       "sys/signal.h"
 gen_table "umtxcvwaitflags" "CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+"           "sys/umtx.h"
 gen_table "umtxrwlockflags" "URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+"    "sys/umtx.h"

Modified: projects/bsnmp-ipv6-mib/sbin/camcontrol/modeedit.c
==============================================================================
--- projects/bsnmp-ipv6-mib/sbin/camcontrol/modeedit.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sbin/camcontrol/modeedit.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -193,7 +193,14 @@ editentry_save(void *hook __unused, char
 	struct editentry *src;		/* Entry value to save. */
 
 	src = editentry_lookup(name);
-	assert(src != NULL);
+	if (src == 0) {
+		/*
+		 * This happens if field does not fit into read page size.
+		 * It also means that this field won't be written, so the
+		 * returned value does not really matter.
+		 */
+		return (0);
+	}
 
 	switch (src->type) {
 	case 'i':			/* Byte-sized integral type. */

Modified: projects/bsnmp-ipv6-mib/sbin/ifconfig/ifieee80211.c
==============================================================================
--- projects/bsnmp-ipv6-mib/sbin/ifconfig/ifieee80211.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sbin/ifconfig/ifieee80211.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -119,6 +119,7 @@
 #define	IEEE80211_NODE_ASSOCID	0x020000	/* xmit requires associd */
 #define	IEEE80211_NODE_AMSDU_RX	0x040000	/* AMSDU rx enabled */
 #define	IEEE80211_NODE_AMSDU_TX	0x080000	/* AMSDU tx enabled */
+#define	IEEE80211_NODE_VHT	0x100000	/* VHT enabled */
 #endif
 
 #define	MAXCHAN	1536		/* max 1.5K channels */
@@ -143,7 +144,9 @@ static const char *modename[IEEE80211_MO
 	[IEEE80211_MODE_11NA]	  = "11na",
 	[IEEE80211_MODE_11NG]	  = "11ng",
 	[IEEE80211_MODE_HALF]	  = "half",
-	[IEEE80211_MODE_QUARTER]  = "quarter"
+	[IEEE80211_MODE_QUARTER]  = "quarter",
+	[IEEE80211_MODE_VHT_2GHZ] = "11acg",
+	[IEEE80211_MODE_VHT_5GHZ] = "11ac",
 };
 
 static void set80211(int s, int type, int val, int len, void *data);
@@ -183,6 +186,20 @@ gethtconf(int s)
 	gothtconf = 1;
 }
 
+/* VHT */
+static int vhtconf = 0;
+static	int gotvhtconf = 0;
+
+static void
+getvhtconf(int s)
+{
+	if (gotvhtconf)
+		return;
+	if (get80211val(s, IEEE80211_IOC_VHTCONF, &vhtconf) < 0)
+		warn("unable to get VHT configuration information");
+	gotvhtconf = 1;
+}
+
 /*
  * Collect channel info from the kernel.  We use this (mostly)
  * to handle mapping between frequency and IEEE channel number.
@@ -200,6 +217,7 @@ getchaninfo(int s)
 		err(1, "unable to get channel information");
 	ifmr = ifmedia_getstate(s);
 	gethtconf(s);
+	getvhtconf(s);
 }
 
 static struct regdata *
@@ -255,6 +273,9 @@ canpromote(int i, int from, int to)
  * channe list (e.g. mode 11a); we want to honor that to avoid
  * confusing behaviour.
  */
+/*
+ * XXX VHT
+ */
 static int
 promote(int i)
 {
@@ -361,6 +382,10 @@ getcurchan(int s)
 static enum ieee80211_phymode
 chan2mode(const struct ieee80211_channel *c)
 {
+	if (IEEE80211_IS_CHAN_VHTA(c))
+		return IEEE80211_MODE_VHT_5GHZ;
+	if (IEEE80211_IS_CHAN_VHTG(c))
+		return IEEE80211_MODE_VHT_2GHZ;
 	if (IEEE80211_IS_CHAN_HTA(c))
 		return IEEE80211_MODE_11NA;
 	if (IEEE80211_IS_CHAN_HTG(c))
@@ -502,9 +527,12 @@ setregdomain_cb(int s, void *arg)
 		printf("drivercaps: 0x%x\n", dc->dc_drivercaps);
 		printf("cryptocaps: 0x%x\n", dc->dc_cryptocaps);
 		printf("htcaps    : 0x%x\n", dc->dc_htcaps);
+		printf("vhtcaps   : 0x%x\n", dc->dc_vhtcaps);
+#if 0
 		memcpy(chaninfo, &dc->dc_chaninfo,
 		    IEEE80211_CHANINFO_SPACE(&dc->dc_chaninfo));
 		print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, 1/*verbose*/);
+#endif
 	}
 #endif
 	req = malloc(IEEE80211_REGDOMAIN_SIZE(dc->dc_chaninfo.ic_nchans));
@@ -616,6 +644,7 @@ getchannelflags(const char *val, int fre
 #define	_CHAN_HT	0x80000000
 	const char *cp;
 	int flags;
+	int is_vht = 0;
 
 	flags = 0;
 
@@ -636,6 +665,9 @@ getchannelflags(const char *val, int fre
 			case 'g':		/* 802.11g */
 				flags |= IEEE80211_CHAN_G;
 				break;
+			case 'v':		/* vht: 802.11ac */
+				is_vht = 1;
+				/* Fallthrough */
 			case 'h':		/* ht = 802.11n */
 			case 'n':		/* 802.11n */
 				flags |= _CHAN_HT;	/* NB: private */
@@ -674,6 +706,15 @@ getchannelflags(const char *val, int fre
 			flags |= IEEE80211_CHAN_HT20;
 			break;
 		case 40:
+		case 80:
+		case 160:
+			/* Handle the 80/160 VHT flag */
+			if (cw == 80)
+				flags |= IEEE80211_CHAN_VHT80;
+			else if (cw == 160)
+				flags |= IEEE80211_CHAN_VHT160;
+
+			/* Fallthrough */
 			if (ep != NULL && *ep == '+')
 				flags |= IEEE80211_CHAN_HT40U;
 			else if (ep != NULL && *ep == '-')
@@ -683,6 +724,7 @@ getchannelflags(const char *val, int fre
 			errx(-1, "%s: Invalid channel width\n", val);
 		}
 	}
+
 	/*
 	 * Cleanup specifications.
 	 */ 
@@ -695,6 +737,7 @@ getchannelflags(const char *val, int fre
 		 * are also usable for legacy operation; e.g. freq:n/40.
 		 */
 		flags &= ~IEEE80211_CHAN_HT;
+		flags &= ~IEEE80211_CHAN_VHT;
 	} else {
 		/*
 		 * Remove private indicator that this is an HT channel
@@ -714,6 +757,25 @@ getchannelflags(const char *val, int fre
 				mapchan(&chan, freq, 0);
 			flags |= (chan.ic_flags & IEEE80211_CHAN_HT);
 		}
+
+		/*
+		 * If VHT is enabled, then also set the VHT flag and the
+		 * relevant channel up/down.
+		 */
+		if (is_vht && (flags & IEEE80211_CHAN_HT)) {
+			/*
+			 * XXX yes, maybe we should just have VHT, and reuse
+			 * HT20/HT40U/HT40D
+			 */
+			if (flags & IEEE80211_CHAN_VHT80)
+				;
+			else if (flags & IEEE80211_CHAN_HT20)
+				flags |= IEEE80211_CHAN_VHT20;
+			else if (flags & IEEE80211_CHAN_HT40U)
+				flags |= IEEE80211_CHAN_VHT40U;
+			else if (flags & IEEE80211_CHAN_HT40D)
+				flags |= IEEE80211_CHAN_VHT40D;
+		}
 	}
 	return flags;
 #undef _CHAN_HT
@@ -1447,6 +1509,10 @@ getmodeflags(const char *val)
 			case 'q':		/* 1/4-width channels */
 				flags |= IEEE80211_CHAN_QUARTER;
 				break;
+			case 'v':
+				/* XXX set HT too? */
+				flags |= IEEE80211_CHAN_VHT;
+				break;
 			default:
 				errx(-1, "%s: Invalid mode attribute %c\n",
 				    val, *cp);
@@ -1863,6 +1929,21 @@ set80211rifs(const char *val, int d, int
 	set80211(s, IEEE80211_IOC_RIFS, d, 0, NULL);
 }
 
+static void
+set80211vhtconf(const char *val, int d, int s, const struct afswtch *rafp)
+{
+	if (get80211val(s, IEEE80211_IOC_VHTCONF, &vhtconf) < 0)
+		errx(-1, "cannot set VHT setting");
+	printf("%s: vhtconf=0x%08x, d=%d\n", __func__, vhtconf, d);
+	if (d < 0) {
+		d = -d;
+		vhtconf &= ~d;
+	} else
+		vhtconf |= d;
+	printf("%s: vhtconf is now 0x%08x\n", __func__, vhtconf);
+	set80211(s, IEEE80211_IOC_VHTCONF, vhtconf, 0, NULL);
+}
+
 static
 DECL_CMD_FUNC(set80211tdmaslot, val, d)
 {
@@ -2035,6 +2116,7 @@ regdomain_addchans(struct ieee80211req_c
 	hi_adj = (chanFlags & IEEE80211_CHAN_HT40U) ? -20 : 0;
 	lo_adj = (chanFlags & IEEE80211_CHAN_HT40D) ? 20 : 0;
 	channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40;
+
 	LIST_FOREACH(nb, bands, next) {
 		b = nb->band;
 		if (verbose) {
@@ -2045,6 +2127,7 @@ regdomain_addchans(struct ieee80211req_c
 			putchar('\n');
 		}
 		prev = NULL;
+
 		for (freq = b->freqStart + lo_adj;
 		     freq <= b->freqEnd + hi_adj; freq += b->chanSep) {
 			/*
@@ -2055,6 +2138,40 @@ regdomain_addchans(struct ieee80211req_c
 			 * then constrained according by channel separation.
 			 */
 			flags = nb->flags | b->flags;
+
+			/*
+			 * VHT first - HT is a subset.
+			 *
+			 * XXX TODO: VHT80p80, VHT160 is not yet done.
+			 */
+			if (flags & IEEE80211_CHAN_VHT) {
+				if ((chanFlags & IEEE80211_CHAN_VHT20) &&
+				    (flags & IEEE80211_CHAN_VHT20) == 0) {
+					if (verbose)
+						printf("%u: skip, not a "
+						    "VHT20 channel\n", freq);
+					continue;
+				}
+				if ((chanFlags & IEEE80211_CHAN_VHT40) &&
+				    (flags & IEEE80211_CHAN_VHT40) == 0) {
+					if (verbose)
+						printf("%u: skip, not a "
+						    "VHT40 channel\n", freq);
+					continue;
+				}
+				if ((chanFlags & IEEE80211_CHAN_VHT80) &&
+				    (flags & IEEE80211_CHAN_VHT80) == 0) {
+					if (verbose)
+						printf("%u: skip, not a "
+						    "VHT80 channel\n", freq);
+					continue;
+				}
+
+				flags &= ~IEEE80211_CHAN_VHT;
+				flags |= chanFlags & IEEE80211_CHAN_VHT;
+			}
+
+			/* Now, constrain HT */
 			if (flags & IEEE80211_CHAN_HT) {
 				/*
 				 * HT channels are generated specially; we're
@@ -2127,7 +2244,7 @@ regdomain_addchans(struct ieee80211req_c
 			memset(c, 0, sizeof(*c));
 			c->ic_freq = freq;
 			c->ic_flags = flags;
-			if (c->ic_flags & IEEE80211_CHAN_DFS)
+		if (c->ic_flags & IEEE80211_CHAN_DFS)
 				c->ic_maxregpower = nb->maxPowerDFS;
 			else
 				c->ic_maxregpower = nb->maxPower;
@@ -2204,6 +2321,40 @@ regdomain_makechannels(
 				    &dc->dc_chaninfo);
 			}
 		}
+		if (!LIST_EMPTY(&rd->bands_11ac) && dc->dc_vhtcaps != 0) {
+			regdomain_addchans(ci, &rd->bands_11ac, reg,
+			    IEEE80211_CHAN_A | IEEE80211_CHAN_HT20 |
+			    IEEE80211_CHAN_VHT20,
+			    &dc->dc_chaninfo);
+
+			/* VHT40 is a function of HT40.. */
+			if (dc->dc_htcaps & IEEE80211_HTCAP_CHWIDTH40) {
+				regdomain_addchans(ci, &rd->bands_11ac, reg,
+				    IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U |
+				    IEEE80211_CHAN_VHT40U,
+				    &dc->dc_chaninfo);
+				regdomain_addchans(ci, &rd->bands_11ac, reg,
+				    IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D |
+				    IEEE80211_CHAN_VHT40D,
+				    &dc->dc_chaninfo);
+			}
+
+			/* VHT80 */
+			/* XXX dc_vhtcap? */
+			if (1) {
+				regdomain_addchans(ci, &rd->bands_11ac, reg,
+				    IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U |
+				    IEEE80211_CHAN_VHT80,
+				    &dc->dc_chaninfo);
+				regdomain_addchans(ci, &rd->bands_11ac, reg,
+				    IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D |
+				    IEEE80211_CHAN_VHT80,
+				    &dc->dc_chaninfo);
+			}
+
+			/* XXX TODO: VHT80_80, VHT160 */
+		}
+
 		if (!LIST_EMPTY(&rd->bands_11ng) && dc->dc_htcaps != 0) {
 			regdomain_addchans(ci, &rd->bands_11ng, reg,
 			    IEEE80211_CHAN_G | IEEE80211_CHAN_HT20,
@@ -2435,6 +2586,8 @@ getflags(int flags)
 		if (flags & IEEE80211_NODE_HTCOMPAT)
 			*cp++ = '+';
 	}
+	if (flags & IEEE80211_NODE_VHT)
+		*cp++ = 'V';
 	if (flags & IEEE80211_NODE_WPS)
 		*cp++ = 'W';
 	if (flags & IEEE80211_NODE_TSN)
@@ -3574,14 +3727,31 @@ get_chaninfo(const struct ieee80211_chan
 	if (IEEE80211_IS_CHAN_TURBO(c))
 		strlcat(buf, " Turbo", bsize);
 	if (precise) {
-		if (IEEE80211_IS_CHAN_HT20(c))
+		/* XXX should make VHT80U, VHT80D */
+		if (IEEE80211_IS_CHAN_VHT80(c) &&
+		    IEEE80211_IS_CHAN_HT40D(c))
+			strlcat(buf, " vht/80-", bsize);
+		else if (IEEE80211_IS_CHAN_VHT80(c) &&
+		    IEEE80211_IS_CHAN_HT40U(c))
+			strlcat(buf, " vht/80+", bsize);
+		else if (IEEE80211_IS_CHAN_VHT80(c))
+			strlcat(buf, " vht/80", bsize);
+		else if (IEEE80211_IS_CHAN_VHT40D(c))
+			strlcat(buf, " vht/40-", bsize);
+		else if (IEEE80211_IS_CHAN_VHT40U(c))
+			strlcat(buf, " vht/40+", bsize);
+		else if (IEEE80211_IS_CHAN_VHT20(c))
+			strlcat(buf, " vht/20", bsize);
+		else if (IEEE80211_IS_CHAN_HT20(c))
 			strlcat(buf, " ht/20", bsize);
 		else if (IEEE80211_IS_CHAN_HT40D(c))
 			strlcat(buf, " ht/40-", bsize);
 		else if (IEEE80211_IS_CHAN_HT40U(c))
 			strlcat(buf, " ht/40+", bsize);
 	} else {
-		if (IEEE80211_IS_CHAN_HT(c))
+		if (IEEE80211_IS_CHAN_VHT(c))
+			strlcat(buf, " vht", bsize);
+		else if (IEEE80211_IS_CHAN_HT(c))
 			strlcat(buf, " ht", bsize);
 	}
 	return buf;
@@ -3612,6 +3782,16 @@ print_chaninfo(const struct ieee80211_ch
 static int
 chanpref(const struct ieee80211_channel *c)
 {
+	if (IEEE80211_IS_CHAN_VHT160(c))
+		return 80;
+	if (IEEE80211_IS_CHAN_VHT80_80(c))
+		return 75;
+	if (IEEE80211_IS_CHAN_VHT80(c))
+		return 70;
+	if (IEEE80211_IS_CHAN_VHT40(c))
+		return 60;
+	if (IEEE80211_IS_CHAN_VHT20(c))
+		return 50;
 	if (IEEE80211_IS_CHAN_HT40(c))
 		return 40;
 	if (IEEE80211_IS_CHAN_HT20(c))
@@ -3807,6 +3987,11 @@ list_capabilities(int s)
 		putchar('\n');
 		printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS);
 	}
+	if (dc->dc_vhtcaps != 0 || verbose) {
+		putchar('\n');
+		printb("vhtcaps", dc->dc_vhtcaps, IEEE80211_VHTCAP_BITS);
+	}
+
 	putchar('\n');
 	if (verbose) {
 		chaninfo = &dc->dc_chaninfo;	/* XXX */
@@ -4847,6 +5032,30 @@ end:
 		}
 	}
 
+	if (IEEE80211_IS_CHAN_VHT(c) || verbose) {
+		getvhtconf(s);
+		if (vhtconf & 0x1)
+			LINE_CHECK("vht");
+		else
+			LINE_CHECK("-vht");
+		if (vhtconf & 0x2)
+			LINE_CHECK("vht40");
+		else
+			LINE_CHECK("-vht40");
+		if (vhtconf & 0x4)
+			LINE_CHECK("vht80");
+		else
+			LINE_CHECK("-vht80");
+		if (vhtconf & 0x8)
+			LINE_CHECK("vht80p80");
+		else
+			LINE_CHECK("-vht80p80");
+		if (vhtconf & 0x10)
+			LINE_CHECK("vht160");
+		else
+			LINE_CHECK("-vht160");
+	}
+
 	if (get80211val(s, IEEE80211_IOC_WME, &wme) != -1) {
 		if (wme)
 			LINE_CHECK("wme");
@@ -5426,6 +5635,16 @@ static struct cmd ieee80211_cmds[] = {
 	DEF_CMD("-ht40",	0,	set80211htconf),
 	DEF_CMD("ht",		3,	set80211htconf),	/* NB: 20+40 */
 	DEF_CMD("-ht",		0,	set80211htconf),
+	DEF_CMD("vht",		1,	set80211vhtconf),
+	DEF_CMD("-vht",		0,	set80211vhtconf),
+	DEF_CMD("vht40",		2,	set80211vhtconf),
+	DEF_CMD("-vht40",		-2,	set80211vhtconf),
+	DEF_CMD("vht80",		4,	set80211vhtconf),
+	DEF_CMD("-vht80",		-4,	set80211vhtconf),
+	DEF_CMD("vht80p80",		8,	set80211vhtconf),
+	DEF_CMD("-vht80p80",		-8,	set80211vhtconf),
+	DEF_CMD("vht160",		16,	set80211vhtconf),
+	DEF_CMD("-vht160",		-16,	set80211vhtconf),
 	DEF_CMD("rifs",		1,	set80211rifs),
 	DEF_CMD("-rifs",	0,	set80211rifs),
 	DEF_CMD("smps",		IEEE80211_HTCAP_SMPS_ENA,	set80211smps),

Modified: projects/bsnmp-ipv6-mib/secure/usr.sbin/sshd/Makefile
==============================================================================
--- projects/bsnmp-ipv6-mib/secure/usr.sbin/sshd/Makefile	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/secure/usr.sbin/sshd/Makefile	Sat Jan  7 09:56:50 2017	(r311637)
@@ -27,7 +27,7 @@ CFLAGS+=-I${SSHDIR} -include ssh_namespa
 SRCS+=	ssh_namespace.h
 
 # pam should always happen before ssh here for static linking
-LIBADD=	pam ssh util wrap
+LIBADD=	pam ssh util
 
 .if ${MK_LDNS} != "no"
 CFLAGS+=	-DHAVE_LDNS=1
@@ -53,6 +53,11 @@ SRCS+=	krb5_config.h
 LIBADD+=	gssapi_krb5 gssapi krb5
 .endif
 
+.if ${MK_TCP_WRAPPERS} != "no"
+CFLAGS+=	-DLIBWRAP
+LIBADD+=	wrap
+.endif
+
 LIBADD+=	crypto
 
 .if defined(LOCALBASE)

Modified: projects/bsnmp-ipv6-mib/sys/dev/cxgbe/tom/t4_connect.c
==============================================================================
--- projects/bsnmp-ipv6-mib/sys/dev/cxgbe/tom/t4_connect.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sys/dev/cxgbe/tom/t4_connect.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -107,7 +107,7 @@ free_atid(struct adapter *sc, int atid)
 }
 
 /*
- * Active open failed.
+ * Active open succeeded.
  */
 static int
 do_act_establish(struct sge_iq *iq, const struct rss_header *rss,
@@ -187,6 +187,9 @@ act_open_failure_cleanup(struct adapter 
 		INP_INFO_RUNLOCK(&V_tcbinfo);
 }
 
+/*
+ * Active open failed.
+ */
 static int
 do_act_open_rpl(struct sge_iq *iq, const struct rss_header *rss,
     struct mbuf *m)

Modified: projects/bsnmp-ipv6-mib/sys/kern/sys_socket.c
==============================================================================
--- projects/bsnmp-ipv6-mib/sys/kern/sys_socket.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sys/kern/sys_socket.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -604,6 +604,8 @@ retry:
 		if (td->td_ru.ru_msgrcv != ru_before)
 			job->msgrcv = 1;
 	} else {
+		if (!TAILQ_EMPTY(&sb->sb_aiojobq))
+			flags |= MSG_MORETOCOME;
 		uio.uio_rw = UIO_WRITE;
 		ru_before = td->td_ru.ru_msgsnd;
 #ifdef MAC

Modified: projects/bsnmp-ipv6-mib/sys/kern/uipc_socket.c
==============================================================================
--- projects/bsnmp-ipv6-mib/sys/kern/uipc_socket.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sys/kern/uipc_socket.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -1182,6 +1182,7 @@ sosend_dgram(struct socket *so, struct s
 	     (resid <= 0)) ?
 		PRUS_EOF :
 		/* If there is more to send set PRUS_MORETOCOME */
+		(flags & MSG_MORETOCOME) ||
 		(resid > 0 && space > 0) ? PRUS_MORETOCOME : 0,
 		top, addr, control, td);
 	if (dontroute) {
@@ -1368,6 +1369,7 @@ restart:
 			     (resid <= 0)) ?
 				PRUS_EOF :
 			/* If there is more to send set PRUS_MORETOCOME. */
+			    (flags & MSG_MORETOCOME) ||
 			    (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0,
 			    top, addr, control, td);
 			if (dontroute) {

Modified: projects/bsnmp-ipv6-mib/sys/mips/conf/MALTA64
==============================================================================
--- projects/bsnmp-ipv6-mib/sys/mips/conf/MALTA64	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sys/mips/conf/MALTA64	Sat Jan  7 09:56:50 2017	(r311637)
@@ -11,3 +11,5 @@ machine		mips mips64
 makeoptions	ARCH_FLAGS="-march=mips64 -mabi=64"
  
 makeoptions 	KERNLOADADDR=0xffffffff80100000
+
+options 	COMPAT_FREEBSD32	# Compatible with o32 binaries

Modified: projects/bsnmp-ipv6-mib/sys/net80211/ieee80211.c
==============================================================================
--- projects/bsnmp-ipv6-mib/sys/net80211/ieee80211.c	Sat Jan  7 09:56:12 2017	(r311636)
+++ projects/bsnmp-ipv6-mib/sys/net80211/ieee80211.c	Sat Jan  7 09:56:50 2017	(r311637)
@@ -90,6 +90,7 @@ const uint8_t ieee80211broadcastaddr[IEE
 static	void ieee80211_syncflag_locked(struct ieee80211com *ic, int flag);
 static	void ieee80211_syncflag_ht_locked(struct ieee80211com *ic, int flag);
 static	void ieee80211_syncflag_ext_locked(struct ieee80211com *ic, int flag);
+static	void ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag);
 static	int ieee80211_media_setup(struct ieee80211com *ic,
 		struct ifmedia *media, int caps, int addsta,
 		ifm_change_cb_t media_change, ifm_stat_cb_t media_stat);
@@ -652,6 +653,12 @@ ieee80211_vap_attach(struct ieee80211vap
 	ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
 	ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
 	ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
+
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160);
 	IEEE80211_UNLOCK(ic);
 
 	return 1;
@@ -699,6 +706,13 @@ ieee80211_vap_detach(struct ieee80211vap
 	ieee80211_syncflag_locked(ic, IEEE80211_F_BURST);
 	ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_HT);
 	ieee80211_syncflag_ht_locked(ic, IEEE80211_FHT_USEHT40);
+
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_VHT);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT40);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT80P80);
+	ieee80211_syncflag_vht_locked(ic, IEEE80211_FVHT_USEVHT160);
+
 	/* NB: this handles the bpfdetach done below */
 	ieee80211_syncflag_ext_locked(ic, IEEE80211_FEXT_BPF);
 	if (vap->iv_ifflags & IFF_PROMISC)
@@ -853,6 +867,46 @@ ieee80211_syncflag_ht(struct ieee80211va
 }
 
 /*
+ * Synchronize flags_vht bit state in the com structure
+ * according to the state of all vap's.  This is used,
+ * for example, to handle state changes via ioctls.
+ */
+static void
+ieee80211_syncflag_vht_locked(struct ieee80211com *ic, int flag)
+{
+	struct ieee80211vap *vap;
+	int bit;
+
+	IEEE80211_LOCK_ASSERT(ic);
+
+	bit = 0;
+	TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
+		if (vap->iv_flags_vht & flag) {
+			bit = 1;
+			break;
+		}
+	if (bit)
+		ic->ic_flags_vht |= flag;
+	else
+		ic->ic_flags_vht &= ~flag;
+}
+
+void
+ieee80211_syncflag_vht(struct ieee80211vap *vap, int flag)
+{
+	struct ieee80211com *ic = vap->iv_ic;
+
+	IEEE80211_LOCK(ic);
+	if (flag < 0) {
+		flag = -flag;
+		vap->iv_flags_vht &= ~flag;
+	} else
+		vap->iv_flags_vht |= flag;
+	ieee80211_syncflag_vht_locked(ic, flag);
+	IEEE80211_UNLOCK(ic);
+}
+
+/*
  * Synchronize flags_ext bit state in the com structure

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070956.v079uoAG012645>