summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2023-04-07 06:33:50 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2023-04-07 06:33:50 +0000
commitd0eae993bf9722c3a769734bb6b5d8eb7f13bd07 (patch)
tree6f2c66aa4d88bd53fb27fa148b0db94ff1bad115 /sys/dev
parent717dd959cc09ee1f9a13518a8394b4211effb353 (diff)
register a mapping of dwqe interfaces to ofw nodes/phandles.
ok kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/fdt/if_dwqe_fdt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/fdt/if_dwqe_fdt.c b/sys/dev/fdt/if_dwqe_fdt.c
index 5eb6aed3020..b4a66dead99 100644
--- a/sys/dev/fdt/if_dwqe_fdt.c
+++ b/sys/dev/fdt/if_dwqe_fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dwqe_fdt.c,v 1.6 2023/04/06 00:09:39 dlg Exp $ */
+/* $OpenBSD: if_dwqe_fdt.c,v 1.7 2023/04/07 06:33:49 dlg Exp $ */
/*
* Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org>
* Copyright (c) 2017, 2022 Patrick Wildt <patrick@blueri.se>
@@ -88,6 +88,7 @@ dwqe_fdt_attach(struct device *parent, struct device *self, void *aux)
struct fdt_attach_args *faa = aux;
uint32_t phy, phy_supply;
uint32_t axi_config;
+ struct ifnet *ifp;
int i, node;
sc->sc_node = faa->fa_node;
@@ -210,6 +211,11 @@ dwqe_fdt_attach(struct device *parent, struct device *self, void *aux)
dwqe_intr, sc, sc->sc_dev.dv_xname);
if (sc->sc_ih == NULL)
printf("%s: can't establish interrupt\n", sc->sc_dev.dv_xname);
+
+ ifp = &sc->sc_ac.ac_if;
+ sc->sc_ifd.if_node = faa->fa_node;
+ sc->sc_ifd.if_ifp = ifp;
+ if_register(&sc->sc_ifd);
}
void