diff options
Diffstat (limited to 'sys/dev/mii/mii_physubr.c')
-rw-r--r-- | sys/dev/mii/mii_physubr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index 34f50dd..07ea088 100644 --- a/sys/dev/mii/mii_physubr.c +++ b/sys/dev/mii/mii_physubr.c @@ -593,3 +593,15 @@ mii_phy_detach(device_t dev) 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); +} |