> +     switch (media_type) {
> +     case HNAE3_MEDIA_TYPE_FIBER:
> +             cmd->base.port = PORT_FIBRE;
> +             supported_caps = HNS3_LM_FIBRE_BIT | HNS3_LM_AUTONEG_BIT |
> +                     HNS3_LM_PAUSE_BIT | HNS3_LM_40000BASELR4_FULL_BIT |
> +                     HNS3_LM_10000BASEKR_FULL_BIT |
> +                     HNS3_LM_1000BASET_FULL_BIT;
> +             /* TODO: add speed 100G/50G/25G when ethtool and linux kernel
> +              * is ready to support.

Linux already has:

linux/ethtool.h:        ETHTOOL_LINK_MODE_25000baseCR_Full_BIT  = 31,
linux/ethtool.h:        ETHTOOL_LINK_MODE_25000baseKR_Full_BIT  = 32,
linux/ethtool.h:        ETHTOOL_LINK_MODE_25000baseSR_Full_BIT  = 33,
linux/ethtool.h:        ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 34,
linux/ethtool.h:        ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 35,
linux/ethtool.h:        ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT  = 36,
linux/ethtool.h:        ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT  = 37,
linux/ethtool.h:        ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT  = 38,
linux/ethtool.h:        ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT    = 39,

        Andrew

Reply via email to