Lines Matching refs:emac
20 void emac_update_hardware_stats(struct prueth_emac *emac) in emac_update_hardware_stats() argument
22 struct prueth *prueth = emac->prueth; in emac_update_hardware_stats()
23 int slice = prueth_emac_slice(emac); in emac_update_hardware_stats()
40 emac->stats[i] += val; in emac_update_hardware_stats()
42 emac->stats[i] -= tx_pkt_cnt * 8; in emac_update_hardware_stats()
51 emac->pa_stats[i] += val; in emac_update_hardware_stats()
58 struct prueth_emac *emac = container_of(work, struct prueth_emac, in icssg_stats_work_handler() local
60 emac_update_hardware_stats(emac); in icssg_stats_work_handler()
62 queue_delayed_work(system_long_wq, &emac->stats_work, in icssg_stats_work_handler()
63 msecs_to_jiffies((STATS_TIME_LIMIT_1G_MS * 1000) / emac->speed)); in icssg_stats_work_handler()
67 int emac_get_stat_by_name(struct prueth_emac *emac, char *stat_name) in emac_get_stat_by_name() argument
73 return emac->stats[icssg_all_miig_stats[i].offset / sizeof(u32)]; in emac_get_stat_by_name()
76 if (emac->prueth->pa_stats) { in emac_get_stat_by_name()
79 return emac->pa_stats[icssg_all_pa_stats[i].offset / sizeof(u32)]; in emac_get_stat_by_name()
83 netdev_err(emac->ndev, "Invalid stats %s\n", stat_name); in emac_get_stat_by_name()