Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/ic/lance.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/ic/lance.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.39.20.2 retrieving revision 1.40 diff -u -p -r1.39.20.2 -r1.40 --- src/sys/dev/ic/lance.c 2009/01/17 13:28:55 1.39.20.2 +++ src/sys/dev/ic/lance.c 2008/04/04 12:25:07 1.40 @@ -1,4 +1,4 @@ -/* $NetBSD: lance.c,v 1.39.20.2 2009/01/17 13:28:55 mjf Exp $ */ +/* $NetBSD: lance.c,v 1.40 2008/04/04 12:25:07 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -16,6 +16,13 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -65,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.39.20.2 2009/01/17 13:28:55 mjf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.40 2008/04/04 12:25:07 tsutsui Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -543,25 +550,31 @@ lance_ioctl(struct ifnet *ifp, u_long cm s = splnet(); switch (cmd) { - case SIOCGIFMEDIA: - case SIOCSIFMEDIA: - error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd); + case SIOCSIFADDR: + case SIOCSIFFLAGS: + error = ether_ioctl(ifp, cmd, data); break; - default: - if ((error = ether_ioctl(ifp, cmd, data)) != ENETRESET) - break; - error = 0; - if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI) - break; - if (ifp->if_flags & IFF_RUNNING) { + case SIOCADDMULTI: + case SIOCDELMULTI: + if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) { /* * Multicast list has changed; set the hardware filter * accordingly. */ - lance_reset(sc); + if (ifp->if_flags & IFF_RUNNING) + lance_reset(sc); + error = 0; } break; + case SIOCGIFMEDIA: + case SIOCSIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd); + break; + + default: + error = EINVAL; + break; } splx(s);