From: "Nikhil P. Rao" ionic_get_fecparam() fills fec->fec with the constant ETHTOOL_FEC_OFF | ETHTOOL_FEC_RS | ETHTOOL_FEC_BASER. The uAPI defines fec as the configured FEC modes, so a port configured for RS reports all three: Supported/Configured FEC encodings: Off RS BaseR where it should report RS alone. Take fec->fec from config.fec_type. Supported modes belong in ETHTOOL_GLINKSETTINGS, which ionic_get_link_ksettings() already fills. fec->active_fec still reads config.fec_type; reporting the operational mode is a separate change. Fixes: e95f922f4c2f ("ionic: implement ethtool set-fec") Signed-off-by: Nikhil P. Rao Signed-off-by: Eric Joyner --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index 119ac720c078..317dbf96964e 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -427,17 +427,18 @@ static int ionic_get_fecparam(struct net_device *netdev, switch (lif->ionic->idev.port_info->config.fec_type) { case IONIC_PORT_FEC_TYPE_NONE: fec->active_fec = ETHTOOL_FEC_OFF; + fec->fec = ETHTOOL_FEC_OFF; break; case IONIC_PORT_FEC_TYPE_RS: fec->active_fec = ETHTOOL_FEC_RS; + fec->fec = ETHTOOL_FEC_RS; break; case IONIC_PORT_FEC_TYPE_FC: fec->active_fec = ETHTOOL_FEC_BASER; + fec->fec = ETHTOOL_FEC_BASER; break; } - fec->fec = ETHTOOL_FEC_OFF | ETHTOOL_FEC_RS | ETHTOOL_FEC_BASER; - return 0; } -- 2.53.0