FreeBSD/sys/dev/vxge/vxge.c
/*
 * vxge_media_status
 * Callback  for interface media settings
 */
vxge_media_status
Callback  for interface media settings
vxge_media_status Callback for interface media settings
void
vxge_media_status(ifnet_t ifp, struct ifmediareq *ifmr)
{
	vxge_dev_t *vdev = (vxge_dev_t *) ifp->if_softc;
	vxge_hal_device_t *hldev = vdev->devh;
	ifmr->ifm_status = IFM_AVALID;
	ifmr->ifm_active = IFM_ETHER;
	if (vxge_hal_device_link_state_get(hldev) == VXGE_HAL_LINK_UP) {
		ifmr->ifm_status |= IFM_ACTIVE;
		ifmr->ifm_active |= vdev->ifm_optics | IFM_FDX;
		if_link_state_change(ifp, LINK_STATE_UP);
	}
}
void vxge_media_status ( ifnet_t ifp , struct ifmediareq * ifmr ) { vxge_dev_t * vdev = ( vxge_dev_t * ) ifp -> if_softc ; vxge_hal_device_t * hldev = vdev -> devh ; ifmr -> ifm_status = IFM_AVALID ; ifmr -> ifm_active = IFM_ETHER ; if ( vxge_hal_device_link_state_get ( hldev ) == VXGE_HAL_LINK_UP ) { ifmr -> ifm_status |= IFM_ACTIVE ; ifmr -> ifm_active |= vdev -> ifm_optics | IFM_FDX ; if_link_state_change ( ifp , LINK_STATE_UP ) ; } }
vxge_media_status
 Callback  for interface media settings
vxge_media_status Callback for interface media settings
/* set link state */