diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2005-06-11 00:20:38 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2005-06-11 00:20:38 +0000 |
| commit | f32e678d0c1aa1a206356341f79c698cd270b146 (patch) | |
| tree | 309c3062f0a7521de5c1216e25221b33657a0085 /sys/dev/mii | |
| parent | faefda0be0d31df09ced636bb637cf42b2dfbb5e (diff) | |
Notes
Diffstat (limited to 'sys/dev/mii')
| -rw-r--r-- | sys/dev/mii/mii.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 51e2ffc9d1cb..c640e1358eba 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -172,9 +172,10 @@ miibus_attach(device_t dev) mii = device_get_softc(dev); /* - * Note that each NIC's softc must start with an ifnet structure. + * Note that each NIC's softc must start with an ifnet pointer. + * XXX: EVIL HACK! */ - mii->mii_ifp = device_get_softc(device_get_parent(dev)); + mii->mii_ifp = *(struct ifnet**)device_get_softc(device_get_parent(dev)); v = device_get_ivars(dev); ifmedia_upd = v[0]; ifmedia_sts = v[1]; @@ -265,9 +266,10 @@ miibus_linkchg(device_t dev) } else link_state = LINK_STATE_UNKNOWN; /* - * Note that each NIC's softc must start with an ifnet structure. + * Note that each NIC's softc must start with an ifnet pointer. + * XXX: EVIL HACK! */ - if_link_state_change(device_get_softc(parent), link_state); + if_link_state_change(*(struct ifnet**)device_get_softc(parent), link_state); } static void |
