CVS commit: src/share/man/man7

2015-09-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep 22 08:29:30 UTC 2015

Modified Files:
src/share/man/man7: module.7

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man7/module.7

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

Modified files:

Index: src/share/man/man7/module.7
diff -u src/share/man/man7/module.7:1.4 src/share/man/man7/module.7:1.5
--- src/share/man/man7/module.7:1.4	Tue Sep 22 00:10:12 2015
+++ src/share/man/man7/module.7	Tue Sep 22 08:29:30 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: module.7,v 1.4 2015/09/22 00:10:12 pgoyette Exp $
+.\" $NetBSD: module.7,v 1.5 2015/09/22 08:29:30 wiz Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 14, 2010
+.Dd September 22, 2015
 .Dt MODULE 7
 .Os
 .Sh NAME



CVS commit: src/lib

2015-09-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 22 13:26:14 UTC 2015

Modified Files:
src/lib: Makefile

Log Message:
Restrict libc_vfp to NetBSD/arm. It doesn't make sense for aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.227 -r1.228 src/lib/Makefile

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

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.227 src/lib/Makefile:1.228
--- src/lib/Makefile:1.227	Thu Sep 17 02:00:33 2015
+++ src/lib/Makefile	Tue Sep 22 13:26:14 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.227 2015/09/17 02:00:33 christos Exp $
+#	$NetBSD: Makefile,v 1.228 2015/09/22 13:26:14 joerg Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -35,7 +35,8 @@ SUBDIR+=	libkern
 
 .if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
-.if empty(LIBC_MACHINE_ARCH:M*hf*)
+LIBC_MACHINE_CPU?=${MACHINE_CPU}
+.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
 SUBDIR+=	libc_vfp
 .endif
 .endif



CVS commit: src/lib/libarch/sparc/v8

2015-09-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 22 13:27:13 UTC 2015

Modified Files:
src/lib/libarch/sparc/v8: sparc_v8.S

Log Message:
Drop .proc. It is ignored by GNU as anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libarch/sparc/v8/sparc_v8.S

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

Modified files:

Index: src/lib/libarch/sparc/v8/sparc_v8.S
diff -u src/lib/libarch/sparc/v8/sparc_v8.S:1.1 src/lib/libarch/sparc/v8/sparc_v8.S:1.2
--- src/lib/libarch/sparc/v8/sparc_v8.S:1.1	Tue Nov 26 14:30:54 2002
+++ src/lib/libarch/sparc/v8/sparc_v8.S	Tue Sep 22 13:27:13 2015
@@ -10,7 +10,6 @@
 	.align 4
 	.global .umul
 	.type	 .umul,@function
-	.proc	016
 
 .umul:
 	!#PROLOGUE# 0
@@ -24,7 +23,6 @@
 	.align 4
 	.global .mul
 	.type	 .mul,@function
-	.proc	04
 .mul:
 	!#PROLOGUE# 0
 	!#PROLOGUE# 1
@@ -37,7 +35,6 @@
 	.align 4
 	.global .udiv
 	.type	 .udiv,@function
-	.proc	016
 .udiv:
 	wr	%g0, 0, %y
 	nop; nop; nop
@@ -50,8 +47,6 @@
 	.align 4
 	.global .div
 	.type	 .div,@function
-	.proc	04
-
 .div:
 	sra	%o0, 31, %g2
 	wr	%g2, 0, %y
@@ -65,7 +60,6 @@
 	.align 4
 	.global .urem
 	.type	 .urem,@function
-	.proc	016
 .urem:
 	wr	%g0, %g0, %y
 	nop; nop; nop
@@ -80,7 +74,6 @@
 	.align 4
 	.global .rem
 	.type	 .rem,@function
-	.proc	04
 .rem:
 	sra	%o0, 31, %g3
 	wr	%g3, 0, %y



CVS commit: src/sys/dev/ic

2015-09-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 22 13:28:02 UTC 2015

Modified Files:
src/sys/dev/ic: athn.c

Log Message:
Avoid left-shift of negative values.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/athn.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/ic/athn.c
diff -u src/sys/dev/ic/athn.c:1.10 src/sys/dev/ic/athn.c:1.11
--- src/sys/dev/ic/athn.c:1.10	Thu Jul 24 19:47:15 2014
+++ src/sys/dev/ic/athn.c	Tue Sep 22 13:28:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: athn.c,v 1.10 2014/07/24 19:47:15 riz Exp $	*/
+/*	$NetBSD: athn.c,v 1.11 2015/09/22 13:28:02 joerg Exp $	*/
 /*	$OpenBSD: athn.c,v 1.83 2014/07/22 13:12:11 mpi Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.10 2014/07/24 19:47:15 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.11 2015/09/22 13:28:02 joerg Exp $");
 
 #ifndef _MODULE
 #include "athn_usb.h"		/* for NATHN_USB */
