Add macros which follow the miidevs design pattern to make it easier
to construct tables for mii_phy_match.
This commit is contained in:
parent
4041bad612
commit
a1039f82ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150755
@ -161,6 +161,9 @@ struct mii_phydesc {
|
||||
u_int32_t mpd_model; /* the PHY's model */
|
||||
const char *mpd_name; /* the PHY's name */
|
||||
};
|
||||
#define MII_PHY_DESC(a, b) { MII_OUI_ ## a, MII_MODEL_ ## a ## _ ## b, \
|
||||
MII_STR_ ## a ## _ ## b }
|
||||
#define MII_PHY_END { 0, 0, NULL }
|
||||
|
||||
/*
|
||||
* An array of these structures map MII media types to BMCR/ANAR settings.
|
||||
|
@ -101,14 +101,9 @@ static int nsgphy_service(struct mii_softc *, struct mii_data *,int);
|
||||
static void nsgphy_status(struct mii_softc *);
|
||||
|
||||
const struct mii_phydesc gphyters[] = {
|
||||
{ MII_OUI_NATSEMI, MII_MODEL_NATSEMI_DP83861,
|
||||
MII_STR_NATSEMI_DP83861 },
|
||||
|
||||
{ MII_OUI_NATSEMI, MII_MODEL_NATSEMI_DP83891,
|
||||
MII_STR_NATSEMI_DP83891 },
|
||||
|
||||
{ 0, 0,
|
||||
NULL },
|
||||
MII_PHY_DESC(NATSEMI, DP83861),
|
||||
MII_PHY_DESC(NATSEMI, DP83891),
|
||||
MII_PHY_END
|
||||
};
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user