Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb use the proper station nodeid read ...
details: https://anonhg.NetBSD.org/src/rev/0d4a01d936b1
branches: trunk
changeset: 318510:0d4a01d936b1
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 27 12:04:23 2018 +0000
description:
use the proper station nodeid read command.
diffstat:
sys/dev/usb/if_axe.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diffs (57 lines):
diff -r f0cdb4a71acf -r 0d4a01d936b1 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c Fri Apr 27 09:55:27 2018 +0000
+++ b/sys/dev/usb/if_axe.c Fri Apr 27 12:04:23 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.88 2018/04/22 20:32:27 christos Exp $ */
+/* $NetBSD: if_axe.c,v 1.89 2018/04/27 12:04:23 christos Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.88 2018/04/22 20:32:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.89 2018/04/27 12:04:23 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -526,6 +526,8 @@
static void
axe_ax_init(struct axe_softc *sc)
{
+ int cmd = AXE_178_CMD_READ_NODEID;
+
if (sc->axe_flags & AX178) {
axe_ax88178_init(sc);
} else if (sc->axe_flags & AX772) {
@@ -534,6 +536,14 @@
axe_ax88772a_init(sc);
} else if (sc->axe_flags & AX772B) {
axe_ax88772b_init(sc);
+ return;
+ } else {
+ cmd = AXE_172_CMD_READ_NODEID;
+ }
+
+ if (axe_cmd(sc, cmd, 0, 0, sc->axe_enaddr)) {
+ aprint_error_dev(sc->axe_dev,
+ "failed to read ethernet address\n");
}
}
@@ -980,14 +990,6 @@
axe_ax_init(sc);
- if ((sc->axe_flags & AX772B) != 0) {
- if (axe_cmd(sc, AXE_172_CMD_READ_NODEID, 0, 0, sc->axe_enaddr))
- {
- aprint_error_dev(self,
- "failed to read ethernet address\n");
- }
- }
-
/*
* Fetch IPG values.
*/
Home |
Main Index |
Thread Index |
Old Index