Lines Matching refs:stats
17 u64 stats[1 + ETHTOOL_MAX_LANES]; member
72 fec_stats_recalc(struct fec_stat_grp *grp, struct ethtool_fec_stat *stats) in fec_stats_recalc() argument
76 if (stats->lanes[0] == ETHTOOL_STAT_NOT_SET) { in fec_stats_recalc()
77 grp->stats[0] = stats->total; in fec_stats_recalc()
78 grp->cnt = stats->total != ETHTOOL_STAT_NOT_SET; in fec_stats_recalc()
83 grp->stats[0] = 0; in fec_stats_recalc()
85 if (stats->lanes[i] == ETHTOOL_STAT_NOT_SET) in fec_stats_recalc()
88 grp->stats[0] += stats->lanes[i]; in fec_stats_recalc()
89 grp->stats[grp->cnt++] = stats->lanes[i]; in fec_stats_recalc()
113 struct ethtool_fec_stats stats; in fec_prepare_data() local
115 ethtool_stats_init((u64 *)&stats, sizeof(stats) / 8); in fec_prepare_data()
116 dev->ethtool_ops->get_fec_stats(dev, &stats); in fec_prepare_data()
118 fec_stats_recalc(&data->corr, &stats.corrected_blocks); in fec_prepare_data()
119 fec_stats_recalc(&data->uncorr, &stats.uncorrectable_blocks); in fec_prepare_data()
120 fec_stats_recalc(&data->corr_bits, &stats.corrected_bits); in fec_prepare_data()
177 data->corr.stats, ETHTOOL_A_FEC_STAT_PAD) || in fec_put_stats()
180 data->uncorr.stats, ETHTOOL_A_FEC_STAT_PAD) || in fec_put_stats()
183 data->corr_bits.stats, ETHTOOL_A_FEC_STAT_PAD)) in fec_put_stats()