diff options
Diffstat (limited to 'sys/dev/mii/mii_physubr.c')
-rw-r--r-- | sys/dev/mii/mii_physubr.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index 42351ab959b..de21e2be9fb 100644 --- a/sys/dev/mii/mii_physubr.c +++ b/sys/dev/mii/mii_physubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mii_physubr.c,v 1.21 2004/10/09 02:17:03 brad Exp $ */ +/* $OpenBSD: mii_physubr.c,v 1.22 2004/11/18 16:15:33 brad Exp $ */ /* $NetBSD: mii_physubr.c,v 1.20 2001/04/13 23:30:09 thorpej Exp $ */ /*- @@ -511,6 +511,18 @@ mii_phy_detach(struct device *self, int flags) return (0); } +const struct mii_phydesc * +mii_phy_match(const struct mii_attach_args *ma, const struct mii_phydesc *mpd) +{ + + for (; mpd->mpd_name != NULL; mpd++) { + if (MII_OUI(ma->mii_id1, ma->mii_id2) == mpd->mpd_oui && + MII_MODEL(ma->mii_id2) == mpd->mpd_model) + return (mpd); + } + return (NULL); +} + /* * Given an ifmedia word, return the corresponding ANAR value. */ |