21 #include <linux/netdevice.h>
22 #include <linux/ethtool.h>
23 #include <linux/pci.h>
31 } ethtool_stats_keys[] = {
35 {
"rx-broadcast-packets" },
36 {
"rx-multicast-packets" },
38 {
"rx-undersize-errors" },
39 {
"rx-oversize-errors" },
40 {
"rx-short-fragment-errors" },
41 {
"rx-jabber-errors" },
42 {
"rx-64-byte-packets" },
43 {
"rx-65-127-byte-packets" },
44 {
"rx-128-255-byte-packets" },
45 {
"rx-256-511-byte-packets" },
46 {
"rx-512-1023-byte-packets" },
47 {
"rx-1024-1518-byte-packets" },
48 {
"rx-pause-frames" },
51 {
"tx-broadcast-packets" },
52 {
"tx-multicast-packets" },
54 {
"tx-late-collisions" },
55 {
"tx-excessive-collisions" },
57 {
"tx-undersize-errors" },
58 {
"tx-oversize-errors" },
59 {
"tx-64-byte-packets" },
60 {
"tx-65-127-byte-packets" },
61 {
"tx-128-255-byte-packets" },
62 {
"tx-256-511-byte-packets" },
63 {
"tx-512-1023-byte-packets" },
64 {
"tx-1024-1518-byte-packets" },
68 pasemi_mac_ethtool_get_settings(
struct net_device *netdev,
81 pasemi_mac_ethtool_set_settings(
struct net_device *netdev,
94 pasemi_mac_ethtool_get_msglevel(
struct net_device *netdev)
101 pasemi_mac_ethtool_set_msglevel(
struct net_device *netdev,
110 pasemi_mac_ethtool_get_ringparam(
struct net_device *netdev,
121 static int pasemi_mac_get_sset_count(
struct net_device *netdev,
int sset)
131 static void pasemi_mac_get_ethtool_stats(
struct net_device *netdev,
139 for (i = 0; i < 32; i++)
143 static void pasemi_mac_get_strings(
struct net_device *netdev,
u32 stringset,
146 memcpy(data, ethtool_stats_keys,
sizeof(ethtool_stats_keys));
150 .get_settings = pasemi_mac_ethtool_get_settings,
151 .set_settings = pasemi_mac_ethtool_set_settings,
152 .get_msglevel = pasemi_mac_ethtool_get_msglevel,
153 .set_msglevel = pasemi_mac_ethtool_set_msglevel,
155 .get_ringparam = pasemi_mac_ethtool_get_ringparam,
156 .get_strings = pasemi_mac_get_strings,
157 .get_sset_count = pasemi_mac_get_sset_count,
158 .get_ethtool_stats = pasemi_mac_get_ethtool_stats,