FreeBSD/sys/dev/cxgb/cxgb_main.c
/*
 * Translates phy->modtype to the correct Ethernet media subtype.
 */
Translates phy->modtype to the correct Ethernet media subtype.
Translates phy - > modtype to the correct Ethernet media subtype .
static int
cxgb_ifm_type(int mod)
{
	switch (mod) {
	case phy_modtype_sr:
		return (IFM_10G_SR);
	case phy_modtype_lr:
		return (IFM_10G_LR);
	case phy_modtype_lrm:
		return (IFM_10G_LRM);
	case phy_modtype_twinax:
		return (IFM_10G_TWINAX);
	case phy_modtype_twinax_long:
		return (IFM_10G_TWINAX_LONG);
	case phy_modtype_none:
		return (IFM_NONE);
	case phy_modtype_unknown:
		return (IFM_UNKNOWN);
	}
	KASSERT(0, ("%s: modtype %d unknown", __func__, mod));
	return (IFM_UNKNOWN);
}
static int cxgb_ifm_type ( int mod ) { switch ( mod ) { case phy_modtype_sr : return ( IFM_10G_SR ) ; case phy_modtype_lr : return ( IFM_10G_LR ) ; case phy_modtype_lrm : return ( IFM_10G_LRM ) ; case phy_modtype_twinax : return ( IFM_10G_TWINAX ) ; case phy_modtype_twinax_long : return ( IFM_10G_TWINAX_LONG ) ; case phy_modtype_none : return ( IFM_NONE ) ; case phy_modtype_unknown : return ( IFM_UNKNOWN ) ; } KASSERT ( 0 , ( " " , __func__ , mod ) ) ; return ( IFM_UNKNOWN ) ; }
Translates phy->modtype to the correct Ethernet media subtype.
Translates phy - > modtype to the correct Ethernet media subtype .