FreeBSD/sys/arm/at91/if_macb.c
/*
 * Notify the world which media we're using.
 */
Notify the world which media we're using.
Notify the world which media we ' re using .
static void
macb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
{
	struct macb_softc *sc = ifp->if_softc;
	struct mii_data *mii;
	mii = device_get_softc(sc->miibus);
	MACB_LOCK(sc);
	if ((ifp->if_flags & IFF_UP) == 0) {
		MACB_UNLOCK(sc);
		return;
	}
	mii_pollstat(mii);
	ifmr->ifm_active = mii->mii_media_active;
	ifmr->ifm_status = mii->mii_media_status;
	MACB_UNLOCK(sc);
}
static void macb_ifmedia_sts ( struct ifnet * ifp , struct ifmediareq * ifmr ) { struct macb_softc * sc = ifp -> if_softc ; struct mii_data * mii ; mii = device_get_softc ( sc -> miibus ) ; MACB_LOCK ( sc ) ; if ( ( ifp -> if_flags & IFF_UP ) == 0 ) { MACB_UNLOCK ( sc ) ; return ; } mii_pollstat ( mii ) ; ifmr -> ifm_active = mii -> mii_media_active ; ifmr -> ifm_status = mii -> mii_media_status ; MACB_UNLOCK ( sc ) ; }
Notify the world which media we're using.
Notify the world which media we ' re using .
/* Don't report link state if driver is not running. */