mask, names);
 }
 
+static void efx_ef10_get_fec_stats(struct efx_nic *efx,
+                                  struct ethtool_fec_stats *fec_stats)
+{
+       DECLARE_BITMAP(mask, EF10_STAT_COUNT);
+       struct efx_ef10_nic_data *nic_data = efx->nic_data;
+       u64 *stats = nic_data->stats;
+
+       efx_ef10_get_stat_mask(efx, mask);
+       if (test_bit(EF10_STAT_fec_corrected_errors, mask))
+               fec_stats->corrected_blocks.total =
+                       stats[EF10_STAT_fec_corrected_errors];
+       if (test_bit(EF10_STAT_fec_uncorrected_errors, mask))
+               fec_stats->uncorrectable_blocks.total =
+                       stats[EF10_STAT_fec_uncorrected_errors];
+}
+
 static size_t efx_ef10_update_stats_common(struct efx_nic *efx, u64 *full_stats,
                                           struct rtnl_link_stats64 *core_stats)
 {
        .get_wol = efx_ef10_get_wol,
        .set_wol = efx_ef10_set_wol,
        .resume_wol = efx_port_dummy_op_void,
+       .get_fec_stats = efx_ef10_get_fec_stats,
        .test_chip = efx_ef10_test_chip,
        .test_nvram = efx_mcdi_nvram_test_all,
        .mcdi_request = efx_ef10_mcdi_request,
 
        return efx->type->set_wol(efx, wol->wolopts);
 }
 
+static void efx_ethtool_get_fec_stats(struct net_device *net_dev,
+                                     struct ethtool_fec_stats *fec_stats)
+{
+       struct efx_nic *efx = netdev_priv(net_dev);
+
+       if (efx->type->get_fec_stats)
+               efx->type->get_fec_stats(efx, fec_stats);
+}
+
 static int efx_ethtool_get_ts_info(struct net_device *net_dev,
                                   struct ethtool_ts_info *ts_info)
 {
        .get_module_eeprom      = efx_ethtool_get_module_eeprom,
        .get_link_ksettings     = efx_ethtool_get_link_ksettings,
        .set_link_ksettings     = efx_ethtool_set_link_ksettings,
+       .get_fec_stats          = efx_ethtool_get_fec_stats,
        .get_fecparam           = efx_ethtool_get_fecparam,
        .set_fecparam           = efx_ethtool_set_fecparam,
 };
 
  * @get_wol: Get WoL configuration from driver state
  * @set_wol: Push WoL configuration to the NIC
  * @resume_wol: Synchronise WoL state between driver and MC (e.g. after resume)
+ * @get_fec_stats: Get standard FEC statistics.
  * @test_chip: Test registers.  May use efx_farch_test_registers(), and is
  *     expected to reset the NIC.
  * @test_nvram: Test validity of NVRAM contents
        void (*get_wol)(struct efx_nic *efx, struct ethtool_wolinfo *wol);
        int (*set_wol)(struct efx_nic *efx, u32 type);
        void (*resume_wol)(struct efx_nic *efx);
+       void (*get_fec_stats)(struct efx_nic *efx,
+                             struct ethtool_fec_stats *fec_stats);
        unsigned int (*check_caps)(const struct efx_nic *efx,
                                   u8 flag,
                                   u32 offset);