Date: Sat, 27 Mar 2004 19:18:16 +0100 From: Vincent Jardin <vjardin@free.fr> To: Bruce M Simpson <bms@spc.org>, Dirk-Willem van Gulik <dirkx@asemantics.com> Cc: freebsd-hackers@freebsd.org Subject: Re: events when (de)associating or when cable is (un)plugged Message-ID: <200403271918.18032.vjardin@free.fr> In-Reply-To: <20040327175645.GC90316@empiric.dek.spc.org> References: <39FE23FA-7F75-11D8-8F99-000A95CDA38A@webweaving.org> <BA068B86-7F97-11D8-8F99-000A95CDA38A@asemantics.com> <20040327175645.GC90316@empiric.dek.spc.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403271918.18032.vjardin>