diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-02-14 12:10:03 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-02-14 12:10:03 +0000 |
| commit | efd19b8fd01ab0d5b10c78c8eddbd9bed512b11f (patch) | |
| tree | 9ba2b71cf1d58835c6cc2982582bfcdbba49433c /sys/dev | |
| parent | 4bb97cfa93ab447ba8945e6498acc4415449e354 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/mii/mii.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index c640e1358eba9..25110687b6c2c 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -240,9 +240,20 @@ static void miibus_statchg(device_t dev) { device_t parent; + struct mii_data *mii; + struct ifnet *ifp; parent = device_get_parent(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); return; } |