@@ -2248,7 +2248,7 @@ athn_hw_reset(struct athn_softc *sc, str
 		/* Do not mask the subtype field in management frames. */
 		reg = RW(reg, AR_AES_MUTE_MASK1_FC0_MGMT, 0xff);
 		reg = RW(reg, AR_AES_MUTE_MASK1_FC1_MGMT,
-		~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
+		(uint32_t)~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
 		  IEEE80211_FC1_MORE_DATA));
 		AR_WRITE(sc, AR_AES_MUTE_MASK1, reg);
 	}



CVS commit: src/lib/libc/net

2015-09-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 22 14:46:09 UTC 2015

Modified Files:
src/lib/libc/net: getnameinfo.c

Log Message:
Handle herrors properly so that postfix can return 4XX codes when appropriate.
Pointed out by Viktor Dukhovni.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libc/net/getnameinfo.c

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

Modified files:

Index: src/lib/libc/net/getnameinfo.c
diff -u src/lib/libc/net/getnameinfo.c:1.57 src/lib/libc/net/getnameinfo.c:1.58
--- src/lib/libc/net/getnameinfo.c:1.57	Thu Sep  3 11:01:19 2015
+++ src/lib/libc/net/getnameinfo.c	Tue Sep 22 10:46:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnameinfo.c,v 1.57 2015/09/03 15:01:19 christos Exp $	*/
+/*	$NetBSD: getnameinfo.c,v 1.58 2015/09/22 14:46:09 christos Exp $	*/
 /*	$KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $	*/
 
 /*
@@ -47,7 +47,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getnameinfo.c,v 1.57 2015/09/03 15:01:19 christos Exp $");
+__RCSID("$NetBSD: getnameinfo.c,v 1.58 2015/09/22 14:46:09 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifndef RUMP_ACTION
@@ -64,6 +64,7 @@ __RCSID("$NetBSD: getnameinfo.c,v 1.57 2
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -404,8 +405,22 @@ getnameinfo_inet(const struct sockaddr *
 			}
 			strlcpy(host, hp->h_name, hostlen);
 		} else {
-			if (flags & NI_NAMEREQD)
-return EAI_NONAME;
+			switch (he) {
+			case NETDB_INTERNAL:
+			case NO_RECOVERY:
+return EAI_SYSTEM;
+			case NO_DATA:
+			case HOST_NOT_FOUND:
+if (flags & NI_NAMEREQD)
+	return EAI_NONAME;
+break;
+			case TRY_AGAIN:
+return EAI_AGAIN;
+			case NETDB_SUCCESS:
+/*FALLTHROUGH*/
+			default:
+abort();
+			}
 			switch(afd->a_af) {
 #ifdef INET6
 			case AF_INET6:



CVS commit: src/lib/libc/net

2015-09-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 22 16:16:02 UTC 2015

Modified Files:
src/lib/libc/net: gethnamaddr.c

Log Message:
- fix various leaks on error
- don't use the wrong error variable in switch
- always set the error return code
- return consistent errors when the input data cannot be handled.


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/lib/libc/net/gethnamaddr.c

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

Modified files:

Index: src/lib/libc/net/gethnamaddr.c
diff -u src/lib/libc/net/gethnamaddr.c:1.91 src/lib/libc/net/gethnamaddr.c:1.92
--- src/lib/libc/net/gethnamaddr.c:1.91	Thu Jun 19 11:08:18 2014
+++ src/lib/libc/net/gethnamaddr.c	Tue Sep 22 12:16:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gethnamaddr.c,v 1.91 2014/06/19 15:08:18 christos Exp $	*/
+/*	$NetBSD: gethnamaddr.c,v 1.92 2015/09/22 16:16:02 christos Exp $	*/
 
 /*
  * ++Copyright++ 1985, 1988, 1993
@@ -57,7 +57,7 @@
 static char sccsid[] = "@(#)gethostnamadr.c	8.1 (Berkeley) 6/4/93";
 static char rcsid[] = "Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: gethnamaddr.c,v 1.91 2014/06/19 15:08:18 christos Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.92 2015/09/22 16:16:02 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -244,6 +244,7 @@ getanswer(const querybuf *answer, int an
 		name_ok = res_dnok;
 		break;
 	default:
+		*he = NO_RECOVERY;
 		return NULL;	/* XXX should be abort(); */
 	}
 
