FreeBSD/sys/dev/ixl/if_ixlv.c
/*********************************************************************
 *
 *  Media Ioctl callback
 *
 *  This routine is called when the user changes speed/duplex using
 *  media/mediopt option with ifconfig.
 *
 **********************************************************************/
Media Ioctl callback
This routine is called when the user changes speed/duplex using
media/mediopt option with ifconfig.
Media Ioctl callback This routine is called when the user changes speed / duplex using media / mediopt option with ifconfig .
static int
ixlv_media_change(struct ifnet * ifp)
{
	struct ixl_vsi *vsi = ifp->if_softc;
	struct ifmedia *ifm = &vsi->media;
	INIT_DBG_IF(ifp, "begin");
	if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
		return (EINVAL);
	INIT_DBG_IF(ifp, "end");
	return (0);
}
static int ixlv_media_change ( struct ifnet * ifp ) { struct ixl_vsi * vsi = ifp -> if_softc ; struct ifmedia * ifm = & vsi -> media ; INIT_DBG_IF ( ifp , " " ) ; if ( IFM_TYPE ( ifm -> ifm_media ) != IFM_ETHER ) return ( EINVAL ) ; INIT_DBG_IF ( ifp , " " ) ; return ( 0 ) ; }
Media Ioctl callback
  This routine is called when the user changes speed/duplex using
  media/mediopt option with ifconfig.
Media Ioctl callback This routine is called when the user changes speed / duplex using media / mediopt option with ifconfig .