Date: Fri, 9 Jan 2004 11:05:57 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 45021 for review Message-ID: <200401091905.i09J5vwq041575@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401091905.i09J5vwq041575>