Module Name:    src
Committed By:   ozaki-r
Date:           Wed Jul 30 13:32:09 UTC 2014

Modified Files:
        src/sys/conf: files
        src/sys/net: if.c
Added Files:
        src/sys/rump/net/lib/libnetinet/opt: ether.h opt_wlan.h

Log Message:
Call etherinit from ifinit1 only when it is required

This unbreaks the builds of kernels that don't build if_ethersubr.c.


To generate a diff of this commit:
cvs rdiff -u -r1.1094 -r1.1095 src/sys/conf/files
cvs rdiff -u -r1.287 -r1.288 src/sys/net/if.c
cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnetinet/opt/ether.h \
    src/sys/rump/net/lib/libnetinet/opt/opt_wlan.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/conf/files
diff -u src/sys/conf/files:1.1094 src/sys/conf/files:1.1095
--- src/sys/conf/files:1.1094	Wed Jul 16 18:22:23 2014
+++ src/sys/conf/files	Wed Jul 30 13:32:09 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1094 2014/07/16 18:22:23 bouyer Exp $
+#	$NetBSD: files,v 1.1095 2014/07/30 13:32:09 ozaki-r Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1708,7 +1708,7 @@ file	net/bridgestp.c			bridge
 file	net/if_ecosubr.c		eco
 file	net/if_etherip.c		etherip			needs-flag
 file	net/if_ethersubr.c		ether | fddi | netatalk | token |
-					    wlan
+					    wlan		needs-flag
 file	net/if_faith.c			faith & (inet | inet6)	needs-flag
 file	net/if_fddisubr.c		fddi			needs-flag
 file	net/if_gif.c			gif			needs-flag

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.287 src/sys/net/if.c:1.288
--- src/sys/net/if.c:1.287	Tue Jul 29 05:56:58 2014
+++ src/sys/net/if.c	Wed Jul 30 13:32:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.287 2014/07/29 05:56:58 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.288 2014/07/30 13:32:09 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,12 +90,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.287 2014/07/29 05:56:58 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.288 2014/07/30 13:32:09 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
 #include "opt_atalk.h"
 #include "opt_natm.h"
+#include "opt_wlan.h"
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -138,6 +139,10 @@ __KERNEL_RCSID(0, "$NetBSD: if.c,v 1.287
 #include <netinet6/nd6.h>
 #endif
 
+#include "ether.h"
+#include "fddi.h"
+#include "token.h"
+
 #include "carp.h"
 #if NCARP > 0
 #include <netinet/ip_carp.h>
@@ -253,7 +258,9 @@ ifinit1(void)
 	if_pfil = pfil_head_create(PFIL_TYPE_IFNET, NULL);
 	KASSERT(if_pfil != NULL);
 
+#if NETHER > 0 || NFDDI > 0 || defined(NETATALK) || NTOKEN > 0 || defined(WLAN)
 	etherinit();
+#endif
 }
 
 ifnet_t *

Added files:

Index: src/sys/rump/net/lib/libnetinet/opt/ether.h
diff -u /dev/null src/sys/rump/net/lib/libnetinet/opt/ether.h:1.1
--- /dev/null	Wed Jul 30 13:32:09 2014
+++ src/sys/rump/net/lib/libnetinet/opt/ether.h	Wed Jul 30 13:32:09 2014
@@ -0,0 +1,3 @@
+/*	$NetBSD: ether.h,v 1.1 2014/07/30 13:32:09 ozaki-r Exp $	*/
+
+/* dummy */
Index: src/sys/rump/net/lib/libnetinet/opt/opt_wlan.h
diff -u /dev/null src/sys/rump/net/lib/libnetinet/opt/opt_wlan.h:1.1
--- /dev/null	Wed Jul 30 13:32:09 2014
+++ src/sys/rump/net/lib/libnetinet/opt/opt_wlan.h	Wed Jul 30 13:32:09 2014
@@ -0,0 +1,3 @@
+/*	$NetBSD: opt_wlan.h,v 1.1 2014/07/30 13:32:09 ozaki-r Exp $	*/
+
+/* dummy */

Reply via email to