FreeBSD/sys/dev/vnic/thunder_bgx.c
/* Returns the current link status of LMAC */
Returns the current link status of LMAC
Returns the current link status of LMAC
void
bgx_get_lmac_link_state(int node, int bgx_idx, int lmacid, void *status)
{
	struct bgx_link_status *link = (struct bgx_link_status *)status;
	struct bgx *bgx;
	struct lmac *lmac;
	bgx = bgx_vnic[(node * MAX_BGX_PER_CN88XX) + bgx_idx];
	if (bgx == NULL)
		return;
	lmac = &bgx->lmac[lmacid];
	link->link_up = lmac->link_up;
	link->duplex = lmac->last_duplex;
	link->speed = lmac->last_speed;
}
void bgx_get_lmac_link_state ( int node , int bgx_idx , int lmacid , void * status ) { struct bgx_link_status * link = ( struct bgx_link_status * ) status ; struct bgx * bgx ; struct lmac * lmac ; bgx = bgx_vnic [ ( node * MAX_BGX_PER_CN88XX ) + bgx_idx ] ; if ( bgx == NULL ) return ; lmac = & bgx -> lmac [ lmacid ] ; link -> link_up = lmac -> link_up ; link -> duplex = lmac -> last_duplex ; link -> speed = lmac -> last_speed ; }
Returns the current link status of LMAC
Returns the current link status of LMAC