From c1af44178cfaeb865f6ed1f6d00439edaa7b00d1 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Wed, 23 Dec 2009 09:29:47 -0500 Subject: ethtool: add support for at76c50x-usb driver Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik --- at76c50x-usb.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 at76c50x-usb.c (limited to 'at76c50x-usb.c') diff --git a/at76c50x-usb.c b/at76c50x-usb.c new file mode 100644 index 0000000..4c2a1a8 --- /dev/null +++ b/at76c50x-usb.c @@ -0,0 +1,32 @@ +#include +#include "ethtool-util.h" + +static char *hw_versions[] = { + "503_ISL3861", + "503_ISL3863", + " 503", + " 503_ACC", + " 505", + " 505_2958", + " 505A", + " 505AMX", +}; + +int +at76c50x_usb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) +{ + u8 version = (u8)(regs->version >> 24); + u8 rev_id = (u8)(regs->version); + char *ver_string; + + if (version != 0) + return -1; + + ver_string = hw_versions[rev_id]; + fprintf(stdout, + "Hardware Version %s\n", + ver_string); + + return 0; +} + -- cgit v1.2.1