summaryrefslogtreecommitdiffstats
path: root/at76c50x-usb.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:34:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:34:36 +0000
commit74ebeae0b4c411df9900224b90a6072b16098458 (patch)
treefee8f5c9e37f1a9f0842e026876c8af541fa2e86 /at76c50x-usb.c
parentInitial commit. (diff)
downloadethtool-74ebeae0b4c411df9900224b90a6072b16098458.tar.xz
ethtool-74ebeae0b4c411df9900224b90a6072b16098458.zip
Adding upstream version 1:6.7.upstream/1%6.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'at76c50x-usb.c')
-rw-r--r--at76c50x-usb.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/at76c50x-usb.c b/at76c50x-usb.c
new file mode 100644
index 0000000..fad41bf
--- /dev/null
+++ b/at76c50x-usb.c
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include "internal.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 __maybe_unused,
+ 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;
+}
+