summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2006-12-13 09:50:00 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2006-12-13 09:50:00 +0000
commit36085ce04666fe86affa70ee3feef72bb6360942 (patch)
tree688ea772d4d2344818caf3d104b9851a0b3da5ce /sys/dev
parent1822c03e0119506f93b0225555c4af71fc3ce813 (diff)
eliminate unnecessary interface resets in fxp_ioctl()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/fxp.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 1f6d4ff1879..bf28075906c 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.81 2006/11/05 02:47:01 brad Exp $ */
+/* $OpenBSD: fxp.c,v 1.82 2006/12/13 09:49:59 martin Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -1651,18 +1651,12 @@ fxp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
switch (command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
-
- switch (ifa->ifa_addr->sa_family) {
-#ifdef INET
- case AF_INET:
+ if (!(ifp->if_flags & IFF_RUNNING))
fxp_init(sc);
+#ifdef INET
+ if (ifa->ifa_addr->sa_family == AF_INET)
arp_ifinit(&sc->sc_arpcom, ifa);
- break;
#endif
- default:
- fxp_init(sc);
- break;
- }
break;
case SIOCSIFMTU: