From owner-p4-projects@FreeBSD.ORG Fri Jan 9 11:05:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 929E716A4D1; Fri, 9 Jan 2004 11:05:58 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6CC8816A4CE for ; Fri, 9 Jan 2004 11:05:58 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 704B543D49 for ; Fri, 9 Jan 2004 11:05:57 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i09J5v0B041580 for ; Fri, 9 Jan 2004 11:05:57 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i09J5vwq041575 for perforce@freebsd.org; Fri, 9 Jan 2004 11:05:57 -0800 (PST) (envelope-from sam@freebsd.org) Date: Fri, 9 Jan 2004 11:05:57 -0800 (PST) Message-Id: <200401091905.i09J5vwq041575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 45021 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2004 19:05:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=45021 Change 45021 by sam@sam_ebb on 2004/01/09 11:05:28 revert change to suppress if_init calls; must do this in the 802.11 layer as there are too many assumptions elsewhere that ether_ioctl will call if_init each time Affected files ... .. //depot/projects/netperf+sockets/sys/net/if_ethersubr.c#4 edit Differences ... ==== //depot/projects/netperf+sockets/sys/net/if_ethersubr.c#4 (text+ko) ==== @@ -873,21 +873,12 @@ switch (command) { case SIOCSIFADDR: - /* - * NB: don't reset the interface unless it's - * being marked up for the first time. Calling - * the init method unncessarily can cause some - * devices to do lots of work (e.g. 802.11 where - * the station may reassociate). - */ + ifp->if_flags |= IFF_UP; + switch (ifa->ifa_addr->sa_family) { #ifdef INET case AF_INET: - if ((ifp->if_flags & IFF_UP) == 0) { - /* bring the interface up before arpwhohas */ - ifp->if_flags |= IFF_UP; - ifp->if_init(ifp->if_softc); - } + ifp->if_init(ifp->if_softc); /* before arpwhohas */ arp_ifinit(ifp, ifa); break; #endif @@ -895,7 +886,8 @@ /* * XXX - This code is probably wrong */ - case AF_IPX: { + case AF_IPX: + { struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); struct arpcom *ac = IFP2AC(ifp); @@ -908,14 +900,16 @@ (caddr_t) ac->ac_enaddr, sizeof(ac->ac_enaddr)); } - /* fall thru... */ - } + + /* + * Set new address + */ + ifp->if_init(ifp->if_softc); + break; + } #endif default: - if ((ifp->if_flags & IFF_UP) == 0) { - ifp->if_flags |= IFF_UP; - ifp->if_init(ifp->if_softc); - } + ifp->if_init(ifp->if_softc); break; } break;