summaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-10-29 10:45:04 -0700
committerDavid S. Miller <davem@davemloft.net>2014-10-30 14:54:11 -0400
commit3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2 (patch)
treecf917d9d31b285c559c8cdead7b33fa78e70e265 /include/net/dsa.h
parent33b43df40a3827365ff80fae79f7c59c107508d3 (diff)
downloadlinux-3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2.tar.bz2
net: dsa: Add support for reading switch registers with ethtool
Add support for reading switch registers with 'ethtool -d'. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 37856a28c8d3..ed3c34bbb67a 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -268,6 +268,13 @@ struct dsa_switch_driver {
struct ethtool_eeprom *eeprom, u8 *data);
int (*set_eeprom)(struct dsa_switch *ds,
struct ethtool_eeprom *eeprom, u8 *data);
+
+ /*
+ * Register access.
+ */
+ int (*get_regs_len)(struct dsa_switch *ds, int port);
+ void (*get_regs)(struct dsa_switch *ds, int port,
+ struct ethtool_regs *regs, void *p);
};
void register_switch_driver(struct dsa_switch_driver *type);