summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2007-10-18 04:52:38 +0000
committerBrad Smith <brad@cvs.openbsd.org>2007-10-18 04:52:38 +0000
commit61ed6ee3d12786c43d897c0b38397e9be0dc5553 (patch)
tree69a46aff5a4fdc10bbdfabb68e6192633a5b904f /sys/dev
parent05df80d8037fbf389d5d310f7baa287dfedb6efe (diff)
Eliminate unnecessary resets when calling the SIOCSIFADDR ioctl.
Tested by todd@ ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/if_ex.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c
index 3b91b23fc5c..7e27552cccf 100644
--- a/sys/dev/isa/if_ex.c
+++ b/sys/dev/isa/if_ex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ex.c,v 1.28 2007/10/06 06:35:57 brad Exp $ */
+/* $OpenBSD: if_ex.c,v 1.29 2007/10/18 04:52:37 brad Exp $ */
/*
* Copyright (c) 1997, Donald A. Schmidt
* Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
@@ -748,18 +748,12 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFADDR:
DODEBUG(Start_End, printf("SIOCSIFADDR"););
ifp->if_flags |= IFF_UP;
-
- switch(ifa->ifa_addr->sa_family) {
+ if (!(ifp->if_flags & IFF_RUNNING))
+ ex_init(sc);
#ifdef INET
- case AF_INET:
- ex_init(sc);
- arp_ifinit((struct arpcom *) ifp, ifa);
- break;
+ if (ifa->ifa_addr->sa_family == AF_INET)
+ arp_ifinit(&sc->arpcom, ifa);
#endif
- default:
- ex_init(sc);
- break;
- }
break;
case SIOCSIFFLAGS:
DODEBUG(Start_End, printf("SIOCSIFFLAGS"););