@@ -964,6 +965,7 @@ _dns_gethtbyname(void *rv, void *cb_data
 	res = __res_get_state();
 	if (res == NULL) {
 		free(buf);
+		*info->he = NETDB_INTERNAL;
 		return NS_NOTFOUND;
 	}
 	n = res_nsearch(res, name, C_IN, type, buf->buf, (int)sizeof(buf->buf));
@@ -978,7 +980,7 @@ _dns_gethtbyname(void *rv, void *cb_data
 	free(buf);
 	__res_put_state(res);
 	if (hp == NULL)
-		switch (h_errno) {
+		switch (*info->he) {
 		case HOST_NOT_FOUND:
 			return NS_NOTFOUND;
 		case TRY_AGAIN:
@@ -1026,35 +1028,31 @@ _dns_gethtbyaddr(void *rv, void	*cb_data
 			((unsigned int)uaddr[n] >> 4) & 0xf);
 			if (advance > 0 && qp + advance < ep)
 qp += advance;
-			else {
-*info->he = NETDB_INTERNAL;
-return NS_NOTFOUND;
-			}
-		}
-		if (strlcat(qbuf, "ip6.arpa", sizeof(qbuf)) >= sizeof(qbuf)) {
-			*info->he = NETDB_INTERNAL;
-			return NS_NOTFOUND;
+			else
+goto norecovery;
 		}
+		if (strlcat(qbuf, "ip6.arpa", sizeof(qbuf)) >= sizeof(qbuf))
+			goto norecovery;
 		break;
 	default:
-		return NS_UNAVAIL;
+		goto norecovery;
 	}
 
 	buf = malloc(sizeof(*buf));
 	if (buf == NULL) {
-		*info->he = NETDB_INTERNAL;
-		return NS_NOTFOUND;
+		goto nospc;
 	}
 	res = __res_get_state();
 	if (res == NULL) {
 		free(buf);
-		return NS_NOTFOUND;
+		goto nospc;
 	}
 	n = res_nquery(res, qbuf, C_IN, T_PTR, buf->buf, (int)sizeof(buf->buf));
 	if (n < 0) {
 		free(buf);
 		debugprintf("res_nquery failed (%d)\n", res, n);
 		__res_put_state(res);
+		*info->he = HOST_NOT_FOUND;
 		return NS_NOTFOUND;
 	}
 	hp = getanswer(buf, n, qbuf, T_PTR, res, info->hp, info->buf,
@@ -1080,8 +1078,10 @@ _dns_gethtbyaddr(void *rv, void	*cb_data
 	hp->h_addr_list[1] = NULL;
 	(void)memcpy(bf, uaddr, (size_t)info->hp->h_length);
 	if (info->hp->h_addrtype == AF_INET && (res->options & RES_USE_INET6)) {
-		if (blen + NS_IN6ADDRSZ > info->buflen)
+		if (blen + NS_IN6ADDRSZ > info->buflen) {
+			__res_put_state(res);
 			goto nospc;
+		}
 		map_v4v6_address(bf, bf);
 		hp->h_addrtype = AF_INET6;
 		hp->h_length = NS_IN6ADDRSZ;
@@ -1093,6 +1093,9 @@ _dns_gethtbyaddr(void *rv, void	*cb_data
 nospc:
 	*info->he = NETDB_INTERNAL;
 	return NS_UNAVAIL;
+norecovery:
+	*info->he = NO_RECOVERY;
+	return NS_UNAVAIL;
 }
 
 #ifdef YP



CVS commit: src/lib/libc/net

2015-09-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 22 16:15:08 UTC 2015

Modified Files:
src/lib/libc/net: getnameinfo.c

Log Message:
be more forgiving, and don't abort on unexpected errors.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/lib/libc/net/getnameinfo.c

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

Modified files:

Index: src/lib/libc/net/getnameinfo.c
diff -u src/lib/libc/net/getnameinfo.c:1.58 src/lib/libc/net/getnameinfo.c:1.59
--- src/lib/libc/net/getnameinfo.c:1.58	Tue Sep 22 10:46:09 2015
+++ src/lib/libc/net/getnameinfo.c	Tue Sep 22 12:15:08 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: getnameinfo.c,v 1.58 2015/09/22 14:46:09 christos Exp $	*/
+/*	$NetBSD: getnameinfo.c,v 1.59 2015/09/22 16:15:08 christos Exp $	*/
 /*	$KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $	*/
 
 /*
@@ -47,7 +47,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getnameinfo.c,v 1.58 2015/09/22 14:46:09 christos Exp $");
+__RCSID("$NetBSD: getnameinfo.c,v 1.59 2015/09/22 16:15:08 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifndef RUMP_ACTION
@@ -64,7 +64,6 @@ __RCSID("$NetBSD: getnameinfo.c,v 1.58 2
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -406,9 +405,6 @@ getnameinfo_inet(const struct sockaddr *
 			strlcpy(host, hp->h_name, hostlen);
 		} else {
 			switch (he) {
-			case NETDB_INTERNAL:
-			case NO_RECOVERY:
-return EAI_SYSTEM;
 			case NO_DATA:
 			case HOST_NOT_FOUND:
 if (flags & NI_NAMEREQD)
@@ -417,9 +413,11 @@ getnameinfo_inet(const struct sockaddr *
 			case TRY_AGAIN:
 return EAI_AGAIN;
 			case NETDB_SUCCESS:
+			case NETDB_INTERNAL:
+			case NO_RECOVERY:
 /*FALLTHROUGH*/
 			default:
-abort();
+return EAI_SYSTEM;
 			}
 			switch(afd->a_af) {
 #ifdef INET6



CVS commit: xsrc/external/mit/twm/dist/src

2015-09-22 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Tue Sep 22 18:33:41 UTC 2015

Modified Files:
xsrc/external/mit/twm/dist/src: util.c util.h

Log Message:
constify to fix build (with minimal changes)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/twm/dist/src/util.c
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/twm/dist/src/util.h

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

Modified files:

Index: xsrc/external/mit/twm/dist/src/util.c
diff -u xsrc/external/mit/twm/dist/src/util.c:1.2 xsrc/external/mit/twm/dist/src/util.c:1.3
--- xsrc/external/mit/twm/dist/src/util.c:1.2	Wed Oct  1 05:56:39 2014
+++ xsrc/external/mit/twm/dist/src/util.c	Tue Sep 22 14:33:41 2015
@@ -256,11 +256,11 @@ Zoom(Window wf, Window wt)
  *  \param name  the filename to expand
  */
 char *
-ExpandFilename(char *name)
+ExpandFilename(const char *name)
 {
 char *newname;
 
-if (name[0] != '~') return name;
+if (name[0] != '~') return strdup(name);
 
 newname = malloc (HomeLen + strlen(name) + 2);
 if (!newname) {

Index: xsrc/external/mit/twm/dist/src/util.h
diff -u xsrc/external/mit/twm/dist/src/util.h:1.1.1.4 xsrc/external/mit/twm/dist/src/util.h:1.2
--- xsrc/external/mit/twm/dist/src/util.h:1.1.1.4	Mon Mar 17 04:48:43 2014
+++ xsrc/external/mit/twm/dist/src/util.h	Tue Sep 22 14:33:41 2015
@@ -64,7 +64,7 @@ in this Software without prior written a
 extern void MoveOutline ( Window root, int x, int y, int width, int height,
 			  int bw, int th );
 extern void Zoom ( Window wf, Window wt );
-extern char * ExpandFilename ( char *name );
+extern char * ExpandFilename ( const char *name );
 extern void GetUnknownIcon ( const char *name );
 extern Pixmap FindBitmap ( const char *name, unsigned int *widthp,
 			   unsigned int *heightp );



CVS commit: src/sys/dev/pci

2015-09-22 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Tue Sep 22 23:23:06 UTC 2015

Modified Files:
src/sys/dev/pci: if_iwn.c if_iwnvar.h

Log Message:
PR/50187: Don't use DS parameter set when 5GHz channel is scanning.

XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/if_iwn.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/if_iwnvar.h

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_iwn.c
diff -u src/sys/dev/pci/if_iwn.c:1.75 src/sys/dev/pci/if_iwn.c:1.76
--- src/sys/dev/pci/if_iwn.c:1.75	Mon Aug 24 23:52:18 2015
+++ src/sys/dev/pci/if_iwn.c	Tue Sep 22 23:23:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwn.c,v 1.75 2015/08/24 23:52:18 pooka Exp $	*/
+/*	$NetBSD: if_iwn.c,v 1.76 2015/09/22 23:23:06 nonaka Exp $	*/
 /*	$OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $	*/
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.75 2015/08/24 23:52:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.76 2015/09/22 23:23:06 nonaka Exp $");
 
 #define IWN_USE_RBUF	/* Use local storage for RX */
 #undef IWN_HWCRYPTO	/* XXX does not even compile yet */
@@ -330,7 +330,8 @@ static u_int8_t	*ieee80211_add_rates(u_i
 static u_int8_t	*ieee80211_add_xrates(u_int8_t *,
 const struct ieee80211_rateset *);
 
-static void	iwn_fix_channel(struct ieee80211com *, struct mbuf *);
+static void	iwn_fix_channel(struct ieee80211com *, struct mbuf *,
+		struct iwn_rx_stat *);
 
 #ifdef IWN_DEBUG
 #define DPRINTF(x)	do { if (iwn_debug > 0) printf x; } while (0)
@@ -1866,7 +1867,7 @@ iwn_newstate(struct ieee80211com *ic, en
 		/* XXX Not sure if call and flags are needed. */
 		ieee80211_node_table_reset(&ic->ic_scan);
 		ic->ic_flags |= IEEE80211_F_SCAN | IEEE80211_F_ASCAN;
-		sc->sc_flags |= IWN_FLAG_SCANNING;
+		sc->sc_flags |= IWN_FLAG_SCANNING_2GHZ;
 
 		/* Make the link LED blink while we're scanning. */
 		iwn_set_led(sc, IWN_LED_LINK, 10, 10);
@@ -2089,7 +2090,7 @@ iwn_rx_done(struct iwn_softc *sc, struct
 
 	/* XXX Added for NetBSD: scans never stop without it */
 	if (ic->ic_state == IEEE80211_S_SCAN)
-		iwn_fix_channel(ic, m);
+		iwn_fix_channel(ic, m, stat);
 
 	if (sc->sc_drvbpf != NULL) {
 		struct iwn_rx_radiotap_header *tap = &sc->sc_rxtap;
@@ -2520,6 +2521,8 @@ iwn_notif_intr(struct iwn_softc *sc)
  * We just finished scanning 2GHz channels,
  * start scanning 5GHz ones.
  */
+sc->sc_flags &= ~IWN_FLAG_SCANNING_2GHZ;
+sc->sc_flags |= IWN_FLAG_SCANNING_5GHZ;
 if (iwn_scan(sc, IEEE80211_CHAN_5GHZ) == 0)
 	break;
 			}
@@ -6506,8 +6509,10 @@ ieee80211_add_xrates(u_int8_t *frm, cons
  * XXX: Duplicated from if_iwi.c
  */
 static void
-iwn_fix_channel(struct ieee80211com *ic, struct mbuf *m)
+iwn_fix_channel(struct ieee80211com *ic, struct mbuf *m,
+struct iwn_rx_stat *stat)
 {
+	struct iwn_softc *sc = ic->ic_ifp->if_softc;
 	struct ieee80211_frame *wh;
 	uint8_t subtype;
 	uint8_t *frm, *efrm;
@@ -6523,6 +6528,13 @@ iwn_fix_channel(struct ieee80211com *ic,
 	subtype != IEEE80211_FC0_SUBTYPE_PROBE_RESP)
 		return;
 
+	if (sc->sc_flags & IWN_FLAG_SCANNING_5GHZ) {
+		int chan = le16toh(stat->chan);
+		if (chan < __arraycount(ic->ic_channels))
+			ic->ic_curchan = &ic->ic_channels[chan];
+		return;
+	}
+
 	frm = (uint8_t *)(wh + 1);
 	efrm = mtod(m, uint8_t *) + m->m_len;
 

Index: src/sys/dev/pci/if_iwnvar.h
diff -u src/sys/dev/pci/if_iwnvar.h:1.16 src/sys/dev/pci/if_iwnvar.h:1.17
--- src/sys/dev/pci/if_iwnvar.h:1.16	Thu Oct 30 13:05:58 2014
+++ src/sys/dev/pci/if_iwnvar.h	Tue Sep 22 23:23:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwnvar.h,v 1.16 2014/10/30 13:05:58 nonaka Exp $	*/
+/*	$NetBSD: if_iwnvar.h,v 1.17 2015/09/22 23:23:06 nonaka Exp $	*/
 /*	$OpenBSD: if_iwnvar.h,v 1.28 2014/09/09 18:55:08 sthen Exp $	*/
 
 /*-
@@ -221,8 +221,10 @@ struct iwn_softc {
 #define IWN_FLAG_HAS_11N	(1 << 6)
 #define IWN_FLAG_ENH_SENS	(1 << 7)
 /* Added for NetBSD */
-#define IWN_FLAG_SCANNING	(1 << 8)
-#define IWN_FLAG_HW_INITED	(1 << 9)
+#define IWN_FLAG_HW_INITED	(1 << 8)
+#define IWN_FLAG_SCANNING_2GHZ	(1 << 9)
+#define IWN_FLAG_SCANNING_5GHZ	(1 << 10)
+#define IWN_FLAG_SCANNING	(IWN_FLAG_SCANNING_2GHZ|IWN_FLAG_SCANNING_5GHZ)
 
 	uint8_t 		hw_type;
 



CVS commit: src/usr.bin/calendar/calendars

2015-09-22 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Wed Sep 23 05:21:00 UTC 2015

Modified Files:
src/usr.bin/calendar/calendars: calendar.christian calendar.holiday
calendar.judaic calendar.usholiday

Log Message:
Adjust dates for floating holidays.  Use 2015 for things happening from
mid-October onwards, and 2016 for things happening earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/calendar/calendars/calendar.christian \
src/usr.bin/calendar/calendars/calendar.judaic
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/calendar/calendars/calendar.holiday
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/calendar/calendars/calendar.usholiday

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.christian
diff -u src/usr.bin/calendar/calendars/calendar.christian:1.4 src/usr.bin/calendar/calendars/calendar.christian:1.5
--- src/usr.bin/calendar/calendars/calendar.christian:1.4	Sat May  5 01:29:56 2012
+++ src/usr.bin/calendar/calendars/calendar.christian	Wed Sep 23 05:21:00 2015
@@ -1,17 +1,17 @@
-01/18*	Epiphany
-02/12*	Shrove Tuesday / Mardi Gras (day before Ash Wednesday)
-02/13*	Ash Wednesday (First day of Lent)
-03/24*	Palm Sunday (7 days before Easter)
-03/28*	Maundy Thursday (3 days before Easter)
-03/29*	Good Friday (2 days before Easter)
-03/31*	Easter Sunday
-05/05*	Rogation Sunday
-05/09*	Ascension Day (10 days before Pentecost)
-05/19*	Pentecost (Whitsunday)
-05/20*	Whitmonday
-05/26*	Trinity Sunday (7 days after Pentecost)
-05/30*	Corpus Christi (11 days after Pentecost)
+01/06*	Epiphany
+02/09*	Shrove Tuesday / Mardi Gras (day before Ash Wednesday)
+02/10*	Ash Wednesday (First day of Lent)
+03/20*	Palm Sunday (7 days before Easter)
+03/24*	Maundy Thursday (3 days before Easter)
+03/25*	Good Friday (2 days before Easter)
+03/27*	Easter Sunday
+05/01*	Rogation Sunday
+05/05*	Ascension Day (10 days before Pentecost)
+05/15*	Pentecost (Whitsunday)
+05/16*	Whitmonday
+05/22*	Trinity Sunday (7 days after Pentecost)
+05/26*	Corpus Christi (11 days after Pentecost)
 10/18	Feast Day of St. Luke
-12/01*	First Sunday of Advent (4th Sunday before Christmas)
+11/29*	First Sunday of Advent (4th Sunday before Christmas)
 12/06	St. Nicholas' Day
 12/25	Feast of the Nativity (Christmas)
Index: src/usr.bin/calendar/calendars/calendar.judaic
diff -u src/usr.bin/calendar/calendars/calendar.judaic:1.4 src/usr.bin/calendar/calendars/calendar.judaic:1.5
--- src/usr.bin/calendar/calendars/calendar.judaic:1.4	Sat May  5 01:29:56 2012
+++ src/usr.bin/calendar/calendars/calendar.judaic	Wed Sep 23 05:21:00 2015
@@ -1,27 +1,27 @@
-01/26*  Tu B'Shvat (Feast of Trees)
-02/22*	Fast of Esther (Battle of Purim; 1 day before Purim; fast day)
-02/23*	Purim (Feast of Lots; 30 days before Pesach)
-03/25*	Pesach (First Day of Passover; sabbatical)
-03/26*	Pesach (sabbatical)
-03/27*	Pesach (sabbatical)
-03/28*	Pesach (Last Day of Passover; 8th day of Pesach; sabbatical)
-04/16*	Yom HaAtzma'ut (Israel Independence Day)
-05/12*	Lag B'Omer (Commemoration of the Great Rebellion)
-05/22*	Yom Yerushalayim (Reunification of Jerusalem)
-05/29*	Shavuos (Festival of Weeks; 50 days after Pesach; sabbatical)
-07/09*	Fast of Shiv'a Asar B'Tammuz (Tzom Tammuz) (Romans breach Wall of Jerusalem;
+01/25*  Tu B'Shvat (Feast of Trees)
+03/23*	Fast of Esther (Battle of Purim; 1 day before Purim; fast day)
+03/24*	Purim (Feast of Lots; 30 days before Pesach)
+04/23*	Pesach (First Day of Passover; sabbatical)
+04/24*	Pesach (sabbatical)
+04/25*	Pesach (sabbatical)
+04/26*	Pesach (Last Day of Passover; 8th day of Pesach; sabbatical)
+05/12*	Yom HaAtzma'ut (Israel Independence Day)
+05/26*	Lag B'Omer (Commemoration of the Great Rebellion)
+06/04*	Yom Yerushalayim (Reunification of Jerusalem)
+06/12*	Shavuos (Festival of Weeks; 50 days after Pesach; sabbatical)
+07/24*	Fast of Shiv'a Asar B'Tammuz (Tzom Tammuz) (Romans breach Wall of Jerusalem;
 	fast day)
-07/30*	Fast of Tish'a B'Av (Babylon/Rome destroys Holy Temple; fast day)
-09/19*	First Day of Rosh Hashanah (Jewish Lunar New Year; 5767 == 2006;
+08/14*	Fast of Tish'a B'Av (Babylon/Rome destroys Holy Temple; fast day)
+10/03*	First Day of Rosh Hashanah (Jewish Lunar New Year; 5767 == 2006;
 	sabbatical)
-09/04*	Rosh Hashanah (sabbatical)
-09/05*	Fast of Gedalya (Murder of Gedalya and subsequent Exile; 1 day
+10/03*	Rosh Hashanah (sabbatical)
+10/04*	Fast of Gedalya (Murder of Gedalya and subsequent Exile; 1 day
 	after Rosh Hashanah; fast day)
-09/13*	Yom Kippur (Day of Atonement; 9 days after Rosh Hashanah;
+10/12*	Yom Kippur (Day of Atonement; 9 days after Rosh Hashanah;
 	sabbatical, fast day)
-09/28*	Succos (Festival of Tabernacles; 14 days after Rosh Hashanah;
+10/17*	Succos (Festival of Tabernacles; 14 days after Rosh Hashanah;
 	sabbatical)
-10/04*	Hoshanah Rabba (7th day of Succos)
-10/15*	Shmini Atzeres (8th Day of Gathering; 1 day a

CVS commit: src/external/mit/xorg/lib/gallium

2015-09-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep 23 05:28:14 UTC 2015

Modified Files:
src/external/mit/xorg/lib/gallium: Makefile

Log Message:
remove unused GALLIUM_NAMES variable.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/gallium/Makefile

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

Modified files:

Index: src/external/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.6 src/external/mit/xorg/lib/gallium/Makefile:1.7
--- src/external/mit/xorg/lib/gallium/Makefile:1.6	Mon Jan  5 20:06:06 2015
+++ src/external/mit/xorg/lib/gallium/Makefile	Wed Sep 23 05:28:14 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2015/01/05 20:06:06 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2015/09/23 05:28:14 mrg Exp $
 
 # Link the gallium mega driver.
 
@@ -54,8 +54,6 @@ GALLIUM_SUBDIRS= \
 	winsys/sw/kms-dri \
 	state_trackers/dri
 
-GALLIUM_NAMES=	kms_swrast r600 swrant
-
 GALLIUM_SOURCES.auxiliary/cso_cache= \
 	cso_cache.c \
 	cso_context.c \



CVS commit: src/usr.bin/midirecord

2015-09-22 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Sep 23 05:31:01 UTC 2015

Modified Files:
src/usr.bin/midirecord: midirecord.1 midirecord.c

Log Message:
add "-R " option, to round beat counts to be aligned to
, which defaults to 1.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/midirecord/midirecord.1
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/midirecord/midirecord.c

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

Modified files:

Index: src/usr.bin/midirecord/midirecord.1
diff -u src/usr.bin/midirecord/midirecord.1:1.4 src/usr.bin/midirecord/midirecord.1:1.5
--- src/usr.bin/midirecord/midirecord.1:1.4	Mon Jun  8 06:33:35 2015
+++ src/usr.bin/midirecord/midirecord.1	Wed Sep 23 05:31:01 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: midirecord.1,v 1.4 2015/06/08 06:33:35 mrg Exp $
+.\"	$NetBSD: midirecord.1,v 1.5 2015/09/23 05:31:01 mrg Exp $
 .\"
 .\" Copyright (c) 1998, 1999, 2001, 2002, 2010 Matthew R. Green
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 30, 2014
+.Dd July 22, 2015
 .Dt MIDIRECORD 1
 .Os
 .Sh NAME
@@ -38,6 +38,7 @@
 .Op Fl d Ar devices
 .Op Fl f Ar sequencerdev
 .Op Fl n Ar notesperbeat
+.Op Fl R Ar roundbeats
 .Op Fl r Ar raw_output
 .Op Fl T Ar tempo
 .Op Fl t Ar time
@@ -87,6 +88,11 @@ Start the relative timer at process star
 the first event.
 .It Fl q
 Be quiet.
+.It Fl R Ar roundbeats
+Round timings to
+.Ar roundbeats
+of a note.
+Output will always be aligned to this many beats.
 .It Fl r Ar raw_output
 Create the raw output of the sequencer device in
 .Ar raw_output .

Index: src/usr.bin/midirecord/midirecord.c
diff -u src/usr.bin/midirecord/midirecord.c:1.9 src/usr.bin/midirecord/midirecord.c:1.10
--- src/usr.bin/midirecord/midirecord.c:1.9	Sun Jun 21 06:04:45 2015
+++ src/usr.bin/midirecord/midirecord.c	Wed Sep 23 05:31:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: midirecord.c,v 1.9 2015/06/21 06:04:45 mrg Exp $	*/
+/*	$NetBSD: midirecord.c,v 1.10 2015/09/23 05:31:01 mrg Exp $	*/
 
 /*
  * Copyright (c) 2014 Matthew R. Green
@@ -33,7 +33,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: midirecord.c,v 1.9 2015/06/21 06:04:45 mrg Exp $");
+__RCSID("$NetBSD: midirecord.c,v 1.10 2015/09/23 05:31:01 mrg Exp $");
 #endif
 
 #include 
@@ -72,6 +72,7 @@ static ssize_t	data_size;
 static struct timeval record_time;
 static struct timeval start_time;
 static int	tempo = 120;
+static unsigned	round_beats = 1;
 static unsigned	notes_per_beat = 24;
 static bool ignore_timer_fail = false;
 static bool stdout_mode = false;
@@ -144,6 +145,11 @@ main(int argc, char *argv[])
 		case 'r':
 			raw_output = optarg;
 			break;
+		case 'R':
+			decode_uint(optarg, &round_beats);
+			if (round_beats == 0)
+errx(1, "-R  must be a positive integer");
+			break;
 		case 't':
 			no_time_limit = 0;
 			decode_time(optarg, &record_time);
@@ -316,6 +322,7 @@ midi_event_timer_wait_abs_to_output(
 	size_t bufsize)
 {
 	static unsigned prev_div;
+	static int prev_leftover;
 	unsigned cur_div;
 	unsigned val = 0, xdiv;
 	int vallen = 0, i;
@@ -324,7 +331,15 @@ midi_event_timer_wait_abs_to_output(
 		prev_div = e.t_WAIT_ABS.divisions;
 	cur_div = e.t_WAIT_ABS.divisions;
 
-	xdiv = cur_div - prev_div;
+	xdiv = cur_div - prev_div + prev_leftover;
+	if (round_beats != 1) {
+		// round to closest
+		prev_leftover = xdiv % round_beats;
+		xdiv -= prev_leftover;
+		if (verbose)
+			fprintf(stderr, "adjusted beat value to %x (leftover = %d)\n",
+			xdiv, prev_leftover);
+	}
 	if (xdiv) {
 		while (xdiv) {
 			uint32_t extra = val ? 0x80 : 0;