PERFORCE change 45021 for review
Sam Leffler
sam at FreeBSD.org
Fri Jan 9 11:05:59 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=45021
Change 45021 by sam at 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;
More information about the p4-projects
mailing list