Author: imp Date: Wed Mar 17 22:45:53 2010 New Revision: 205270 URL: http://svn.freebsd.org/changeset/base/205270
Log: Remove two instances of the evil hack to get the ifnet. mii_ifp is set early enough that we don't need to do these hacks anymore. Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Mar 17 22:45:09 2010 (r205269) +++ head/sys/dev/mii/mii.c Wed Mar 17 22:45:53 2010 (r205270) @@ -259,13 +259,7 @@ miibus_statchg(device_t dev) MIIBUS_STATCHG(parent); mii = device_get_softc(dev); - - /* - * Note that each NIC's softc must start with an ifnet pointer. - * XXX: EVIL HACK! - */ - ifp = *(struct ifnet **)device_get_softc(parent); - ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); + mii->mii_ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); return; } @@ -288,11 +282,7 @@ miibus_linkchg(device_t dev) link_state = LINK_STATE_DOWN; } else link_state = LINK_STATE_UNKNOWN; - /* - * Note that each NIC's softc must start with an ifnet pointer. - * XXX: EVIL HACK! - */ - if_link_state_change(*(struct ifnet**)device_get_softc(parent), link_state); + if_link_state_change(mii->mii_ifp, link_state); } static void _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"