events when (de)associating or when cable is (un)plugged
Vincent Jardin
vjardin at free.fr
Sat Mar 27 10:13:06 PST 2004
See NetBSD mii source code too:
They announce when a cable is plugged and unplugged on the routing socket.
mii_physubr.c
...
void
mii_phy_update(struct mii_softc *sc, int cmd)
{
struct mii_data *mii = sc->mii_pdata;
int announce, s;
if (sc->mii_media_active != mii->mii_media_active ||
sc->mii_media_status != mii->mii_media_status ||
cmd == MII_MEDIACHG) {
announce = mii_phy_statusmsg(sc);
(*mii->mii_statchg)(sc->mii_dev.dv_parent);
sc->mii_media_active = mii->mii_media_active;
sc->mii_media_status = mii->mii_media_status;
if (announce) {
s = splnet();
rt_ifmsg(mii->mii_ifp);
splx(s);
}
}
}
Regards,
Vincent
On Saturday 27 March 2004 18:56, Bruce M Simpson wrote:
> On Sat, Mar 27, 2004 at 03:37:44AM +0100, Dirk-Willem van Gulik wrote:
> > Suleiman,
> >
> > Thanks for all the help - I just hacked up the patch below and took
> > http://green.homeunix.org/~green/linkwatcher.c for testing. I also
> > had to add the LINKUP/DOWN in some non-mii using ethernet
> > cards (as only miibus(4) seems to issue this event).
>
> Nice! I'll take a more indepth look at this when less pressed. Keep on
> hacking. Would be nice to hook up with the WirelessLeiden folks too...
>
> Good stuff,
> BMS
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-hackers
mailing list