From 589e5418f103139d46cdc6046939ebecffe852be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 1 Dec 2007 13:16:34 +0000 Subject: [PATCH] * We need to call if_init() before trying to set the media. * Accidently excluded the MII bus from being probed in r23019 - in fact, now all devices have to be probed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23038 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/compat/freebsd_network/compat.c | 2 +- src/libs/compat/freebsd_network/device.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/compat/freebsd_network/compat.c b/src/libs/compat/freebsd_network/compat.c index d89c3d8e2b..f29f16b3db 100644 --- a/src/libs/compat/freebsd_network/compat.c +++ b/src/libs/compat/freebsd_network/compat.c @@ -415,7 +415,7 @@ bus_generic_attach(device_t dev) MII_OUI(ma->mii_id1, ma->mii_id2), MII_MODEL(ma->mii_id2)); } else device_set_driver(child, driver); - } else if (child->driver != &miibus_driver) + } else child->methods.probe(child); if (child->driver != NULL) { diff --git a/src/libs/compat/freebsd_network/device.c b/src/libs/compat/freebsd_network/device.c index 95841c7058..97a538d04b 100644 --- a/src/libs/compat/freebsd_network/device.c +++ b/src/libs/compat/freebsd_network/device.c @@ -47,6 +47,8 @@ compat_open(const char *name, uint32 flags, void **cookie) return B_BUSY; } + ifp->if_init(ifp->if_softc); + ifp->if_flags &= ~IFF_UP; ifp->if_ioctl(ifp, SIOCSIFFLAGS, NULL); @@ -57,8 +59,6 @@ compat_open(const char *name, uint32 flags, void **cookie) ifp->if_flags |= IFF_UP; ifp->if_ioctl(ifp, SIOCSIFFLAGS, NULL); - ifp->if_init(ifp->if_softc); - *cookie = ifp; return B_OK; }