Commit 84d3c83e authored by Somnath Kotur's avatar Somnath Kotur Committed by David S. Miller
Browse files

bnxt_en: Fix active FEC reporting to ethtool



ethtool --show-fec <interface> does not show anything when the Active
FEC setting in the chip is set to None.  Fix it to properly return
ETHTOOL_FEC_OFF in that case.

Fixes: 8b277589 ("bnxt_en: Report FEC settings to ethtool.")
Signed-off-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8940e6b6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1969,6 +1969,9 @@ static int bnxt_get_fecparam(struct net_device *dev,
	case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE:
		fec->active_fec |= ETHTOOL_FEC_LLRS;
		break;
	case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_NONE_ACTIVE:
		fec->active_fec |= ETHTOOL_FEC_OFF;
		break;
	}
	return 0;
}